Add E0369 error explanation

This commit is contained in:
Guillaume Gomez 2015-08-10 15:48:02 +02:00
parent 2f84173f2c
commit 8ef395fb7f

View File

@ -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 `<op>` 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