Skip to content

Commit e872464

Browse files
---
yaml --- r: 233646 b: refs/heads/beta c: 8ef395f h: refs/heads/master v: v3
1 parent d02c98c commit e872464

File tree

2 files changed

+23
-2
lines changed

2 files changed

+23
-2
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ refs/tags/0.9: 36870b185fc5f5486636d4515f0e22677493f225
2323
refs/tags/0.10: ac33f2b15782272ae348dbd7b14b8257b2148b5a
2424
refs/tags/0.11.0: e1247cb1d0d681be034adb4b558b5a0c0d5720f9
2525
refs/tags/0.12.0: f0c419429ef30723ceaf6b42f9b5a2aeb5d2e2d1
26-
refs/heads/beta: 2f84173f2c359041d364579d17a1adc8c6569a44
26+
refs/heads/beta: 8ef395fb7fba3b38e4b6aa4ff0d4b0db1524ee47
2727
refs/tags/1.0.0-alpha: e42bd6d93a1d3433c486200587f8f9e12590a4d7
2828
refs/heads/tmp: 370fe2786109360f7c35b8ba552b83b773dd71d6
2929
refs/tags/1.0.0-alpha.2: 4c705f6bc559886632d3871b04f58aab093bfa2f

branches/beta/src/librustc_typeck/diagnostics.rs

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2585,6 +2585,28 @@ to change this.
25852585
[RFC 953]: https://github.com/rust-lang/rfcs/pull/953
25862586
"##,
25872587

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+
25882610
E0371: r##"
25892611
When `Trait2` is a subtrait of `Trait1` (for example, when `Trait2` has a
25902612
definition like `trait Trait2: Trait1 { ... }`), it is not allowed to implement
@@ -2773,7 +2795,6 @@ register_diagnostics! {
27732795
E0325, // implemented an associated type when another trait item expected
27742796
E0328, // cannot implement Unsize explicitly
27752797
E0329, // associated const depends on type parameter or Self.
2776-
E0369, // binary operation `<op>` cannot be applied to types
27772798
E0370, // discriminant overflow
27782799
E0374, // the trait `CoerceUnsized` may only be implemented for a coercion
27792800
// between structures with one field being coerced, none found

0 commit comments

Comments
 (0)