Skip to content

Commit

Permalink
Properly worded diagnostic message
Browse files Browse the repository at this point in the history
  • Loading branch information
oli-obk committed Dec 18, 2018
1 parent 6ca2ad5 commit b678238
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/librustc_mir/transform/qualify_consts.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1340,7 +1340,7 @@ impl MirPass for QualifyAndPromoteConstants {
let mut error = tcx.sess.struct_span_err(
span,
&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",
mode,
),
Expand Down
4 changes: 2 additions & 2 deletions src/test/ui/consts/const_short_circuit.stderr
Original file line number Diff line number Diff line change
@@ -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
|
LL | let mut x = true && false;
Expand All @@ -10,7 +10,7 @@ note: use of `&&` operator here
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
|
LL | let x = true && false;
Expand Down

0 comments on commit b678238

Please sign in to comment.