mirror of
https://github.com/rust-lang/rust.git
synced 2025-04-28 11:07:42 +00:00
Properly worded diagnostic message
This commit is contained in:
parent
6ca2ad5844
commit
b678238070
@ -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,
|
||||||
),
|
),
|
||||||
|
@ -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;
|
||||||
|
Loading…
Reference in New Issue
Block a user