Skip to content

Commit bda57d8

Browse files
---
yaml --- r: 232647 b: refs/heads/try c: 8ef395f h: refs/heads/master i: 232645: 70c3c27 232643: a1aa6d8 232639: 935e43a v: v3
1 parent b5dee26 commit bda57d8

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
@@ -1,7 +1,7 @@
11
---
22
refs/heads/master: edeb4f1c86cbf6af8ef9874d4b3af50f721ea1b8
33
refs/heads/snap-stage3: 1af31d4974e33027a68126fa5a5a3c2c6491824f
4-
refs/heads/try: 2f84173f2c359041d364579d17a1adc8c6569a44
4+
refs/heads/try: 8ef395fb7fba3b38e4b6aa4ff0d4b0db1524ee47
55
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
66
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
77
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503

branches/try/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)