diff options
| author | Guillaume Gomez <guillaume1.gomez@gmail.com> | 2015-08-10 15:48:02 +0200 |
|---|---|---|
| committer | Guillaume Gomez <guillaume1.gomez@gmail.com> | 2015-08-15 12:22:45 +0200 |
| commit | 8ef395fb7fba3b38e4b6aa4ff0d4b0db1524ee47 (patch) | |
| tree | 21d8e424e918980aaf3352cef988a0d5fd158c89 | |
| parent | 2f84173f2c359041d364579d17a1adc8c6569a44 (diff) | |
| download | rust-8ef395fb7fba3b38e4b6aa4ff0d4b0db1524ee47.tar.gz rust-8ef395fb7fba3b38e4b6aa4ff0d4b0db1524ee47.zip | |
Add E0369 error explanation
| -rw-r--r-- | src/librustc_typeck/diagnostics.rs | 23 |
1 files changed, 22 insertions, 1 deletions
diff --git a/src/librustc_typeck/diagnostics.rs b/src/librustc_typeck/diagnostics.rs index 2f10245bd26..4fdd0fde366 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 `<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 |
