Rollup merge of #62703 - fakenine:normalize_use_of_backticks_compiler_messages_p6, r=eddyb
normalize use of backticks in compiler messages for libsyntax/parse https://github.com/rust-lang/rust/issues/60532
This commit is contained in:
commit
94b16d4bd0
@ -226,7 +226,7 @@ fn parse_attribute_with_inner_parse_policy(&mut self,
|
||||
|
||||
fn parse_unsuffixed_lit(&mut self) -> PResult<'a, ast::Lit> {
|
||||
let lit = self.parse_lit()?;
|
||||
debug!("Checking if {:?} is unusuffixed.", lit);
|
||||
debug!("checking if {:?} is unusuffixed", lit);
|
||||
|
||||
if !lit.node.is_unsuffixed() {
|
||||
let msg = "suffixed literals are not allowed in attributes";
|
||||
|
@ -919,7 +919,7 @@ pub fn unexpected_try_recover(
|
||||
Applicability::MaybeIncorrect,
|
||||
);
|
||||
} else {
|
||||
err.note("#![feature(type_ascription)] lets you annotate an \
|
||||
err.note("`#![feature(type_ascription)]` lets you annotate an \
|
||||
expression with a type: `<expr>: <type>`")
|
||||
.span_note(
|
||||
lhs_span,
|
||||
|
@ -443,7 +443,7 @@ fn scan_comment(&mut self) -> Option<Token> {
|
||||
|
||||
let is_beginning_of_file = self.pos == self.source_file.start_pos;
|
||||
if is_beginning_of_file {
|
||||
debug!("Skipping a shebang");
|
||||
debug!("skipping a shebang");
|
||||
let start = self.pos;
|
||||
while !self.ch_is('\n') && !self.is_eof() {
|
||||
self.bump();
|
||||
|
@ -89,7 +89,7 @@ error: expected type, found `4`
|
||||
LL | println!("{}", a: &mut 4);
|
||||
| ^ expecting a type here because of type ascription
|
||||
|
|
||||
= note: #![feature(type_ascription)] lets you annotate an expression with a type: `<expr>: <type>`
|
||||
= note: `#![feature(type_ascription)]` lets you annotate an expression with a type: `<expr>: <type>`
|
||||
note: this expression expects an ascribed type after the colon
|
||||
--> $DIR/issue-22644.rs:34:20
|
||||
|
|
||||
|
@ -4,7 +4,7 @@ error: expected type, found `42`
|
||||
LL | Test::Drill(field: 42);
|
||||
| ^^ expecting a type here because of type ascription
|
||||
|
|
||||
= note: #![feature(type_ascription)] lets you annotate an expression with a type: `<expr>: <type>`
|
||||
= note: `#![feature(type_ascription)]` lets you annotate an expression with a type: `<expr>: <type>`
|
||||
note: this expression expects an ascribed type after the colon
|
||||
--> $DIR/issue-34255-1.rs:8:17
|
||||
|
|
||||
|
@ -14,7 +14,7 @@ error: expected type, found keyword `loop`
|
||||
LL | loop { break 'label: loop { break 'label 42; }; }
|
||||
| ^^^^ expecting a type here because of type ascription
|
||||
|
|
||||
= note: #![feature(type_ascription)] lets you annotate an expression with a type: `<expr>: <type>`
|
||||
= note: `#![feature(type_ascription)]` lets you annotate an expression with a type: `<expr>: <type>`
|
||||
note: this expression expects an ascribed type after the colon
|
||||
--> $DIR/lifetime_starts_expressions.rs:6:12
|
||||
|
|
||||
|
@ -4,7 +4,7 @@ error: expected type, found `3`
|
||||
LL | let x = Enum::Foo(a: 3, b: 4);
|
||||
| ^ expecting a type here because of type ascription
|
||||
|
|
||||
= note: #![feature(type_ascription)] lets you annotate an expression with a type: `<expr>: <type>`
|
||||
= note: `#![feature(type_ascription)]` lets you annotate an expression with a type: `<expr>: <type>`
|
||||
note: this expression expects an ascribed type after the colon
|
||||
--> $DIR/recover-from-bad-variant.rs:7:23
|
||||
|
|
||||
|
@ -12,7 +12,7 @@ error: expected type, found `0`
|
||||
LL | println!("test"): 0;
|
||||
| ^ expecting a type here because of type ascription
|
||||
|
|
||||
= note: #![feature(type_ascription)] lets you annotate an expression with a type: `<expr>: <type>`
|
||||
= note: `#![feature(type_ascription)]` lets you annotate an expression with a type: `<expr>: <type>`
|
||||
note: this expression expects an ascribed type after the colon
|
||||
--> $DIR/type-ascription-instead-of-statement-end.rs:9:5
|
||||
|
|
||||
|
Loading…
Reference in New Issue
Block a user