Skip to content

Commit b678238

Browse files
committed
Properly worded diagnostic message
1 parent 6ca2ad5 commit b678238

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/librustc_mir/transform/qualify_consts.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1340,7 +1340,7 @@ impl MirPass for QualifyAndPromoteConstants {
13401340
let mut error = tcx.sess.struct_span_err(
13411341
span,
13421342
&format!(
1343-
"new features like let bindings are not permitted in {} \
1343+
"new features like let bindings are not permitted in {}s \
13441344
which also use short circuiting operators",
13451345
mode,
13461346
),

src/test/ui/consts/const_short_circuit.stderr

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
error: new features like let bindings are not permitted in constant which also use short circuiting operators
1+
error: new features like let bindings are not permitted in constants which also use short circuiting operators
22
--> $DIR/const_short_circuit.rs:6:9
33
|
44
LL | let mut x = true && false;
@@ -10,7 +10,7 @@ note: use of `&&` operator here
1010
LL | let mut x = true && false;
1111
| ^^
1212

13-
error: new features like let bindings are not permitted in constant which also use short circuiting operators
13+
error: new features like let bindings are not permitted in constants which also use short circuiting operators
1414
--> $DIR/const_short_circuit.rs:11:9
1515
|
1616
LL | let x = true && false;

0 commit comments

Comments
 (0)