]> git.lizzy.rs Git - rust.git/blobdiff - src/librustc_const_eval/diagnostics.rs
Change for-loop desugar to not borrow the iterator during the loop
[rust.git] / src / librustc_const_eval / diagnostics.rs
index 04fc3e68c8ccd9033f3fd0226cfc10e6fe4967b0..4fc7ef8035eb54d777351cb8cc2745957a5a1f69 100644 (file)
@@ -452,12 +452,14 @@ enum Method { GET, POST }
 
 
 E0297: r##"
+#### Note: this error code is no longer emitted by the compiler.
+
 Patterns used to bind names must be irrefutable. That is, they must guarantee
 that a name will be extracted in all cases. Instead of pattern matching the
 loop variable, consider using a `match` or `if let` inside the loop body. For
 instance:
 
-```compile_fail,E0297
+```compile_fail,E0005
 let xs : Vec<Option<i32>> = vec![Some(1), None];
 
 // This fails because `None` is not covered.