From 903bcb84a1f3a9d042810b3e04b874ebf9a12216 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cyryl=20P=C5=82otnicki-Chudyk?= Date: Sun, 20 Mar 2016 16:09:54 +0100 Subject: [PATCH] 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. --- src/librustc_typeck/diagnostics.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/librustc_typeck/diagnostics.rs b/src/librustc_typeck/diagnostics.rs index 19cfc13ea615c..300868721e3ab 100644 --- a/src/librustc_typeck/diagnostics.rs +++ b/src/librustc_typeck/diagnostics.rs @@ -3167,8 +3167,8 @@ x <<= 2; 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! ```