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),
}
}
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
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
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
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