]> git.lizzy.rs Git - rust.git/commitdiff
normalize use of backticks in compiler messages for librustc/hir
authorSamy Kacimi <samy.kacimi@protonmail.ch>
Sun, 21 Jul 2019 13:51:43 +0000 (15:51 +0200)
committerSamy Kacimi <samy.kacimi@protonmail.ch>
Sun, 21 Jul 2019 14:54:33 +0000 (16:54 +0200)
https://github.com/rust-lang/rust/issues/60532

src/librustc/hir/def_id.rs
src/librustc/hir/lowering.rs
src/test/ui/feature-gates/feature-gate-associated_type_bounds.stderr
src/test/ui/feature-gates/feature-gate-impl_trait_in_bindings.stderr
src/test/ui/impl-trait/where-allowed.stderr

index debed38361a1453371546f962f022a6cfc6fef42..057d878a0ab8dc58b64959adc08fa5daa68471c6 100644 (file)
@@ -69,14 +69,14 @@ pub fn from_u32(x: u32) -> CrateNum {
     pub fn as_usize(self) -> usize {
         match self {
             CrateNum::Index(id) => id.as_usize(),
-            _ => bug!("tried to get index of nonstandard crate {:?}", self),
+            _ => bug!("tried to get index of non-standard crate {:?}", self),
         }
     }
 
     pub fn as_u32(self) -> u32 {
         match self {
             CrateNum::Index(id) => id.as_u32(),
-            _ => bug!("tried to get index of nonstandard crate {:?}", self),
+            _ => bug!("tried to get index of non-standard crate {:?}", self),
         }
     }
 
index c228bc2cf6b8c33d22bbba60258c93e0c84a5f4e..288fd2714e251a054e7d92aea0b560241049d97f 100644 (file)
@@ -1693,8 +1693,8 @@ fn lower_ty_direct(&mut self, t: &Ty, mut itctx: ImplTraitContext<'_>) -> hir::T
                         if pos == ImplTraitPosition::Binding &&
                             nightly_options::is_nightly_build() {
                             help!(err,
-                                  "add #![feature(impl_trait_in_bindings)] to the crate attributes \
-                                   to enable");
+                                  "add `#![feature(impl_trait_in_bindings)]` to the crate \
+                                   attributes to enable");
                         }
                         err.emit();
                         hir::TyKind::Err
index cd74916bea48a8a18b41dee659da983a79d4edb2..84af2a0163ae44dbc6948aa69624f88e7bfb11bc 100644 (file)
@@ -121,7 +121,7 @@ error[E0562]: `impl Trait` not allowed outside of function and inherent method r
 LL | const _cdef: impl Tr1<As1: Copy> = S1;
    |              ^^^^^^^^^^^^^^^^^^^
    |
-   = help: add #![feature(impl_trait_in_bindings)] to the crate attributes to enable
+   = help: add `#![feature(impl_trait_in_bindings)]` to the crate attributes to enable
 
 error[E0562]: `impl Trait` not allowed outside of function and inherent method return types
   --> $DIR/feature-gate-associated_type_bounds.rs:60:15
@@ -129,7 +129,7 @@ error[E0562]: `impl Trait` not allowed outside of function and inherent method r
 LL | static _sdef: impl Tr1<As1: Copy> = S1;
    |               ^^^^^^^^^^^^^^^^^^^
    |
-   = help: add #![feature(impl_trait_in_bindings)] to the crate attributes to enable
+   = help: add `#![feature(impl_trait_in_bindings)]` to the crate attributes to enable
 
 error[E0562]: `impl Trait` not allowed outside of function and inherent method return types
   --> $DIR/feature-gate-associated_type_bounds.rs:67:12
@@ -137,7 +137,7 @@ error[E0562]: `impl Trait` not allowed outside of function and inherent method r
 LL |     let _: impl Tr1<As1: Copy> = S1;
    |            ^^^^^^^^^^^^^^^^^^^
    |
-   = help: add #![feature(impl_trait_in_bindings)] to the crate attributes to enable
+   = help: add `#![feature(impl_trait_in_bindings)]` to the crate attributes to enable
 
 error: aborting due to 16 previous errors
 
index a54e7e1b3bfd12f39c7dea7877382503da3784de..bd648b40590ef7549cd191c0b2f47675b64fd64c 100644 (file)
@@ -10,7 +10,7 @@ error[E0562]: `impl Trait` not allowed outside of function and inherent method r
 LL | const FOO: impl Copy = 42;
    |            ^^^^^^^^^
    |
-   = help: add #![feature(impl_trait_in_bindings)] to the crate attributes to enable
+   = help: add `#![feature(impl_trait_in_bindings)]` to the crate attributes to enable
 
 error[E0562]: `impl Trait` not allowed outside of function and inherent method return types
   --> $DIR/feature-gate-impl_trait_in_bindings.rs:4:13
@@ -18,7 +18,7 @@ error[E0562]: `impl Trait` not allowed outside of function and inherent method r
 LL | static BAR: impl Copy = 42;
    |             ^^^^^^^^^
    |
-   = help: add #![feature(impl_trait_in_bindings)] to the crate attributes to enable
+   = help: add `#![feature(impl_trait_in_bindings)]` to the crate attributes to enable
 
 error: aborting due to 3 previous errors
 
index e7a8430faeac5c2e5e887d0742c58104ce5c401d..9895b028a4e26a61fcef6df6f8a2c13537da93c6 100644 (file)
@@ -232,7 +232,7 @@ error[E0562]: `impl Trait` not allowed outside of function and inherent method r
 LL |     let _in_local_variable: impl Fn() = || {};
    |                             ^^^^^^^^^
    |
-   = help: add #![feature(impl_trait_in_bindings)] to the crate attributes to enable
+   = help: add `#![feature(impl_trait_in_bindings)]` to the crate attributes to enable
 
 error[E0562]: `impl Trait` not allowed outside of function and inherent method return types
   --> $DIR/where-allowed.rs:222:46