diff --git a/src/librustc_typeck/diagnostics.rs b/src/librustc_typeck/diagnostics.rs index 2f10245bd26b..4fdd0fde366e 100644 --- a/src/librustc_typeck/diagnostics.rs +++ b/src/librustc_typeck/diagnostics.rs @@ -2585,6 +2585,28 @@ to change this. [RFC 953]: https://github.com/rust-lang/rfcs/pull/953 "##, +E0369: r##" +A binary operation was attempted on a type which doesn't support it. +Erroneous code example: + +``` +let x = 12f32; // error: binary operation `<<` cannot be applied to + // type `f32` + +x << 2; +``` + +To fix this error, please check this type implements this binary operation. +Example: + +``` +let x = 12u32; // the `u32` type does implement it: + // https://doc.rust-lang.org/stable/std/ops/trait.Shl.html + +x << 2; // ok! +``` +"##, + E0371: r##" When `Trait2` is a subtrait of `Trait1` (for example, when `Trait2` has a definition like `trait Trait2: Trait1 { ... }`), it is not allowed to implement @@ -2773,7 +2795,6 @@ register_diagnostics! { E0325, // implemented an associated type when another trait item expected E0328, // cannot implement Unsize explicitly E0329, // associated const depends on type parameter or Self. - E0369, // binary operation `` cannot be applied to types E0370, // discriminant overflow E0374, // the trait `CoerceUnsized` may only be implemented for a coercion // between structures with one field being coerced, none found