about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorSteve Klabnik <steve@steveklabnik.com>2016-03-21 11:46:53 -0400
committerSteve Klabnik <steve@steveklabnik.com>2016-03-21 11:46:53 -0400
commit29b09087c8f5c47bd2f593d3e9d153dfa4dd3974 (patch)
treeeb28a538335a73edf62e2a9fded8d8bc069dca11 /src
parent078b288ebd2261f700e8551f841bfd6396fcf9c5 (diff)
parent903bcb84a1f3a9d042810b3e04b874ebf9a12216 (diff)
downloadrust-29b09087c8f5c47bd2f593d3e9d153dfa4dd3974.tar.gz
rust-29b09087c8f5c47bd2f593d3e9d153dfa4dd3974.zip
Rollup merge of #32376 - cyplo:cyplo_fix_E0368_documentation, r=steveklabnik
Documentation fix for E0368

Made the 'good' example compile.

I got to the [E0368 error page](https://doc.rust-lang.org/error-index.html#E0368) 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.

On the other hand the docstring contained `compile_fail` flag, which might indicate that this was intentional.
I am also assuming here that the `Rust Compiler Error Index` page is generated from the file I changed.

Please let me know what do you think. Thanks a lot !
Diffstat (limited to 'src')
-rw-r--r--src/librustc_typeck/diagnostics.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/librustc_typeck/diagnostics.rs b/src/librustc_typeck/diagnostics.rs
index 19cfc13ea61..300868721e3 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!
 ```