Properly worded diagnostic message

This commit is contained in:
Oliver Scherer 2018-12-18 09:16:56 +01:00
parent 6ca2ad5844
commit b678238070
2 changed files with 3 additions and 3 deletions

View File

@ -1340,7 +1340,7 @@ impl MirPass for QualifyAndPromoteConstants {
let mut error = tcx.sess.struct_span_err( let mut error = tcx.sess.struct_span_err(
span, span,
&format!( &format!(
"new features like let bindings are not permitted in {} \ "new features like let bindings are not permitted in {}s \
which also use short circuiting operators", which also use short circuiting operators",
mode, mode,
), ),

View File

@ -1,4 +1,4 @@
error: new features like let bindings are not permitted in constant which also use short circuiting operators error: new features like let bindings are not permitted in constants which also use short circuiting operators
--> $DIR/const_short_circuit.rs:6:9 --> $DIR/const_short_circuit.rs:6:9
| |
LL | let mut x = true && false; LL | let mut x = true && false;
@ -10,7 +10,7 @@ note: use of `&&` operator here
LL | let mut x = true && false; LL | let mut x = true && false;
| ^^ | ^^
error: new features like let bindings are not permitted in constant which also use short circuiting operators error: new features like let bindings are not permitted in constants which also use short circuiting operators
--> $DIR/const_short_circuit.rs:11:9 --> $DIR/const_short_circuit.rs:11:9
| |
LL | let x = true && false; LL | let x = true && false;