Skip to content

Commit 903bcb8

Browse files
committed
Documentation fix for E0368
Made the 'good' example compile. I got to the E0368 error page by following the link in the output of the compiler. My understanding is that the first example is 'bad' and the second one is 'good'. Following that logic, I pasted the second example into the file and to my surprise it did not compile. This commit fixes the example to make it paste-able.
1 parent 173676e commit 903bcb8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/librustc_typeck/diagnostics.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3167,8 +3167,8 @@ x <<= 2;
31673167
To fix this error, please check that this type implements this binary
31683168
operation. Example:
31693169
3170-
```compile_fail
3171-
let x = 12u32; // the `u32` type does implement the `ShlAssign` trait
3170+
```
3171+
let mut x = 12u32; // the `u32` type does implement the `ShlAssign` trait
31723172
31733173
x <<= 2; // ok!
31743174
```

0 commit comments

Comments
 (0)