]> git.lizzy.rs Git - rust.git/commitdiff
normalize use of backticks in compiler messages for libsyntax/parse
authorSamy Kacimi <samy.kacimi@protonmail.ch>
Mon, 15 Jul 2019 21:23:39 +0000 (23:23 +0200)
committerSamy Kacimi <samy.kacimi@protonmail.ch>
Mon, 15 Jul 2019 22:07:30 +0000 (00:07 +0200)
https://github.com/rust-lang/rust/issues/60532

src/libsyntax/parse/attr.rs
src/libsyntax/parse/diagnostics.rs
src/libsyntax/parse/lexer/mod.rs
src/test/ui/issues/issue-22644.stderr
src/test/ui/issues/issue-34255-1.stderr
src/test/ui/lifetime_starts_expressions.stderr
src/test/ui/parser/recover-from-bad-variant.stderr
src/test/ui/type/type-ascription-instead-of-statement-end.stderr

index b28d48b9445fdcd6c66a9db199bd988f0ee2dbef..1758d0b0bb947781bcef87b8afa132918f53a351 100644 (file)
@@ -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";
index 676c87f9daa3d413e36b24167f59aa7cd4d55c03..0e88a0ee289378ff3353d269a3d014c65f2ec897 100644 (file)
@@ -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,
index d0c4e8d6a5634b6bbbc09b8f252605141423bdc7..7be8e57c7f87fdaa7fb536e9601846b902489cad 100644 (file)
@@ -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();
index cf36953546549c10e1d64d3f7c91d16c84062986..4f0dc0a48876507581ba75d6a65186fb6d590477 100644 (file)
@@ -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
    |
index 01f395377701751b7d82e155c205c5154d52954f..0218a7abeaa4c8a4e6a39a433ac1fdc6f56aa646 100644 (file)
@@ -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
    |
index 8ae8018c2ff25f41d8018b21593eb9b1c35440b3..84e4c87ebc4daa215f691aeb408debbc5188d2e8 100644 (file)
@@ -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
    |
index 150d74f07428d97cf519db0d0457604c84e89713..d525bd3f4c6e5fee5e26c4b8466c158d3f282cfa 100644 (file)
@@ -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
    |
index 4929922c83fe6c0338d333e31f76149e547e3ad0..1f8989db81412856a61c3e4a9c45ee12ccfb085f 100644 (file)
@@ -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
    |