File tree Expand file tree Collapse file tree 1 file changed +22
-1
lines changed Expand file tree Collapse file tree 1 file changed +22
-1
lines changed 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