Remove redundant backtick in error message.
The value passed in already has backticks surrounding the text.
This commit is contained in:
parent
ed084b0b83
commit
004f4f389e
@ -927,7 +927,7 @@ impl<'a> Parser<'a> {
|
|||||||
return Ok(());
|
return Ok(());
|
||||||
}
|
}
|
||||||
let sm = self.sess.source_map();
|
let sm = self.sess.source_map();
|
||||||
let msg = format!("expected `;`, found `{}`", super::token_descr(&self.token));
|
let msg = format!("expected `;`, found {}", super::token_descr(&self.token));
|
||||||
let appl = Applicability::MachineApplicable;
|
let appl = Applicability::MachineApplicable;
|
||||||
if self.token.span == DUMMY_SP || self.prev_token.span == DUMMY_SP {
|
if self.token.span == DUMMY_SP || self.prev_token.span == DUMMY_SP {
|
||||||
// Likely inside a macro, can't provide meaningful suggestions.
|
// Likely inside a macro, can't provide meaningful suggestions.
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
error: expected `;`, found ``}``
|
error: expected `;`, found `}`
|
||||||
--> $DIR/issue-3036.rs:5:14
|
--> $DIR/issue-3036.rs:5:14
|
||||||
|
|
|
|
||||||
LL | let x = 3
|
LL | let x = 3
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
error: expected `;`, found `keyword `let``
|
error: expected `;`, found keyword `let`
|
||||||
--> $DIR/recover-missing-semi.rs:2:22
|
--> $DIR/recover-missing-semi.rs:2:22
|
||||||
|
|
|
|
||||||
LL | let _: usize = ()
|
LL | let _: usize = ()
|
||||||
@ -7,7 +7,7 @@ LL | let _: usize = ()
|
|||||||
LL | let _ = 3;
|
LL | let _ = 3;
|
||||||
| --- unexpected token
|
| --- unexpected token
|
||||||
|
|
||||||
error: expected `;`, found `keyword `return``
|
error: expected `;`, found keyword `return`
|
||||||
--> $DIR/recover-missing-semi.rs:9:22
|
--> $DIR/recover-missing-semi.rs:9:22
|
||||||
|
|
|
|
||||||
LL | let _: usize = ()
|
LL | let _: usize = ()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user