Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

normalize use of backticks in compiler messages for librustc/hir #62853

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/librustc/hir/def_id.rs
Original file line number Diff line number Diff line change
Expand Up @@ -69,14 +69,14 @@ impl 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),
}
}

Expand Down
4 changes: 2 additions & 2 deletions src/librustc/hir/lowering.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1693,8 +1693,8 @@ impl<'a> LoweringContext<'a> {
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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -121,23 +121,23 @@ 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
|
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
|
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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,15 @@ 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
|
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

Expand Down
2 changes: 1 addition & 1 deletion src/test/ui/impl-trait/where-allowed.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down