normalize use of backticks in compiler messages for librustc/hir
https://github.com/rust-lang/rust/issues/60532
This commit is contained in:
parent
83dfe7b27c
commit
51ee196235
5 changed files with 10 additions and 10 deletions
|
@ -69,14 +69,14 @@ impl CrateNum {
|
||||||
pub fn as_usize(self) -> usize {
|
pub fn as_usize(self) -> usize {
|
||||||
match self {
|
match self {
|
||||||
CrateNum::Index(id) => id.as_usize(),
|
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 {
|
pub fn as_u32(self) -> u32 {
|
||||||
match self {
|
match self {
|
||||||
CrateNum::Index(id) => id.as_u32(),
|
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),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1693,8 +1693,8 @@ impl<'a> LoweringContext<'a> {
|
||||||
if pos == ImplTraitPosition::Binding &&
|
if pos == ImplTraitPosition::Binding &&
|
||||||
nightly_options::is_nightly_build() {
|
nightly_options::is_nightly_build() {
|
||||||
help!(err,
|
help!(err,
|
||||||
"add #![feature(impl_trait_in_bindings)] to the crate attributes \
|
"add `#![feature(impl_trait_in_bindings)]` to the crate \
|
||||||
to enable");
|
attributes to enable");
|
||||||
}
|
}
|
||||||
err.emit();
|
err.emit();
|
||||||
hir::TyKind::Err
|
hir::TyKind::Err
|
||||||
|
|
|
@ -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;
|
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
|
error[E0562]: `impl Trait` not allowed outside of function and inherent method return types
|
||||||
--> $DIR/feature-gate-associated_type_bounds.rs:60:15
|
--> $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;
|
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
|
error[E0562]: `impl Trait` not allowed outside of function and inherent method return types
|
||||||
--> $DIR/feature-gate-associated_type_bounds.rs:67:12
|
--> $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;
|
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
|
error: aborting due to 16 previous errors
|
||||||
|
|
||||||
|
|
|
@ -10,7 +10,7 @@ error[E0562]: `impl Trait` not allowed outside of function and inherent method r
|
||||||
LL | const FOO: impl Copy = 42;
|
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
|
error[E0562]: `impl Trait` not allowed outside of function and inherent method return types
|
||||||
--> $DIR/feature-gate-impl_trait_in_bindings.rs:4:13
|
--> $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;
|
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
|
error: aborting due to 3 previous errors
|
||||||
|
|
||||||
|
|
|
@ -232,7 +232,7 @@ error[E0562]: `impl Trait` not allowed outside of function and inherent method r
|
||||||
LL | let _in_local_variable: impl Fn() = || {};
|
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
|
error[E0562]: `impl Trait` not allowed outside of function and inherent method return types
|
||||||
--> $DIR/where-allowed.rs:222:46
|
--> $DIR/where-allowed.rs:222:46
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue