]> git.lizzy.rs Git - rust.git/commitdiff
Documentation fix for E0368
authorCyryl Płotnicki-Chudyk <cyplo@cyplo.net>
Sun, 20 Mar 2016 15:09:54 +0000 (16:09 +0100)
committerCyryl Płotnicki-Chudyk <cyplo@cyplo.net>
Sun, 20 Mar 2016 18:27:00 +0000 (19:27 +0100)
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.

src/librustc_typeck/diagnostics.rs

index 19cfc13ea615c03ca237e15bd951107693a11d05..300868721e3ab2f1d230cfaefc3a6c9d5a446045 100644 (file)
@@ -3167,8 +3167,8 @@ fn drop(&mut self) {}
 To fix this error, please check that this type implements this binary
 operation. Example:
 
-```compile_fail
-let x = 12u32; // the `u32` type does implement the `ShlAssign` trait
+```
+let mut x = 12u32; // the `u32` type does implement the `ShlAssign` trait
 
 x <<= 2; // ok!
 ```