File tree Expand file tree Collapse file tree 2 files changed +23
-2
lines changed
branches/beta/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 @@ -23,7 +23,7 @@ refs/tags/0.9: 36870b185fc5f5486636d4515f0e22677493f225
23
23
refs/tags/0.10: ac33f2b15782272ae348dbd7b14b8257b2148b5a
24
24
refs/tags/0.11.0: e1247cb1d0d681be034adb4b558b5a0c0d5720f9
25
25
refs/tags/0.12.0: f0c419429ef30723ceaf6b42f9b5a2aeb5d2e2d1
26
- refs/heads/beta: 2f84173f2c359041d364579d17a1adc8c6569a44
26
+ refs/heads/beta: 8ef395fb7fba3b38e4b6aa4ff0d4b0db1524ee47
27
27
refs/tags/1.0.0-alpha: e42bd6d93a1d3433c486200587f8f9e12590a4d7
28
28
refs/heads/tmp: 370fe2786109360f7c35b8ba552b83b773dd71d6
29
29
refs/tags/1.0.0-alpha.2: 4c705f6bc559886632d3871b04f58aab093bfa2f
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