File tree Expand file tree Collapse file tree 2 files changed +23
-2
lines changed
branches/try/src/librustc_typeck Expand file tree Collapse file tree 2 files changed +23
-2
lines changed Original file line number Diff line number Diff line change 1
1
---
2
2
refs/heads/master: edeb4f1c86cbf6af8ef9874d4b3af50f721ea1b8
3
3
refs/heads/snap-stage3: 1af31d4974e33027a68126fa5a5a3c2c6491824f
4
- refs/heads/try: 2f84173f2c359041d364579d17a1adc8c6569a44
4
+ refs/heads/try: 8ef395fb7fba3b38e4b6aa4ff0d4b0db1524ee47
5
5
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
6
6
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
7
7
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503
Original file line number Diff line number Diff line change @@ -2585,6 +2585,28 @@ to change this.
2585
2585
[RFC 953]: https://github.com/rust-lang/rfcs/pull/953
2586
2586
"## ,
2587
2587
2588
+ E0369 : r##"
2589
+ A binary operation was attempted on a type which doesn't support it.
2590
+ Erroneous code example:
2591
+
2592
+ ```
2593
+ let x = 12f32; // error: binary operation `<<` cannot be applied to
2594
+ // type `f32`
2595
+
2596
+ x << 2;
2597
+ ```
2598
+
2599
+ To fix this error, please check this type implements this binary operation.
2600
+ Example:
2601
+
2602
+ ```
2603
+ let x = 12u32; // the `u32` type does implement it:
2604
+ // https://doc.rust-lang.org/stable/std/ops/trait.Shl.html
2605
+
2606
+ x << 2; // ok!
2607
+ ```
2608
+ "## ,
2609
+
2588
2610
E0371 : r##"
2589
2611
When `Trait2` is a subtrait of `Trait1` (for example, when `Trait2` has a
2590
2612
definition like `trait Trait2: Trait1 { ... }`), it is not allowed to implement
@@ -2773,7 +2795,6 @@ register_diagnostics! {
2773
2795
E0325 , // implemented an associated type when another trait item expected
2774
2796
E0328 , // cannot implement Unsize explicitly
2775
2797
E0329 , // associated const depends on type parameter or Self.
2776
- E0369 , // binary operation `<op>` cannot be applied to types
2777
2798
E0370 , // discriminant overflow
2778
2799
E0374 , // the trait `CoerceUnsized` may only be implemented for a coercion
2779
2800
// between structures with one field being coerced, none found
You can’t perform that action at this time.
0 commit comments