From fead1d5634f8badb0dd8436032334916bfdff7e4 Mon Sep 17 00:00:00 2001 From: rickdewater Date: Mon, 7 Oct 2024 22:35:54 +0200 Subject: [PATCH 01/21] Add LowerExp and UpperExp implementations Mark the new fmt impls with the correct rust version Clean up the fmt macro and format the tests --- library/core/src/num/nonzero.rs | 46 +++++++++++++++++++++------------ library/core/tests/nonzero.rs | 11 ++++++++ 2 files changed, 41 insertions(+), 16 deletions(-) diff --git a/library/core/src/num/nonzero.rs b/library/core/src/num/nonzero.rs index e5c9a7e086ac9..512c7ffa30509 100644 --- a/library/core/src/num/nonzero.rs +++ b/library/core/src/num/nonzero.rs @@ -110,26 +110,40 @@ impl_zeroable_primitive!( pub struct NonZero(T::NonZeroInner); macro_rules! impl_nonzero_fmt { - ($Trait:ident) => { - #[stable(feature = "nonzero", since = "1.28.0")] - impl fmt::$Trait for NonZero - where - T: ZeroablePrimitive + fmt::$Trait, - { - #[inline] - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - self.get().fmt(f) + ($(#[$Attribute:meta] $Trait:ident)*) => { + $( + #[$Attribute] + impl fmt::$Trait for NonZero + where + T: ZeroablePrimitive + fmt::$Trait, + { + #[inline] + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + self.get().fmt(f) + } } - } + )* }; } -impl_nonzero_fmt!(Debug); -impl_nonzero_fmt!(Display); -impl_nonzero_fmt!(Binary); -impl_nonzero_fmt!(Octal); -impl_nonzero_fmt!(LowerHex); -impl_nonzero_fmt!(UpperHex); +impl_nonzero_fmt! { + #[stable(feature = "nonzero", since = "1.28.0")] + Debug + #[stable(feature = "nonzero", since = "1.28.0")] + Display + #[stable(feature = "nonzero", since = "1.28.0")] + Binary + #[stable(feature = "nonzero", since = "1.28.0")] + Octal + #[stable(feature = "nonzero", since = "1.28.0")] + LowerHex + #[stable(feature = "nonzero", since = "1.28.0")] + UpperHex + #[stable(feature = "nonzero_fmt_exp", since = "CURRENT_RUSTC_VERSION")] + LowerExp + #[stable(feature = "nonzero_fmt_exp", since = "CURRENT_RUSTC_VERSION")] + UpperExp +} macro_rules! impl_nonzero_auto_trait { (unsafe $Trait:ident) => { diff --git a/library/core/tests/nonzero.rs b/library/core/tests/nonzero.rs index d728513a4e297..43c279053d829 100644 --- a/library/core/tests/nonzero.rs +++ b/library/core/tests/nonzero.rs @@ -354,3 +354,14 @@ fn test_signed_nonzero_neg() { assert_eq!((-NonZero::::new(1).unwrap()).get(), -1); assert_eq!((-NonZero::::new(-1).unwrap()).get(), 1); } + +#[test] +fn test_nonzero_fmt() { + let i = format!("{0}, {0:?}, {0:x}, {0:X}, {0:#x}, {0:#X}, {0:o}, {0:b}, {0:e}, {0:E}", 42); + let nz = format!( + "{0}, {0:?}, {0:x}, {0:X}, {0:#x}, {0:#X}, {0:o}, {0:b}, {0:e}, {0:E}", + NonZero::new(42).unwrap() + ); + + assert_eq!(i, nz); +} From 9fe9041cc8eddaed402d17aa4facb2ce8f222e95 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Eduardo=20S=C3=A1nchez=20Mu=C3=B1oz?= Date: Tue, 22 Oct 2024 21:14:22 +0200 Subject: [PATCH 02/21] Implement `From<&mut {slice}>` for `Box/Rc/Arc<{slice}>` --- library/alloc/src/boxed/convert.rs | 45 ++++++++++++++++++++++++++++++ library/alloc/src/ffi/c_str.rs | 31 ++++++++++++++++++++ library/alloc/src/rc.rs | 40 ++++++++++++++++++++++++++ library/alloc/src/sync.rs | 40 ++++++++++++++++++++++++++ library/std/src/ffi/os_str.rs | 27 ++++++++++++++++++ library/std/src/path.rs | 28 +++++++++++++++++++ 6 files changed, 211 insertions(+) diff --git a/library/alloc/src/boxed/convert.rs b/library/alloc/src/boxed/convert.rs index 19a583ca546e4..4430fff66775c 100644 --- a/library/alloc/src/boxed/convert.rs +++ b/library/alloc/src/boxed/convert.rs @@ -109,6 +109,29 @@ impl From<&[T]> for Box<[T]> { } } +#[cfg(not(no_global_oom_handling))] +#[stable(feature = "box_from_mut_slice", since = "CURRENT_RUSTC_VERSION")] +impl From<&mut [T]> for Box<[T]> { + /// Converts a `&mut [T]` into a `Box<[T]>` + /// + /// This conversion allocates on the heap + /// and performs a copy of `slice` and its contents. + /// + /// # Examples + /// ```rust + /// // create a &mut [u8] which will be used to create a Box<[u8]> + /// let mut array = [104, 101, 108, 108, 111]; + /// let slice: &mut [u8] = &mut array; + /// let boxed_slice: Box<[u8]> = Box::from(slice); + /// + /// println!("{boxed_slice:?}"); + /// ``` + #[inline] + fn from(slice: &mut [T]) -> Box<[T]> { + Self::from(&*slice) + } +} + #[cfg(not(no_global_oom_handling))] #[stable(feature = "box_from_cow", since = "1.45.0")] impl From> for Box<[T]> { @@ -147,6 +170,28 @@ impl From<&str> for Box { } } +#[cfg(not(no_global_oom_handling))] +#[stable(feature = "box_from_mut_slice", since = "CURRENT_RUSTC_VERSION")] +impl From<&mut str> for Box { + /// Converts a `&mut str` into a `Box` + /// + /// This conversion allocates on the heap + /// and performs a copy of `s`. + /// + /// # Examples + /// + /// ```rust + /// let mut original = String::from("hello"); + /// let original: &mut str = &mut original; + /// let boxed: Box = Box::from(original); + /// println!("{boxed}"); + /// ``` + #[inline] + fn from(s: &mut str) -> Box { + Self::from(&*s) + } +} + #[cfg(not(no_global_oom_handling))] #[stable(feature = "box_from_cow", since = "1.45.0")] impl From> for Box { diff --git a/library/alloc/src/ffi/c_str.rs b/library/alloc/src/ffi/c_str.rs index d7e99f4a1a638..d91682b796e4f 100644 --- a/library/alloc/src/ffi/c_str.rs +++ b/library/alloc/src/ffi/c_str.rs @@ -772,6 +772,16 @@ impl From<&CStr> for Box { } } +#[cfg(not(test))] +#[stable(feature = "box_from_mut_slice", since = "CURRENT_RUSTC_VERSION")] +impl From<&mut CStr> for Box { + /// Converts a `&mut CStr` into a `Box`, + /// by copying the contents into a newly allocated [`Box`]. + fn from(s: &mut CStr) -> Box { + Self::from(&*s) + } +} + #[stable(feature = "box_from_cow", since = "1.45.0")] impl From> for Box { /// Converts a `Cow<'a, CStr>` into a `Box`, @@ -910,6 +920,17 @@ impl From<&CStr> for Arc { } } +#[cfg(target_has_atomic = "ptr")] +#[stable(feature = "shared_from_mut_slice", since = "CURRENT_RUSTC_VERSION")] +impl From<&mut CStr> for Arc { + /// Converts a `&mut CStr` into a `Arc`, + /// by copying the contents into a newly allocated [`Arc`]. + #[inline] + fn from(s: &mut CStr) -> Arc { + Arc::from(&*s) + } +} + #[stable(feature = "shared_from_slice2", since = "1.24.0")] impl From for Rc { /// Converts a [`CString`] into an [Rc]<[CStr]> by moving the [`CString`] @@ -932,6 +953,16 @@ impl From<&CStr> for Rc { } } +#[stable(feature = "shared_from_mut_slice", since = "CURRENT_RUSTC_VERSION")] +impl From<&mut CStr> for Rc { + /// Converts a `&mut CStr` into a `Rc`, + /// by copying the contents into a newly allocated [`Rc`]. + #[inline] + fn from(s: &mut CStr) -> Rc { + Rc::from(&*s) + } +} + #[cfg(not(no_global_oom_handling))] #[stable(feature = "more_rc_default_impls", since = "1.80.0")] impl Default for Rc { diff --git a/library/alloc/src/rc.rs b/library/alloc/src/rc.rs index 9fdd51ce331fb..3128716497b4e 100644 --- a/library/alloc/src/rc.rs +++ b/library/alloc/src/rc.rs @@ -2651,6 +2651,26 @@ impl From<&[T]> for Rc<[T]> { } } +#[cfg(not(no_global_oom_handling))] +#[stable(feature = "shared_from_mut_slice", since = "CURRENT_RUSTC_VERSION")] +impl From<&mut [T]> for Rc<[T]> { + /// Allocates a reference-counted slice and fills it by cloning `v`'s items. + /// + /// # Example + /// + /// ``` + /// # use std::rc::Rc; + /// let mut original = [1, 2, 3]; + /// let original: &mut [i32] = &mut original; + /// let shared: Rc<[i32]> = Rc::from(original); + /// assert_eq!(&[1, 2, 3], &shared[..]); + /// ``` + #[inline] + fn from(v: &mut [T]) -> Rc<[T]> { + Rc::from(&*v) + } +} + #[cfg(not(no_global_oom_handling))] #[stable(feature = "shared_from_slice", since = "1.21.0")] impl From<&str> for Rc { @@ -2670,6 +2690,26 @@ impl From<&str> for Rc { } } +#[cfg(not(no_global_oom_handling))] +#[stable(feature = "shared_from_mut_slice", since = "CURRENT_RUSTC_VERSION")] +impl From<&mut str> for Rc { + /// Allocates a reference-counted string slice and copies `v` into it. + /// + /// # Example + /// + /// ``` + /// # use std::rc::Rc; + /// let mut original = String::from("statue"); + /// let original: &mut str = &mut original; + /// let shared: Rc = Rc::from(original); + /// assert_eq!("statue", &shared[..]); + /// ``` + #[inline] + fn from(v: &mut str) -> Rc { + Rc::from(&*v) + } +} + #[cfg(not(no_global_oom_handling))] #[stable(feature = "shared_from_slice", since = "1.21.0")] impl From for Rc { diff --git a/library/alloc/src/sync.rs b/library/alloc/src/sync.rs index 15a1b0f283449..3ace7d1fa0343 100644 --- a/library/alloc/src/sync.rs +++ b/library/alloc/src/sync.rs @@ -3612,6 +3612,26 @@ impl From<&[T]> for Arc<[T]> { } } +#[cfg(not(no_global_oom_handling))] +#[stable(feature = "shared_from_mut_slice", since = "CURRENT_RUSTC_VERSION")] +impl From<&mut [T]> for Arc<[T]> { + /// Allocates a reference-counted slice and fills it by cloning `v`'s items. + /// + /// # Example + /// + /// ``` + /// # use std::sync::Arc; + /// let mut original = [1, 2, 3]; + /// let original: &mut [i32] = &mut original; + /// let shared: Arc<[i32]> = Arc::from(original); + /// assert_eq!(&[1, 2, 3], &shared[..]); + /// ``` + #[inline] + fn from(v: &mut [T]) -> Arc<[T]> { + Arc::from(&*v) + } +} + #[cfg(not(no_global_oom_handling))] #[stable(feature = "shared_from_slice", since = "1.21.0")] impl From<&str> for Arc { @@ -3631,6 +3651,26 @@ impl From<&str> for Arc { } } +#[cfg(not(no_global_oom_handling))] +#[stable(feature = "shared_from_mut_slice", since = "CURRENT_RUSTC_VERSION")] +impl From<&mut str> for Arc { + /// Allocates a reference-counted `str` and copies `v` into it. + /// + /// # Example + /// + /// ``` + /// # use std::sync::Arc; + /// let mut original = String::from("eggplant"); + /// let original: &mut str = &mut original; + /// let shared: Arc = Arc::from(original); + /// assert_eq!("eggplant", &shared[..]); + /// ``` + #[inline] + fn from(v: &mut str) -> Arc { + Arc::from(&*v) + } +} + #[cfg(not(no_global_oom_handling))] #[stable(feature = "shared_from_slice", since = "1.21.0")] impl From for Arc { diff --git a/library/std/src/ffi/os_str.rs b/library/std/src/ffi/os_str.rs index 2243f100643df..b19d482feaad0 100644 --- a/library/std/src/ffi/os_str.rs +++ b/library/std/src/ffi/os_str.rs @@ -1225,6 +1225,15 @@ impl From<&OsStr> for Box { } } +#[stable(feature = "box_from_mut_slice", since = "CURRENT_RUSTC_VERSION")] +impl From<&mut OsStr> for Box { + /// Copies the string into a newly allocated [Box]<[OsStr]>. + #[inline] + fn from(s: &mut OsStr) -> Box { + Self::from(&*s) + } +} + #[stable(feature = "box_from_cow", since = "1.45.0")] impl From> for Box { /// Converts a `Cow<'a, OsStr>` into a [Box]<[OsStr]>, @@ -1296,6 +1305,15 @@ impl From<&OsStr> for Arc { } } +#[stable(feature = "shared_from_mut_slice", since = "CURRENT_RUSTC_VERSION")] +impl From<&mut OsStr> for Arc { + /// Copies the string into a newly allocated [Arc]<[OsStr]>. + #[inline] + fn from(s: &mut OsStr) -> Arc { + Arc::from(&*s) + } +} + #[stable(feature = "shared_from_slice2", since = "1.24.0")] impl From for Rc { /// Converts an [`OsString`] into an [Rc]<[OsStr]> by moving the [`OsString`] @@ -1317,6 +1335,15 @@ impl From<&OsStr> for Rc { } } +#[stable(feature = "shared_from_mut_slice", since = "CURRENT_RUSTC_VERSION")] +impl From<&mut OsStr> for Rc { + /// Copies the string into a newly allocated [Rc]<[OsStr]>. + #[inline] + fn from(s: &mut OsStr) -> Rc { + Rc::from(&*s) + } +} + #[stable(feature = "cow_from_osstr", since = "1.28.0")] impl<'a> From for Cow<'a, OsStr> { /// Moves the string into a [`Cow::Owned`]. diff --git a/library/std/src/path.rs b/library/std/src/path.rs index 62125f885b2ff..5662a44d83232 100644 --- a/library/std/src/path.rs +++ b/library/std/src/path.rs @@ -1762,6 +1762,16 @@ impl From<&Path> for Box { } } +#[stable(feature = "box_from_mut_slice", since = "CURRENT_RUSTC_VERSION")] +impl From<&mut Path> for Box { + /// Creates a boxed [`Path`] from a reference. + /// + /// This will allocate and clone `path` to it. + fn from(path: &mut Path) -> Box { + Self::from(&*path) + } +} + #[stable(feature = "box_from_cow", since = "1.45.0")] impl From> for Box { /// Creates a boxed [`Path`] from a clone-on-write pointer. @@ -1990,6 +2000,15 @@ impl From<&Path> for Arc { } } +#[stable(feature = "shared_from_mut_slice", since = "CURRENT_RUSTC_VERSION")] +impl From<&mut Path> for Arc { + /// Converts a [`Path`] into an [`Arc`] by copying the [`Path`] data into a new [`Arc`] buffer. + #[inline] + fn from(s: &mut Path) -> Arc { + Arc::from(&*s) + } +} + #[stable(feature = "shared_from_slice2", since = "1.24.0")] impl From for Rc { /// Converts a [`PathBuf`] into an [Rc]<[Path]> by moving the [`PathBuf`] data into @@ -2011,6 +2030,15 @@ impl From<&Path> for Rc { } } +#[stable(feature = "shared_from_mut_slice", since = "CURRENT_RUSTC_VERSION")] +impl From<&mut Path> for Rc { + /// Converts a [`Path`] into an [`Rc`] by copying the [`Path`] data into a new [`Rc`] buffer. + #[inline] + fn from(s: &mut Path) -> Rc { + Rc::from(&*s) + } +} + #[stable(feature = "rust1", since = "1.0.0")] impl ToOwned for Path { type Owned = PathBuf; From 720d618b5fe92efded36178bcc0f5796646d73c1 Mon Sep 17 00:00:00 2001 From: Ralf Jung Date: Sat, 2 Nov 2024 10:06:52 +0100 Subject: [PATCH 03/21] unicode_data.rs: show command for generating file --- library/core/src/unicode/unicode_data.rs | 2 +- src/tools/unicode-table-generator/src/main.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/library/core/src/unicode/unicode_data.rs b/library/core/src/unicode/unicode_data.rs index cba53bf5054e6..5465fff5f887d 100644 --- a/library/core/src/unicode/unicode_data.rs +++ b/library/core/src/unicode/unicode_data.rs @@ -1,4 +1,4 @@ -///! This file is generated by src/tools/unicode-table-generator; do not edit manually! +///! This file is generated by `./x run src/tools/unicode-table-generator`; do not edit manually! #[rustc_const_unstable(feature = "const_unicode_case_lookup", issue = "101400")] #[inline(always)] diff --git a/src/tools/unicode-table-generator/src/main.rs b/src/tools/unicode-table-generator/src/main.rs index e1832091d7029..415db2c4dbc05 100644 --- a/src/tools/unicode-table-generator/src/main.rs +++ b/src/tools/unicode-table-generator/src/main.rs @@ -268,7 +268,7 @@ fn main() { let mut table_file = String::new(); table_file.push_str( - "///! This file is generated by src/tools/unicode-table-generator; do not edit manually!\n", + "///! This file is generated by `./x run src/tools/unicode-table-generator`; do not edit manually!\n", ); // Include the range search function From 34432f749463983e140e5047fb33b212e695f36a Mon Sep 17 00:00:00 2001 From: Ralf Jung Date: Sat, 2 Nov 2024 11:22:22 +0100 Subject: [PATCH 04/21] const_with_hasher test: actually construct a usable HashMap --- library/std/src/collections/hash/map/tests.rs | 26 ++++++++++++++++--- library/std/src/lib.rs | 1 + 2 files changed, 24 insertions(+), 3 deletions(-) diff --git a/library/std/src/collections/hash/map/tests.rs b/library/std/src/collections/hash/map/tests.rs index b79ad1c3119ff..a275488a55602 100644 --- a/library/std/src/collections/hash/map/tests.rs +++ b/library/std/src/collections/hash/map/tests.rs @@ -5,7 +5,7 @@ use super::Entry::{Occupied, Vacant}; use super::HashMap; use crate::assert_matches::assert_matches; use crate::cell::RefCell; -use crate::hash::RandomState; +use crate::hash::{BuildHasher, BuildHasherDefault, DefaultHasher, RandomState}; use crate::test_helpers::test_rng; // https://github.com/rust-lang/rust/issues/62301 @@ -1124,6 +1124,26 @@ fn from_array() { #[test] fn const_with_hasher() { - const X: HashMap<(), (), ()> = HashMap::with_hasher(()); - assert_eq!(X.len(), 0); + const X: HashMap<(), (), BuildHasherDefault> = + HashMap::with_hasher(BuildHasherDefault::new()); + let mut x = X; + assert_eq!(x.len(), 0); + x.insert((), ()); + assert_eq!(x.len(), 1); + + // It *is* possible to do this without using the `BuildHasherDefault` type. + struct MyBuildDefaultHasher; + impl BuildHasher for MyBuildDefaultHasher { + type Hasher = DefaultHasher; + + fn build_hasher(&self) -> Self::Hasher { + DefaultHasher::new() + } + } + + const Y: HashMap<(), (), MyBuildDefaultHasher> = HashMap::with_hasher(MyBuildDefaultHasher); + let mut y = Y; + assert_eq!(y.len(), 0); + y.insert((), ()); + assert_eq!(y.len(), 1); } diff --git a/library/std/src/lib.rs b/library/std/src/lib.rs index 1de52eb7b21b2..887d845e03c31 100644 --- a/library/std/src/lib.rs +++ b/library/std/src/lib.rs @@ -328,6 +328,7 @@ // Library features (core): // tidy-alphabetical-start #![feature(array_chunks)] +#![feature(build_hasher_default_const_new)] #![feature(c_str_module)] #![feature(char_internals)] #![feature(clone_to_uninit)] From 52666238cfadb8b5780ffa337ad3128c2c7726af Mon Sep 17 00:00:00 2001 From: Ralf Jung Date: Sat, 2 Nov 2024 11:24:28 +0100 Subject: [PATCH 05/21] remove const_hash feature leftovers --- library/core/src/hash/sip.rs | 12 ++++-------- library/core/src/lib.rs | 1 - library/core/tests/lib.rs | 1 - library/std/src/hash/random.rs | 3 +-- library/std/src/lib.rs | 1 - 5 files changed, 5 insertions(+), 13 deletions(-) diff --git a/library/core/src/hash/sip.rs b/library/core/src/hash/sip.rs index 17f2caaa0c083..6ea3241c59354 100644 --- a/library/core/src/hash/sip.rs +++ b/library/core/src/hash/sip.rs @@ -147,9 +147,8 @@ impl SipHasher { #[inline] #[stable(feature = "rust1", since = "1.0.0")] #[deprecated(since = "1.13.0", note = "use `std::hash::DefaultHasher` instead")] - #[rustc_const_unstable(feature = "const_hash", issue = "104061")] #[must_use] - pub const fn new() -> SipHasher { + pub fn new() -> SipHasher { SipHasher::new_with_keys(0, 0) } @@ -157,9 +156,8 @@ impl SipHasher { #[inline] #[stable(feature = "rust1", since = "1.0.0")] #[deprecated(since = "1.13.0", note = "use `std::hash::DefaultHasher` instead")] - #[rustc_const_unstable(feature = "const_hash", issue = "104061")] #[must_use] - pub const fn new_with_keys(key0: u64, key1: u64) -> SipHasher { + pub fn new_with_keys(key0: u64, key1: u64) -> SipHasher { SipHasher(SipHasher24 { hasher: Hasher::new_with_keys(key0, key1) }) } } @@ -169,8 +167,7 @@ impl SipHasher13 { #[inline] #[unstable(feature = "hashmap_internals", issue = "none")] #[deprecated(since = "1.13.0", note = "use `std::hash::DefaultHasher` instead")] - #[rustc_const_unstable(feature = "const_hash", issue = "104061")] - pub const fn new() -> SipHasher13 { + pub fn new() -> SipHasher13 { SipHasher13::new_with_keys(0, 0) } @@ -178,8 +175,7 @@ impl SipHasher13 { #[inline] #[unstable(feature = "hashmap_internals", issue = "none")] #[deprecated(since = "1.13.0", note = "use `std::hash::DefaultHasher` instead")] - #[rustc_const_unstable(feature = "const_hash", issue = "104061")] - pub const fn new_with_keys(key0: u64, key1: u64) -> SipHasher13 { + pub fn new_with_keys(key0: u64, key1: u64) -> SipHasher13 { SipHasher13 { hasher: Hasher::new_with_keys(key0, key1) } } } diff --git a/library/core/src/lib.rs b/library/core/src/lib.rs index 115fdd7a14024..8110983e37dfe 100644 --- a/library/core/src/lib.rs +++ b/library/core/src/lib.rs @@ -122,7 +122,6 @@ #![feature(const_eval_select)] #![feature(const_exact_div)] #![feature(const_float_methods)] -#![feature(const_hash)] #![feature(const_heap)] #![feature(const_nonnull_new)] #![feature(const_num_midpoint)] diff --git a/library/core/tests/lib.rs b/library/core/tests/lib.rs index 2a9f1660a629e..2115e04a15eb0 100644 --- a/library/core/tests/lib.rs +++ b/library/core/tests/lib.rs @@ -20,7 +20,6 @@ #![feature(const_bigint_helper_methods)] #![feature(const_black_box)] #![feature(const_eval_select)] -#![feature(const_hash)] #![feature(const_heap)] #![feature(const_nonnull_new)] #![feature(const_num_midpoint)] diff --git a/library/std/src/hash/random.rs b/library/std/src/hash/random.rs index 40f3a90f60c8a..236803b24a2ec 100644 --- a/library/std/src/hash/random.rs +++ b/library/std/src/hash/random.rs @@ -105,9 +105,8 @@ impl DefaultHasher { #[stable(feature = "hashmap_default_hasher", since = "1.13.0")] #[inline] #[allow(deprecated)] - #[rustc_const_unstable(feature = "const_hash", issue = "104061")] #[must_use] - pub const fn new() -> DefaultHasher { + pub fn new() -> DefaultHasher { DefaultHasher(SipHasher13::new_with_keys(0, 0)) } } diff --git a/library/std/src/lib.rs b/library/std/src/lib.rs index 887d845e03c31..0fdfcef3081f0 100644 --- a/library/std/src/lib.rs +++ b/library/std/src/lib.rs @@ -416,7 +416,6 @@ // Only for const-ness: // tidy-alphabetical-start #![feature(const_collections_with_hasher)] -#![feature(const_hash)] #![feature(thread_local_internals)] // tidy-alphabetical-end // From 8837fc75426831d3f895d460bf86d5634f4458ce Mon Sep 17 00:00:00 2001 From: Remo Senekowitsch Date: Sat, 2 Nov 2024 12:10:37 +0100 Subject: [PATCH 06/21] make codegen help output more consistent The output of `rustc -C help` generally has one option per line. There was one exception because of a (presumably) forgotten line continuation escape. --- compiler/rustc_session/src/options.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compiler/rustc_session/src/options.rs b/compiler/rustc_session/src/options.rs index 2b158627751bc..6ce737d4d4583 100644 --- a/compiler/rustc_session/src/options.rs +++ b/compiler/rustc_session/src/options.rs @@ -1585,7 +1585,7 @@ options! { link_dead_code: Option = (None, parse_opt_bool, [TRACKED], "keep dead code at link time (useful for code coverage) (default: no)"), link_self_contained: LinkSelfContained = (LinkSelfContained::default(), parse_link_self_contained, [UNTRACKED], - "control whether to link Rust provided C objects/libraries or rely + "control whether to link Rust provided C objects/libraries or rely \ on a C toolchain or linker installed in the system"), linker: Option = (None, parse_opt_pathbuf, [UNTRACKED], "system linker to link outputs with"), From afe190204b0cdb37a2e09dd0899421cdad98e262 Mon Sep 17 00:00:00 2001 From: Zalathar Date: Fri, 1 Nov 2024 12:47:53 +1100 Subject: [PATCH 07/21] coverage: Regression test for inlining into an uninstrumented crate --- .../coverage/auxiliary/inline_mixed_helper.rs | 13 +++++++++++++ tests/coverage/inline_mixed.rs | 19 +++++++++++++++++++ 2 files changed, 32 insertions(+) create mode 100644 tests/coverage/auxiliary/inline_mixed_helper.rs create mode 100644 tests/coverage/inline_mixed.rs diff --git a/tests/coverage/auxiliary/inline_mixed_helper.rs b/tests/coverage/auxiliary/inline_mixed_helper.rs new file mode 100644 index 0000000000000..1e91ab8ce7c03 --- /dev/null +++ b/tests/coverage/auxiliary/inline_mixed_helper.rs @@ -0,0 +1,13 @@ +//@ edition: 2021 +//@ compile-flags: -Cinstrument-coverage=on + +#[inline] +pub fn inline_me() {} + +#[inline(never)] +pub fn no_inlining_please() {} + +pub fn generic() {} + +// FIXME(#132436): Even though this doesn't ICE, it still produces coverage +// reports that undercount the affected code. diff --git a/tests/coverage/inline_mixed.rs b/tests/coverage/inline_mixed.rs new file mode 100644 index 0000000000000..163cc7d7d6c5b --- /dev/null +++ b/tests/coverage/inline_mixed.rs @@ -0,0 +1,19 @@ +//@ edition: 2021 +//@ compile-flags: -Cinstrument-coverage=off +//@ ignore-coverage-run +//@ aux-crate: inline_mixed_helper=inline_mixed_helper.rs + +// Regression test for . +// Various forms of cross-crate inlining can cause coverage statements to be +// inlined into crates that are being built without coverage instrumentation. +// At the very least, we need to not ICE when that happens. + +fn main() { + inline_mixed_helper::inline_me(); + inline_mixed_helper::no_inlining_please(); + inline_mixed_helper::generic::(); +} + +// FIXME(#132437): We currently don't test this in coverage-run mode, because +// whether or not it produces a `.profraw` file appears to differ between +// platforms. From f341a193666b836e5f2197e1c674b473b43939a7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matthias=20Kr=C3=BCger?= Date: Sat, 2 Nov 2024 13:33:39 +0100 Subject: [PATCH 08/21] NFC add known bug nr to test --- .../source-impl-requires-constraining-predicates-ambig.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/ui/specialization/source-impl-requires-constraining-predicates-ambig.rs b/tests/ui/specialization/source-impl-requires-constraining-predicates-ambig.rs index 977493c885b29..2296cd8a93756 100644 --- a/tests/ui/specialization/source-impl-requires-constraining-predicates-ambig.rs +++ b/tests/ui/specialization/source-impl-requires-constraining-predicates-ambig.rs @@ -2,7 +2,7 @@ //@ ignore-compare-mode-next-solver (explicit revisions) //@[next] compile-flags: -Znext-solver //@[next] check-pass -//@[current] known-bug: unknown +//@[current] known-bug: #132519 //@[current] failure-status: 101 //@[current] dont-check-compiler-stderr From b9196757a0c2c9ddbbca4372ca272b0e1fec077f Mon Sep 17 00:00:00 2001 From: ranger-ross Date: Sat, 2 Nov 2024 17:17:53 +0900 Subject: [PATCH 09/21] Added regression test for 117446 --- .../ice-index-out-of-bounds-issue-117446.rs | 24 ++++++++++++++ ...ce-index-out-of-bounds-issue-117446.stderr | 33 +++++++++++++++++++ 2 files changed, 57 insertions(+) create mode 100644 tests/ui/traits/ice-index-out-of-bounds-issue-117446.rs create mode 100644 tests/ui/traits/ice-index-out-of-bounds-issue-117446.stderr diff --git a/tests/ui/traits/ice-index-out-of-bounds-issue-117446.rs b/tests/ui/traits/ice-index-out-of-bounds-issue-117446.rs new file mode 100644 index 0000000000000..fa31d8b820c81 --- /dev/null +++ b/tests/ui/traits/ice-index-out-of-bounds-issue-117446.rs @@ -0,0 +1,24 @@ +//@ check-fail +// +// Regression for https://github.com/rust-lang/rust/issues/117446 + +pub struct Repeated(Vec); + +trait Foo<'a> { + fn outer() -> Option<()>; +} + +impl<'a, T> Foo<'a> for Repeated { + fn outer() -> Option<()> { + //~^ ERROR associated function `outer` has 0 type parameters but its trait declaration has 1 type parameter [E0049] + //~^^ ERROR mismatched types [E0308] + fn inner(value: Option<()>) -> Repeated { + match value { + _ => Self(unimplemented!()), + //~^ ERROR can't reference `Self` constructor from outer item [E0401] + } + } + } +} + +fn main() {} diff --git a/tests/ui/traits/ice-index-out-of-bounds-issue-117446.stderr b/tests/ui/traits/ice-index-out-of-bounds-issue-117446.stderr new file mode 100644 index 0000000000000..ad33a70ed3bb6 --- /dev/null +++ b/tests/ui/traits/ice-index-out-of-bounds-issue-117446.stderr @@ -0,0 +1,33 @@ +error[E0049]: associated function `outer` has 0 type parameters but its trait declaration has 1 type parameter + --> $DIR/ice-index-out-of-bounds-issue-117446.rs:12:13 + | +LL | fn outer() -> Option<()>; + | - expected 1 type parameter +... +LL | fn outer() -> Option<()> { + | ^ found 0 type parameters + +error[E0308]: mismatched types + --> $DIR/ice-index-out-of-bounds-issue-117446.rs:12:19 + | +LL | fn outer() -> Option<()> { + | ----- ^^^^^^^^^^ expected `Option<()>`, found `()` + | | + | implicitly returns `()` as its body has no tail or `return` expression + | + = note: expected enum `Option<()>` + found unit type `()` + +error[E0401]: can't reference `Self` constructor from outer item + --> $DIR/ice-index-out-of-bounds-issue-117446.rs:17:22 + | +LL | impl<'a, T> Foo<'a> for Repeated { + | ----------------------------------- the inner item doesn't inherit generics from this impl, so `Self` is invalid to reference +... +LL | _ => Self(unimplemented!()), + | ^^^^ help: replace `Self` with the actual type: `Repeated` + +error: aborting due to 3 previous errors + +Some errors have detailed explanations: E0049, E0308, E0401. +For more information about an error, try `rustc --explain E0049`. From 82f8b8f0e3f44c7280f21364b54840f59890610a Mon Sep 17 00:00:00 2001 From: Michael Goulet Date: Sat, 2 Nov 2024 15:24:57 +0000 Subject: [PATCH 10/21] Use opt functions to not ICE in fallback suggestion --- compiler/rustc_hir_typeck/src/fallback.rs | 7 ++++--- tests/ui/never_type/suggestion-ice-132517.rs | 4 ++++ tests/ui/never_type/suggestion-ice-132517.stderr | 9 +++++++++ 3 files changed, 17 insertions(+), 3 deletions(-) create mode 100644 tests/ui/never_type/suggestion-ice-132517.rs create mode 100644 tests/ui/never_type/suggestion-ice-132517.stderr diff --git a/compiler/rustc_hir_typeck/src/fallback.rs b/compiler/rustc_hir_typeck/src/fallback.rs index 8d8573c65c5b8..97f3807c2521e 100644 --- a/compiler/rustc_hir_typeck/src/fallback.rs +++ b/compiler/rustc_hir_typeck/src/fallback.rs @@ -643,7 +643,7 @@ impl<'tcx> Visitor<'tcx> for AnnotateUnitFallbackVisitor<'_, 'tcx> { fn visit_ty(&mut self, hir_ty: &'tcx hir::Ty<'tcx>) -> Self::Result { // Try to replace `_` with `()`. if let hir::TyKind::Infer = hir_ty.kind - && let ty = self.fcx.typeck_results.borrow().node_type(hir_ty.hir_id) + && let Some(ty) = self.fcx.typeck_results.borrow().node_type_opt(hir_ty.hir_id) && let Some(vid) = self.fcx.root_vid(ty) && self.reachable_vids.contains(&vid) { @@ -680,7 +680,8 @@ impl<'tcx> Visitor<'tcx> for AnnotateUnitFallbackVisitor<'_, 'tcx> { if let hir::ExprKind::Path(hir::QPath::Resolved(None, path)) = expr.kind && let Res::Def(DefKind::AssocFn, def_id) = path.res && self.fcx.tcx.trait_of_item(def_id).is_some() - && let self_ty = self.fcx.typeck_results.borrow().node_args(expr.hir_id).type_at(0) + && let Some(args) = self.fcx.typeck_results.borrow().node_args_opt(expr.hir_id) + && let self_ty = args.type_at(0) && let Some(vid) = self.fcx.root_vid(self_ty) && self.reachable_vids.contains(&vid) && let [.., trait_segment, _method_segment] = path.segments @@ -701,7 +702,7 @@ impl<'tcx> Visitor<'tcx> for AnnotateUnitFallbackVisitor<'_, 'tcx> { fn visit_local(&mut self, local: &'tcx hir::LetStmt<'tcx>) -> Self::Result { // For a local, try suggest annotating the type if it's missing. if let None = local.ty - && let ty = self.fcx.typeck_results.borrow().node_type(local.hir_id) + && let Some(ty) = self.fcx.typeck_results.borrow().node_type_opt(local.hir_id) && let Some(vid) = self.fcx.root_vid(ty) && self.reachable_vids.contains(&vid) { diff --git a/tests/ui/never_type/suggestion-ice-132517.rs b/tests/ui/never_type/suggestion-ice-132517.rs new file mode 100644 index 0000000000000..c1730d06f6b1d --- /dev/null +++ b/tests/ui/never_type/suggestion-ice-132517.rs @@ -0,0 +1,4 @@ +fn main() { + x::<_>(|_| panic!()) + //~^ ERROR cannot find function `x` in this scope +} diff --git a/tests/ui/never_type/suggestion-ice-132517.stderr b/tests/ui/never_type/suggestion-ice-132517.stderr new file mode 100644 index 0000000000000..4f280a0e4f152 --- /dev/null +++ b/tests/ui/never_type/suggestion-ice-132517.stderr @@ -0,0 +1,9 @@ +error[E0425]: cannot find function `x` in this scope + --> $DIR/suggestion-ice-132517.rs:2:5 + | +LL | x::<_>(|_| panic!()) + | ^ not found in this scope + +error: aborting due to 1 previous error + +For more information about this error, try `rustc --explain E0425`. From c7b07d58c32d015e8f26da0bd3defd6898aac2b7 Mon Sep 17 00:00:00 2001 From: tuturuu Date: Thu, 31 Oct 2024 08:23:50 +0100 Subject: [PATCH 11/21] Rustdoc: added brief colon explanation --- library/alloc/src/fmt.rs | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/library/alloc/src/fmt.rs b/library/alloc/src/fmt.rs index 3da71038a5e76..695dddb25eeb4 100644 --- a/library/alloc/src/fmt.rs +++ b/library/alloc/src/fmt.rs @@ -109,6 +109,16 @@ //! parameters (corresponding to `format_spec` in [the syntax](#syntax)). These //! parameters affect the string representation of what's being formatted. //! +//! The colon `:` in format syntax divides indentifier of the input data and +//! the formatting options, the colon itself does not change anything, only +//! introduces the options. +//! +//! ``` +//! let a = 5; +//! let b = &a; +//! println!("{a:e} {b:p}"); // => 5e0 0x7ffe37b7273c +//! ``` +//! //! ## Width //! //! ``` From c61312268e73ef2617d520e0017e440aaa3efcae Mon Sep 17 00:00:00 2001 From: Augie Fackler Date: Sat, 2 Nov 2024 15:50:44 -0400 Subject: [PATCH 12/21] PassWrapper: adapt for llvm/llvm-project@5445edb5d As with ab5583ed1e75869b765a90386dac9119992f8ed7, we had been explicitly passing defaults whose type have changed. Rather than do an ifdef, we simply rely on the defaults. @rustbot label: +llvm-main --- compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp b/compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp index 3b7dc6de82553..a05e29933f06d 100644 --- a/compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp +++ b/compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp @@ -777,10 +777,8 @@ extern "C" LLVMRustResult LLVMRustOptimize( CGSCCAnalysisManager CGAM; ModuleAnalysisManager MAM; - // FIXME: We may want to expose this as an option. - bool DebugPassManager = false; - - StandardInstrumentations SI(TheModule->getContext(), DebugPassManager); + StandardInstrumentations SI(TheModule->getContext(), + /*DebugLogging=*/false); SI.registerCallbacks(PIC, &MAM); if (LLVMPluginsLen) { @@ -932,8 +930,9 @@ extern "C" LLVMRustResult LLVMRustOptimize( for (const auto &C : OptimizerLastEPCallbacks) PB.registerOptimizerLastEPCallback(C); - // Pass false as we manually schedule ThinLTOBufferPasses below. - MPM = PB.buildO0DefaultPipeline(OptLevel, /* PreLinkLTO */ false); + // We manually schedule ThinLTOBufferPasses below, so don't pass the value + // to enable it here. + MPM = PB.buildO0DefaultPipeline(OptLevel); } else { for (const auto &C : PipelineStartEPCallbacks) PB.registerPipelineStartEPCallback(C); @@ -942,7 +941,7 @@ extern "C" LLVMRustResult LLVMRustOptimize( switch (OptStage) { case LLVMRustOptStage::PreLinkNoLTO: - MPM = PB.buildPerModuleDefaultPipeline(OptLevel, DebugPassManager); + MPM = PB.buildPerModuleDefaultPipeline(OptLevel); break; case LLVMRustOptStage::PreLinkThinLTO: MPM = PB.buildThinLTOPreLinkDefaultPipeline(OptLevel); From 16394e9776e1be1abc61a9b26baf73070aa7c37b Mon Sep 17 00:00:00 2001 From: Michael Goulet Date: Sat, 2 Nov 2024 20:25:02 +0000 Subject: [PATCH 13/21] Do not format generic consts --- compiler/rustc_ast/src/ast.rs | 6 +++++ src/tools/rustfmt/src/items.rs | 27 ++++++++++++++----- .../rustfmt/tests/target/const-generics.rs | 25 +++++++++++++++++ 3 files changed, 52 insertions(+), 6 deletions(-) create mode 100644 src/tools/rustfmt/tests/target/const-generics.rs diff --git a/compiler/rustc_ast/src/ast.rs b/compiler/rustc_ast/src/ast.rs index ec6ca70ae0a4b..997c44cffff03 100644 --- a/compiler/rustc_ast/src/ast.rs +++ b/compiler/rustc_ast/src/ast.rs @@ -414,6 +414,12 @@ pub struct WhereClause { pub span: Span, } +impl WhereClause { + pub fn is_empty(&self) -> bool { + !self.has_where_token && self.predicates.is_empty() + } +} + impl Default for WhereClause { fn default() -> WhereClause { WhereClause { has_where_token: false, predicates: ThinVec::new(), span: DUMMY_SP } diff --git a/src/tools/rustfmt/src/items.rs b/src/tools/rustfmt/src/items.rs index fc043a697e039..327a547b2959c 100644 --- a/src/tools/rustfmt/src/items.rs +++ b/src/tools/rustfmt/src/items.rs @@ -2009,6 +2009,7 @@ pub(crate) struct StaticParts<'a> { safety: ast::Safety, vis: &'a ast::Visibility, ident: symbol::Ident, + generics: Option<&'a ast::Generics>, ty: &'a ast::Ty, mutability: ast::Mutability, expr_opt: Option<&'a ptr::P>, @@ -2018,8 +2019,10 @@ pub(crate) struct StaticParts<'a> { impl<'a> StaticParts<'a> { pub(crate) fn from_item(item: &'a ast::Item) -> Self { - let (defaultness, prefix, safety, ty, mutability, expr) = match &item.kind { - ast::ItemKind::Static(s) => (None, "static", s.safety, &s.ty, s.mutability, &s.expr), + let (defaultness, prefix, safety, ty, mutability, expr, generics) = match &item.kind { + ast::ItemKind::Static(s) => { + (None, "static", s.safety, &s.ty, s.mutability, &s.expr, None) + } ast::ItemKind::Const(c) => ( Some(c.defaultness), "const", @@ -2027,6 +2030,7 @@ impl<'a> StaticParts<'a> { &c.ty, ast::Mutability::Not, &c.expr, + Some(&c.generics), ), _ => unreachable!(), }; @@ -2035,6 +2039,7 @@ impl<'a> StaticParts<'a> { safety, vis: &item.vis, ident: item.ident, + generics, ty, mutability, expr_opt: expr.as_ref(), @@ -2044,8 +2049,8 @@ impl<'a> StaticParts<'a> { } pub(crate) fn from_trait_item(ti: &'a ast::AssocItem) -> Self { - let (defaultness, ty, expr_opt) = match &ti.kind { - ast::AssocItemKind::Const(c) => (c.defaultness, &c.ty, &c.expr), + let (defaultness, ty, expr_opt, generics) = match &ti.kind { + ast::AssocItemKind::Const(c) => (c.defaultness, &c.ty, &c.expr, Some(&c.generics)), _ => unreachable!(), }; StaticParts { @@ -2053,6 +2058,7 @@ impl<'a> StaticParts<'a> { safety: ast::Safety::Default, vis: &ti.vis, ident: ti.ident, + generics, ty, mutability: ast::Mutability::Not, expr_opt: expr_opt.as_ref(), @@ -2062,8 +2068,8 @@ impl<'a> StaticParts<'a> { } pub(crate) fn from_impl_item(ii: &'a ast::AssocItem) -> Self { - let (defaultness, ty, expr) = match &ii.kind { - ast::AssocItemKind::Const(c) => (c.defaultness, &c.ty, &c.expr), + let (defaultness, ty, expr, generics) = match &ii.kind { + ast::AssocItemKind::Const(c) => (c.defaultness, &c.ty, &c.expr, Some(&c.generics)), _ => unreachable!(), }; StaticParts { @@ -2071,6 +2077,7 @@ impl<'a> StaticParts<'a> { safety: ast::Safety::Default, vis: &ii.vis, ident: ii.ident, + generics, ty, mutability: ast::Mutability::Not, expr_opt: expr.as_ref(), @@ -2085,6 +2092,14 @@ fn rewrite_static( static_parts: &StaticParts<'_>, offset: Indent, ) -> Option { + // For now, if this static (or const) has generics, then bail. + if static_parts + .generics + .is_some_and(|g| !g.params.is_empty() || !g.where_clause.is_empty()) + { + return None; + } + let colon = colon_spaces(context.config); let mut prefix = format!( "{}{}{}{} {}{}{}", diff --git a/src/tools/rustfmt/tests/target/const-generics.rs b/src/tools/rustfmt/tests/target/const-generics.rs new file mode 100644 index 0000000000000..94f76643664dc --- /dev/null +++ b/src/tools/rustfmt/tests/target/const-generics.rs @@ -0,0 +1,25 @@ +// Make sure we don't mess up the formatting of generic consts + +#![feature(generic_const_items)] + +const GENERIC: i32 = 0; + +const WHERECLAUSE: i32 = 0 +where + i32:; + +trait Foo { + const GENERIC: i32; + + const WHERECLAUSE: i32 + where + i32:; +} + +impl Foo for () { + const GENERIC: i32 = 0; + + const WHERECLAUSE: i32 = 0 + where + i32:; +} From 7745b065cc553c55d63aaad5f000502e2edd6257 Mon Sep 17 00:00:00 2001 From: cyrgani Date: Sat, 2 Nov 2024 23:44:12 +0100 Subject: [PATCH 14/21] add and update some crashtests --- tests/crashes/126268.rs | 18 ++++++++++++++++++ tests/crashes/131050.rs | 20 ++++++++------------ tests/crashes/132126.rs | 2 ++ 3 files changed, 28 insertions(+), 12 deletions(-) create mode 100644 tests/crashes/126268.rs create mode 100644 tests/crashes/132126.rs diff --git a/tests/crashes/126268.rs b/tests/crashes/126268.rs new file mode 100644 index 0000000000000..82e52fa115dc9 --- /dev/null +++ b/tests/crashes/126268.rs @@ -0,0 +1,18 @@ +//@ known-bug: #126268 +#![feature(min_specialization)] + +trait Trait {} + +impl Trait for T {} + +trait Data { + type Elem; +} + +struct DatasetIter<'a, R: Data> { + data: &'a R::Elem, +} + +pub struct ArrayBase {} + +impl<'a> Trait for DatasetIter<'a, ArrayBase> {} diff --git a/tests/crashes/131050.rs b/tests/crashes/131050.rs index 07f8662d016f7..3e3a600ef3de4 100644 --- a/tests/crashes/131050.rs +++ b/tests/crashes/131050.rs @@ -1,25 +1,21 @@ //@ known-bug: #131050 //@ compile-flags: --edition=2021 -fn query_as() {} +use std::future::Future; -async fn create_user() { - query_as(); -} +fn invalid_future() -> impl Future {} -async fn post_user_filter() -> impl Filter { - AndThen(&(), || async { create_user().await }) +fn create_complex_future() -> impl Future { + async { &|| async { invalid_future().await } } } -async fn get_app() -> impl Send { - post_user_filter().await +fn coerce_impl_trait() -> impl Future { + create_complex_future() } -trait Filter {} - -struct AndThen(T, F); +trait ReturnsSend {} -impl Filter for AndThen +impl ReturnsSend for F where F: Fn() -> R, R: Send, diff --git a/tests/crashes/132126.rs b/tests/crashes/132126.rs new file mode 100644 index 0000000000000..6a42853d4694f --- /dev/null +++ b/tests/crashes/132126.rs @@ -0,0 +1,2 @@ +//@ known-bug: #132126 +trait UnsafeCopy where Self: use {} From f3c53ac53f4ddf1e03ff39560f4db5acc7ac632b Mon Sep 17 00:00:00 2001 From: dianne Date: Sat, 2 Nov 2024 16:10:24 -0700 Subject: [PATCH 15/21] use backticks instead of single quotes when reporting "use of unstable library feature" This is consistent with all other diagnostics I could find containing features and enables the use of `DiagSymbolList` for generalizing diagnostics for unstable library features to multiple features. --- compiler/rustc_hir_analysis/messages.ftl | 4 +- compiler/rustc_middle/src/middle/stability.rs | 4 +- tests/ui-fulldeps/hash-stable-is-unstable.rs | 10 +-- .../hash-stable-is-unstable.stderr | 10 +-- tests/ui-fulldeps/pathless-extern-unstable.rs | 2 +- .../pathless-extern-unstable.stderr | 2 +- .../assoc-inherent-unstable.rs | 2 +- .../assoc-inherent-unstable.stderr | 2 +- tests/ui/async-await/async-fn/edition-2015.rs | 4 +- .../async-await/async-fn/edition-2015.stderr | 4 +- tests/ui/box/alloc-unstable-fail.rs | 2 +- tests/ui/box/alloc-unstable-fail.stderr | 2 +- .../cfg_accessible-unstable.rs | 2 +- .../cfg_accessible-unstable.stderr | 2 +- tests/ui/consts/const-unstable-intrinsic.rs | 8 +- .../ui/consts/const-unstable-intrinsic.stderr | 8 +- .../rustc-decodable-issue-123156.stderr | 2 +- tests/ui/explore-issue-38412.rs | 2 +- tests/ui/explore-issue-38412.stderr | 14 +-- tests/ui/feature-gates/bench.rs | 4 +- tests/ui/feature-gates/bench.stderr | 8 +- .../feature-gate-alloc-error-handler.rs | 2 +- .../feature-gate-alloc-error-handler.stderr | 2 +- ...ature-gate-autodiff-use.has_support.stderr | 4 +- ...eature-gate-autodiff-use.no_support.stderr | 4 +- .../feature-gate-autodiff-use.rs | 8 +- .../feature-gate-concat_bytes.rs | 2 +- .../feature-gate-concat_bytes.stderr | 2 +- .../feature-gate-concat_idents.stderr | 4 +- .../feature-gate-concat_idents2.stderr | 2 +- .../feature-gate-concat_idents3.stderr | 4 +- .../feature-gate-custom_mir.stderr | 4 +- ...feature-gate-custom_test_frameworks.stderr | 2 +- .../feature-gate-derive-coerce-pointee.rs | 4 +- .../feature-gate-derive-coerce-pointee.stderr | 4 +- .../feature-gate-format_args_nl.stderr | 2 +- .../feature-gate-log_syntax.stderr | 2 +- .../feature-gate-log_syntax2.stderr | 2 +- .../feature-gate-naked_functions.rs | 6 +- .../feature-gate-naked_functions.stderr | 6 +- .../feature-gate-rustc_encodable_decodable.rs | 4 +- ...ture-gate-rustc_encodable_decodable.stderr | 8 +- .../feature-gate-trace_macros.stderr | 2 +- .../feature-gate-type_ascription.rs | 2 +- .../feature-gate-type_ascription.stderr | 2 +- ...ture-gate-unboxed-closures-method-calls.rs | 6 +- ...-gate-unboxed-closures-method-calls.stderr | 6 +- ...eature-gate-unboxed-closures-ufcs-calls.rs | 6 +- ...re-gate-unboxed-closures-ufcs-calls.stderr | 6 +- .../issue-49983-see-issue-0.stderr | 2 +- tests/ui/feature-gates/rustc-private.rs | 2 +- tests/ui/feature-gates/rustc-private.stderr | 2 +- .../ui/feature-gates/trace_macros-gate.stderr | 8 +- tests/ui/imports/issue-37887.stderr | 2 +- tests/ui/imports/resolve-other-libc.rs | 2 +- .../inference_unstable_forced.stderr | 2 +- .../ui/internal/internal-unstable-noallow.rs | 8 +- .../internal/internal-unstable-noallow.stderr | 8 +- .../internal-unstable-thread-local.stderr | 2 +- tests/ui/internal/internal-unstable.stderr | 10 +-- .../intrinsics/unchecked_math_unstable.stderr | 6 +- tests/ui/issues/issue-52489.rs | 2 +- tests/ui/issues/issue-52489.stderr | 2 +- .../ui/layout/thaw-transmute-invalid-enum.rs | 6 +- .../layout/thaw-transmute-invalid-enum.stderr | 6 +- tests/ui/lint/expansion-time.rs | 2 +- tests/ui/lint/expansion-time.stderr | 4 +- tests/ui/lint/lint-output-format.stderr | 8 +- tests/ui/lint/lint-stability-2.rs | 16 ++-- tests/ui/lint/lint-stability-2.stderr | 64 +++++++------- tests/ui/lint/lint-stability-fields.stderr | 86 +++++++++---------- tests/ui/lint/lint-stability.rs | 10 +-- tests/ui/lint/lint-stability.stderr | 86 +++++++++---------- tests/ui/macros/macro-stability.rs | 8 +- tests/ui/macros/macro-stability.stderr | 6 +- tests/ui/offset-of/offset-of-unstable.stderr | 16 ++-- tests/ui/pin-macro/cant_access_internals.rs | 2 +- .../ui/pin-macro/cant_access_internals.stderr | 2 +- tests/ui/proc-macro/expand-to-unstable.stderr | 2 +- .../feature-gate.no_gate.stderr | 2 +- .../feature-gate.rs | 2 +- .../accidental-stable-in-unstable.rs | 2 +- .../accidental-stable-in-unstable.stderr | 2 +- .../allow-unstable-reexport.rs | 6 +- .../allow-unstable-reexport.stderr | 6 +- .../allowed-through-unstable.rs | 2 +- .../allowed-through-unstable.stderr | 2 +- .../default-body-stability-err.stderr | 8 +- .../generics-default-stability-trait.rs | 6 +- .../generics-default-stability-trait.stderr | 6 +- .../generics-default-stability-where.rs | 2 +- .../generics-default-stability-where.stderr | 2 +- .../generics-default-stability.rs | 56 ++++++------ .../generics-default-stability.stderr | 56 ++++++------ tests/ui/stability-attribute/issue-28075.rs | 2 +- .../ui/stability-attribute/issue-28075.stderr | 2 +- tests/ui/stability-attribute/issue-28388-3.rs | 2 +- .../stability-attribute/issue-28388-3.stderr | 2 +- .../stability-attribute-implies-no-feature.rs | 4 +- ...bility-attribute-implies-no-feature.stderr | 4 +- .../stability-attribute-issue.rs | 4 +- .../stability-attribute-issue.stderr | 4 +- .../stability-attribute/stable-in-unstable.rs | 12 +-- .../stable-in-unstable.stderr | 12 +-- .../suggest-vec-allocator-api.rs | 8 +- .../suggest-vec-allocator-api.stderr | 8 +- .../const_derives/derive-const-gate.stderr | 2 +- tests/ui/traits/issue-78372.rs | 4 +- tests/ui/traits/issue-78372.stderr | 4 +- .../feature-missing.rs | 4 +- .../feature-missing.stderr | 4 +- .../feature-gate-pattern_types.rs | 10 +-- .../feature-gate-pattern_types.stderr | 10 +-- 113 files changed, 425 insertions(+), 425 deletions(-) diff --git a/compiler/rustc_hir_analysis/messages.ftl b/compiler/rustc_hir_analysis/messages.ftl index 38b11aa40179d..6e8ba51612ec4 100644 --- a/compiler/rustc_hir_analysis/messages.ftl +++ b/compiler/rustc_hir_analysis/messages.ftl @@ -311,8 +311,8 @@ hir_analysis_missing_trait_item_suggestion = implement the missing item: `{$snip hir_analysis_missing_trait_item_unstable = not all trait items implemented, missing: `{$missing_item_name}` .note = default implementation of `{$missing_item_name}` is unstable - .some_note = use of unstable library feature '{$feature}': {$reason} - .none_note = use of unstable library feature '{$feature}' + .some_note = use of unstable library feature `{$feature}`: {$reason} + .none_note = use of unstable library feature `{$feature}` hir_analysis_missing_type_params = the type {$parameterCount -> diff --git a/compiler/rustc_middle/src/middle/stability.rs b/compiler/rustc_middle/src/middle/stability.rs index c0688aff18327..e6b36299d7fae 100644 --- a/compiler/rustc_middle/src/middle/stability.rs +++ b/compiler/rustc_middle/src/middle/stability.rs @@ -112,8 +112,8 @@ pub fn report_unstable( soft_handler: impl FnOnce(&'static Lint, Span, String), ) { let msg = match reason { - Some(r) => format!("use of unstable library feature '{feature}': {r}"), - None => format!("use of unstable library feature '{feature}'"), + Some(r) => format!("use of unstable library feature `{feature}`: {r}"), + None => format!("use of unstable library feature `{feature}`"), }; if is_soft { diff --git a/tests/ui-fulldeps/hash-stable-is-unstable.rs b/tests/ui-fulldeps/hash-stable-is-unstable.rs index e5d158a2661ce..a4b8533eb0455 100644 --- a/tests/ui-fulldeps/hash-stable-is-unstable.rs +++ b/tests/ui-fulldeps/hash-stable-is-unstable.rs @@ -1,24 +1,24 @@ //@ compile-flags: -Zdeduplicate-diagnostics=yes extern crate rustc_data_structures; -//~^ use of unstable library feature 'rustc_private' +//~^ use of unstable library feature `rustc_private` //~| NOTE: issue #27812 for more information //~| NOTE: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date extern crate rustc_macros; -//~^ use of unstable library feature 'rustc_private' +//~^ use of unstable library feature `rustc_private` //~| NOTE: see issue #27812 for more information //~| NOTE: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date extern crate rustc_query_system; -//~^ use of unstable library feature 'rustc_private' +//~^ use of unstable library feature `rustc_private` //~| NOTE: see issue #27812 for more information //~| NOTE: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date use rustc_macros::HashStable; -//~^ use of unstable library feature 'rustc_private' +//~^ use of unstable library feature `rustc_private` //~| NOTE: see issue #27812 for more information //~| NOTE: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date #[derive(HashStable)] -//~^ use of unstable library feature 'rustc_private' +//~^ use of unstable library feature `rustc_private` //~| NOTE: in this expansion of #[derive(HashStable)] //~| NOTE: in this expansion of #[derive(HashStable)] //~| NOTE: in this expansion of #[derive(HashStable)] diff --git a/tests/ui-fulldeps/hash-stable-is-unstable.stderr b/tests/ui-fulldeps/hash-stable-is-unstable.stderr index c9aac624cbb71..e7740d744b4f8 100644 --- a/tests/ui-fulldeps/hash-stable-is-unstable.stderr +++ b/tests/ui-fulldeps/hash-stable-is-unstable.stderr @@ -1,4 +1,4 @@ -error[E0658]: use of unstable library feature 'rustc_private': this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via `Cargo.toml` instead? +error[E0658]: use of unstable library feature `rustc_private`: this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via `Cargo.toml` instead? --> $DIR/hash-stable-is-unstable.rs:2:1 | LL | extern crate rustc_data_structures; @@ -8,7 +8,7 @@ LL | extern crate rustc_data_structures; = help: add `#![feature(rustc_private)]` to the crate attributes to enable = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date -error[E0658]: use of unstable library feature 'rustc_private': this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via `Cargo.toml` instead? +error[E0658]: use of unstable library feature `rustc_private`: this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via `Cargo.toml` instead? --> $DIR/hash-stable-is-unstable.rs:6:1 | LL | extern crate rustc_macros; @@ -18,7 +18,7 @@ LL | extern crate rustc_macros; = help: add `#![feature(rustc_private)]` to the crate attributes to enable = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date -error[E0658]: use of unstable library feature 'rustc_private': this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via `Cargo.toml` instead? +error[E0658]: use of unstable library feature `rustc_private`: this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via `Cargo.toml` instead? --> $DIR/hash-stable-is-unstable.rs:10:1 | LL | extern crate rustc_query_system; @@ -28,7 +28,7 @@ LL | extern crate rustc_query_system; = help: add `#![feature(rustc_private)]` to the crate attributes to enable = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date -error[E0658]: use of unstable library feature 'rustc_private': this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via `Cargo.toml` instead? +error[E0658]: use of unstable library feature `rustc_private`: this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via `Cargo.toml` instead? --> $DIR/hash-stable-is-unstable.rs:15:5 | LL | use rustc_macros::HashStable; @@ -38,7 +38,7 @@ LL | use rustc_macros::HashStable; = help: add `#![feature(rustc_private)]` to the crate attributes to enable = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date -error[E0658]: use of unstable library feature 'rustc_private': this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via `Cargo.toml` instead? +error[E0658]: use of unstable library feature `rustc_private`: this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via `Cargo.toml` instead? --> $DIR/hash-stable-is-unstable.rs:20:10 | LL | #[derive(HashStable)] diff --git a/tests/ui-fulldeps/pathless-extern-unstable.rs b/tests/ui-fulldeps/pathless-extern-unstable.rs index 2da1a7f0ddcb0..b5ba4082e9df3 100644 --- a/tests/ui-fulldeps/pathless-extern-unstable.rs +++ b/tests/ui-fulldeps/pathless-extern-unstable.rs @@ -4,6 +4,6 @@ // Test that `--extern rustc_middle` fails with `rustc_private`. pub use rustc_middle; -//~^ ERROR use of unstable library feature 'rustc_private' +//~^ ERROR use of unstable library feature `rustc_private` fn main() {} diff --git a/tests/ui-fulldeps/pathless-extern-unstable.stderr b/tests/ui-fulldeps/pathless-extern-unstable.stderr index 36e56adfdbdf8..779c3773a9b90 100644 --- a/tests/ui-fulldeps/pathless-extern-unstable.stderr +++ b/tests/ui-fulldeps/pathless-extern-unstable.stderr @@ -1,4 +1,4 @@ -error[E0658]: use of unstable library feature 'rustc_private': this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via `Cargo.toml` instead? +error[E0658]: use of unstable library feature `rustc_private`: this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via `Cargo.toml` instead? --> $DIR/pathless-extern-unstable.rs:6:9 | LL | pub use rustc_middle; diff --git a/tests/ui/associated-inherent-types/assoc-inherent-unstable.rs b/tests/ui/associated-inherent-types/assoc-inherent-unstable.rs index ddb9278bafa3c..91641489cc91a 100644 --- a/tests/ui/associated-inherent-types/assoc-inherent-unstable.rs +++ b/tests/ui/associated-inherent-types/assoc-inherent-unstable.rs @@ -4,6 +4,6 @@ #![feature(inherent_associated_types)] #![allow(incomplete_features)] -type Data = aux::Owner::Data; //~ ERROR use of unstable library feature 'data' +type Data = aux::Owner::Data; //~ ERROR use of unstable library feature `data` fn main() {} diff --git a/tests/ui/associated-inherent-types/assoc-inherent-unstable.stderr b/tests/ui/associated-inherent-types/assoc-inherent-unstable.stderr index ab8cdb6f80a48..132d566fecdf4 100644 --- a/tests/ui/associated-inherent-types/assoc-inherent-unstable.stderr +++ b/tests/ui/associated-inherent-types/assoc-inherent-unstable.stderr @@ -1,4 +1,4 @@ -error[E0658]: use of unstable library feature 'data' +error[E0658]: use of unstable library feature `data` --> $DIR/assoc-inherent-unstable.rs:7:13 | LL | type Data = aux::Owner::Data; diff --git a/tests/ui/async-await/async-fn/edition-2015.rs b/tests/ui/async-await/async-fn/edition-2015.rs index 50448313b301a..e38179758f6bb 100644 --- a/tests/ui/async-await/async-fn/edition-2015.rs +++ b/tests/ui/async-await/async-fn/edition-2015.rs @@ -3,7 +3,7 @@ fn foo(x: impl async Fn()) -> impl async Fn() { x } //~| ERROR `async` trait bounds are only allowed in Rust 2018 or later //~| ERROR async closures are unstable //~| ERROR async closures are unstable -//~| ERROR use of unstable library feature 'async_closure' -//~| ERROR use of unstable library feature 'async_closure' +//~| ERROR use of unstable library feature `async_closure` +//~| ERROR use of unstable library feature `async_closure` fn main() {} diff --git a/tests/ui/async-await/async-fn/edition-2015.stderr b/tests/ui/async-await/async-fn/edition-2015.stderr index 358bb3e112ed4..25101cb65df51 100644 --- a/tests/ui/async-await/async-fn/edition-2015.stderr +++ b/tests/ui/async-await/async-fn/edition-2015.stderr @@ -38,7 +38,7 @@ LL | fn foo(x: impl async Fn()) -> impl async Fn() { x } = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date = help: to use an async block, remove the `||`: `async {` -error[E0658]: use of unstable library feature 'async_closure' +error[E0658]: use of unstable library feature `async_closure` --> $DIR/edition-2015.rs:1:42 | LL | fn foo(x: impl async Fn()) -> impl async Fn() { x } @@ -48,7 +48,7 @@ LL | fn foo(x: impl async Fn()) -> impl async Fn() { x } = help: add `#![feature(async_closure)]` to the crate attributes to enable = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date -error[E0658]: use of unstable library feature 'async_closure' +error[E0658]: use of unstable library feature `async_closure` --> $DIR/edition-2015.rs:1:22 | LL | fn foo(x: impl async Fn()) -> impl async Fn() { x } diff --git a/tests/ui/box/alloc-unstable-fail.rs b/tests/ui/box/alloc-unstable-fail.rs index 9427571648c03..e209af97d7f75 100644 --- a/tests/ui/box/alloc-unstable-fail.rs +++ b/tests/ui/box/alloc-unstable-fail.rs @@ -2,5 +2,5 @@ use std::boxed::Box; fn main() { let _boxed: Box = Box::new(10); - //~^ ERROR use of unstable library feature 'allocator_api' + //~^ ERROR use of unstable library feature `allocator_api` } diff --git a/tests/ui/box/alloc-unstable-fail.stderr b/tests/ui/box/alloc-unstable-fail.stderr index 9e1e12a2b6aee..6ce63a7996662 100644 --- a/tests/ui/box/alloc-unstable-fail.stderr +++ b/tests/ui/box/alloc-unstable-fail.stderr @@ -1,4 +1,4 @@ -error[E0658]: use of unstable library feature 'allocator_api' +error[E0658]: use of unstable library feature `allocator_api` --> $DIR/alloc-unstable-fail.rs:4:26 | LL | let _boxed: Box = Box::new(10); diff --git a/tests/ui/conditional-compilation/cfg_accessible-unstable.rs b/tests/ui/conditional-compilation/cfg_accessible-unstable.rs index e9247e67a2a26..9ac98dbd6e7d3 100644 --- a/tests/ui/conditional-compilation/cfg_accessible-unstable.rs +++ b/tests/ui/conditional-compilation/cfg_accessible-unstable.rs @@ -1,2 +1,2 @@ -#[cfg_accessible(std)] //~ ERROR use of unstable library feature 'cfg_accessible' +#[cfg_accessible(std)] //~ ERROR use of unstable library feature `cfg_accessible` fn main() {} diff --git a/tests/ui/conditional-compilation/cfg_accessible-unstable.stderr b/tests/ui/conditional-compilation/cfg_accessible-unstable.stderr index 201f6a13f1faf..c994f4e67acb7 100644 --- a/tests/ui/conditional-compilation/cfg_accessible-unstable.stderr +++ b/tests/ui/conditional-compilation/cfg_accessible-unstable.stderr @@ -1,4 +1,4 @@ -error[E0658]: use of unstable library feature 'cfg_accessible': `cfg_accessible` is not fully implemented +error[E0658]: use of unstable library feature `cfg_accessible`: `cfg_accessible` is not fully implemented --> $DIR/cfg_accessible-unstable.rs:1:3 | LL | #[cfg_accessible(std)] diff --git a/tests/ui/consts/const-unstable-intrinsic.rs b/tests/ui/consts/const-unstable-intrinsic.rs index 050abc6dd4611..5d43cdf5da6df 100644 --- a/tests/ui/consts/const-unstable-intrinsic.rs +++ b/tests/ui/consts/const-unstable-intrinsic.rs @@ -15,16 +15,16 @@ const fn const_main() { let x = 42; unsafe { unstable_intrinsic::old_way::size_of_val(&x); - //~^ERROR: unstable library feature 'unstable' + //~^ERROR: unstable library feature `unstable` //~|ERROR: cannot call non-const intrinsic unstable_intrinsic::old_way::min_align_of_val(&x); - //~^ERROR: unstable library feature 'unstable' + //~^ERROR: unstable library feature `unstable` //~|ERROR: not yet stable as a const intrinsic unstable_intrinsic::new_way::size_of_val(&x); - //~^ERROR: unstable library feature 'unstable' + //~^ERROR: unstable library feature `unstable` //~|ERROR: cannot be (indirectly) exposed to stable unstable_intrinsic::new_way::min_align_of_val(&x); - //~^ERROR: unstable library feature 'unstable' + //~^ERROR: unstable library feature `unstable` //~|ERROR: not yet stable as a const intrinsic old_way::size_of_val(&x); diff --git a/tests/ui/consts/const-unstable-intrinsic.stderr b/tests/ui/consts/const-unstable-intrinsic.stderr index 33a434c503dcb..c2e38f54dc637 100644 --- a/tests/ui/consts/const-unstable-intrinsic.stderr +++ b/tests/ui/consts/const-unstable-intrinsic.stderr @@ -1,4 +1,4 @@ -error[E0658]: use of unstable library feature 'unstable' +error[E0658]: use of unstable library feature `unstable` --> $DIR/const-unstable-intrinsic.rs:17:9 | LL | unstable_intrinsic::old_way::size_of_val(&x); @@ -8,7 +8,7 @@ LL | unstable_intrinsic::old_way::size_of_val(&x); = help: add `#![feature(unstable)]` to the crate attributes to enable = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date -error[E0658]: use of unstable library feature 'unstable' +error[E0658]: use of unstable library feature `unstable` --> $DIR/const-unstable-intrinsic.rs:20:9 | LL | unstable_intrinsic::old_way::min_align_of_val(&x); @@ -18,7 +18,7 @@ LL | unstable_intrinsic::old_way::min_align_of_val(&x); = help: add `#![feature(unstable)]` to the crate attributes to enable = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date -error[E0658]: use of unstable library feature 'unstable' +error[E0658]: use of unstable library feature `unstable` --> $DIR/const-unstable-intrinsic.rs:23:9 | LL | unstable_intrinsic::new_way::size_of_val(&x); @@ -28,7 +28,7 @@ LL | unstable_intrinsic::new_way::size_of_val(&x); = help: add `#![feature(unstable)]` to the crate attributes to enable = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date -error[E0658]: use of unstable library feature 'unstable' +error[E0658]: use of unstable library feature `unstable` --> $DIR/const-unstable-intrinsic.rs:26:9 | LL | unstable_intrinsic::new_way::min_align_of_val(&x); diff --git a/tests/ui/derives/rustc-decodable-issue-123156.stderr b/tests/ui/derives/rustc-decodable-issue-123156.stderr index ee7b33d59bb9b..93a993b90d814 100644 --- a/tests/ui/derives/rustc-decodable-issue-123156.stderr +++ b/tests/ui/derives/rustc-decodable-issue-123156.stderr @@ -1,5 +1,5 @@ Future incompatibility report: Future breakage diagnostic: -warning: use of unstable library feature 'rustc_encodable_decodable': derive macro for `rustc-serialize`; should not be used in new code +warning: use of unstable library feature `rustc_encodable_decodable`: derive macro for `rustc-serialize`; should not be used in new code --> $DIR/rustc-decodable-issue-123156.rs:10:10 | LL | #[derive(RustcDecodable)] diff --git a/tests/ui/explore-issue-38412.rs b/tests/ui/explore-issue-38412.rs index 836cb98b5b345..e1295a96ba5ff 100644 --- a/tests/ui/explore-issue-38412.rs +++ b/tests/ui/explore-issue-38412.rs @@ -18,7 +18,7 @@ fn main() { let Record { a_stable_pub: _, a_unstable_declared_pub: _, a_unstable_undeclared_pub: _, .. } = Record::new(); - //~^^ ERROR use of unstable library feature 'unstable_undeclared' + //~^^ ERROR use of unstable library feature `unstable_undeclared` let r = Record::new(); let t = Tuple::new(); diff --git a/tests/ui/explore-issue-38412.stderr b/tests/ui/explore-issue-38412.stderr index a45ec6888559c..884184ec16e97 100644 --- a/tests/ui/explore-issue-38412.stderr +++ b/tests/ui/explore-issue-38412.stderr @@ -1,4 +1,4 @@ -error[E0658]: use of unstable library feature 'unstable_undeclared' +error[E0658]: use of unstable library feature `unstable_undeclared` --> $DIR/explore-issue-38412.rs:19:63 | LL | let Record { a_stable_pub: _, a_unstable_declared_pub: _, a_unstable_undeclared_pub: _, .. } = @@ -8,7 +8,7 @@ LL | let Record { a_stable_pub: _, a_unstable_declared_pub: _, a_unstable_un = help: add `#![feature(unstable_undeclared)]` to the crate attributes to enable = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date -error[E0658]: use of unstable library feature 'unstable_undeclared' +error[E0658]: use of unstable library feature `unstable_undeclared` --> $DIR/explore-issue-38412.rs:28:5 | LL | r.a_unstable_undeclared_pub; @@ -36,7 +36,7 @@ error[E0616]: field `d_priv` of struct `Record` is private LL | r.d_priv; | ^^^^^^ private field -error[E0658]: use of unstable library feature 'unstable_undeclared' +error[E0658]: use of unstable library feature `unstable_undeclared` --> $DIR/explore-issue-38412.rs:35:5 | LL | t.2; @@ -64,7 +64,7 @@ error[E0616]: field `5` of struct `pub_and_stability::Tuple` is private LL | t.5; | ^ private field -error[E0658]: use of unstable library feature 'unstable_undeclared' +error[E0658]: use of unstable library feature `unstable_undeclared` --> $DIR/explore-issue-38412.rs:42:7 | LL | r.unstable_undeclared_trait_method(); @@ -74,7 +74,7 @@ LL | r.unstable_undeclared_trait_method(); = help: add `#![feature(unstable_undeclared)]` to the crate attributes to enable = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date -error[E0658]: use of unstable library feature 'unstable_undeclared' +error[E0658]: use of unstable library feature `unstable_undeclared` --> $DIR/explore-issue-38412.rs:46:7 | LL | r.unstable_undeclared(); @@ -117,7 +117,7 @@ LL | r.private(); LL | fn private(&self) -> i32 { self.d_priv } | ------------------------ private method defined here -error[E0658]: use of unstable library feature 'unstable_undeclared' +error[E0658]: use of unstable library feature `unstable_undeclared` --> $DIR/explore-issue-38412.rs:55:7 | LL | t.unstable_undeclared_trait_method(); @@ -127,7 +127,7 @@ LL | t.unstable_undeclared_trait_method(); = help: add `#![feature(unstable_undeclared)]` to the crate attributes to enable = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date -error[E0658]: use of unstable library feature 'unstable_undeclared' +error[E0658]: use of unstable library feature `unstable_undeclared` --> $DIR/explore-issue-38412.rs:59:7 | LL | t.unstable_undeclared(); diff --git a/tests/ui/feature-gates/bench.rs b/tests/ui/feature-gates/bench.rs index 2ce1d50fbb0ba..12e646f7a323a 100644 --- a/tests/ui/feature-gates/bench.rs +++ b/tests/ui/feature-gates/bench.rs @@ -1,9 +1,9 @@ //@ edition:2018 -#[bench] //~ ERROR use of unstable library feature 'test' +#[bench] //~ ERROR use of unstable library feature `test` //~| WARN this was previously accepted fn bench() {} -use bench as _; //~ ERROR use of unstable library feature 'test' +use bench as _; //~ ERROR use of unstable library feature `test` //~| WARN this was previously accepted fn main() {} diff --git a/tests/ui/feature-gates/bench.stderr b/tests/ui/feature-gates/bench.stderr index df935560fd693..de78e863012dd 100644 --- a/tests/ui/feature-gates/bench.stderr +++ b/tests/ui/feature-gates/bench.stderr @@ -1,4 +1,4 @@ -error: use of unstable library feature 'test': `bench` is a part of custom test frameworks which are unstable +error: use of unstable library feature `test`: `bench` is a part of custom test frameworks which are unstable --> $DIR/bench.rs:3:3 | LL | #[bench] @@ -8,7 +8,7 @@ LL | #[bench] = note: for more information, see issue #64266 = note: `#[deny(soft_unstable)]` on by default -error: use of unstable library feature 'test': `bench` is a part of custom test frameworks which are unstable +error: use of unstable library feature `test`: `bench` is a part of custom test frameworks which are unstable --> $DIR/bench.rs:7:5 | LL | use bench as _; @@ -20,7 +20,7 @@ LL | use bench as _; error: aborting due to 2 previous errors Future incompatibility report: Future breakage diagnostic: -error: use of unstable library feature 'test': `bench` is a part of custom test frameworks which are unstable +error: use of unstable library feature `test`: `bench` is a part of custom test frameworks which are unstable --> $DIR/bench.rs:3:3 | LL | #[bench] @@ -31,7 +31,7 @@ LL | #[bench] = note: `#[deny(soft_unstable)]` on by default Future breakage diagnostic: -error: use of unstable library feature 'test': `bench` is a part of custom test frameworks which are unstable +error: use of unstable library feature `test`: `bench` is a part of custom test frameworks which are unstable --> $DIR/bench.rs:7:5 | LL | use bench as _; diff --git a/tests/ui/feature-gates/feature-gate-alloc-error-handler.rs b/tests/ui/feature-gates/feature-gate-alloc-error-handler.rs index 2d099e24db8ff..a2a4b3f19d9ef 100644 --- a/tests/ui/feature-gates/feature-gate-alloc-error-handler.rs +++ b/tests/ui/feature-gates/feature-gate-alloc-error-handler.rs @@ -5,7 +5,7 @@ use core::alloc::Layout; -#[alloc_error_handler] //~ ERROR use of unstable library feature 'alloc_error_handler' +#[alloc_error_handler] //~ ERROR use of unstable library feature `alloc_error_handler` fn oom(info: Layout) -> ! { loop {} } diff --git a/tests/ui/feature-gates/feature-gate-alloc-error-handler.stderr b/tests/ui/feature-gates/feature-gate-alloc-error-handler.stderr index 2ebd7cd9b0239..ae41ee55d3da7 100644 --- a/tests/ui/feature-gates/feature-gate-alloc-error-handler.stderr +++ b/tests/ui/feature-gates/feature-gate-alloc-error-handler.stderr @@ -1,4 +1,4 @@ -error[E0658]: use of unstable library feature 'alloc_error_handler' +error[E0658]: use of unstable library feature `alloc_error_handler` --> $DIR/feature-gate-alloc-error-handler.rs:8:3 | LL | #[alloc_error_handler] diff --git a/tests/ui/feature-gates/feature-gate-autodiff-use.has_support.stderr b/tests/ui/feature-gates/feature-gate-autodiff-use.has_support.stderr index 36a017dd53c22..15ef257fbd84d 100644 --- a/tests/ui/feature-gates/feature-gate-autodiff-use.has_support.stderr +++ b/tests/ui/feature-gates/feature-gate-autodiff-use.has_support.stderr @@ -1,4 +1,4 @@ -error[E0658]: use of unstable library feature 'autodiff' +error[E0658]: use of unstable library feature `autodiff` --> $DIR/feature-gate-autodiff-use.rs:13:3 | LL | #[autodiff(dfoo, Reverse)] @@ -8,7 +8,7 @@ LL | #[autodiff(dfoo, Reverse)] = help: add `#![feature(autodiff)]` to the crate attributes to enable = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date -error[E0658]: use of unstable library feature 'autodiff' +error[E0658]: use of unstable library feature `autodiff` --> $DIR/feature-gate-autodiff-use.rs:9:5 | LL | use std::autodiff::autodiff; diff --git a/tests/ui/feature-gates/feature-gate-autodiff-use.no_support.stderr b/tests/ui/feature-gates/feature-gate-autodiff-use.no_support.stderr index 4b767f824c809..f59e495545202 100644 --- a/tests/ui/feature-gates/feature-gate-autodiff-use.no_support.stderr +++ b/tests/ui/feature-gates/feature-gate-autodiff-use.no_support.stderr @@ -1,4 +1,4 @@ -error[E0658]: use of unstable library feature 'autodiff' +error[E0658]: use of unstable library feature `autodiff` --> $DIR/feature-gate-autodiff-use.rs:13:3 | LL | #[autodiff(dfoo, Reverse)] @@ -14,7 +14,7 @@ error: this rustc version does not support autodiff LL | #[autodiff(dfoo, Reverse)] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ -error[E0658]: use of unstable library feature 'autodiff' +error[E0658]: use of unstable library feature `autodiff` --> $DIR/feature-gate-autodiff-use.rs:9:5 | LL | use std::autodiff::autodiff; diff --git a/tests/ui/feature-gates/feature-gate-autodiff-use.rs b/tests/ui/feature-gates/feature-gate-autodiff-use.rs index 2276a79d6e2d8..602e830b0b21c 100644 --- a/tests/ui/feature-gates/feature-gate-autodiff-use.rs +++ b/tests/ui/feature-gates/feature-gate-autodiff-use.rs @@ -7,11 +7,11 @@ #![crate_type = "lib"] use std::autodiff::autodiff; -//[has_support]~^ ERROR use of unstable library feature 'autodiff' -//[no_support]~^^ ERROR use of unstable library feature 'autodiff' +//[has_support]~^ ERROR use of unstable library feature `autodiff` +//[no_support]~^^ ERROR use of unstable library feature `autodiff` #[autodiff(dfoo, Reverse)] -//[has_support]~^ ERROR use of unstable library feature 'autodiff' [E0658] -//[no_support]~^^ ERROR use of unstable library feature 'autodiff' [E0658] +//[has_support]~^ ERROR use of unstable library feature `autodiff` [E0658] +//[no_support]~^^ ERROR use of unstable library feature `autodiff` [E0658] //[no_support]~| ERROR this rustc version does not support autodiff fn foo() {} diff --git a/tests/ui/feature-gates/feature-gate-concat_bytes.rs b/tests/ui/feature-gates/feature-gate-concat_bytes.rs index 07d63cb11e085..abdaa725784b9 100644 --- a/tests/ui/feature-gates/feature-gate-concat_bytes.rs +++ b/tests/ui/feature-gates/feature-gate-concat_bytes.rs @@ -1,4 +1,4 @@ fn main() { - let a = concat_bytes!(b'A', b"BC"); //~ ERROR use of unstable library feature 'concat_bytes' + let a = concat_bytes!(b'A', b"BC"); //~ ERROR use of unstable library feature `concat_bytes` assert_eq!(a, &[65, 66, 67]); } diff --git a/tests/ui/feature-gates/feature-gate-concat_bytes.stderr b/tests/ui/feature-gates/feature-gate-concat_bytes.stderr index ed9692d369304..4f75e143e9aaa 100644 --- a/tests/ui/feature-gates/feature-gate-concat_bytes.stderr +++ b/tests/ui/feature-gates/feature-gate-concat_bytes.stderr @@ -1,4 +1,4 @@ -error[E0658]: use of unstable library feature 'concat_bytes' +error[E0658]: use of unstable library feature `concat_bytes` --> $DIR/feature-gate-concat_bytes.rs:2:13 | LL | let a = concat_bytes!(b'A', b"BC"); diff --git a/tests/ui/feature-gates/feature-gate-concat_idents.stderr b/tests/ui/feature-gates/feature-gate-concat_idents.stderr index eaaef0f2539bc..d0f4fe62d048f 100644 --- a/tests/ui/feature-gates/feature-gate-concat_idents.stderr +++ b/tests/ui/feature-gates/feature-gate-concat_idents.stderr @@ -1,4 +1,4 @@ -error[E0658]: use of unstable library feature 'concat_idents': `concat_idents` is not stable enough for use and is subject to change +error[E0658]: use of unstable library feature `concat_idents`: `concat_idents` is not stable enough for use and is subject to change --> $DIR/feature-gate-concat_idents.rs:5:13 | LL | let a = concat_idents!(X, Y_1); @@ -8,7 +8,7 @@ LL | let a = concat_idents!(X, Y_1); = help: add `#![feature(concat_idents)]` to the crate attributes to enable = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date -error[E0658]: use of unstable library feature 'concat_idents': `concat_idents` is not stable enough for use and is subject to change +error[E0658]: use of unstable library feature `concat_idents`: `concat_idents` is not stable enough for use and is subject to change --> $DIR/feature-gate-concat_idents.rs:6:13 | LL | let b = concat_idents!(X, Y_2); diff --git a/tests/ui/feature-gates/feature-gate-concat_idents2.stderr b/tests/ui/feature-gates/feature-gate-concat_idents2.stderr index 2fe786ff4063d..2052813ea4ac6 100644 --- a/tests/ui/feature-gates/feature-gate-concat_idents2.stderr +++ b/tests/ui/feature-gates/feature-gate-concat_idents2.stderr @@ -1,4 +1,4 @@ -error[E0658]: use of unstable library feature 'concat_idents': `concat_idents` is not stable enough for use and is subject to change +error[E0658]: use of unstable library feature `concat_idents`: `concat_idents` is not stable enough for use and is subject to change --> $DIR/feature-gate-concat_idents2.rs:2:5 | LL | concat_idents!(a, b); diff --git a/tests/ui/feature-gates/feature-gate-concat_idents3.stderr b/tests/ui/feature-gates/feature-gate-concat_idents3.stderr index a7daa1f949f01..b186601d0ed68 100644 --- a/tests/ui/feature-gates/feature-gate-concat_idents3.stderr +++ b/tests/ui/feature-gates/feature-gate-concat_idents3.stderr @@ -1,4 +1,4 @@ -error[E0658]: use of unstable library feature 'concat_idents': `concat_idents` is not stable enough for use and is subject to change +error[E0658]: use of unstable library feature `concat_idents`: `concat_idents` is not stable enough for use and is subject to change --> $DIR/feature-gate-concat_idents3.rs:5:20 | LL | assert_eq!(10, concat_idents!(X, Y_1)); @@ -8,7 +8,7 @@ LL | assert_eq!(10, concat_idents!(X, Y_1)); = help: add `#![feature(concat_idents)]` to the crate attributes to enable = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date -error[E0658]: use of unstable library feature 'concat_idents': `concat_idents` is not stable enough for use and is subject to change +error[E0658]: use of unstable library feature `concat_idents`: `concat_idents` is not stable enough for use and is subject to change --> $DIR/feature-gate-concat_idents3.rs:6:20 | LL | assert_eq!(20, concat_idents!(X, Y_2)); diff --git a/tests/ui/feature-gates/feature-gate-custom_mir.stderr b/tests/ui/feature-gates/feature-gate-custom_mir.stderr index 118eab144bf7f..eeceb0355ee7b 100644 --- a/tests/ui/feature-gates/feature-gate-custom_mir.stderr +++ b/tests/ui/feature-gates/feature-gate-custom_mir.stderr @@ -7,7 +7,7 @@ LL | #[custom_mir(dialect = "built")] = help: add `#![feature(custom_mir)]` to the crate attributes to enable = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date -error[E0658]: use of unstable library feature 'custom_mir': MIR is an implementation detail and extremely unstable +error[E0658]: use of unstable library feature `custom_mir`: MIR is an implementation detail and extremely unstable --> $DIR/feature-gate-custom_mir.rs:4:5 | LL | use core::intrinsics::mir::*; @@ -16,7 +16,7 @@ LL | use core::intrinsics::mir::*; = help: add `#![feature(custom_mir)]` to the crate attributes to enable = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date -error[E0658]: use of unstable library feature 'custom_mir': MIR is an implementation detail and extremely unstable +error[E0658]: use of unstable library feature `custom_mir`: MIR is an implementation detail and extremely unstable --> $DIR/feature-gate-custom_mir.rs:10:13 | LL | Return() diff --git a/tests/ui/feature-gates/feature-gate-custom_test_frameworks.stderr b/tests/ui/feature-gates/feature-gate-custom_test_frameworks.stderr index 016be980d4d64..7744759be5727 100644 --- a/tests/ui/feature-gates/feature-gate-custom_test_frameworks.stderr +++ b/tests/ui/feature-gates/feature-gate-custom_test_frameworks.stderr @@ -1,4 +1,4 @@ -error[E0658]: use of unstable library feature 'custom_test_frameworks': custom test frameworks are an unstable feature +error[E0658]: use of unstable library feature `custom_test_frameworks`: custom test frameworks are an unstable feature --> $DIR/feature-gate-custom_test_frameworks.rs:3:3 | LL | #[test_case] diff --git a/tests/ui/feature-gates/feature-gate-derive-coerce-pointee.rs b/tests/ui/feature-gates/feature-gate-derive-coerce-pointee.rs index 69bc70e8666a3..d730849dcf6aa 100644 --- a/tests/ui/feature-gates/feature-gate-derive-coerce-pointee.rs +++ b/tests/ui/feature-gates/feature-gate-derive-coerce-pointee.rs @@ -1,6 +1,6 @@ -use std::marker::CoercePointee; //~ ERROR use of unstable library feature 'derive_coerce_pointee' +use std::marker::CoercePointee; //~ ERROR use of unstable library feature `derive_coerce_pointee` -#[derive(CoercePointee)] //~ ERROR use of unstable library feature 'derive_coerce_pointee' +#[derive(CoercePointee)] //~ ERROR use of unstable library feature `derive_coerce_pointee` #[repr(transparent)] struct MyPointer<'a, #[pointee] T: ?Sized> { ptr: &'a T, diff --git a/tests/ui/feature-gates/feature-gate-derive-coerce-pointee.stderr b/tests/ui/feature-gates/feature-gate-derive-coerce-pointee.stderr index 0b52ceb782aea..19babe149d9a4 100644 --- a/tests/ui/feature-gates/feature-gate-derive-coerce-pointee.stderr +++ b/tests/ui/feature-gates/feature-gate-derive-coerce-pointee.stderr @@ -1,4 +1,4 @@ -error[E0658]: use of unstable library feature 'derive_coerce_pointee' +error[E0658]: use of unstable library feature `derive_coerce_pointee` --> $DIR/feature-gate-derive-coerce-pointee.rs:3:10 | LL | #[derive(CoercePointee)] @@ -8,7 +8,7 @@ LL | #[derive(CoercePointee)] = help: add `#![feature(derive_coerce_pointee)]` to the crate attributes to enable = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date -error[E0658]: use of unstable library feature 'derive_coerce_pointee' +error[E0658]: use of unstable library feature `derive_coerce_pointee` --> $DIR/feature-gate-derive-coerce-pointee.rs:1:5 | LL | use std::marker::CoercePointee; diff --git a/tests/ui/feature-gates/feature-gate-format_args_nl.stderr b/tests/ui/feature-gates/feature-gate-format_args_nl.stderr index f72d34d9b0bcb..c7e8f8c686f90 100644 --- a/tests/ui/feature-gates/feature-gate-format_args_nl.stderr +++ b/tests/ui/feature-gates/feature-gate-format_args_nl.stderr @@ -1,4 +1,4 @@ -error[E0658]: use of unstable library feature 'format_args_nl': `format_args_nl` is only for internal language use and is subject to change +error[E0658]: use of unstable library feature `format_args_nl`: `format_args_nl` is only for internal language use and is subject to change --> $DIR/feature-gate-format_args_nl.rs:2:5 | LL | format_args_nl!(""); diff --git a/tests/ui/feature-gates/feature-gate-log_syntax.stderr b/tests/ui/feature-gates/feature-gate-log_syntax.stderr index 0eba231a287e9..78152b50e89d3 100644 --- a/tests/ui/feature-gates/feature-gate-log_syntax.stderr +++ b/tests/ui/feature-gates/feature-gate-log_syntax.stderr @@ -1,4 +1,4 @@ -error[E0658]: use of unstable library feature 'log_syntax': `log_syntax!` is not stable enough for use and is subject to change +error[E0658]: use of unstable library feature `log_syntax`: `log_syntax!` is not stable enough for use and is subject to change --> $DIR/feature-gate-log_syntax.rs:2:5 | LL | log_syntax!() diff --git a/tests/ui/feature-gates/feature-gate-log_syntax2.stderr b/tests/ui/feature-gates/feature-gate-log_syntax2.stderr index e1f92dd60a3ca..8875de2281b6b 100644 --- a/tests/ui/feature-gates/feature-gate-log_syntax2.stderr +++ b/tests/ui/feature-gates/feature-gate-log_syntax2.stderr @@ -1,4 +1,4 @@ -error[E0658]: use of unstable library feature 'log_syntax': `log_syntax!` is not stable enough for use and is subject to change +error[E0658]: use of unstable library feature `log_syntax`: `log_syntax!` is not stable enough for use and is subject to change --> $DIR/feature-gate-log_syntax2.rs:2:22 | LL | println!("{:?}", log_syntax!()); diff --git a/tests/ui/feature-gates/feature-gate-naked_functions.rs b/tests/ui/feature-gates/feature-gate-naked_functions.rs index 5fe0bbdc77435..abb55b9a557a9 100644 --- a/tests/ui/feature-gates/feature-gate-naked_functions.rs +++ b/tests/ui/feature-gates/feature-gate-naked_functions.rs @@ -1,13 +1,13 @@ //@ needs-asm-support use std::arch::naked_asm; -//~^ ERROR use of unstable library feature 'naked_functions' +//~^ ERROR use of unstable library feature `naked_functions` #[naked] //~^ the `#[naked]` attribute is an experimental feature extern "C" fn naked() { naked_asm!("") - //~^ ERROR use of unstable library feature 'naked_functions' + //~^ ERROR use of unstable library feature `naked_functions` //~| ERROR: requires unsafe } @@ -15,7 +15,7 @@ extern "C" fn naked() { //~^ the `#[naked]` attribute is an experimental feature extern "C" fn naked_2() -> isize { naked_asm!("") - //~^ ERROR use of unstable library feature 'naked_functions' + //~^ ERROR use of unstable library feature `naked_functions` //~| ERROR: requires unsafe } diff --git a/tests/ui/feature-gates/feature-gate-naked_functions.stderr b/tests/ui/feature-gates/feature-gate-naked_functions.stderr index 709234eb02372..9bfb9275bb201 100644 --- a/tests/ui/feature-gates/feature-gate-naked_functions.stderr +++ b/tests/ui/feature-gates/feature-gate-naked_functions.stderr @@ -1,4 +1,4 @@ -error[E0658]: use of unstable library feature 'naked_functions' +error[E0658]: use of unstable library feature `naked_functions` --> $DIR/feature-gate-naked_functions.rs:9:5 | LL | naked_asm!("") @@ -8,7 +8,7 @@ LL | naked_asm!("") = help: add `#![feature(naked_functions)]` to the crate attributes to enable = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date -error[E0658]: use of unstable library feature 'naked_functions' +error[E0658]: use of unstable library feature `naked_functions` --> $DIR/feature-gate-naked_functions.rs:17:5 | LL | naked_asm!("") @@ -38,7 +38,7 @@ LL | #[naked] = help: add `#![feature(naked_functions)]` to the crate attributes to enable = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date -error[E0658]: use of unstable library feature 'naked_functions' +error[E0658]: use of unstable library feature `naked_functions` --> $DIR/feature-gate-naked_functions.rs:3:5 | LL | use std::arch::naked_asm; diff --git a/tests/ui/feature-gates/feature-gate-rustc_encodable_decodable.rs b/tests/ui/feature-gates/feature-gate-rustc_encodable_decodable.rs index 13f8fd5fe22a0..71caf43806d09 100644 --- a/tests/ui/feature-gates/feature-gate-rustc_encodable_decodable.rs +++ b/tests/ui/feature-gates/feature-gate-rustc_encodable_decodable.rs @@ -5,11 +5,11 @@ extern crate rustc_serialize; //~ERROR can't find crate for `rustc_serialize` #[derive( RustcEncodable, - //~^ ERROR use of unstable library feature 'rustc_encodable_decodable' + //~^ ERROR use of unstable library feature `rustc_encodable_decodable` //~^^ WARNING this was previously accepted by the compiler //~^^^ WARNING use of deprecated macro `RustcEncodable` RustcDecodable, - //~^ ERROR use of unstable library feature 'rustc_encodable_decodable' + //~^ ERROR use of unstable library feature `rustc_encodable_decodable` //~^^ WARNING this was previously accepted by the compiler //~^^^ WARNING use of deprecated macro `RustcDecodable` )] diff --git a/tests/ui/feature-gates/feature-gate-rustc_encodable_decodable.stderr b/tests/ui/feature-gates/feature-gate-rustc_encodable_decodable.stderr index 02b74dacf4dac..b949dbb9da21c 100644 --- a/tests/ui/feature-gates/feature-gate-rustc_encodable_decodable.stderr +++ b/tests/ui/feature-gates/feature-gate-rustc_encodable_decodable.stderr @@ -6,7 +6,7 @@ LL | extern crate rustc_serialize; | = help: maybe you need to install the missing components with: `rustup component add rust-src rustc-dev llvm-tools-preview` -error: use of unstable library feature 'rustc_encodable_decodable': derive macro for `rustc-serialize`; should not be used in new code +error: use of unstable library feature `rustc_encodable_decodable`: derive macro for `rustc-serialize`; should not be used in new code --> $DIR/feature-gate-rustc_encodable_decodable.rs:7:5 | LL | RustcEncodable, @@ -24,7 +24,7 @@ LL | RustcEncodable, | = note: `#[warn(deprecated)]` on by default -error: use of unstable library feature 'rustc_encodable_decodable': derive macro for `rustc-serialize`; should not be used in new code +error: use of unstable library feature `rustc_encodable_decodable`: derive macro for `rustc-serialize`; should not be used in new code --> $DIR/feature-gate-rustc_encodable_decodable.rs:11:5 | LL | RustcDecodable, @@ -43,7 +43,7 @@ error: aborting due to 3 previous errors; 2 warnings emitted For more information about this error, try `rustc --explain E0463`. Future incompatibility report: Future breakage diagnostic: -error: use of unstable library feature 'rustc_encodable_decodable': derive macro for `rustc-serialize`; should not be used in new code +error: use of unstable library feature `rustc_encodable_decodable`: derive macro for `rustc-serialize`; should not be used in new code --> $DIR/feature-gate-rustc_encodable_decodable.rs:7:5 | LL | RustcEncodable, @@ -54,7 +54,7 @@ LL | RustcEncodable, = note: `#[deny(soft_unstable)]` on by default Future breakage diagnostic: -error: use of unstable library feature 'rustc_encodable_decodable': derive macro for `rustc-serialize`; should not be used in new code +error: use of unstable library feature `rustc_encodable_decodable`: derive macro for `rustc-serialize`; should not be used in new code --> $DIR/feature-gate-rustc_encodable_decodable.rs:11:5 | LL | RustcDecodable, diff --git a/tests/ui/feature-gates/feature-gate-trace_macros.stderr b/tests/ui/feature-gates/feature-gate-trace_macros.stderr index 68d3f75e99594..4c6cfce7d3d9a 100644 --- a/tests/ui/feature-gates/feature-gate-trace_macros.stderr +++ b/tests/ui/feature-gates/feature-gate-trace_macros.stderr @@ -1,4 +1,4 @@ -error[E0658]: use of unstable library feature 'trace_macros': `trace_macros` is not stable enough for use and is subject to change +error[E0658]: use of unstable library feature `trace_macros`: `trace_macros` is not stable enough for use and is subject to change --> $DIR/feature-gate-trace_macros.rs:2:5 | LL | trace_macros!(true); diff --git a/tests/ui/feature-gates/feature-gate-type_ascription.rs b/tests/ui/feature-gates/feature-gate-type_ascription.rs index 5c3f0e37df63d..ef3923b6ff298 100644 --- a/tests/ui/feature-gates/feature-gate-type_ascription.rs +++ b/tests/ui/feature-gates/feature-gate-type_ascription.rs @@ -1,5 +1,5 @@ // Type ascription is unstable fn main() { - let a = type_ascribe!(10, u8); //~ ERROR use of unstable library feature 'type_ascription': placeholder syntax for type ascription + let a = type_ascribe!(10, u8); //~ ERROR use of unstable library feature `type_ascription`: placeholder syntax for type ascription } diff --git a/tests/ui/feature-gates/feature-gate-type_ascription.stderr b/tests/ui/feature-gates/feature-gate-type_ascription.stderr index 88da58d07e1a1..f59e6435c8e89 100644 --- a/tests/ui/feature-gates/feature-gate-type_ascription.stderr +++ b/tests/ui/feature-gates/feature-gate-type_ascription.stderr @@ -1,4 +1,4 @@ -error[E0658]: use of unstable library feature 'type_ascription': placeholder syntax for type ascription +error[E0658]: use of unstable library feature `type_ascription`: placeholder syntax for type ascription --> $DIR/feature-gate-type_ascription.rs:4:13 | LL | let a = type_ascribe!(10, u8); diff --git a/tests/ui/feature-gates/feature-gate-unboxed-closures-method-calls.rs b/tests/ui/feature-gates/feature-gate-unboxed-closures-method-calls.rs index 42f7c5f0fbaa8..bc5b48741b021 100644 --- a/tests/ui/feature-gates/feature-gate-unboxed-closures-method-calls.rs +++ b/tests/ui/feature-gates/feature-gate-unboxed-closures-method-calls.rs @@ -1,9 +1,9 @@ #![allow(dead_code)] fn foo(mut f: F) { - f.call(()); //~ ERROR use of unstable library feature 'fn_traits' - f.call_mut(()); //~ ERROR use of unstable library feature 'fn_traits' - f.call_once(()); //~ ERROR use of unstable library feature 'fn_traits' + f.call(()); //~ ERROR use of unstable library feature `fn_traits` + f.call_mut(()); //~ ERROR use of unstable library feature `fn_traits` + f.call_once(()); //~ ERROR use of unstable library feature `fn_traits` } fn main() {} diff --git a/tests/ui/feature-gates/feature-gate-unboxed-closures-method-calls.stderr b/tests/ui/feature-gates/feature-gate-unboxed-closures-method-calls.stderr index 0ef732d391b7b..6a5f0c8e6a6f4 100644 --- a/tests/ui/feature-gates/feature-gate-unboxed-closures-method-calls.stderr +++ b/tests/ui/feature-gates/feature-gate-unboxed-closures-method-calls.stderr @@ -1,4 +1,4 @@ -error[E0658]: use of unstable library feature 'fn_traits' +error[E0658]: use of unstable library feature `fn_traits` --> $DIR/feature-gate-unboxed-closures-method-calls.rs:4:7 | LL | f.call(()); @@ -8,7 +8,7 @@ LL | f.call(()); = help: add `#![feature(fn_traits)]` to the crate attributes to enable = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date -error[E0658]: use of unstable library feature 'fn_traits' +error[E0658]: use of unstable library feature `fn_traits` --> $DIR/feature-gate-unboxed-closures-method-calls.rs:5:7 | LL | f.call_mut(()); @@ -18,7 +18,7 @@ LL | f.call_mut(()); = help: add `#![feature(fn_traits)]` to the crate attributes to enable = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date -error[E0658]: use of unstable library feature 'fn_traits' +error[E0658]: use of unstable library feature `fn_traits` --> $DIR/feature-gate-unboxed-closures-method-calls.rs:6:7 | LL | f.call_once(()); diff --git a/tests/ui/feature-gates/feature-gate-unboxed-closures-ufcs-calls.rs b/tests/ui/feature-gates/feature-gate-unboxed-closures-ufcs-calls.rs index 25c90492eb8f2..137e7d71e919c 100644 --- a/tests/ui/feature-gates/feature-gate-unboxed-closures-ufcs-calls.rs +++ b/tests/ui/feature-gates/feature-gate-unboxed-closures-ufcs-calls.rs @@ -1,9 +1,9 @@ #![allow(dead_code)] fn foo(mut f: F) { - Fn::call(&f, ()); //~ ERROR use of unstable library feature 'fn_traits' - FnMut::call_mut(&mut f, ()); //~ ERROR use of unstable library feature 'fn_traits' - FnOnce::call_once(f, ()); //~ ERROR use of unstable library feature 'fn_traits' + Fn::call(&f, ()); //~ ERROR use of unstable library feature `fn_traits` + FnMut::call_mut(&mut f, ()); //~ ERROR use of unstable library feature `fn_traits` + FnOnce::call_once(f, ()); //~ ERROR use of unstable library feature `fn_traits` } fn main() {} diff --git a/tests/ui/feature-gates/feature-gate-unboxed-closures-ufcs-calls.stderr b/tests/ui/feature-gates/feature-gate-unboxed-closures-ufcs-calls.stderr index f4d75fc6a8644..90695fa4c4615 100644 --- a/tests/ui/feature-gates/feature-gate-unboxed-closures-ufcs-calls.stderr +++ b/tests/ui/feature-gates/feature-gate-unboxed-closures-ufcs-calls.stderr @@ -1,4 +1,4 @@ -error[E0658]: use of unstable library feature 'fn_traits' +error[E0658]: use of unstable library feature `fn_traits` --> $DIR/feature-gate-unboxed-closures-ufcs-calls.rs:4:5 | LL | Fn::call(&f, ()); @@ -8,7 +8,7 @@ LL | Fn::call(&f, ()); = help: add `#![feature(fn_traits)]` to the crate attributes to enable = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date -error[E0658]: use of unstable library feature 'fn_traits' +error[E0658]: use of unstable library feature `fn_traits` --> $DIR/feature-gate-unboxed-closures-ufcs-calls.rs:5:5 | LL | FnMut::call_mut(&mut f, ()); @@ -18,7 +18,7 @@ LL | FnMut::call_mut(&mut f, ()); = help: add `#![feature(fn_traits)]` to the crate attributes to enable = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date -error[E0658]: use of unstable library feature 'fn_traits' +error[E0658]: use of unstable library feature `fn_traits` --> $DIR/feature-gate-unboxed-closures-ufcs-calls.rs:6:5 | LL | FnOnce::call_once(f, ()); diff --git a/tests/ui/feature-gates/issue-49983-see-issue-0.stderr b/tests/ui/feature-gates/issue-49983-see-issue-0.stderr index 8f090c9eef906..29a2845852e44 100644 --- a/tests/ui/feature-gates/issue-49983-see-issue-0.stderr +++ b/tests/ui/feature-gates/issue-49983-see-issue-0.stderr @@ -1,4 +1,4 @@ -error[E0658]: use of unstable library feature 'ptr_internals': use `NonNull` instead and consider `PhantomData` (if you also use `#[may_dangle]`), `Send`, and/or `Sync` +error[E0658]: use of unstable library feature `ptr_internals`: use `NonNull` instead and consider `PhantomData` (if you also use `#[may_dangle]`), `Send`, and/or `Sync` --> $DIR/issue-49983-see-issue-0.rs:4:30 | LL | #[allow(unused_imports)] use core::ptr::Unique; diff --git a/tests/ui/feature-gates/rustc-private.rs b/tests/ui/feature-gates/rustc-private.rs index aa44f790c8ae3..2605f595b6c72 100644 --- a/tests/ui/feature-gates/rustc-private.rs +++ b/tests/ui/feature-gates/rustc-private.rs @@ -1,5 +1,5 @@ // gate-test-rustc_private -extern crate cfg_if; //~ ERROR use of unstable library feature 'rustc_private' +extern crate cfg_if; //~ ERROR use of unstable library feature `rustc_private` fn main() {} diff --git a/tests/ui/feature-gates/rustc-private.stderr b/tests/ui/feature-gates/rustc-private.stderr index 96cc98619fd77..74594c712f290 100644 --- a/tests/ui/feature-gates/rustc-private.stderr +++ b/tests/ui/feature-gates/rustc-private.stderr @@ -1,4 +1,4 @@ -error[E0658]: use of unstable library feature 'rustc_private': this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via `Cargo.toml` instead? +error[E0658]: use of unstable library feature `rustc_private`: this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via `Cargo.toml` instead? --> $DIR/rustc-private.rs:3:1 | LL | extern crate cfg_if; diff --git a/tests/ui/feature-gates/trace_macros-gate.stderr b/tests/ui/feature-gates/trace_macros-gate.stderr index 1313a0e8ae26c..6ca9d1573d920 100644 --- a/tests/ui/feature-gates/trace_macros-gate.stderr +++ b/tests/ui/feature-gates/trace_macros-gate.stderr @@ -1,4 +1,4 @@ -error[E0658]: use of unstable library feature 'trace_macros': `trace_macros` is not stable enough for use and is subject to change +error[E0658]: use of unstable library feature `trace_macros`: `trace_macros` is not stable enough for use and is subject to change --> $DIR/trace_macros-gate.rs:4:5 | LL | trace_macros!(); @@ -14,7 +14,7 @@ error: trace_macros! accepts only `true` or `false` LL | trace_macros!(); | ^^^^^^^^^^^^^^^ -error[E0658]: use of unstable library feature 'trace_macros': `trace_macros` is not stable enough for use and is subject to change +error[E0658]: use of unstable library feature `trace_macros`: `trace_macros` is not stable enough for use and is subject to change --> $DIR/trace_macros-gate.rs:6:5 | LL | trace_macros!(true); @@ -24,7 +24,7 @@ LL | trace_macros!(true); = help: add `#![feature(trace_macros)]` to the crate attributes to enable = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date -error[E0658]: use of unstable library feature 'trace_macros': `trace_macros` is not stable enough for use and is subject to change +error[E0658]: use of unstable library feature `trace_macros`: `trace_macros` is not stable enough for use and is subject to change --> $DIR/trace_macros-gate.rs:7:5 | LL | trace_macros!(false); @@ -34,7 +34,7 @@ LL | trace_macros!(false); = help: add `#![feature(trace_macros)]` to the crate attributes to enable = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date -error[E0658]: use of unstable library feature 'trace_macros': `trace_macros` is not stable enough for use and is subject to change +error[E0658]: use of unstable library feature `trace_macros`: `trace_macros` is not stable enough for use and is subject to change --> $DIR/trace_macros-gate.rs:10:26 | LL | ($x: ident) => { trace_macros!($x) } diff --git a/tests/ui/imports/issue-37887.stderr b/tests/ui/imports/issue-37887.stderr index 02c2c80326217..cc191a17c2936 100644 --- a/tests/ui/imports/issue-37887.stderr +++ b/tests/ui/imports/issue-37887.stderr @@ -9,7 +9,7 @@ help: consider importing the `test` crate LL + extern crate test; | -error[E0658]: use of unstable library feature 'test' +error[E0658]: use of unstable library feature `test` --> $DIR/issue-37887.rs:2:5 | LL | extern crate test; diff --git a/tests/ui/imports/resolve-other-libc.rs b/tests/ui/imports/resolve-other-libc.rs index d848f8260aad8..e23083276ce2b 100644 --- a/tests/ui/imports/resolve-other-libc.rs +++ b/tests/ui/imports/resolve-other-libc.rs @@ -6,7 +6,7 @@ // indicates that `libc` was wrongly resolved to `libc` shipped with the // compiler: // -// error[E0658]: use of unstable library feature 'rustc_private': \ +// error[E0658]: use of unstable library feature `rustc_private`: \ // this crate is being loaded from the sysroot // extern crate libc; //~ ERROR: extern location for libc does not exist: test.rlib diff --git a/tests/ui/inference/inference_unstable_forced.stderr b/tests/ui/inference/inference_unstable_forced.stderr index 26eaddd27072a..e3b5b292cd474 100644 --- a/tests/ui/inference/inference_unstable_forced.stderr +++ b/tests/ui/inference/inference_unstable_forced.stderr @@ -1,4 +1,4 @@ -error[E0658]: use of unstable library feature 'ipu_flatten' +error[E0658]: use of unstable library feature `ipu_flatten` --> $DIR/inference_unstable_forced.rs:11:20 | LL | assert_eq!('x'.ipu_flatten(), 0); diff --git a/tests/ui/internal/internal-unstable-noallow.rs b/tests/ui/internal/internal-unstable-noallow.rs index 9d925c861226f..57ddb93d8801c 100644 --- a/tests/ui/internal/internal-unstable-noallow.rs +++ b/tests/ui/internal/internal-unstable-noallow.rs @@ -4,10 +4,10 @@ // the // ~ form. //@ aux-build:internal_unstable.rs -//@ error-pattern:use of unstable library feature 'function' -//@ error-pattern:use of unstable library feature 'struct_field' -//@ error-pattern:use of unstable library feature 'method' -//@ error-pattern:use of unstable library feature 'struct2_field' +//@ error-pattern:use of unstable library feature `function` +//@ error-pattern:use of unstable library feature `struct_field` +//@ error-pattern:use of unstable library feature `method` +//@ error-pattern:use of unstable library feature `struct2_field` #[macro_use] extern crate internal_unstable; diff --git a/tests/ui/internal/internal-unstable-noallow.stderr b/tests/ui/internal/internal-unstable-noallow.stderr index b39456b1caeca..22f42abbd1146 100644 --- a/tests/ui/internal/internal-unstable-noallow.stderr +++ b/tests/ui/internal/internal-unstable-noallow.stderr @@ -1,4 +1,4 @@ -error[E0658]: use of unstable library feature 'function' +error[E0658]: use of unstable library feature `function` --> $DIR/internal-unstable-noallow.rs:16:5 | LL | call_unstable_noallow!(); @@ -8,7 +8,7 @@ LL | call_unstable_noallow!(); = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date = note: this error originates in the macro `call_unstable_noallow` (in Nightly builds, run with -Z macro-backtrace for more info) -error[E0658]: use of unstable library feature 'struct_field' +error[E0658]: use of unstable library feature `struct_field` --> $DIR/internal-unstable-noallow.rs:18:5 | LL | construct_unstable_noallow!(0); @@ -18,7 +18,7 @@ LL | construct_unstable_noallow!(0); = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date = note: this error originates in the macro `construct_unstable_noallow` (in Nightly builds, run with -Z macro-backtrace for more info) -error[E0658]: use of unstable library feature 'method' +error[E0658]: use of unstable library feature `method` --> $DIR/internal-unstable-noallow.rs:20:35 | LL | |x: internal_unstable::Foo| { call_method_noallow!(x) }; @@ -28,7 +28,7 @@ LL | |x: internal_unstable::Foo| { call_method_noallow!(x) }; = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date = note: this error originates in the macro `call_method_noallow` (in Nightly builds, run with -Z macro-backtrace for more info) -error[E0658]: use of unstable library feature 'struct2_field' +error[E0658]: use of unstable library feature `struct2_field` --> $DIR/internal-unstable-noallow.rs:22:35 | LL | |x: internal_unstable::Bar| { access_field_noallow!(x) }; diff --git a/tests/ui/internal/internal-unstable-thread-local.stderr b/tests/ui/internal/internal-unstable-thread-local.stderr index 58c7b3f67ebef..c0510b39e50fd 100644 --- a/tests/ui/internal/internal-unstable-thread-local.stderr +++ b/tests/ui/internal/internal-unstable-thread-local.stderr @@ -1,4 +1,4 @@ -error[E0658]: use of unstable library feature 'function' +error[E0658]: use of unstable library feature `function` --> $DIR/internal-unstable-thread-local.rs:9:32 | LL | thread_local!(static BAR: () = internal_unstable::unstable()); diff --git a/tests/ui/internal/internal-unstable.stderr b/tests/ui/internal/internal-unstable.stderr index 78b9109d1c287..ea74175f09b29 100644 --- a/tests/ui/internal/internal-unstable.stderr +++ b/tests/ui/internal/internal-unstable.stderr @@ -1,4 +1,4 @@ -error[E0658]: use of unstable library feature 'function' +error[E0658]: use of unstable library feature `function` --> $DIR/internal-unstable.rs:48:25 | LL | pass_through_allow!(internal_unstable::unstable()); @@ -7,7 +7,7 @@ LL | pass_through_allow!(internal_unstable::unstable()); = help: add `#![feature(function)]` to the crate attributes to enable = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date -error[E0658]: use of unstable library feature 'function' +error[E0658]: use of unstable library feature `function` --> $DIR/internal-unstable.rs:50:27 | LL | pass_through_noallow!(internal_unstable::unstable()); @@ -16,7 +16,7 @@ LL | pass_through_noallow!(internal_unstable::unstable()); = help: add `#![feature(function)]` to the crate attributes to enable = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date -error[E0658]: use of unstable library feature 'function' +error[E0658]: use of unstable library feature `function` --> $DIR/internal-unstable.rs:54:22 | LL | println!("{:?}", internal_unstable::unstable()); @@ -25,7 +25,7 @@ LL | println!("{:?}", internal_unstable::unstable()); = help: add `#![feature(function)]` to the crate attributes to enable = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date -error[E0658]: use of unstable library feature 'function' +error[E0658]: use of unstable library feature `function` --> $DIR/internal-unstable.rs:56:10 | LL | bar!(internal_unstable::unstable()); @@ -34,7 +34,7 @@ LL | bar!(internal_unstable::unstable()); = help: add `#![feature(function)]` to the crate attributes to enable = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date -error[E0658]: use of unstable library feature 'function' +error[E0658]: use of unstable library feature `function` --> $DIR/internal-unstable.rs:18:9 | LL | internal_unstable::unstable(); diff --git a/tests/ui/intrinsics/unchecked_math_unstable.stderr b/tests/ui/intrinsics/unchecked_math_unstable.stderr index c2a116b620046..b284567f8afa3 100644 --- a/tests/ui/intrinsics/unchecked_math_unstable.stderr +++ b/tests/ui/intrinsics/unchecked_math_unstable.stderr @@ -1,4 +1,4 @@ -error[E0658]: use of unstable library feature 'core_intrinsics': intrinsics are unlikely to ever be stabilized, instead they should be used through stabilized interfaces in the rest of the standard library +error[E0658]: use of unstable library feature `core_intrinsics`: intrinsics are unlikely to ever be stabilized, instead they should be used through stabilized interfaces in the rest of the standard library --> $DIR/unchecked_math_unstable.rs:4:19 | LL | let add = std::intrinsics::unchecked_add(x, y); @@ -7,7 +7,7 @@ LL | let add = std::intrinsics::unchecked_add(x, y); = help: add `#![feature(core_intrinsics)]` to the crate attributes to enable = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date -error[E0658]: use of unstable library feature 'core_intrinsics': intrinsics are unlikely to ever be stabilized, instead they should be used through stabilized interfaces in the rest of the standard library +error[E0658]: use of unstable library feature `core_intrinsics`: intrinsics are unlikely to ever be stabilized, instead they should be used through stabilized interfaces in the rest of the standard library --> $DIR/unchecked_math_unstable.rs:5:19 | LL | let sub = std::intrinsics::unchecked_sub(x, y); @@ -16,7 +16,7 @@ LL | let sub = std::intrinsics::unchecked_sub(x, y); = help: add `#![feature(core_intrinsics)]` to the crate attributes to enable = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date -error[E0658]: use of unstable library feature 'core_intrinsics': intrinsics are unlikely to ever be stabilized, instead they should be used through stabilized interfaces in the rest of the standard library +error[E0658]: use of unstable library feature `core_intrinsics`: intrinsics are unlikely to ever be stabilized, instead they should be used through stabilized interfaces in the rest of the standard library --> $DIR/unchecked_math_unstable.rs:6:19 | LL | let mul = std::intrinsics::unchecked_mul(x, y); diff --git a/tests/ui/issues/issue-52489.rs b/tests/ui/issues/issue-52489.rs index 95a3d43105c75..c1e1cb41c76d6 100644 --- a/tests/ui/issues/issue-52489.rs +++ b/tests/ui/issues/issue-52489.rs @@ -3,6 +3,6 @@ //@ compile-flags:--extern issue_52489 use issue_52489; -//~^ ERROR use of unstable library feature 'issue_52489_unstable' +//~^ ERROR use of unstable library feature `issue_52489_unstable` fn main() {} diff --git a/tests/ui/issues/issue-52489.stderr b/tests/ui/issues/issue-52489.stderr index fa88725bcebf4..8e5b87b7f0fd2 100644 --- a/tests/ui/issues/issue-52489.stderr +++ b/tests/ui/issues/issue-52489.stderr @@ -1,4 +1,4 @@ -error[E0658]: use of unstable library feature 'issue_52489_unstable' +error[E0658]: use of unstable library feature `issue_52489_unstable` --> $DIR/issue-52489.rs:5:5 | LL | use issue_52489; diff --git a/tests/ui/layout/thaw-transmute-invalid-enum.rs b/tests/ui/layout/thaw-transmute-invalid-enum.rs index 835dcc049964f..a7c2e1a86de7b 100644 --- a/tests/ui/layout/thaw-transmute-invalid-enum.rs +++ b/tests/ui/layout/thaw-transmute-invalid-enum.rs @@ -2,13 +2,13 @@ mod assert { use std::mem::{Assume, TransmuteFrom}; - //~^ ERROR: use of unstable library feature 'transmutability' - //~| ERROR: use of unstable library feature 'transmutability' + //~^ ERROR: use of unstable library feature `transmutability` + //~| ERROR: use of unstable library feature `transmutability` pub fn is_transmutable() where Dst: TransmuteFrom, - //~^ ERROR: use of unstable library feature 'transmutability' + //~^ ERROR: use of unstable library feature `transmutability` { } } diff --git a/tests/ui/layout/thaw-transmute-invalid-enum.stderr b/tests/ui/layout/thaw-transmute-invalid-enum.stderr index e6a5399c66b3d..d12fc4694e0ab 100644 --- a/tests/ui/layout/thaw-transmute-invalid-enum.stderr +++ b/tests/ui/layout/thaw-transmute-invalid-enum.stderr @@ -20,7 +20,7 @@ LL | | V = 0xFF, LL | | } | |_- not a struct or union -error[E0658]: use of unstable library feature 'transmutability' +error[E0658]: use of unstable library feature `transmutability` --> $DIR/thaw-transmute-invalid-enum.rs:4:20 | LL | use std::mem::{Assume, TransmuteFrom}; @@ -30,7 +30,7 @@ LL | use std::mem::{Assume, TransmuteFrom}; = help: add `#![feature(transmutability)]` to the crate attributes to enable = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date -error[E0658]: use of unstable library feature 'transmutability' +error[E0658]: use of unstable library feature `transmutability` --> $DIR/thaw-transmute-invalid-enum.rs:4:28 | LL | use std::mem::{Assume, TransmuteFrom}; @@ -40,7 +40,7 @@ LL | use std::mem::{Assume, TransmuteFrom}; = help: add `#![feature(transmutability)]` to the crate attributes to enable = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date -error[E0658]: use of unstable library feature 'transmutability' +error[E0658]: use of unstable library feature `transmutability` --> $DIR/thaw-transmute-invalid-enum.rs:10:14 | LL | Dst: TransmuteFrom, diff --git a/tests/ui/lint/expansion-time.rs b/tests/ui/lint/expansion-time.rs index 1e1f8f9e1b6a5..d0f26a87385c7 100644 --- a/tests/ui/lint/expansion-time.rs +++ b/tests/ui/lint/expansion-time.rs @@ -11,7 +11,7 @@ macro_rules! m { ($i) => {} } //~ WARN missing fragment specifier #[warn(soft_unstable)] mod benches { - #[bench] //~ WARN use of unstable library feature 'test' + #[bench] //~ WARN use of unstable library feature `test` //~| WARN this was previously accepted fn foo() {} } diff --git a/tests/ui/lint/expansion-time.stderr b/tests/ui/lint/expansion-time.stderr index e490ae91a4888..f65627c2c0878 100644 --- a/tests/ui/lint/expansion-time.stderr +++ b/tests/ui/lint/expansion-time.stderr @@ -26,7 +26,7 @@ note: the lint level is defined here LL | #[warn(missing_fragment_specifier)] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ -warning: use of unstable library feature 'test': `bench` is a part of custom test frameworks which are unstable +warning: use of unstable library feature `test`: `bench` is a part of custom test frameworks which are unstable --> $DIR/expansion-time.rs:14:7 | LL | #[bench] @@ -70,7 +70,7 @@ LL | #[warn(missing_fragment_specifier)] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ Future breakage diagnostic: -warning: use of unstable library feature 'test': `bench` is a part of custom test frameworks which are unstable +warning: use of unstable library feature `test`: `bench` is a part of custom test frameworks which are unstable --> $DIR/expansion-time.rs:14:7 | LL | #[bench] diff --git a/tests/ui/lint/lint-output-format.stderr b/tests/ui/lint/lint-output-format.stderr index c399b6cdbc257..23a36eb4c87dc 100644 --- a/tests/ui/lint/lint-output-format.stderr +++ b/tests/ui/lint/lint-output-format.stderr @@ -1,4 +1,4 @@ -error[E0658]: use of unstable library feature 'unstable_test_feature' +error[E0658]: use of unstable library feature `unstable_test_feature` --> $DIR/lint-output-format.rs:6:1 | LL | extern crate lint_output_format; @@ -7,7 +7,7 @@ LL | extern crate lint_output_format; = help: add `#![feature(unstable_test_feature)]` to the crate attributes to enable = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date -error[E0658]: use of unstable library feature 'unstable_test_feature' +error[E0658]: use of unstable library feature `unstable_test_feature` --> $DIR/lint-output-format.rs:7:26 | LL | use lint_output_format::{foo, bar}; @@ -16,7 +16,7 @@ LL | use lint_output_format::{foo, bar}; = help: add `#![feature(unstable_test_feature)]` to the crate attributes to enable = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date -error[E0658]: use of unstable library feature 'unstable_test_feature' +error[E0658]: use of unstable library feature `unstable_test_feature` --> $DIR/lint-output-format.rs:7:31 | LL | use lint_output_format::{foo, bar}; @@ -25,7 +25,7 @@ LL | use lint_output_format::{foo, bar}; = help: add `#![feature(unstable_test_feature)]` to the crate attributes to enable = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date -error[E0658]: use of unstable library feature 'unstable_test_feature' +error[E0658]: use of unstable library feature `unstable_test_feature` --> $DIR/lint-output-format.rs:12:14 | LL | let _y = bar(); diff --git a/tests/ui/lint/lint-stability-2.rs b/tests/ui/lint/lint-stability-2.rs index 644b12670a6c2..50e84a6f4a76f 100644 --- a/tests/ui/lint/lint-stability-2.rs +++ b/tests/ui/lint/lint-stability-2.rs @@ -66,15 +66,15 @@ mod cross_crate { ::trait_unstable(&foo); //~ ERROR use of unstable library feature foo.method_unstable_text(); - //~^ ERROR use of unstable library feature 'unstable_test_feature': text + //~^ ERROR use of unstable library feature `unstable_test_feature`: text Foo::method_unstable_text(&foo); - //~^ ERROR use of unstable library feature 'unstable_test_feature': text + //~^ ERROR use of unstable library feature `unstable_test_feature`: text ::method_unstable_text(&foo); - //~^ ERROR use of unstable library feature 'unstable_test_feature': text + //~^ ERROR use of unstable library feature `unstable_test_feature`: text foo.trait_unstable_text(); - //~^ ERROR use of unstable library feature 'unstable_test_feature': text + //~^ ERROR use of unstable library feature `unstable_test_feature`: text ::trait_unstable_text(&foo); - //~^ ERROR use of unstable library feature 'unstable_test_feature': text + //~^ ERROR use of unstable library feature `unstable_test_feature`: text stable(); foo.method_stable(); @@ -139,9 +139,9 @@ mod cross_crate { foo.trait_unstable(); //~ ERROR use of unstable library feature ::trait_unstable(&foo); //~ ERROR use of unstable library feature foo.trait_unstable_text(); - //~^ ERROR use of unstable library feature 'unstable_test_feature': text + //~^ ERROR use of unstable library feature `unstable_test_feature`: text ::trait_unstable_text(&foo); - //~^ ERROR use of unstable library feature 'unstable_test_feature': text + //~^ ERROR use of unstable library feature `unstable_test_feature`: text foo.trait_stable(); Trait::trait_stable(&foo); ::trait_stable(&foo); @@ -157,7 +157,7 @@ mod cross_crate { //~^ ERROR use of unstable library feature foo.trait_unstable(); //~ ERROR use of unstable library feature foo.trait_unstable_text(); - //~^ ERROR use of unstable library feature 'unstable_test_feature': text + //~^ ERROR use of unstable library feature `unstable_test_feature`: text foo.trait_stable(); } diff --git a/tests/ui/lint/lint-stability-2.stderr b/tests/ui/lint/lint-stability-2.stderr index 20d49780a919f..b3357bfe23210 100644 --- a/tests/ui/lint/lint-stability-2.stderr +++ b/tests/ui/lint/lint-stability-2.stderr @@ -1,4 +1,4 @@ -error[E0658]: use of unstable library feature 'unstable_test_feature' +error[E0658]: use of unstable library feature `unstable_test_feature` --> $DIR/lint-stability-2.rs:40:13 | LL | foo.method_deprecated_unstable(); @@ -7,7 +7,7 @@ LL | foo.method_deprecated_unstable(); = help: add `#![feature(unstable_test_feature)]` to the crate attributes to enable = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date -error[E0658]: use of unstable library feature 'unstable_test_feature' +error[E0658]: use of unstable library feature `unstable_test_feature` --> $DIR/lint-stability-2.rs:42:9 | LL | Foo::method_deprecated_unstable(&foo); @@ -16,7 +16,7 @@ LL | Foo::method_deprecated_unstable(&foo); = help: add `#![feature(unstable_test_feature)]` to the crate attributes to enable = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date -error[E0658]: use of unstable library feature 'unstable_test_feature' +error[E0658]: use of unstable library feature `unstable_test_feature` --> $DIR/lint-stability-2.rs:44:9 | LL | ::method_deprecated_unstable(&foo); @@ -25,7 +25,7 @@ LL | ::method_deprecated_unstable(&foo); = help: add `#![feature(unstable_test_feature)]` to the crate attributes to enable = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date -error[E0658]: use of unstable library feature 'unstable_test_feature' +error[E0658]: use of unstable library feature `unstable_test_feature` --> $DIR/lint-stability-2.rs:46:13 | LL | foo.trait_deprecated_unstable(); @@ -34,7 +34,7 @@ LL | foo.trait_deprecated_unstable(); = help: add `#![feature(unstable_test_feature)]` to the crate attributes to enable = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date -error[E0658]: use of unstable library feature 'unstable_test_feature' +error[E0658]: use of unstable library feature `unstable_test_feature` --> $DIR/lint-stability-2.rs:48:9 | LL | ::trait_deprecated_unstable(&foo); @@ -43,7 +43,7 @@ LL | ::trait_deprecated_unstable(&foo); = help: add `#![feature(unstable_test_feature)]` to the crate attributes to enable = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date -error[E0658]: use of unstable library feature 'unstable_test_feature' +error[E0658]: use of unstable library feature `unstable_test_feature` --> $DIR/lint-stability-2.rs:51:13 | LL | foo.method_deprecated_unstable_text(); @@ -52,7 +52,7 @@ LL | foo.method_deprecated_unstable_text(); = help: add `#![feature(unstable_test_feature)]` to the crate attributes to enable = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date -error[E0658]: use of unstable library feature 'unstable_test_feature' +error[E0658]: use of unstable library feature `unstable_test_feature` --> $DIR/lint-stability-2.rs:53:9 | LL | Foo::method_deprecated_unstable_text(&foo); @@ -61,7 +61,7 @@ LL | Foo::method_deprecated_unstable_text(&foo); = help: add `#![feature(unstable_test_feature)]` to the crate attributes to enable = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date -error[E0658]: use of unstable library feature 'unstable_test_feature' +error[E0658]: use of unstable library feature `unstable_test_feature` --> $DIR/lint-stability-2.rs:55:9 | LL | ::method_deprecated_unstable_text(&foo); @@ -70,7 +70,7 @@ LL | ::method_deprecated_unstable_text(&foo); = help: add `#![feature(unstable_test_feature)]` to the crate attributes to enable = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date -error[E0658]: use of unstable library feature 'unstable_test_feature' +error[E0658]: use of unstable library feature `unstable_test_feature` --> $DIR/lint-stability-2.rs:57:13 | LL | foo.trait_deprecated_unstable_text(); @@ -79,7 +79,7 @@ LL | foo.trait_deprecated_unstable_text(); = help: add `#![feature(unstable_test_feature)]` to the crate attributes to enable = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date -error[E0658]: use of unstable library feature 'unstable_test_feature' +error[E0658]: use of unstable library feature `unstable_test_feature` --> $DIR/lint-stability-2.rs:59:9 | LL | ::trait_deprecated_unstable_text(&foo); @@ -88,7 +88,7 @@ LL | ::trait_deprecated_unstable_text(&foo); = help: add `#![feature(unstable_test_feature)]` to the crate attributes to enable = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date -error[E0658]: use of unstable library feature 'unstable_test_feature' +error[E0658]: use of unstable library feature `unstable_test_feature` --> $DIR/lint-stability-2.rs:62:13 | LL | foo.method_unstable(); @@ -97,7 +97,7 @@ LL | foo.method_unstable(); = help: add `#![feature(unstable_test_feature)]` to the crate attributes to enable = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date -error[E0658]: use of unstable library feature 'unstable_test_feature' +error[E0658]: use of unstable library feature `unstable_test_feature` --> $DIR/lint-stability-2.rs:63:9 | LL | Foo::method_unstable(&foo); @@ -106,7 +106,7 @@ LL | Foo::method_unstable(&foo); = help: add `#![feature(unstable_test_feature)]` to the crate attributes to enable = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date -error[E0658]: use of unstable library feature 'unstable_test_feature' +error[E0658]: use of unstable library feature `unstable_test_feature` --> $DIR/lint-stability-2.rs:64:9 | LL | ::method_unstable(&foo); @@ -115,7 +115,7 @@ LL | ::method_unstable(&foo); = help: add `#![feature(unstable_test_feature)]` to the crate attributes to enable = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date -error[E0658]: use of unstable library feature 'unstable_test_feature' +error[E0658]: use of unstable library feature `unstable_test_feature` --> $DIR/lint-stability-2.rs:65:13 | LL | foo.trait_unstable(); @@ -124,7 +124,7 @@ LL | foo.trait_unstable(); = help: add `#![feature(unstable_test_feature)]` to the crate attributes to enable = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date -error[E0658]: use of unstable library feature 'unstable_test_feature' +error[E0658]: use of unstable library feature `unstable_test_feature` --> $DIR/lint-stability-2.rs:66:9 | LL | ::trait_unstable(&foo); @@ -133,7 +133,7 @@ LL | ::trait_unstable(&foo); = help: add `#![feature(unstable_test_feature)]` to the crate attributes to enable = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date -error[E0658]: use of unstable library feature 'unstable_test_feature': text +error[E0658]: use of unstable library feature `unstable_test_feature`: text --> $DIR/lint-stability-2.rs:68:13 | LL | foo.method_unstable_text(); @@ -142,7 +142,7 @@ LL | foo.method_unstable_text(); = help: add `#![feature(unstable_test_feature)]` to the crate attributes to enable = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date -error[E0658]: use of unstable library feature 'unstable_test_feature': text +error[E0658]: use of unstable library feature `unstable_test_feature`: text --> $DIR/lint-stability-2.rs:70:9 | LL | Foo::method_unstable_text(&foo); @@ -151,7 +151,7 @@ LL | Foo::method_unstable_text(&foo); = help: add `#![feature(unstable_test_feature)]` to the crate attributes to enable = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date -error[E0658]: use of unstable library feature 'unstable_test_feature': text +error[E0658]: use of unstable library feature `unstable_test_feature`: text --> $DIR/lint-stability-2.rs:72:9 | LL | ::method_unstable_text(&foo); @@ -160,7 +160,7 @@ LL | ::method_unstable_text(&foo); = help: add `#![feature(unstable_test_feature)]` to the crate attributes to enable = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date -error[E0658]: use of unstable library feature 'unstable_test_feature': text +error[E0658]: use of unstable library feature `unstable_test_feature`: text --> $DIR/lint-stability-2.rs:74:13 | LL | foo.trait_unstable_text(); @@ -169,7 +169,7 @@ LL | foo.trait_unstable_text(); = help: add `#![feature(unstable_test_feature)]` to the crate attributes to enable = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date -error[E0658]: use of unstable library feature 'unstable_test_feature': text +error[E0658]: use of unstable library feature `unstable_test_feature`: text --> $DIR/lint-stability-2.rs:76:9 | LL | ::trait_unstable_text(&foo); @@ -178,7 +178,7 @@ LL | ::trait_unstable_text(&foo); = help: add `#![feature(unstable_test_feature)]` to the crate attributes to enable = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date -error[E0658]: use of unstable library feature 'unstable_test_feature' +error[E0658]: use of unstable library feature `unstable_test_feature` --> $DIR/lint-stability-2.rs:131:13 | LL | foo.trait_deprecated_unstable(); @@ -187,7 +187,7 @@ LL | foo.trait_deprecated_unstable(); = help: add `#![feature(unstable_test_feature)]` to the crate attributes to enable = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date -error[E0658]: use of unstable library feature 'unstable_test_feature' +error[E0658]: use of unstable library feature `unstable_test_feature` --> $DIR/lint-stability-2.rs:133:9 | LL | ::trait_deprecated_unstable(&foo); @@ -196,7 +196,7 @@ LL | ::trait_deprecated_unstable(&foo); = help: add `#![feature(unstable_test_feature)]` to the crate attributes to enable = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date -error[E0658]: use of unstable library feature 'unstable_test_feature' +error[E0658]: use of unstable library feature `unstable_test_feature` --> $DIR/lint-stability-2.rs:135:13 | LL | foo.trait_deprecated_unstable_text(); @@ -205,7 +205,7 @@ LL | foo.trait_deprecated_unstable_text(); = help: add `#![feature(unstable_test_feature)]` to the crate attributes to enable = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date -error[E0658]: use of unstable library feature 'unstable_test_feature' +error[E0658]: use of unstable library feature `unstable_test_feature` --> $DIR/lint-stability-2.rs:137:9 | LL | ::trait_deprecated_unstable_text(&foo); @@ -214,7 +214,7 @@ LL | ::trait_deprecated_unstable_text(&foo); = help: add `#![feature(unstable_test_feature)]` to the crate attributes to enable = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date -error[E0658]: use of unstable library feature 'unstable_test_feature' +error[E0658]: use of unstable library feature `unstable_test_feature` --> $DIR/lint-stability-2.rs:139:13 | LL | foo.trait_unstable(); @@ -223,7 +223,7 @@ LL | foo.trait_unstable(); = help: add `#![feature(unstable_test_feature)]` to the crate attributes to enable = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date -error[E0658]: use of unstable library feature 'unstable_test_feature' +error[E0658]: use of unstable library feature `unstable_test_feature` --> $DIR/lint-stability-2.rs:140:9 | LL | ::trait_unstable(&foo); @@ -232,7 +232,7 @@ LL | ::trait_unstable(&foo); = help: add `#![feature(unstable_test_feature)]` to the crate attributes to enable = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date -error[E0658]: use of unstable library feature 'unstable_test_feature': text +error[E0658]: use of unstable library feature `unstable_test_feature`: text --> $DIR/lint-stability-2.rs:141:13 | LL | foo.trait_unstable_text(); @@ -241,7 +241,7 @@ LL | foo.trait_unstable_text(); = help: add `#![feature(unstable_test_feature)]` to the crate attributes to enable = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date -error[E0658]: use of unstable library feature 'unstable_test_feature': text +error[E0658]: use of unstable library feature `unstable_test_feature`: text --> $DIR/lint-stability-2.rs:143:9 | LL | ::trait_unstable_text(&foo); @@ -250,7 +250,7 @@ LL | ::trait_unstable_text(&foo); = help: add `#![feature(unstable_test_feature)]` to the crate attributes to enable = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date -error[E0658]: use of unstable library feature 'unstable_test_feature' +error[E0658]: use of unstable library feature `unstable_test_feature` --> $DIR/lint-stability-2.rs:154:13 | LL | foo.trait_deprecated_unstable(); @@ -259,7 +259,7 @@ LL | foo.trait_deprecated_unstable(); = help: add `#![feature(unstable_test_feature)]` to the crate attributes to enable = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date -error[E0658]: use of unstable library feature 'unstable_test_feature' +error[E0658]: use of unstable library feature `unstable_test_feature` --> $DIR/lint-stability-2.rs:156:13 | LL | foo.trait_deprecated_unstable_text(); @@ -268,7 +268,7 @@ LL | foo.trait_deprecated_unstable_text(); = help: add `#![feature(unstable_test_feature)]` to the crate attributes to enable = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date -error[E0658]: use of unstable library feature 'unstable_test_feature' +error[E0658]: use of unstable library feature `unstable_test_feature` --> $DIR/lint-stability-2.rs:158:13 | LL | foo.trait_unstable(); @@ -277,7 +277,7 @@ LL | foo.trait_unstable(); = help: add `#![feature(unstable_test_feature)]` to the crate attributes to enable = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date -error[E0658]: use of unstable library feature 'unstable_test_feature': text +error[E0658]: use of unstable library feature `unstable_test_feature`: text --> $DIR/lint-stability-2.rs:159:13 | LL | foo.trait_unstable_text(); diff --git a/tests/ui/lint/lint-stability-fields.stderr b/tests/ui/lint/lint-stability-fields.stderr index 9dffe94c12e6c..9cd3753cc3b90 100644 --- a/tests/ui/lint/lint-stability-fields.stderr +++ b/tests/ui/lint/lint-stability-fields.stderr @@ -1,4 +1,4 @@ -error[E0658]: use of unstable library feature 'unstable_test_feature' +error[E0658]: use of unstable library feature `unstable_test_feature` --> $DIR/lint-stability-fields.rs:56:17 | LL | let x = Unstable { @@ -7,7 +7,7 @@ LL | let x = Unstable { = help: add `#![feature(unstable_test_feature)]` to the crate attributes to enable = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date -error[E0658]: use of unstable library feature 'unstable_test_feature' +error[E0658]: use of unstable library feature `unstable_test_feature` --> $DIR/lint-stability-fields.rs:66:13 | LL | let Unstable { @@ -16,7 +16,7 @@ LL | let Unstable { = help: add `#![feature(unstable_test_feature)]` to the crate attributes to enable = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date -error[E0658]: use of unstable library feature 'unstable_test_feature' +error[E0658]: use of unstable library feature `unstable_test_feature` --> $DIR/lint-stability-fields.rs:72:13 | LL | let Unstable @@ -25,7 +25,7 @@ LL | let Unstable = help: add `#![feature(unstable_test_feature)]` to the crate attributes to enable = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date -error[E0658]: use of unstable library feature 'unstable_test_feature' +error[E0658]: use of unstable library feature `unstable_test_feature` --> $DIR/lint-stability-fields.rs:77:17 | LL | let x = reexport::Unstable2(1, 2, 3); @@ -34,7 +34,7 @@ LL | let x = reexport::Unstable2(1, 2, 3); = help: add `#![feature(unstable_test_feature)]` to the crate attributes to enable = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date -error[E0658]: use of unstable library feature 'unstable_test_feature' +error[E0658]: use of unstable library feature `unstable_test_feature` --> $DIR/lint-stability-fields.rs:79:17 | LL | let x = Unstable2(1, 2, 3); @@ -43,7 +43,7 @@ LL | let x = Unstable2(1, 2, 3); = help: add `#![feature(unstable_test_feature)]` to the crate attributes to enable = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date -error[E0658]: use of unstable library feature 'unstable_test_feature' +error[E0658]: use of unstable library feature `unstable_test_feature` --> $DIR/lint-stability-fields.rs:85:13 | LL | let Unstable2 @@ -52,7 +52,7 @@ LL | let Unstable2 = help: add `#![feature(unstable_test_feature)]` to the crate attributes to enable = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date -error[E0658]: use of unstable library feature 'unstable_test_feature' +error[E0658]: use of unstable library feature `unstable_test_feature` --> $DIR/lint-stability-fields.rs:90:13 | LL | let Unstable2 @@ -61,7 +61,7 @@ LL | let Unstable2 = help: add `#![feature(unstable_test_feature)]` to the crate attributes to enable = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date -error[E0658]: use of unstable library feature 'unstable_test_feature' +error[E0658]: use of unstable library feature `unstable_test_feature` --> $DIR/lint-stability-fields.rs:95:17 | LL | let x = Deprecated { @@ -70,7 +70,7 @@ LL | let x = Deprecated { = help: add `#![feature(unstable_test_feature)]` to the crate attributes to enable = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date -error[E0658]: use of unstable library feature 'unstable_test_feature' +error[E0658]: use of unstable library feature `unstable_test_feature` --> $DIR/lint-stability-fields.rs:105:13 | LL | let Deprecated { @@ -79,7 +79,7 @@ LL | let Deprecated { = help: add `#![feature(unstable_test_feature)]` to the crate attributes to enable = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date -error[E0658]: use of unstable library feature 'unstable_test_feature' +error[E0658]: use of unstable library feature `unstable_test_feature` --> $DIR/lint-stability-fields.rs:111:13 | LL | let Deprecated @@ -88,7 +88,7 @@ LL | let Deprecated = help: add `#![feature(unstable_test_feature)]` to the crate attributes to enable = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date -error[E0658]: use of unstable library feature 'unstable_test_feature' +error[E0658]: use of unstable library feature `unstable_test_feature` --> $DIR/lint-stability-fields.rs:115:17 | LL | let x = Deprecated2(1, 2, 3); @@ -97,7 +97,7 @@ LL | let x = Deprecated2(1, 2, 3); = help: add `#![feature(unstable_test_feature)]` to the crate attributes to enable = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date -error[E0658]: use of unstable library feature 'unstable_test_feature' +error[E0658]: use of unstable library feature `unstable_test_feature` --> $DIR/lint-stability-fields.rs:121:13 | LL | let Deprecated2 @@ -106,7 +106,7 @@ LL | let Deprecated2 = help: add `#![feature(unstable_test_feature)]` to the crate attributes to enable = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date -error[E0658]: use of unstable library feature 'unstable_test_feature' +error[E0658]: use of unstable library feature `unstable_test_feature` --> $DIR/lint-stability-fields.rs:126:13 | LL | let Deprecated2 @@ -115,7 +115,7 @@ LL | let Deprecated2 = help: add `#![feature(unstable_test_feature)]` to the crate attributes to enable = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date -error[E0658]: use of unstable library feature 'unstable_test_feature' +error[E0658]: use of unstable library feature `unstable_test_feature` --> $DIR/lint-stability-fields.rs:21:13 | LL | override1: 2, @@ -124,7 +124,7 @@ LL | override1: 2, = help: add `#![feature(unstable_test_feature)]` to the crate attributes to enable = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date -error[E0658]: use of unstable library feature 'unstable_test_feature' +error[E0658]: use of unstable library feature `unstable_test_feature` --> $DIR/lint-stability-fields.rs:22:13 | LL | override2: 3, @@ -133,7 +133,7 @@ LL | override2: 3, = help: add `#![feature(unstable_test_feature)]` to the crate attributes to enable = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date -error[E0658]: use of unstable library feature 'unstable_test_feature' +error[E0658]: use of unstable library feature `unstable_test_feature` --> $DIR/lint-stability-fields.rs:27:17 | LL | let _ = x.override1; @@ -142,7 +142,7 @@ LL | let _ = x.override1; = help: add `#![feature(unstable_test_feature)]` to the crate attributes to enable = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date -error[E0658]: use of unstable library feature 'unstable_test_feature' +error[E0658]: use of unstable library feature `unstable_test_feature` --> $DIR/lint-stability-fields.rs:28:17 | LL | let _ = x.override2; @@ -151,7 +151,7 @@ LL | let _ = x.override2; = help: add `#![feature(unstable_test_feature)]` to the crate attributes to enable = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date -error[E0658]: use of unstable library feature 'unstable_test_feature' +error[E0658]: use of unstable library feature `unstable_test_feature` --> $DIR/lint-stability-fields.rs:33:13 | LL | override1: _, @@ -160,7 +160,7 @@ LL | override1: _, = help: add `#![feature(unstable_test_feature)]` to the crate attributes to enable = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date -error[E0658]: use of unstable library feature 'unstable_test_feature' +error[E0658]: use of unstable library feature `unstable_test_feature` --> $DIR/lint-stability-fields.rs:34:13 | LL | override2: _, @@ -169,7 +169,7 @@ LL | override2: _, = help: add `#![feature(unstable_test_feature)]` to the crate attributes to enable = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date -error[E0658]: use of unstable library feature 'unstable_test_feature' +error[E0658]: use of unstable library feature `unstable_test_feature` --> $DIR/lint-stability-fields.rs:43:17 | LL | let _ = x.1; @@ -178,7 +178,7 @@ LL | let _ = x.1; = help: add `#![feature(unstable_test_feature)]` to the crate attributes to enable = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date -error[E0658]: use of unstable library feature 'unstable_test_feature' +error[E0658]: use of unstable library feature `unstable_test_feature` --> $DIR/lint-stability-fields.rs:44:17 | LL | let _ = x.2; @@ -187,7 +187,7 @@ LL | let _ = x.2; = help: add `#![feature(unstable_test_feature)]` to the crate attributes to enable = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date -error[E0658]: use of unstable library feature 'unstable_test_feature' +error[E0658]: use of unstable library feature `unstable_test_feature` --> $DIR/lint-stability-fields.rs:48:20 | LL | _, @@ -196,7 +196,7 @@ LL | _, = help: add `#![feature(unstable_test_feature)]` to the crate attributes to enable = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date -error[E0658]: use of unstable library feature 'unstable_test_feature' +error[E0658]: use of unstable library feature `unstable_test_feature` --> $DIR/lint-stability-fields.rs:49:20 | LL | _, @@ -205,7 +205,7 @@ LL | _, = help: add `#![feature(unstable_test_feature)]` to the crate attributes to enable = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date -error[E0658]: use of unstable library feature 'unstable_test_feature' +error[E0658]: use of unstable library feature `unstable_test_feature` --> $DIR/lint-stability-fields.rs:57:13 | LL | inherit: 1, @@ -214,7 +214,7 @@ LL | inherit: 1, = help: add `#![feature(unstable_test_feature)]` to the crate attributes to enable = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date -error[E0658]: use of unstable library feature 'unstable_test_feature' +error[E0658]: use of unstable library feature `unstable_test_feature` --> $DIR/lint-stability-fields.rs:59:13 | LL | override2: 3, @@ -223,7 +223,7 @@ LL | override2: 3, = help: add `#![feature(unstable_test_feature)]` to the crate attributes to enable = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date -error[E0658]: use of unstable library feature 'unstable_test_feature' +error[E0658]: use of unstable library feature `unstable_test_feature` --> $DIR/lint-stability-fields.rs:62:17 | LL | let _ = x.inherit; @@ -232,7 +232,7 @@ LL | let _ = x.inherit; = help: add `#![feature(unstable_test_feature)]` to the crate attributes to enable = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date -error[E0658]: use of unstable library feature 'unstable_test_feature' +error[E0658]: use of unstable library feature `unstable_test_feature` --> $DIR/lint-stability-fields.rs:64:17 | LL | let _ = x.override2; @@ -241,7 +241,7 @@ LL | let _ = x.override2; = help: add `#![feature(unstable_test_feature)]` to the crate attributes to enable = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date -error[E0658]: use of unstable library feature 'unstable_test_feature' +error[E0658]: use of unstable library feature `unstable_test_feature` --> $DIR/lint-stability-fields.rs:67:13 | LL | inherit: _, @@ -250,7 +250,7 @@ LL | inherit: _, = help: add `#![feature(unstable_test_feature)]` to the crate attributes to enable = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date -error[E0658]: use of unstable library feature 'unstable_test_feature' +error[E0658]: use of unstable library feature `unstable_test_feature` --> $DIR/lint-stability-fields.rs:69:13 | LL | override2: _ @@ -259,7 +259,7 @@ LL | override2: _ = help: add `#![feature(unstable_test_feature)]` to the crate attributes to enable = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date -error[E0658]: use of unstable library feature 'unstable_test_feature' +error[E0658]: use of unstable library feature `unstable_test_feature` --> $DIR/lint-stability-fields.rs:81:17 | LL | let _ = x.0; @@ -268,7 +268,7 @@ LL | let _ = x.0; = help: add `#![feature(unstable_test_feature)]` to the crate attributes to enable = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date -error[E0658]: use of unstable library feature 'unstable_test_feature' +error[E0658]: use of unstable library feature `unstable_test_feature` --> $DIR/lint-stability-fields.rs:83:17 | LL | let _ = x.2; @@ -277,7 +277,7 @@ LL | let _ = x.2; = help: add `#![feature(unstable_test_feature)]` to the crate attributes to enable = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date -error[E0658]: use of unstable library feature 'unstable_test_feature' +error[E0658]: use of unstable library feature `unstable_test_feature` --> $DIR/lint-stability-fields.rs:86:14 | LL | (_, @@ -286,7 +286,7 @@ LL | (_, = help: add `#![feature(unstable_test_feature)]` to the crate attributes to enable = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date -error[E0658]: use of unstable library feature 'unstable_test_feature' +error[E0658]: use of unstable library feature `unstable_test_feature` --> $DIR/lint-stability-fields.rs:88:14 | LL | _) @@ -295,7 +295,7 @@ LL | _) = help: add `#![feature(unstable_test_feature)]` to the crate attributes to enable = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date -error[E0658]: use of unstable library feature 'unstable_test_feature' +error[E0658]: use of unstable library feature `unstable_test_feature` --> $DIR/lint-stability-fields.rs:96:13 | LL | inherit: 1, @@ -304,7 +304,7 @@ LL | inherit: 1, = help: add `#![feature(unstable_test_feature)]` to the crate attributes to enable = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date -error[E0658]: use of unstable library feature 'unstable_test_feature' +error[E0658]: use of unstable library feature `unstable_test_feature` --> $DIR/lint-stability-fields.rs:98:13 | LL | override2: 3, @@ -313,7 +313,7 @@ LL | override2: 3, = help: add `#![feature(unstable_test_feature)]` to the crate attributes to enable = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date -error[E0658]: use of unstable library feature 'unstable_test_feature' +error[E0658]: use of unstable library feature `unstable_test_feature` --> $DIR/lint-stability-fields.rs:101:17 | LL | let _ = x.inherit; @@ -322,7 +322,7 @@ LL | let _ = x.inherit; = help: add `#![feature(unstable_test_feature)]` to the crate attributes to enable = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date -error[E0658]: use of unstable library feature 'unstable_test_feature' +error[E0658]: use of unstable library feature `unstable_test_feature` --> $DIR/lint-stability-fields.rs:103:17 | LL | let _ = x.override2; @@ -331,7 +331,7 @@ LL | let _ = x.override2; = help: add `#![feature(unstable_test_feature)]` to the crate attributes to enable = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date -error[E0658]: use of unstable library feature 'unstable_test_feature' +error[E0658]: use of unstable library feature `unstable_test_feature` --> $DIR/lint-stability-fields.rs:106:13 | LL | inherit: _, @@ -340,7 +340,7 @@ LL | inherit: _, = help: add `#![feature(unstable_test_feature)]` to the crate attributes to enable = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date -error[E0658]: use of unstable library feature 'unstable_test_feature' +error[E0658]: use of unstable library feature `unstable_test_feature` --> $DIR/lint-stability-fields.rs:108:13 | LL | override2: _ @@ -349,7 +349,7 @@ LL | override2: _ = help: add `#![feature(unstable_test_feature)]` to the crate attributes to enable = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date -error[E0658]: use of unstable library feature 'unstable_test_feature' +error[E0658]: use of unstable library feature `unstable_test_feature` --> $DIR/lint-stability-fields.rs:117:17 | LL | let _ = x.0; @@ -358,7 +358,7 @@ LL | let _ = x.0; = help: add `#![feature(unstable_test_feature)]` to the crate attributes to enable = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date -error[E0658]: use of unstable library feature 'unstable_test_feature' +error[E0658]: use of unstable library feature `unstable_test_feature` --> $DIR/lint-stability-fields.rs:119:17 | LL | let _ = x.2; @@ -367,7 +367,7 @@ LL | let _ = x.2; = help: add `#![feature(unstable_test_feature)]` to the crate attributes to enable = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date -error[E0658]: use of unstable library feature 'unstable_test_feature' +error[E0658]: use of unstable library feature `unstable_test_feature` --> $DIR/lint-stability-fields.rs:122:14 | LL | (_, @@ -376,7 +376,7 @@ LL | (_, = help: add `#![feature(unstable_test_feature)]` to the crate attributes to enable = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date -error[E0658]: use of unstable library feature 'unstable_test_feature' +error[E0658]: use of unstable library feature `unstable_test_feature` --> $DIR/lint-stability-fields.rs:124:14 | LL | _) diff --git a/tests/ui/lint/lint-stability.rs b/tests/ui/lint/lint-stability.rs index eaf9796df6a3c..f080b5e4bbeb1 100644 --- a/tests/ui/lint/lint-stability.rs +++ b/tests/ui/lint/lint-stability.rs @@ -61,11 +61,11 @@ mod cross_crate { ::trait_unstable(&foo); //~ ERROR use of unstable library feature unstable_text(); - //~^ ERROR use of unstable library feature 'unstable_test_feature': text + //~^ ERROR use of unstable library feature `unstable_test_feature`: text Trait::trait_unstable_text(&foo); - //~^ ERROR use of unstable library feature 'unstable_test_feature': text + //~^ ERROR use of unstable library feature `unstable_test_feature`: text ::trait_unstable_text(&foo); - //~^ ERROR use of unstable library feature 'unstable_test_feature': text + //~^ ERROR use of unstable library feature `unstable_test_feature`: text stable(); foo.method_stable(); @@ -152,9 +152,9 @@ mod cross_crate { Trait::trait_unstable(&foo); //~ ERROR use of unstable library feature ::trait_unstable(&foo); //~ ERROR use of unstable library feature Trait::trait_unstable_text(&foo); - //~^ ERROR use of unstable library feature 'unstable_test_feature': text + //~^ ERROR use of unstable library feature `unstable_test_feature`: text ::trait_unstable_text(&foo); - //~^ ERROR use of unstable library feature 'unstable_test_feature': text + //~^ ERROR use of unstable library feature `unstable_test_feature`: text foo.trait_stable(); Trait::trait_stable(&foo); ::trait_stable(&foo); diff --git a/tests/ui/lint/lint-stability.stderr b/tests/ui/lint/lint-stability.stderr index af5816d4564f1..a22fce70a4ad5 100644 --- a/tests/ui/lint/lint-stability.stderr +++ b/tests/ui/lint/lint-stability.stderr @@ -1,4 +1,4 @@ -error[E0658]: use of unstable library feature 'unstable_test_feature' +error[E0658]: use of unstable library feature `unstable_test_feature` --> $DIR/lint-stability.rs:17:5 | LL | extern crate stability_cfg2; @@ -7,7 +7,7 @@ LL | extern crate stability_cfg2; = help: add `#![feature(unstable_test_feature)]` to the crate attributes to enable = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date -error[E0658]: use of unstable library feature 'unstable_test_feature' +error[E0658]: use of unstable library feature `unstable_test_feature` --> $DIR/lint-stability.rs:45:9 | LL | deprecated_unstable(); @@ -16,7 +16,7 @@ LL | deprecated_unstable(); = help: add `#![feature(unstable_test_feature)]` to the crate attributes to enable = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date -error[E0658]: use of unstable library feature 'unstable_test_feature' +error[E0658]: use of unstable library feature `unstable_test_feature` --> $DIR/lint-stability.rs:47:9 | LL | Trait::trait_deprecated_unstable(&foo); @@ -25,7 +25,7 @@ LL | Trait::trait_deprecated_unstable(&foo); = help: add `#![feature(unstable_test_feature)]` to the crate attributes to enable = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date -error[E0658]: use of unstable library feature 'unstable_test_feature' +error[E0658]: use of unstable library feature `unstable_test_feature` --> $DIR/lint-stability.rs:49:9 | LL | ::trait_deprecated_unstable(&foo); @@ -34,7 +34,7 @@ LL | ::trait_deprecated_unstable(&foo); = help: add `#![feature(unstable_test_feature)]` to the crate attributes to enable = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date -error[E0658]: use of unstable library feature 'unstable_test_feature' +error[E0658]: use of unstable library feature `unstable_test_feature` --> $DIR/lint-stability.rs:52:9 | LL | deprecated_unstable_text(); @@ -43,7 +43,7 @@ LL | deprecated_unstable_text(); = help: add `#![feature(unstable_test_feature)]` to the crate attributes to enable = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date -error[E0658]: use of unstable library feature 'unstable_test_feature' +error[E0658]: use of unstable library feature `unstable_test_feature` --> $DIR/lint-stability.rs:54:9 | LL | Trait::trait_deprecated_unstable_text(&foo); @@ -52,7 +52,7 @@ LL | Trait::trait_deprecated_unstable_text(&foo); = help: add `#![feature(unstable_test_feature)]` to the crate attributes to enable = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date -error[E0658]: use of unstable library feature 'unstable_test_feature' +error[E0658]: use of unstable library feature `unstable_test_feature` --> $DIR/lint-stability.rs:56:9 | LL | ::trait_deprecated_unstable_text(&foo); @@ -61,7 +61,7 @@ LL | ::trait_deprecated_unstable_text(&foo); = help: add `#![feature(unstable_test_feature)]` to the crate attributes to enable = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date -error[E0658]: use of unstable library feature 'unstable_test_feature' +error[E0658]: use of unstable library feature `unstable_test_feature` --> $DIR/lint-stability.rs:59:9 | LL | unstable(); @@ -70,7 +70,7 @@ LL | unstable(); = help: add `#![feature(unstable_test_feature)]` to the crate attributes to enable = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date -error[E0658]: use of unstable library feature 'unstable_test_feature' +error[E0658]: use of unstable library feature `unstable_test_feature` --> $DIR/lint-stability.rs:60:9 | LL | Trait::trait_unstable(&foo); @@ -79,7 +79,7 @@ LL | Trait::trait_unstable(&foo); = help: add `#![feature(unstable_test_feature)]` to the crate attributes to enable = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date -error[E0658]: use of unstable library feature 'unstable_test_feature' +error[E0658]: use of unstable library feature `unstable_test_feature` --> $DIR/lint-stability.rs:61:9 | LL | ::trait_unstable(&foo); @@ -88,7 +88,7 @@ LL | ::trait_unstable(&foo); = help: add `#![feature(unstable_test_feature)]` to the crate attributes to enable = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date -error[E0658]: use of unstable library feature 'unstable_test_feature': text +error[E0658]: use of unstable library feature `unstable_test_feature`: text --> $DIR/lint-stability.rs:63:9 | LL | unstable_text(); @@ -97,7 +97,7 @@ LL | unstable_text(); = help: add `#![feature(unstable_test_feature)]` to the crate attributes to enable = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date -error[E0658]: use of unstable library feature 'unstable_test_feature': text +error[E0658]: use of unstable library feature `unstable_test_feature`: text --> $DIR/lint-stability.rs:65:9 | LL | Trait::trait_unstable_text(&foo); @@ -106,7 +106,7 @@ LL | Trait::trait_unstable_text(&foo); = help: add `#![feature(unstable_test_feature)]` to the crate attributes to enable = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date -error[E0658]: use of unstable library feature 'unstable_test_feature': text +error[E0658]: use of unstable library feature `unstable_test_feature`: text --> $DIR/lint-stability.rs:67:9 | LL | ::trait_unstable_text(&foo); @@ -115,7 +115,7 @@ LL | ::trait_unstable_text(&foo); = help: add `#![feature(unstable_test_feature)]` to the crate attributes to enable = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date -error[E0658]: use of unstable library feature 'unstable_test_feature' +error[E0658]: use of unstable library feature `unstable_test_feature` --> $DIR/lint-stability.rs:99:17 | LL | let _ = DeprecatedUnstableStruct { @@ -124,7 +124,7 @@ LL | let _ = DeprecatedUnstableStruct { = help: add `#![feature(unstable_test_feature)]` to the crate attributes to enable = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date -error[E0658]: use of unstable library feature 'unstable_test_feature' +error[E0658]: use of unstable library feature `unstable_test_feature` --> $DIR/lint-stability.rs:103:17 | LL | let _ = UnstableStruct { i: 0 }; @@ -133,7 +133,7 @@ LL | let _ = UnstableStruct { i: 0 }; = help: add `#![feature(unstable_test_feature)]` to the crate attributes to enable = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date -error[E0658]: use of unstable library feature 'unstable_test_feature' +error[E0658]: use of unstable library feature `unstable_test_feature` --> $DIR/lint-stability.rs:107:17 | LL | let _ = DeprecatedUnstableUnitStruct; @@ -142,7 +142,7 @@ LL | let _ = DeprecatedUnstableUnitStruct; = help: add `#![feature(unstable_test_feature)]` to the crate attributes to enable = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date -error[E0658]: use of unstable library feature 'unstable_test_feature' +error[E0658]: use of unstable library feature `unstable_test_feature` --> $DIR/lint-stability.rs:109:17 | LL | let _ = UnstableUnitStruct; @@ -151,7 +151,7 @@ LL | let _ = UnstableUnitStruct; = help: add `#![feature(unstable_test_feature)]` to the crate attributes to enable = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date -error[E0658]: use of unstable library feature 'unstable_test_feature' +error[E0658]: use of unstable library feature `unstable_test_feature` --> $DIR/lint-stability.rs:113:17 | LL | let _ = Enum::DeprecatedUnstableVariant; @@ -160,7 +160,7 @@ LL | let _ = Enum::DeprecatedUnstableVariant; = help: add `#![feature(unstable_test_feature)]` to the crate attributes to enable = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date -error[E0658]: use of unstable library feature 'unstable_test_feature' +error[E0658]: use of unstable library feature `unstable_test_feature` --> $DIR/lint-stability.rs:115:17 | LL | let _ = Enum::UnstableVariant; @@ -169,7 +169,7 @@ LL | let _ = Enum::UnstableVariant; = help: add `#![feature(unstable_test_feature)]` to the crate attributes to enable = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date -error[E0658]: use of unstable library feature 'unstable_test_feature' +error[E0658]: use of unstable library feature `unstable_test_feature` --> $DIR/lint-stability.rs:119:17 | LL | let _ = DeprecatedUnstableTupleStruct (1); @@ -178,7 +178,7 @@ LL | let _ = DeprecatedUnstableTupleStruct (1); = help: add `#![feature(unstable_test_feature)]` to the crate attributes to enable = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date -error[E0658]: use of unstable library feature 'unstable_test_feature' +error[E0658]: use of unstable library feature `unstable_test_feature` --> $DIR/lint-stability.rs:121:17 | LL | let _ = UnstableTupleStruct (1); @@ -187,7 +187,7 @@ LL | let _ = UnstableTupleStruct (1); = help: add `#![feature(unstable_test_feature)]` to the crate attributes to enable = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date -error[E0658]: use of unstable library feature 'unstable_test_feature' +error[E0658]: use of unstable library feature `unstable_test_feature` --> $DIR/lint-stability.rs:130:25 | LL | macro_test_arg!(deprecated_unstable_text()); @@ -196,7 +196,7 @@ LL | macro_test_arg!(deprecated_unstable_text()); = help: add `#![feature(unstable_test_feature)]` to the crate attributes to enable = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date -error[E0658]: use of unstable library feature 'unstable_test_feature' +error[E0658]: use of unstable library feature `unstable_test_feature` --> $DIR/lint-stability.rs:144:9 | LL | Trait::trait_deprecated_unstable(&foo); @@ -205,7 +205,7 @@ LL | Trait::trait_deprecated_unstable(&foo); = help: add `#![feature(unstable_test_feature)]` to the crate attributes to enable = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date -error[E0658]: use of unstable library feature 'unstable_test_feature' +error[E0658]: use of unstable library feature `unstable_test_feature` --> $DIR/lint-stability.rs:146:9 | LL | ::trait_deprecated_unstable(&foo); @@ -214,7 +214,7 @@ LL | ::trait_deprecated_unstable(&foo); = help: add `#![feature(unstable_test_feature)]` to the crate attributes to enable = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date -error[E0658]: use of unstable library feature 'unstable_test_feature' +error[E0658]: use of unstable library feature `unstable_test_feature` --> $DIR/lint-stability.rs:148:9 | LL | Trait::trait_deprecated_unstable_text(&foo); @@ -223,7 +223,7 @@ LL | Trait::trait_deprecated_unstable_text(&foo); = help: add `#![feature(unstable_test_feature)]` to the crate attributes to enable = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date -error[E0658]: use of unstable library feature 'unstable_test_feature' +error[E0658]: use of unstable library feature `unstable_test_feature` --> $DIR/lint-stability.rs:150:9 | LL | ::trait_deprecated_unstable_text(&foo); @@ -232,7 +232,7 @@ LL | ::trait_deprecated_unstable_text(&foo); = help: add `#![feature(unstable_test_feature)]` to the crate attributes to enable = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date -error[E0658]: use of unstable library feature 'unstable_test_feature' +error[E0658]: use of unstable library feature `unstable_test_feature` --> $DIR/lint-stability.rs:152:9 | LL | Trait::trait_unstable(&foo); @@ -241,7 +241,7 @@ LL | Trait::trait_unstable(&foo); = help: add `#![feature(unstable_test_feature)]` to the crate attributes to enable = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date -error[E0658]: use of unstable library feature 'unstable_test_feature' +error[E0658]: use of unstable library feature `unstable_test_feature` --> $DIR/lint-stability.rs:153:9 | LL | ::trait_unstable(&foo); @@ -250,7 +250,7 @@ LL | ::trait_unstable(&foo); = help: add `#![feature(unstable_test_feature)]` to the crate attributes to enable = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date -error[E0658]: use of unstable library feature 'unstable_test_feature': text +error[E0658]: use of unstable library feature `unstable_test_feature`: text --> $DIR/lint-stability.rs:154:9 | LL | Trait::trait_unstable_text(&foo); @@ -259,7 +259,7 @@ LL | Trait::trait_unstable_text(&foo); = help: add `#![feature(unstable_test_feature)]` to the crate attributes to enable = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date -error[E0658]: use of unstable library feature 'unstable_test_feature': text +error[E0658]: use of unstable library feature `unstable_test_feature`: text --> $DIR/lint-stability.rs:156:9 | LL | ::trait_unstable_text(&foo); @@ -268,7 +268,7 @@ LL | ::trait_unstable_text(&foo); = help: add `#![feature(unstable_test_feature)]` to the crate attributes to enable = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date -error[E0658]: use of unstable library feature 'unstable_test_feature' +error[E0658]: use of unstable library feature `unstable_test_feature` --> $DIR/lint-stability.rs:172:10 | LL | impl UnstableTrait for S { } @@ -277,7 +277,7 @@ LL | impl UnstableTrait for S { } = help: add `#![feature(unstable_test_feature)]` to the crate attributes to enable = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date -error[E0658]: use of unstable library feature 'unstable_test_feature' +error[E0658]: use of unstable library feature `unstable_test_feature` --> $DIR/lint-stability.rs:174:24 | LL | trait LocalTrait : UnstableTrait { } @@ -286,7 +286,7 @@ LL | trait LocalTrait : UnstableTrait { } = help: add `#![feature(unstable_test_feature)]` to the crate attributes to enable = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date -error[E0658]: use of unstable library feature 'unstable_test_feature' +error[E0658]: use of unstable library feature `unstable_test_feature` --> $DIR/lint-stability.rs:179:9 | LL | fn trait_unstable(&self) {} @@ -295,7 +295,7 @@ LL | fn trait_unstable(&self) {} = help: add `#![feature(unstable_test_feature)]` to the crate attributes to enable = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date -error[E0658]: use of unstable library feature 'unstable_test_feature' +error[E0658]: use of unstable library feature `unstable_test_feature` --> $DIR/lint-stability.rs:184:5 | LL | extern crate inherited_stability; @@ -304,7 +304,7 @@ LL | extern crate inherited_stability; = help: add `#![feature(unstable_test_feature)]` to the crate attributes to enable = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date -error[E0658]: use of unstable library feature 'unstable_test_feature' +error[E0658]: use of unstable library feature `unstable_test_feature` --> $DIR/lint-stability.rs:185:9 | LL | use self::inherited_stability::*; @@ -313,7 +313,7 @@ LL | use self::inherited_stability::*; = help: add `#![feature(unstable_test_feature)]` to the crate attributes to enable = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date -error[E0658]: use of unstable library feature 'unstable_test_feature' +error[E0658]: use of unstable library feature `unstable_test_feature` --> $DIR/lint-stability.rs:188:9 | LL | unstable(); @@ -322,7 +322,7 @@ LL | unstable(); = help: add `#![feature(unstable_test_feature)]` to the crate attributes to enable = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date -error[E0658]: use of unstable library feature 'unstable_test_feature' +error[E0658]: use of unstable library feature `unstable_test_feature` --> $DIR/lint-stability.rs:191:9 | LL | stable_mod::unstable(); @@ -331,7 +331,7 @@ LL | stable_mod::unstable(); = help: add `#![feature(unstable_test_feature)]` to the crate attributes to enable = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date -error[E0658]: use of unstable library feature 'unstable_test_feature' +error[E0658]: use of unstable library feature `unstable_test_feature` --> $DIR/lint-stability.rs:194:9 | LL | unstable_mod::deprecated(); @@ -340,7 +340,7 @@ LL | unstable_mod::deprecated(); = help: add `#![feature(unstable_test_feature)]` to the crate attributes to enable = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date -error[E0658]: use of unstable library feature 'unstable_test_feature' +error[E0658]: use of unstable library feature `unstable_test_feature` --> $DIR/lint-stability.rs:195:9 | LL | unstable_mod::unstable(); @@ -349,7 +349,7 @@ LL | unstable_mod::unstable(); = help: add `#![feature(unstable_test_feature)]` to the crate attributes to enable = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date -error[E0658]: use of unstable library feature 'unstable_test_feature' +error[E0658]: use of unstable library feature `unstable_test_feature` --> $DIR/lint-stability.rs:197:17 | LL | let _ = Unstable::UnstableVariant; @@ -358,7 +358,7 @@ LL | let _ = Unstable::UnstableVariant; = help: add `#![feature(unstable_test_feature)]` to the crate attributes to enable = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date -error[E0658]: use of unstable library feature 'unstable_test_feature' +error[E0658]: use of unstable library feature `unstable_test_feature` --> $DIR/lint-stability.rs:198:17 | LL | let _ = Unstable::StableVariant; @@ -367,7 +367,7 @@ LL | let _ = Unstable::StableVariant; = help: add `#![feature(unstable_test_feature)]` to the crate attributes to enable = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date -error[E0658]: use of unstable library feature 'unstable_test_feature' +error[E0658]: use of unstable library feature `unstable_test_feature` --> $DIR/lint-stability.rs:88:48 | LL | struct S1(T::TypeUnstable); @@ -376,7 +376,7 @@ LL | struct S1(T::TypeUnstable); = help: add `#![feature(unstable_test_feature)]` to the crate attributes to enable = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date -error[E0658]: use of unstable library feature 'unstable_test_feature' +error[E0658]: use of unstable library feature `unstable_test_feature` --> $DIR/lint-stability.rs:92:13 | LL | TypeUnstable = u8, diff --git a/tests/ui/macros/macro-stability.rs b/tests/ui/macros/macro-stability.rs index a909b14f47b1b..cd419d5135483 100644 --- a/tests/ui/macros/macro-stability.rs +++ b/tests/ui/macros/macro-stability.rs @@ -19,10 +19,10 @@ macro local_unstable_modern() {} macro_rules! local_deprecated{ () => () } fn main() { - local_unstable!(); //~ ERROR use of unstable library feature 'local_unstable' - local_unstable_modern!(); //~ ERROR use of unstable library feature 'local_unstable' - unstable_macro!(); //~ ERROR use of unstable library feature 'unstable_macros' - // unstable_macro_modern!(); // ERROR use of unstable library feature 'unstable_macros' + local_unstable!(); //~ ERROR use of unstable library feature `local_unstable` + local_unstable_modern!(); //~ ERROR use of unstable library feature `local_unstable` + unstable_macro!(); //~ ERROR use of unstable library feature `unstable_macros` + // unstable_macro_modern!(); // ERROR use of unstable library feature `unstable_macros` deprecated_macro!(); //~^ WARN use of deprecated macro `deprecated_macro`: deprecation note diff --git a/tests/ui/macros/macro-stability.stderr b/tests/ui/macros/macro-stability.stderr index 21b6cef5c9cee..fd8f029b4c478 100644 --- a/tests/ui/macros/macro-stability.stderr +++ b/tests/ui/macros/macro-stability.stderr @@ -1,4 +1,4 @@ -error[E0658]: use of unstable library feature 'local_unstable' +error[E0658]: use of unstable library feature `local_unstable` --> $DIR/macro-stability.rs:22:5 | LL | local_unstable!(); @@ -7,7 +7,7 @@ LL | local_unstable!(); = help: add `#![feature(local_unstable)]` to the crate attributes to enable = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date -error[E0658]: use of unstable library feature 'local_unstable' +error[E0658]: use of unstable library feature `local_unstable` --> $DIR/macro-stability.rs:23:5 | LL | local_unstable_modern!(); @@ -16,7 +16,7 @@ LL | local_unstable_modern!(); = help: add `#![feature(local_unstable)]` to the crate attributes to enable = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date -error[E0658]: use of unstable library feature 'unstable_macros' +error[E0658]: use of unstable library feature `unstable_macros` --> $DIR/macro-stability.rs:24:5 | LL | unstable_macro!(); diff --git a/tests/ui/offset-of/offset-of-unstable.stderr b/tests/ui/offset-of/offset-of-unstable.stderr index 44ccad3ff39fd..d249e1b176d7f 100644 --- a/tests/ui/offset-of/offset-of-unstable.stderr +++ b/tests/ui/offset-of/offset-of-unstable.stderr @@ -1,4 +1,4 @@ -error[E0658]: use of unstable library feature 'unstable_test_feature' +error[E0658]: use of unstable library feature `unstable_test_feature` --> $DIR/offset-of-unstable.rs:12:9 | LL | Unstable, @@ -7,7 +7,7 @@ LL | Unstable, = help: add `#![feature(unstable_test_feature)]` to the crate attributes to enable = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date -error[E0658]: use of unstable library feature 'unstable_test_feature' +error[E0658]: use of unstable library feature `unstable_test_feature` --> $DIR/offset-of-unstable.rs:21:9 | LL | UnstableWithStableFieldType, @@ -16,7 +16,7 @@ LL | UnstableWithStableFieldType, = help: add `#![feature(unstable_test_feature)]` to the crate attributes to enable = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date -error[E0658]: use of unstable library feature 'unstable_test_feature' +error[E0658]: use of unstable library feature `unstable_test_feature` --> $DIR/offset-of-unstable.rs:26:9 | LL | UnstableWithStableFieldType, @@ -25,7 +25,7 @@ LL | UnstableWithStableFieldType, = help: add `#![feature(unstable_test_feature)]` to the crate attributes to enable = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date -error[E0658]: use of unstable library feature 'unstable_test_feature' +error[E0658]: use of unstable library feature `unstable_test_feature` --> $DIR/offset-of-unstable.rs:10:5 | LL | / offset_of!( @@ -39,7 +39,7 @@ LL | | ); = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date = note: this error originates in the macro `offset_of` (in Nightly builds, run with -Z macro-backtrace for more info) -error[E0658]: use of unstable library feature 'unstable_test_feature' +error[E0658]: use of unstable library feature `unstable_test_feature` --> $DIR/offset-of-unstable.rs:16:5 | LL | offset_of!(StableWithUnstableField, unstable); @@ -49,7 +49,7 @@ LL | offset_of!(StableWithUnstableField, unstable); = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date = note: this error originates in the macro `offset_of` (in Nightly builds, run with -Z macro-backtrace for more info) -error[E0658]: use of unstable library feature 'unstable_test_feature' +error[E0658]: use of unstable library feature `unstable_test_feature` --> $DIR/offset-of-unstable.rs:18:5 | LL | offset_of!(StableWithUnstableFieldType, stable.unstable); @@ -59,7 +59,7 @@ LL | offset_of!(StableWithUnstableFieldType, stable.unstable); = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date = note: this error originates in the macro `offset_of` (in Nightly builds, run with -Z macro-backtrace for more info) -error[E0658]: use of unstable library feature 'unstable_test_feature' +error[E0658]: use of unstable library feature `unstable_test_feature` --> $DIR/offset-of-unstable.rs:19:5 | LL | / offset_of!( @@ -73,7 +73,7 @@ LL | | ); = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date = note: this error originates in the macro `offset_of` (in Nightly builds, run with -Z macro-backtrace for more info) -error[E0658]: use of unstable library feature 'unstable_test_feature' +error[E0658]: use of unstable library feature `unstable_test_feature` --> $DIR/offset-of-unstable.rs:24:5 | LL | / offset_of!( diff --git a/tests/ui/pin-macro/cant_access_internals.rs b/tests/ui/pin-macro/cant_access_internals.rs index 17fe7fa073848..36a47d0fdf937 100644 --- a/tests/ui/pin-macro/cant_access_internals.rs +++ b/tests/ui/pin-macro/cant_access_internals.rs @@ -8,5 +8,5 @@ use core::{ fn main() { let mut phantom_pinned = pin!(PhantomPinned); - mem::take(phantom_pinned.__pointer); //~ ERROR use of unstable library feature 'unsafe_pin_internals' + mem::take(phantom_pinned.__pointer); //~ ERROR use of unstable library feature `unsafe_pin_internals` } diff --git a/tests/ui/pin-macro/cant_access_internals.stderr b/tests/ui/pin-macro/cant_access_internals.stderr index 444314a9d8bb3..8ad897bbbb951 100644 --- a/tests/ui/pin-macro/cant_access_internals.stderr +++ b/tests/ui/pin-macro/cant_access_internals.stderr @@ -1,4 +1,4 @@ -error[E0658]: use of unstable library feature 'unsafe_pin_internals' +error[E0658]: use of unstable library feature `unsafe_pin_internals` --> $DIR/cant_access_internals.rs:11:15 | LL | mem::take(phantom_pinned.__pointer); diff --git a/tests/ui/proc-macro/expand-to-unstable.stderr b/tests/ui/proc-macro/expand-to-unstable.stderr index 9eb701d970256..563c7ae8f9561 100644 --- a/tests/ui/proc-macro/expand-to-unstable.stderr +++ b/tests/ui/proc-macro/expand-to-unstable.stderr @@ -1,4 +1,4 @@ -error[E0658]: use of unstable library feature 'core_intrinsics': intrinsics are unlikely to ever be stabilized, instead they should be used through stabilized interfaces in the rest of the standard library +error[E0658]: use of unstable library feature `core_intrinsics`: intrinsics are unlikely to ever be stabilized, instead they should be used through stabilized interfaces in the rest of the standard library --> $DIR/expand-to-unstable.rs:8:10 | LL | #[derive(Unstable)] diff --git a/tests/ui/rfcs/rfc-1445-restrict-constants-in-patterns/feature-gate.no_gate.stderr b/tests/ui/rfcs/rfc-1445-restrict-constants-in-patterns/feature-gate.no_gate.stderr index af6d05c1f96ff..0858434962664 100644 --- a/tests/ui/rfcs/rfc-1445-restrict-constants-in-patterns/feature-gate.no_gate.stderr +++ b/tests/ui/rfcs/rfc-1445-restrict-constants-in-patterns/feature-gate.no_gate.stderr @@ -1,4 +1,4 @@ -error[E0658]: use of unstable library feature 'structural_match' +error[E0658]: use of unstable library feature `structural_match` --> $DIR/feature-gate.rs:29:6 | LL | impl std::marker::StructuralPartialEq for Foo { } diff --git a/tests/ui/rfcs/rfc-1445-restrict-constants-in-patterns/feature-gate.rs b/tests/ui/rfcs/rfc-1445-restrict-constants-in-patterns/feature-gate.rs index 839e908544091..711b07fee3b6f 100644 --- a/tests/ui/rfcs/rfc-1445-restrict-constants-in-patterns/feature-gate.rs +++ b/tests/ui/rfcs/rfc-1445-restrict-constants-in-patterns/feature-gate.rs @@ -27,7 +27,7 @@ fn main() { //[with_gate]~ ERROR fatal error triggered by #[rustc_error] } impl std::marker::StructuralPartialEq for Foo { } -//[no_gate]~^ ERROR use of unstable library feature 'structural_match' +//[no_gate]~^ ERROR use of unstable library feature `structural_match` impl PartialEq for Foo { fn eq(&self, other: &Self) -> bool { diff --git a/tests/ui/stability-attribute/accidental-stable-in-unstable.rs b/tests/ui/stability-attribute/accidental-stable-in-unstable.rs index f8bbe90cfc53b..86a9d2066eb58 100644 --- a/tests/ui/stability-attribute/accidental-stable-in-unstable.rs +++ b/tests/ui/stability-attribute/accidental-stable-in-unstable.rs @@ -3,7 +3,7 @@ extern crate core; // Known accidental stabilizations with no known users, slated for un-stabilization // fully stable @ core::char::UNICODE_VERSION -use core::unicode::UNICODE_VERSION; //~ ERROR use of unstable library feature 'unicode_internals' +use core::unicode::UNICODE_VERSION; //~ ERROR use of unstable library feature `unicode_internals` // Known accidental stabilizations with known users // fully stable @ core::mem::transmute diff --git a/tests/ui/stability-attribute/accidental-stable-in-unstable.stderr b/tests/ui/stability-attribute/accidental-stable-in-unstable.stderr index 4abf8243d2fca..9943e6d7ac6ab 100644 --- a/tests/ui/stability-attribute/accidental-stable-in-unstable.stderr +++ b/tests/ui/stability-attribute/accidental-stable-in-unstable.stderr @@ -1,4 +1,4 @@ -error[E0658]: use of unstable library feature 'unicode_internals' +error[E0658]: use of unstable library feature `unicode_internals` --> $DIR/accidental-stable-in-unstable.rs:6:5 | LL | use core::unicode::UNICODE_VERSION; diff --git a/tests/ui/stability-attribute/allow-unstable-reexport.rs b/tests/ui/stability-attribute/allow-unstable-reexport.rs index d2f1593c31a93..b6ed211091807 100644 --- a/tests/ui/stability-attribute/allow-unstable-reexport.rs +++ b/tests/ui/stability-attribute/allow-unstable-reexport.rs @@ -20,11 +20,11 @@ pub use lint_stability_reexport::unstable_text; // Ensure items which aren't marked as unstable can't re-export unstable items #[stable(feature = "lint_stability", since = "1.0.0")] pub use lint_stability::unstable as unstable2; -//~^ ERROR use of unstable library feature 'unstable_test_feature' +//~^ ERROR use of unstable library feature `unstable_test_feature` fn main() { // Since we didn't enable the feature in this crate, we still can't // use these items, even though they're in scope from the `use`s which are now allowed. - unstable(); //~ ERROR use of unstable library feature 'unstable_test_feature' - unstable_text(); //~ ERROR use of unstable library feature 'unstable_test_feature' + unstable(); //~ ERROR use of unstable library feature `unstable_test_feature` + unstable_text(); //~ ERROR use of unstable library feature `unstable_test_feature` } diff --git a/tests/ui/stability-attribute/allow-unstable-reexport.stderr b/tests/ui/stability-attribute/allow-unstable-reexport.stderr index af75b6afb049f..f869eeb790ea3 100644 --- a/tests/ui/stability-attribute/allow-unstable-reexport.stderr +++ b/tests/ui/stability-attribute/allow-unstable-reexport.stderr @@ -1,4 +1,4 @@ -error[E0658]: use of unstable library feature 'unstable_test_feature' +error[E0658]: use of unstable library feature `unstable_test_feature` --> $DIR/allow-unstable-reexport.rs:22:9 | LL | pub use lint_stability::unstable as unstable2; @@ -7,7 +7,7 @@ LL | pub use lint_stability::unstable as unstable2; = help: add `#![feature(unstable_test_feature)]` to the crate attributes to enable = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date -error[E0658]: use of unstable library feature 'unstable_test_feature' +error[E0658]: use of unstable library feature `unstable_test_feature` --> $DIR/allow-unstable-reexport.rs:28:5 | LL | unstable(); @@ -16,7 +16,7 @@ LL | unstable(); = help: add `#![feature(unstable_test_feature)]` to the crate attributes to enable = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date -error[E0658]: use of unstable library feature 'unstable_test_feature': text +error[E0658]: use of unstable library feature `unstable_test_feature`: text --> $DIR/allow-unstable-reexport.rs:29:5 | LL | unstable_text(); diff --git a/tests/ui/stability-attribute/allowed-through-unstable.rs b/tests/ui/stability-attribute/allowed-through-unstable.rs index 6bce5c87ddbde..29911a70be942 100644 --- a/tests/ui/stability-attribute/allowed-through-unstable.rs +++ b/tests/ui/stability-attribute/allowed-through-unstable.rs @@ -6,4 +6,4 @@ extern crate allowed_through_unstable_core; use allowed_through_unstable_core::unstable_module::OldStableTraitAllowedThoughUnstable; -use allowed_through_unstable_core::unstable_module::NewStableTraitNotAllowedThroughUnstable; //~ ERROR use of unstable library feature 'unstable_test_feature' +use allowed_through_unstable_core::unstable_module::NewStableTraitNotAllowedThroughUnstable; //~ ERROR use of unstable library feature `unstable_test_feature` diff --git a/tests/ui/stability-attribute/allowed-through-unstable.stderr b/tests/ui/stability-attribute/allowed-through-unstable.stderr index 5c8e6358b7c1c..00eea9f730d66 100644 --- a/tests/ui/stability-attribute/allowed-through-unstable.stderr +++ b/tests/ui/stability-attribute/allowed-through-unstable.stderr @@ -1,4 +1,4 @@ -error[E0658]: use of unstable library feature 'unstable_test_feature' +error[E0658]: use of unstable library feature `unstable_test_feature` --> $DIR/allowed-through-unstable.rs:9:5 | LL | use allowed_through_unstable_core::unstable_module::NewStableTraitNotAllowedThroughUnstable; diff --git a/tests/ui/stability-attribute/default-body-stability-err.stderr b/tests/ui/stability-attribute/default-body-stability-err.stderr index 9d8ad81f102f0..6173de5020bc9 100644 --- a/tests/ui/stability-attribute/default-body-stability-err.stderr +++ b/tests/ui/stability-attribute/default-body-stability-err.stderr @@ -5,7 +5,7 @@ LL | impl JustTrait for Type {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^ | = note: default implementation of `CONSTANT` is unstable - = note: use of unstable library feature 'constant_default_body' + = note: use of unstable library feature `constant_default_body` = help: add `#![feature(constant_default_body)]` to the crate attributes to enable = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date @@ -16,7 +16,7 @@ LL | impl JustTrait for Type {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^ | = note: default implementation of `fun` is unstable - = note: use of unstable library feature 'fun_default_body' + = note: use of unstable library feature `fun_default_body` = help: add `#![feature(fun_default_body)]` to the crate attributes to enable = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date @@ -27,7 +27,7 @@ LL | impl JustTrait for Type {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^ | = note: default implementation of `fun2` is unstable - = note: use of unstable library feature 'fun_default_body': reason + = note: use of unstable library feature `fun_default_body`: reason = help: add `#![feature(fun_default_body)]` to the crate attributes to enable = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date @@ -43,7 +43,7 @@ LL | | } | |_^ | = note: default implementation of `eq` is unstable - = note: use of unstable library feature 'eq_default_body' + = note: use of unstable library feature `eq_default_body` = help: add `#![feature(eq_default_body)]` to the crate attributes to enable = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date diff --git a/tests/ui/stability-attribute/generics-default-stability-trait.rs b/tests/ui/stability-attribute/generics-default-stability-trait.rs index ba8ee143d4a3b..a23029596380c 100644 --- a/tests/ui/stability-attribute/generics-default-stability-trait.rs +++ b/tests/ui/stability-attribute/generics-default-stability-trait.rs @@ -13,15 +13,15 @@ impl Trait1 for S { struct S; -impl Trait1 for S { //~ ERROR use of unstable library feature 'unstable_default' +impl Trait1 for S { //~ ERROR use of unstable library feature `unstable_default` fn foo() -> usize { 0 } } -impl Trait1 for S { //~ ERROR use of unstable library feature 'unstable_default' +impl Trait1 for S { //~ ERROR use of unstable library feature `unstable_default` fn foo() -> isize { 0 } } -impl Trait2 for S { //~ ERROR use of unstable library feature 'unstable_default' +impl Trait2 for S { //~ ERROR use of unstable library feature `unstable_default` fn foo() -> usize { 0 } } diff --git a/tests/ui/stability-attribute/generics-default-stability-trait.stderr b/tests/ui/stability-attribute/generics-default-stability-trait.stderr index 699e7c83c70ee..21b21fdb9457c 100644 --- a/tests/ui/stability-attribute/generics-default-stability-trait.stderr +++ b/tests/ui/stability-attribute/generics-default-stability-trait.stderr @@ -1,4 +1,4 @@ -error[E0658]: use of unstable library feature 'unstable_default' +error[E0658]: use of unstable library feature `unstable_default` --> $DIR/generics-default-stability-trait.rs:16:13 | LL | impl Trait1 for S { @@ -7,7 +7,7 @@ LL | impl Trait1 for S { = help: add `#![feature(unstable_default)]` to the crate attributes to enable = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date -error[E0658]: use of unstable library feature 'unstable_default' +error[E0658]: use of unstable library feature `unstable_default` --> $DIR/generics-default-stability-trait.rs:20:13 | LL | impl Trait1 for S { @@ -16,7 +16,7 @@ LL | impl Trait1 for S { = help: add `#![feature(unstable_default)]` to the crate attributes to enable = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date -error[E0658]: use of unstable library feature 'unstable_default' +error[E0658]: use of unstable library feature `unstable_default` --> $DIR/generics-default-stability-trait.rs:24:13 | LL | impl Trait2 for S { diff --git a/tests/ui/stability-attribute/generics-default-stability-where.rs b/tests/ui/stability-attribute/generics-default-stability-where.rs index f8a2fb4873aa6..a7bc1756d78a4 100644 --- a/tests/ui/stability-attribute/generics-default-stability-where.rs +++ b/tests/ui/stability-attribute/generics-default-stability-where.rs @@ -4,7 +4,7 @@ extern crate unstable_generic_param; use unstable_generic_param::*; -impl Trait3 for T where T: Trait2 { //~ ERROR use of unstable library feature 'unstable_default' +impl Trait3 for T where T: Trait2 { //~ ERROR use of unstable library feature `unstable_default` //~^ ERROR `T` must be used as the type parameter for some local type fn foo() -> usize { T::foo() } } diff --git a/tests/ui/stability-attribute/generics-default-stability-where.stderr b/tests/ui/stability-attribute/generics-default-stability-where.stderr index 8e4089970f56e..9437f5d65fac2 100644 --- a/tests/ui/stability-attribute/generics-default-stability-where.stderr +++ b/tests/ui/stability-attribute/generics-default-stability-where.stderr @@ -1,4 +1,4 @@ -error[E0658]: use of unstable library feature 'unstable_default' +error[E0658]: use of unstable library feature `unstable_default` --> $DIR/generics-default-stability-where.rs:7:45 | LL | impl Trait3 for T where T: Trait2 { diff --git a/tests/ui/stability-attribute/generics-default-stability.rs b/tests/ui/stability-attribute/generics-default-stability.rs index abd45b651ee74..e1b3971f70c06 100644 --- a/tests/ui/stability-attribute/generics-default-stability.rs +++ b/tests/ui/stability-attribute/generics-default-stability.rs @@ -20,12 +20,12 @@ impl Trait3 for S { fn main() { let _ = S; - let _: Struct1 = Struct1 { field: 1 }; //~ ERROR use of unstable library feature 'unstable_default' + let _: Struct1 = Struct1 { field: 1 }; //~ ERROR use of unstable library feature `unstable_default` let _ = STRUCT1; // ok let _: Struct1 = STRUCT1; // ok - let _: Struct1 = STRUCT1; //~ ERROR use of unstable library feature 'unstable_default' - let _: Struct1 = Struct1 { field: 0 }; //~ ERROR use of unstable library feature 'unstable_default' + let _: Struct1 = STRUCT1; //~ ERROR use of unstable library feature `unstable_default` + let _: Struct1 = Struct1 { field: 0 }; //~ ERROR use of unstable library feature `unstable_default` // Instability is not enforced for generic type parameters used in public fields. // Note how the unstable type default `usize` leaks, @@ -54,10 +54,10 @@ fn main() { let _ = STRUCT3; let _: Struct3 = STRUCT3; // ok - let _: Struct3 = STRUCT3; //~ ERROR use of unstable library feature 'unstable_default' + let _: Struct3 = STRUCT3; //~ ERROR use of unstable library feature `unstable_default` let _: Struct3 = STRUCT3; // ok - let _: Struct3 = Struct3 { field1: 0, field2: 0 }; //~ ERROR use of unstable library feature 'unstable_default' - let _: Struct3 = Struct3 { field1: 0, field2: 0 }; //~ ERROR use of unstable library feature 'unstable_default' + let _: Struct3 = Struct3 { field1: 0, field2: 0 }; //~ ERROR use of unstable library feature `unstable_default` + let _: Struct3 = Struct3 { field1: 0, field2: 0 }; //~ ERROR use of unstable library feature `unstable_default` let _ = STRUCT3.field1; // ok let _: isize = STRUCT3.field1; // ok let _ = STRUCT3.field1 + 1; // ok @@ -81,15 +81,15 @@ fn main() { //~^^^ use of deprecated field `unstable_generic_param::Struct4::field`: test [deprecated] let _ = STRUCT5; - let _: Struct5 = Struct5 { field: 1 }; //~ ERROR use of unstable library feature 'unstable_default' + let _: Struct5 = Struct5 { field: 1 }; //~ ERROR use of unstable library feature `unstable_default` //~^ use of deprecated struct `unstable_generic_param::Struct5`: test [deprecated] //~^^ use of deprecated struct `unstable_generic_param::Struct5`: test [deprecated] //~^^^ use of deprecated field `unstable_generic_param::Struct5::field`: test [deprecated] let _ = STRUCT5; let _: Struct5 = STRUCT5; //~ use of deprecated struct `unstable_generic_param::Struct5`: test [deprecated] - let _: Struct5 = STRUCT5; //~ ERROR use of unstable library feature 'unstable_default' + let _: Struct5 = STRUCT5; //~ ERROR use of unstable library feature `unstable_default` //~^ use of deprecated struct `unstable_generic_param::Struct5`: test [deprecated] - let _: Struct5 = Struct5 { field: 0 }; //~ ERROR use of unstable library feature 'unstable_default' + let _: Struct5 = Struct5 { field: 0 }; //~ ERROR use of unstable library feature `unstable_default` //~^ use of deprecated struct `unstable_generic_param::Struct5`: test [deprecated] //~^^ use of deprecated struct `unstable_generic_param::Struct5`: test [deprecated] //~^^^ use of deprecated field `unstable_generic_param::Struct5::field`: test [deprecated] @@ -97,12 +97,12 @@ fn main() { let _: Struct6 = Struct6 { field: 1 }; // ok let _: Struct6 = Struct6 { field: 0 }; // ok - let _: Alias1 = Alias1::Some(1); //~ ERROR use of unstable library feature 'unstable_default' + let _: Alias1 = Alias1::Some(1); //~ ERROR use of unstable library feature `unstable_default` let _ = ALIAS1; // ok let _: Alias1 = ALIAS1; // ok - let _: Alias1 = ALIAS1; //~ ERROR use of unstable library feature 'unstable_default' - let _: Alias1 = Alias1::Some(0); //~ ERROR use of unstable library feature 'unstable_default' + let _: Alias1 = ALIAS1; //~ ERROR use of unstable library feature `unstable_default` + let _: Alias1 = Alias1::Some(0); //~ ERROR use of unstable library feature `unstable_default` // Instability is not enforced for generic type parameters used in public fields. // Note how the unstable type default `usize` leaks, @@ -130,10 +130,10 @@ fn main() { let _ = ALIAS3; let _: Alias3 = ALIAS3; // ok - let _: Alias3 = ALIAS3; //~ ERROR use of unstable library feature 'unstable_default' + let _: Alias3 = ALIAS3; //~ ERROR use of unstable library feature `unstable_default` let _: Alias3 = ALIAS3; // ok - let _: Alias3 = Alias3::Ok(0); //~ ERROR use of unstable library feature 'unstable_default' - let _: Alias3 = Alias3::Ok(0); //~ ERROR use of unstable library feature 'unstable_default' + let _: Alias3 = Alias3::Ok(0); //~ ERROR use of unstable library feature `unstable_default` + let _: Alias3 = Alias3::Ok(0); //~ ERROR use of unstable library feature `unstable_default` let _ = ALIAS3.unwrap(); // ok let _: isize = ALIAS3.unwrap(); // ok let _ = ALIAS3.unwrap() + 1; // ok @@ -155,26 +155,26 @@ fn main() { //~^^ use of deprecated type alias `unstable_generic_param::Alias4`: test [deprecated] let _ = ALIAS5; - let _: Alias5 = Alias5::Some(1); //~ ERROR use of unstable library feature 'unstable_default' + let _: Alias5 = Alias5::Some(1); //~ ERROR use of unstable library feature `unstable_default` //~^ use of deprecated type alias `unstable_generic_param::Alias5`: test [deprecated] //~^^ use of deprecated type alias `unstable_generic_param::Alias5`: test [deprecated] let _ = ALIAS5; let _: Alias5 = ALIAS5; //~ use of deprecated type alias `unstable_generic_param::Alias5`: test [deprecated] - let _: Alias5 = ALIAS5; //~ ERROR use of unstable library feature 'unstable_default' + let _: Alias5 = ALIAS5; //~ ERROR use of unstable library feature `unstable_default` //~^ use of deprecated type alias `unstable_generic_param::Alias5`: test [deprecated] - let _: Alias5 = Alias5::Some(0); //~ ERROR use of unstable library feature 'unstable_default' + let _: Alias5 = Alias5::Some(0); //~ ERROR use of unstable library feature `unstable_default` //~^ use of deprecated type alias `unstable_generic_param::Alias5`: test [deprecated] //~^^ use of deprecated type alias `unstable_generic_param::Alias5`: test [deprecated] let _: Alias6 = Alias6::Some(1); // ok let _: Alias6 = Alias6::Some(0); // ok - let _: Enum1 = Enum1::Some(1); //~ ERROR use of unstable library feature 'unstable_default' + let _: Enum1 = Enum1::Some(1); //~ ERROR use of unstable library feature `unstable_default` let _ = ENUM1; // ok let _: Enum1 = ENUM1; // ok - let _: Enum1 = ENUM1; //~ ERROR use of unstable library feature 'unstable_default' - let _: Enum1 = Enum1::Some(0); //~ ERROR use of unstable library feature 'unstable_default' + let _: Enum1 = ENUM1; //~ ERROR use of unstable library feature `unstable_default` + let _: Enum1 = Enum1::Some(0); //~ ERROR use of unstable library feature `unstable_default` // Instability is not enforced for generic type parameters used in public fields. // Note how the unstable type default `usize` leaks, @@ -202,10 +202,10 @@ fn main() { let _ = ENUM3; let _: Enum3 = ENUM3; // ok - let _: Enum3 = ENUM3; //~ ERROR use of unstable library feature 'unstable_default' + let _: Enum3 = ENUM3; //~ ERROR use of unstable library feature `unstable_default` let _: Enum3 = ENUM3; // ok - let _: Enum3 = Enum3::Ok(0); //~ ERROR use of unstable library feature 'unstable_default' - let _: Enum3 = Enum3::Ok(0); //~ ERROR use of unstable library feature 'unstable_default' + let _: Enum3 = Enum3::Ok(0); //~ ERROR use of unstable library feature `unstable_default` + let _: Enum3 = Enum3::Ok(0); //~ ERROR use of unstable library feature `unstable_default` if let Enum3::Ok(x) = ENUM3 {let _ = x;} // ok if let Enum3::Ok(x) = ENUM3 {let _: isize = x;} // ok if let Enum3::Ok(x) = ENUM3 {let _ = x + 1;} // ok @@ -227,21 +227,21 @@ fn main() { //~^^ use of deprecated enum `unstable_generic_param::Enum4`: test [deprecated] let _ = ENUM5; - let _: Enum5 = Enum5::Some(1); //~ ERROR use of unstable library feature 'unstable_default' + let _: Enum5 = Enum5::Some(1); //~ ERROR use of unstable library feature `unstable_default` //~^ use of deprecated tuple variant `unstable_generic_param::Enum5::Some`: test [deprecated] //~^^ use of deprecated enum `unstable_generic_param::Enum5`: test [deprecated] let _ = ENUM5; let _: Enum5 = ENUM5; //~ use of deprecated enum `unstable_generic_param::Enum5`: test [deprecated] - let _: Enum5 = ENUM5; //~ ERROR use of unstable library feature 'unstable_default' + let _: Enum5 = ENUM5; //~ ERROR use of unstable library feature `unstable_default` //~^ use of deprecated enum `unstable_generic_param::Enum5`: test [deprecated] - let _: Enum5 = Enum5::Some(0); //~ ERROR use of unstable library feature 'unstable_default' + let _: Enum5 = Enum5::Some(0); //~ ERROR use of unstable library feature `unstable_default` //~^ use of deprecated tuple variant `unstable_generic_param::Enum5::Some`: test [deprecated] //~^^ use of deprecated enum `unstable_generic_param::Enum5`: test [deprecated] let _: Enum6 = Enum6::Some(1); // ok let _: Enum6 = Enum6::Some(0); // ok - let _: Box1 = Box1::new(1); //~ ERROR use of unstable library feature 'box_alloc_param' + let _: Box1 = Box1::new(1); //~ ERROR use of unstable library feature `box_alloc_param` let _: Box1 = Box1::new(1); // ok let _: Box2 = Box2::new(1); // ok diff --git a/tests/ui/stability-attribute/generics-default-stability.stderr b/tests/ui/stability-attribute/generics-default-stability.stderr index b1b91a850e909..f4f51a14248eb 100644 --- a/tests/ui/stability-attribute/generics-default-stability.stderr +++ b/tests/ui/stability-attribute/generics-default-stability.stderr @@ -216,7 +216,7 @@ warning: use of deprecated enum `unstable_generic_param::Enum5`: test LL | let _: Enum5 = Enum5::Some(0); | ^^^^^ -error[E0658]: use of unstable library feature 'unstable_default' +error[E0658]: use of unstable library feature `unstable_default` --> $DIR/generics-default-stability.rs:23:20 | LL | let _: Struct1 = Struct1 { field: 1 }; @@ -225,7 +225,7 @@ LL | let _: Struct1 = Struct1 { field: 1 }; = help: add `#![feature(unstable_default)]` to the crate attributes to enable = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date -error[E0658]: use of unstable library feature 'unstable_default' +error[E0658]: use of unstable library feature `unstable_default` --> $DIR/generics-default-stability.rs:27:20 | LL | let _: Struct1 = STRUCT1; @@ -234,7 +234,7 @@ LL | let _: Struct1 = STRUCT1; = help: add `#![feature(unstable_default)]` to the crate attributes to enable = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date -error[E0658]: use of unstable library feature 'unstable_default' +error[E0658]: use of unstable library feature `unstable_default` --> $DIR/generics-default-stability.rs:28:20 | LL | let _: Struct1 = Struct1 { field: 0 }; @@ -243,7 +243,7 @@ LL | let _: Struct1 = Struct1 { field: 0 }; = help: add `#![feature(unstable_default)]` to the crate attributes to enable = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date -error[E0658]: use of unstable library feature 'unstable_default' +error[E0658]: use of unstable library feature `unstable_default` --> $DIR/generics-default-stability.rs:57:27 | LL | let _: Struct3 = STRUCT3; @@ -252,7 +252,7 @@ LL | let _: Struct3 = STRUCT3; = help: add `#![feature(unstable_default)]` to the crate attributes to enable = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date -error[E0658]: use of unstable library feature 'unstable_default' +error[E0658]: use of unstable library feature `unstable_default` --> $DIR/generics-default-stability.rs:59:27 | LL | let _: Struct3 = Struct3 { field1: 0, field2: 0 }; @@ -261,7 +261,7 @@ LL | let _: Struct3 = Struct3 { field1: 0, field2: 0 }; = help: add `#![feature(unstable_default)]` to the crate attributes to enable = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date -error[E0658]: use of unstable library feature 'unstable_default' +error[E0658]: use of unstable library feature `unstable_default` --> $DIR/generics-default-stability.rs:60:27 | LL | let _: Struct3 = Struct3 { field1: 0, field2: 0 }; @@ -270,7 +270,7 @@ LL | let _: Struct3 = Struct3 { field1: 0, field2: 0 }; = help: add `#![feature(unstable_default)]` to the crate attributes to enable = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date -error[E0658]: use of unstable library feature 'unstable_default' +error[E0658]: use of unstable library feature `unstable_default` --> $DIR/generics-default-stability.rs:84:20 | LL | let _: Struct5 = Struct5 { field: 1 }; @@ -279,7 +279,7 @@ LL | let _: Struct5 = Struct5 { field: 1 }; = help: add `#![feature(unstable_default)]` to the crate attributes to enable = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date -error[E0658]: use of unstable library feature 'unstable_default' +error[E0658]: use of unstable library feature `unstable_default` --> $DIR/generics-default-stability.rs:90:20 | LL | let _: Struct5 = STRUCT5; @@ -288,7 +288,7 @@ LL | let _: Struct5 = STRUCT5; = help: add `#![feature(unstable_default)]` to the crate attributes to enable = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date -error[E0658]: use of unstable library feature 'unstable_default' +error[E0658]: use of unstable library feature `unstable_default` --> $DIR/generics-default-stability.rs:92:20 | LL | let _: Struct5 = Struct5 { field: 0 }; @@ -297,7 +297,7 @@ LL | let _: Struct5 = Struct5 { field: 0 }; = help: add `#![feature(unstable_default)]` to the crate attributes to enable = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date -error[E0658]: use of unstable library feature 'unstable_default' +error[E0658]: use of unstable library feature `unstable_default` --> $DIR/generics-default-stability.rs:100:19 | LL | let _: Alias1 = Alias1::Some(1); @@ -306,7 +306,7 @@ LL | let _: Alias1 = Alias1::Some(1); = help: add `#![feature(unstable_default)]` to the crate attributes to enable = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date -error[E0658]: use of unstable library feature 'unstable_default' +error[E0658]: use of unstable library feature `unstable_default` --> $DIR/generics-default-stability.rs:104:19 | LL | let _: Alias1 = ALIAS1; @@ -315,7 +315,7 @@ LL | let _: Alias1 = ALIAS1; = help: add `#![feature(unstable_default)]` to the crate attributes to enable = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date -error[E0658]: use of unstable library feature 'unstable_default' +error[E0658]: use of unstable library feature `unstable_default` --> $DIR/generics-default-stability.rs:105:19 | LL | let _: Alias1 = Alias1::Some(0); @@ -324,7 +324,7 @@ LL | let _: Alias1 = Alias1::Some(0); = help: add `#![feature(unstable_default)]` to the crate attributes to enable = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date -error[E0658]: use of unstable library feature 'unstable_default' +error[E0658]: use of unstable library feature `unstable_default` --> $DIR/generics-default-stability.rs:133:26 | LL | let _: Alias3 = ALIAS3; @@ -333,7 +333,7 @@ LL | let _: Alias3 = ALIAS3; = help: add `#![feature(unstable_default)]` to the crate attributes to enable = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date -error[E0658]: use of unstable library feature 'unstable_default' +error[E0658]: use of unstable library feature `unstable_default` --> $DIR/generics-default-stability.rs:135:26 | LL | let _: Alias3 = Alias3::Ok(0); @@ -342,7 +342,7 @@ LL | let _: Alias3 = Alias3::Ok(0); = help: add `#![feature(unstable_default)]` to the crate attributes to enable = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date -error[E0658]: use of unstable library feature 'unstable_default' +error[E0658]: use of unstable library feature `unstable_default` --> $DIR/generics-default-stability.rs:136:26 | LL | let _: Alias3 = Alias3::Ok(0); @@ -351,7 +351,7 @@ LL | let _: Alias3 = Alias3::Ok(0); = help: add `#![feature(unstable_default)]` to the crate attributes to enable = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date -error[E0658]: use of unstable library feature 'unstable_default' +error[E0658]: use of unstable library feature `unstable_default` --> $DIR/generics-default-stability.rs:158:19 | LL | let _: Alias5 = Alias5::Some(1); @@ -360,7 +360,7 @@ LL | let _: Alias5 = Alias5::Some(1); = help: add `#![feature(unstable_default)]` to the crate attributes to enable = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date -error[E0658]: use of unstable library feature 'unstable_default' +error[E0658]: use of unstable library feature `unstable_default` --> $DIR/generics-default-stability.rs:163:19 | LL | let _: Alias5 = ALIAS5; @@ -369,7 +369,7 @@ LL | let _: Alias5 = ALIAS5; = help: add `#![feature(unstable_default)]` to the crate attributes to enable = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date -error[E0658]: use of unstable library feature 'unstable_default' +error[E0658]: use of unstable library feature `unstable_default` --> $DIR/generics-default-stability.rs:165:19 | LL | let _: Alias5 = Alias5::Some(0); @@ -378,7 +378,7 @@ LL | let _: Alias5 = Alias5::Some(0); = help: add `#![feature(unstable_default)]` to the crate attributes to enable = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date -error[E0658]: use of unstable library feature 'unstable_default' +error[E0658]: use of unstable library feature `unstable_default` --> $DIR/generics-default-stability.rs:172:18 | LL | let _: Enum1 = Enum1::Some(1); @@ -387,7 +387,7 @@ LL | let _: Enum1 = Enum1::Some(1); = help: add `#![feature(unstable_default)]` to the crate attributes to enable = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date -error[E0658]: use of unstable library feature 'unstable_default' +error[E0658]: use of unstable library feature `unstable_default` --> $DIR/generics-default-stability.rs:176:18 | LL | let _: Enum1 = ENUM1; @@ -396,7 +396,7 @@ LL | let _: Enum1 = ENUM1; = help: add `#![feature(unstable_default)]` to the crate attributes to enable = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date -error[E0658]: use of unstable library feature 'unstable_default' +error[E0658]: use of unstable library feature `unstable_default` --> $DIR/generics-default-stability.rs:177:18 | LL | let _: Enum1 = Enum1::Some(0); @@ -405,7 +405,7 @@ LL | let _: Enum1 = Enum1::Some(0); = help: add `#![feature(unstable_default)]` to the crate attributes to enable = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date -error[E0658]: use of unstable library feature 'unstable_default' +error[E0658]: use of unstable library feature `unstable_default` --> $DIR/generics-default-stability.rs:205:25 | LL | let _: Enum3 = ENUM3; @@ -414,7 +414,7 @@ LL | let _: Enum3 = ENUM3; = help: add `#![feature(unstable_default)]` to the crate attributes to enable = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date -error[E0658]: use of unstable library feature 'unstable_default' +error[E0658]: use of unstable library feature `unstable_default` --> $DIR/generics-default-stability.rs:207:25 | LL | let _: Enum3 = Enum3::Ok(0); @@ -423,7 +423,7 @@ LL | let _: Enum3 = Enum3::Ok(0); = help: add `#![feature(unstable_default)]` to the crate attributes to enable = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date -error[E0658]: use of unstable library feature 'unstable_default' +error[E0658]: use of unstable library feature `unstable_default` --> $DIR/generics-default-stability.rs:208:25 | LL | let _: Enum3 = Enum3::Ok(0); @@ -432,7 +432,7 @@ LL | let _: Enum3 = Enum3::Ok(0); = help: add `#![feature(unstable_default)]` to the crate attributes to enable = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date -error[E0658]: use of unstable library feature 'unstable_default' +error[E0658]: use of unstable library feature `unstable_default` --> $DIR/generics-default-stability.rs:230:18 | LL | let _: Enum5 = Enum5::Some(1); @@ -441,7 +441,7 @@ LL | let _: Enum5 = Enum5::Some(1); = help: add `#![feature(unstable_default)]` to the crate attributes to enable = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date -error[E0658]: use of unstable library feature 'unstable_default' +error[E0658]: use of unstable library feature `unstable_default` --> $DIR/generics-default-stability.rs:235:18 | LL | let _: Enum5 = ENUM5; @@ -450,7 +450,7 @@ LL | let _: Enum5 = ENUM5; = help: add `#![feature(unstable_default)]` to the crate attributes to enable = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date -error[E0658]: use of unstable library feature 'unstable_default' +error[E0658]: use of unstable library feature `unstable_default` --> $DIR/generics-default-stability.rs:237:18 | LL | let _: Enum5 = Enum5::Some(0); @@ -459,7 +459,7 @@ LL | let _: Enum5 = Enum5::Some(0); = help: add `#![feature(unstable_default)]` to the crate attributes to enable = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date -error[E0658]: use of unstable library feature 'box_alloc_param' +error[E0658]: use of unstable library feature `box_alloc_param` --> $DIR/generics-default-stability.rs:244:24 | LL | let _: Box1 = Box1::new(1); diff --git a/tests/ui/stability-attribute/issue-28075.rs b/tests/ui/stability-attribute/issue-28075.rs index 8fc2ffe3dc9ad..b6b231d4afa30 100644 --- a/tests/ui/stability-attribute/issue-28075.rs +++ b/tests/ui/stability-attribute/issue-28075.rs @@ -7,7 +7,7 @@ extern crate lint_stability; use lint_stability::{unstable, deprecated}; -//~^ ERROR use of unstable library feature 'unstable_test_feature' +//~^ ERROR use of unstable library feature `unstable_test_feature` fn main() { } diff --git a/tests/ui/stability-attribute/issue-28075.stderr b/tests/ui/stability-attribute/issue-28075.stderr index 282686d82bbc1..d10a27b874e26 100644 --- a/tests/ui/stability-attribute/issue-28075.stderr +++ b/tests/ui/stability-attribute/issue-28075.stderr @@ -1,4 +1,4 @@ -error[E0658]: use of unstable library feature 'unstable_test_feature' +error[E0658]: use of unstable library feature `unstable_test_feature` --> $DIR/issue-28075.rs:9:22 | LL | use lint_stability::{unstable, deprecated}; diff --git a/tests/ui/stability-attribute/issue-28388-3.rs b/tests/ui/stability-attribute/issue-28388-3.rs index 2f61146f6e39a..7b6b6ce7f4be0 100644 --- a/tests/ui/stability-attribute/issue-28388-3.rs +++ b/tests/ui/stability-attribute/issue-28388-3.rs @@ -5,7 +5,7 @@ extern crate lint_stability; use lint_stability::UnstableEnum::{}; -//~^ ERROR use of unstable library feature 'unstable_test_feature' +//~^ ERROR use of unstable library feature `unstable_test_feature` use lint_stability::StableEnum::{}; // OK fn main() {} diff --git a/tests/ui/stability-attribute/issue-28388-3.stderr b/tests/ui/stability-attribute/issue-28388-3.stderr index 56ca57591ce0e..def27c0b44d9a 100644 --- a/tests/ui/stability-attribute/issue-28388-3.stderr +++ b/tests/ui/stability-attribute/issue-28388-3.stderr @@ -1,4 +1,4 @@ -error[E0658]: use of unstable library feature 'unstable_test_feature' +error[E0658]: use of unstable library feature `unstable_test_feature` --> $DIR/issue-28388-3.rs:7:5 | LL | use lint_stability::UnstableEnum::{}; diff --git a/tests/ui/stability-attribute/stability-attribute-implies-no-feature.rs b/tests/ui/stability-attribute/stability-attribute-implies-no-feature.rs index 47f885a43d6a7..0cc1dd20fd82f 100644 --- a/tests/ui/stability-attribute/stability-attribute-implies-no-feature.rs +++ b/tests/ui/stability-attribute/stability-attribute-implies-no-feature.rs @@ -5,9 +5,9 @@ extern crate stability_attribute_implies; use stability_attribute_implies::{foo, foobar}; -//~^ ERROR use of unstable library feature 'foobar' +//~^ ERROR use of unstable library feature `foobar` fn main() { foo(); // no error - stable - foobar(); //~ ERROR use of unstable library feature 'foobar' + foobar(); //~ ERROR use of unstable library feature `foobar` } diff --git a/tests/ui/stability-attribute/stability-attribute-implies-no-feature.stderr b/tests/ui/stability-attribute/stability-attribute-implies-no-feature.stderr index b35ee6c12913d..a625ef504b191 100644 --- a/tests/ui/stability-attribute/stability-attribute-implies-no-feature.stderr +++ b/tests/ui/stability-attribute/stability-attribute-implies-no-feature.stderr @@ -1,4 +1,4 @@ -error[E0658]: use of unstable library feature 'foobar' +error[E0658]: use of unstable library feature `foobar` --> $DIR/stability-attribute-implies-no-feature.rs:7:40 | LL | use stability_attribute_implies::{foo, foobar}; @@ -8,7 +8,7 @@ LL | use stability_attribute_implies::{foo, foobar}; = help: add `#![feature(foobar)]` to the crate attributes to enable = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date -error[E0658]: use of unstable library feature 'foobar' +error[E0658]: use of unstable library feature `foobar` --> $DIR/stability-attribute-implies-no-feature.rs:12:5 | LL | foobar(); diff --git a/tests/ui/stability-attribute/stability-attribute-issue.rs b/tests/ui/stability-attribute/stability-attribute-issue.rs index 2d25c0c8bd72b..e9d1f144e6bc3 100644 --- a/tests/ui/stability-attribute/stability-attribute-issue.rs +++ b/tests/ui/stability-attribute/stability-attribute-issue.rs @@ -6,7 +6,7 @@ use stability_attribute_issue::*; fn main() { unstable(); - //~^ ERROR use of unstable library feature 'unstable_test_feature' + //~^ ERROR use of unstable library feature `unstable_test_feature` unstable_msg(); - //~^ ERROR use of unstable library feature 'unstable_test_feature': message + //~^ ERROR use of unstable library feature `unstable_test_feature`: message } diff --git a/tests/ui/stability-attribute/stability-attribute-issue.stderr b/tests/ui/stability-attribute/stability-attribute-issue.stderr index 336e0f1718ffd..9dc6f4419875e 100644 --- a/tests/ui/stability-attribute/stability-attribute-issue.stderr +++ b/tests/ui/stability-attribute/stability-attribute-issue.stderr @@ -1,4 +1,4 @@ -error[E0658]: use of unstable library feature 'unstable_test_feature' +error[E0658]: use of unstable library feature `unstable_test_feature` --> $DIR/stability-attribute-issue.rs:8:5 | LL | unstable(); @@ -8,7 +8,7 @@ LL | unstable(); = help: add `#![feature(unstable_test_feature)]` to the crate attributes to enable = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date -error[E0658]: use of unstable library feature 'unstable_test_feature': message +error[E0658]: use of unstable library feature `unstable_test_feature`: message --> $DIR/stability-attribute-issue.rs:10:5 | LL | unstable_msg(); diff --git a/tests/ui/stability-attribute/stable-in-unstable.rs b/tests/ui/stability-attribute/stable-in-unstable.rs index d10845d49a3fd..1fe084f6e5923 100644 --- a/tests/ui/stability-attribute/stable-in-unstable.rs +++ b/tests/ui/stability-attribute/stable-in-unstable.rs @@ -13,8 +13,8 @@ extern crate stable_in_unstable_core; extern crate stable_in_unstable_std; mod isolated1 { - use stable_in_unstable_core::new_unstable_module; //~ ERROR use of unstable library feature 'unstable_test_feature' - use stable_in_unstable_core::new_unstable_module::OldTrait; //~ ERROR use of unstable library feature 'unstable_test_feature' + use stable_in_unstable_core::new_unstable_module; //~ ERROR use of unstable library feature `unstable_test_feature` + use stable_in_unstable_core::new_unstable_module::OldTrait; //~ ERROR use of unstable library feature `unstable_test_feature` } mod isolated2 { @@ -26,7 +26,7 @@ mod isolated2 { } mod isolated3 { - use stable_in_unstable_core::new_unstable_module::OldTrait; //~ ERROR use of unstable library feature 'unstable_test_feature' + use stable_in_unstable_core::new_unstable_module::OldTrait; //~ ERROR use of unstable library feature `unstable_test_feature` struct LocalType; @@ -36,7 +36,7 @@ mod isolated3 { mod isolated4 { struct LocalType; - impl stable_in_unstable_core::new_unstable_module::OldTrait for LocalType {} //~ ERROR use of unstable library feature 'unstable_test_feature' + impl stable_in_unstable_core::new_unstable_module::OldTrait for LocalType {} //~ ERROR use of unstable library feature `unstable_test_feature` } mod isolated5 { @@ -46,9 +46,9 @@ mod isolated5 { } mod isolated6 { - use stable_in_unstable_core::new_unstable_module::{OldTrait}; //~ ERROR use of unstable library feature 'unstable_test_feature' + use stable_in_unstable_core::new_unstable_module::{OldTrait}; //~ ERROR use of unstable library feature `unstable_test_feature` } mod isolated7 { - use stable_in_unstable_core::new_unstable_module::*; //~ ERROR use of unstable library feature 'unstable_test_feature' + use stable_in_unstable_core::new_unstable_module::*; //~ ERROR use of unstable library feature `unstable_test_feature` } diff --git a/tests/ui/stability-attribute/stable-in-unstable.stderr b/tests/ui/stability-attribute/stable-in-unstable.stderr index eb73f047acd1c..b37b4dfd586c1 100644 --- a/tests/ui/stability-attribute/stable-in-unstable.stderr +++ b/tests/ui/stability-attribute/stable-in-unstable.stderr @@ -1,4 +1,4 @@ -error[E0658]: use of unstable library feature 'unstable_test_feature' +error[E0658]: use of unstable library feature `unstable_test_feature` --> $DIR/stable-in-unstable.rs:16:9 | LL | use stable_in_unstable_core::new_unstable_module; @@ -8,7 +8,7 @@ LL | use stable_in_unstable_core::new_unstable_module; = help: add `#![feature(unstable_test_feature)]` to the crate attributes to enable = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date -error[E0658]: use of unstable library feature 'unstable_test_feature' +error[E0658]: use of unstable library feature `unstable_test_feature` --> $DIR/stable-in-unstable.rs:17:9 | LL | use stable_in_unstable_core::new_unstable_module::OldTrait; @@ -18,7 +18,7 @@ LL | use stable_in_unstable_core::new_unstable_module::OldTrait; = help: add `#![feature(unstable_test_feature)]` to the crate attributes to enable = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date -error[E0658]: use of unstable library feature 'unstable_test_feature' +error[E0658]: use of unstable library feature `unstable_test_feature` --> $DIR/stable-in-unstable.rs:29:9 | LL | use stable_in_unstable_core::new_unstable_module::OldTrait; @@ -28,7 +28,7 @@ LL | use stable_in_unstable_core::new_unstable_module::OldTrait; = help: add `#![feature(unstable_test_feature)]` to the crate attributes to enable = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date -error[E0658]: use of unstable library feature 'unstable_test_feature' +error[E0658]: use of unstable library feature `unstable_test_feature` --> $DIR/stable-in-unstable.rs:39:10 | LL | impl stable_in_unstable_core::new_unstable_module::OldTrait for LocalType {} @@ -38,7 +38,7 @@ LL | impl stable_in_unstable_core::new_unstable_module::OldTrait for LocalTy = help: add `#![feature(unstable_test_feature)]` to the crate attributes to enable = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date -error[E0658]: use of unstable library feature 'unstable_test_feature' +error[E0658]: use of unstable library feature `unstable_test_feature` --> $DIR/stable-in-unstable.rs:49:56 | LL | use stable_in_unstable_core::new_unstable_module::{OldTrait}; @@ -48,7 +48,7 @@ LL | use stable_in_unstable_core::new_unstable_module::{OldTrait}; = help: add `#![feature(unstable_test_feature)]` to the crate attributes to enable = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date -error[E0658]: use of unstable library feature 'unstable_test_feature' +error[E0658]: use of unstable library feature `unstable_test_feature` --> $DIR/stable-in-unstable.rs:53:9 | LL | use stable_in_unstable_core::new_unstable_module::*; diff --git a/tests/ui/stability-attribute/suggest-vec-allocator-api.rs b/tests/ui/stability-attribute/suggest-vec-allocator-api.rs index fac52ab77c68c..61a48c19e72ad 100644 --- a/tests/ui/stability-attribute/suggest-vec-allocator-api.rs +++ b/tests/ui/stability-attribute/suggest-vec-allocator-api.rs @@ -1,9 +1,9 @@ fn main() { - let _: Vec = vec![]; //~ ERROR use of unstable library feature 'allocator_api' + let _: Vec = vec![]; //~ ERROR use of unstable library feature `allocator_api` #[rustfmt::skip] let _: Vec< String, - _> = vec![]; //~ ERROR use of unstable library feature 'allocator_api' - let _ = Vec::::new(); //~ ERROR use of unstable library feature 'allocator_api' - let _boxed: Box = Box::new(10); //~ ERROR use of unstable library feature 'allocator_api' + _> = vec![]; //~ ERROR use of unstable library feature `allocator_api` + let _ = Vec::::new(); //~ ERROR use of unstable library feature `allocator_api` + let _boxed: Box = Box::new(10); //~ ERROR use of unstable library feature `allocator_api` } diff --git a/tests/ui/stability-attribute/suggest-vec-allocator-api.stderr b/tests/ui/stability-attribute/suggest-vec-allocator-api.stderr index d7fcba4ced55d..6662ceda90b9e 100644 --- a/tests/ui/stability-attribute/suggest-vec-allocator-api.stderr +++ b/tests/ui/stability-attribute/suggest-vec-allocator-api.stderr @@ -1,4 +1,4 @@ -error[E0658]: use of unstable library feature 'allocator_api' +error[E0658]: use of unstable library feature `allocator_api` --> $DIR/suggest-vec-allocator-api.rs:2:20 | LL | let _: Vec = vec![]; @@ -10,7 +10,7 @@ LL | let _: Vec = vec![]; = help: add `#![feature(allocator_api)]` to the crate attributes to enable = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date -error[E0658]: use of unstable library feature 'allocator_api' +error[E0658]: use of unstable library feature `allocator_api` --> $DIR/suggest-vec-allocator-api.rs:6:9 | LL | _> = vec![]; @@ -26,7 +26,7 @@ LL + String, LL ~ _)> = vec![]; | -error[E0658]: use of unstable library feature 'allocator_api' +error[E0658]: use of unstable library feature `allocator_api` --> $DIR/suggest-vec-allocator-api.rs:8:26 | LL | let _boxed: Box = Box::new(10); @@ -36,7 +36,7 @@ LL | let _boxed: Box = Box::new(10); = help: add `#![feature(allocator_api)]` to the crate attributes to enable = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date -error[E0658]: use of unstable library feature 'allocator_api' +error[E0658]: use of unstable library feature `allocator_api` --> $DIR/suggest-vec-allocator-api.rs:7:24 | LL | let _ = Vec::::new(); diff --git a/tests/ui/traits/const-traits/const_derives/derive-const-gate.stderr b/tests/ui/traits/const-traits/const_derives/derive-const-gate.stderr index 3ccae5a83e665..95f6f32f21d3c 100644 --- a/tests/ui/traits/const-traits/const_derives/derive-const-gate.stderr +++ b/tests/ui/traits/const-traits/const_derives/derive-const-gate.stderr @@ -1,4 +1,4 @@ -error[E0658]: use of unstable library feature 'derive_const' +error[E0658]: use of unstable library feature `derive_const` --> $DIR/derive-const-gate.rs:1:3 | LL | #[derive_const(Default)] diff --git a/tests/ui/traits/issue-78372.rs b/tests/ui/traits/issue-78372.rs index b97835bbc57fd..82b13cc0b6238 100644 --- a/tests/ui/traits/issue-78372.rs +++ b/tests/ui/traits/issue-78372.rs @@ -1,8 +1,8 @@ -use std::ops::DispatchFromDyn; //~ ERROR use of unstable library feature 'dispatch_from_dyn' +use std::ops::DispatchFromDyn; //~ ERROR use of unstable library feature `dispatch_from_dyn` struct Smaht(PhantomData); //~ ERROR cannot find type `PhantomData` in this scope impl DispatchFromDyn> for T {} //~ ERROR cannot find type `U` in this scope //~^ ERROR cannot find type `MISC` in this scope -//~| ERROR use of unstable library feature 'dispatch_from_dyn' +//~| ERROR use of unstable library feature `dispatch_from_dyn` //~| ERROR the trait `DispatchFromDyn` may only be implemented for a coercion between structures trait Foo: X {} trait X { diff --git a/tests/ui/traits/issue-78372.stderr b/tests/ui/traits/issue-78372.stderr index 9b93ffe8efb7c..4cc2c59fd8dc5 100644 --- a/tests/ui/traits/issue-78372.stderr +++ b/tests/ui/traits/issue-78372.stderr @@ -37,7 +37,7 @@ help: you might be missing a type parameter LL | impl DispatchFromDyn> for T {} | ++++++ -error[E0658]: use of unstable library feature 'dispatch_from_dyn' +error[E0658]: use of unstable library feature `dispatch_from_dyn` --> $DIR/issue-78372.rs:1:5 | LL | use std::ops::DispatchFromDyn; @@ -46,7 +46,7 @@ LL | use std::ops::DispatchFromDyn; = help: add `#![feature(dispatch_from_dyn)]` to the crate attributes to enable = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date -error[E0658]: use of unstable library feature 'dispatch_from_dyn' +error[E0658]: use of unstable library feature `dispatch_from_dyn` --> $DIR/issue-78372.rs:3:9 | LL | impl DispatchFromDyn> for T {} diff --git a/tests/ui/transmutability/malformed-program-gracefulness/feature-missing.rs b/tests/ui/transmutability/malformed-program-gracefulness/feature-missing.rs index 07133aa56147d..7fe2324698e25 100644 --- a/tests/ui/transmutability/malformed-program-gracefulness/feature-missing.rs +++ b/tests/ui/transmutability/malformed-program-gracefulness/feature-missing.rs @@ -3,7 +3,7 @@ #![crate_type = "lib"] use std::mem::TransmuteFrom; -//~^ ERROR use of unstable library feature 'transmutability' [E0658] +//~^ ERROR use of unstable library feature `transmutability` [E0658] use std::mem::Assume; -//~^ ERROR use of unstable library feature 'transmutability' [E0658] +//~^ ERROR use of unstable library feature `transmutability` [E0658] diff --git a/tests/ui/transmutability/malformed-program-gracefulness/feature-missing.stderr b/tests/ui/transmutability/malformed-program-gracefulness/feature-missing.stderr index a2096cd53e5b3..e4ad720ff692d 100644 --- a/tests/ui/transmutability/malformed-program-gracefulness/feature-missing.stderr +++ b/tests/ui/transmutability/malformed-program-gracefulness/feature-missing.stderr @@ -1,4 +1,4 @@ -error[E0658]: use of unstable library feature 'transmutability' +error[E0658]: use of unstable library feature `transmutability` --> $DIR/feature-missing.rs:5:5 | LL | use std::mem::TransmuteFrom; @@ -8,7 +8,7 @@ LL | use std::mem::TransmuteFrom; = help: add `#![feature(transmutability)]` to the crate attributes to enable = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date -error[E0658]: use of unstable library feature 'transmutability' +error[E0658]: use of unstable library feature `transmutability` --> $DIR/feature-missing.rs:8:5 | LL | use std::mem::Assume; diff --git a/tests/ui/type/pattern_types/feature-gate-pattern_types.rs b/tests/ui/type/pattern_types/feature-gate-pattern_types.rs index 3c507a9669de8..e638f3c6c40d7 100644 --- a/tests/ui/type/pattern_types/feature-gate-pattern_types.rs +++ b/tests/ui/type/pattern_types/feature-gate-pattern_types.rs @@ -3,12 +3,12 @@ use std::pat::pattern_type; type NonNullU32 = pattern_type!(u32 is 1..); -//~^ use of unstable library feature 'core_pattern_type' +//~^ use of unstable library feature `core_pattern_type` type Percent = pattern_type!(u32 is 0..=100); -//~^ use of unstable library feature 'core_pattern_type' +//~^ use of unstable library feature `core_pattern_type` type Negative = pattern_type!(i32 is ..=0); -//~^ use of unstable library feature 'core_pattern_type' +//~^ use of unstable library feature `core_pattern_type` type Positive = pattern_type!(i32 is 0..); -//~^ use of unstable library feature 'core_pattern_type' +//~^ use of unstable library feature `core_pattern_type` type Always = pattern_type!(Option is Some(_)); -//~^ use of unstable library feature 'core_pattern_type' +//~^ use of unstable library feature `core_pattern_type` diff --git a/tests/ui/type/pattern_types/feature-gate-pattern_types.stderr b/tests/ui/type/pattern_types/feature-gate-pattern_types.stderr index 03e91b52a2aae..6cbadf370a7dc 100644 --- a/tests/ui/type/pattern_types/feature-gate-pattern_types.stderr +++ b/tests/ui/type/pattern_types/feature-gate-pattern_types.stderr @@ -1,4 +1,4 @@ -error[E0658]: use of unstable library feature 'core_pattern_type' +error[E0658]: use of unstable library feature `core_pattern_type` --> $DIR/feature-gate-pattern_types.rs:5:19 | LL | type NonNullU32 = pattern_type!(u32 is 1..); @@ -8,7 +8,7 @@ LL | type NonNullU32 = pattern_type!(u32 is 1..); = help: add `#![feature(core_pattern_type)]` to the crate attributes to enable = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date -error[E0658]: use of unstable library feature 'core_pattern_type' +error[E0658]: use of unstable library feature `core_pattern_type` --> $DIR/feature-gate-pattern_types.rs:7:16 | LL | type Percent = pattern_type!(u32 is 0..=100); @@ -18,7 +18,7 @@ LL | type Percent = pattern_type!(u32 is 0..=100); = help: add `#![feature(core_pattern_type)]` to the crate attributes to enable = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date -error[E0658]: use of unstable library feature 'core_pattern_type' +error[E0658]: use of unstable library feature `core_pattern_type` --> $DIR/feature-gate-pattern_types.rs:9:17 | LL | type Negative = pattern_type!(i32 is ..=0); @@ -28,7 +28,7 @@ LL | type Negative = pattern_type!(i32 is ..=0); = help: add `#![feature(core_pattern_type)]` to the crate attributes to enable = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date -error[E0658]: use of unstable library feature 'core_pattern_type' +error[E0658]: use of unstable library feature `core_pattern_type` --> $DIR/feature-gate-pattern_types.rs:11:17 | LL | type Positive = pattern_type!(i32 is 0..); @@ -38,7 +38,7 @@ LL | type Positive = pattern_type!(i32 is 0..); = help: add `#![feature(core_pattern_type)]` to the crate attributes to enable = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date -error[E0658]: use of unstable library feature 'core_pattern_type' +error[E0658]: use of unstable library feature `core_pattern_type` --> $DIR/feature-gate-pattern_types.rs:13:15 | LL | type Always = pattern_type!(Option is Some(_)); From 586766e790d195b14b193daa41aff259b11a2356 Mon Sep 17 00:00:00 2001 From: Jubilee Young Date: Sat, 2 Nov 2024 20:24:15 -0700 Subject: [PATCH 16/21] compiler: Replace rustc_target with _abi in _borrowck --- Cargo.lock | 2 +- compiler/rustc_borrowck/Cargo.toml | 2 +- compiler/rustc_borrowck/src/diagnostics/mod.rs | 2 +- compiler/rustc_borrowck/src/diagnostics/mutability_errors.rs | 2 +- compiler/rustc_borrowck/src/diagnostics/region_errors.rs | 2 +- compiler/rustc_borrowck/src/lib.rs | 2 +- compiler/rustc_borrowck/src/path_utils.rs | 2 +- compiler/rustc_borrowck/src/type_check/mod.rs | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 9fa1daf654614..feea7a9222ce5 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3346,6 +3346,7 @@ dependencies = [ "either", "itertools", "polonius-engine", + "rustc_abi", "rustc_data_structures", "rustc_errors", "rustc_fluent_macro", @@ -3359,7 +3360,6 @@ dependencies = [ "rustc_mir_dataflow", "rustc_session", "rustc_span", - "rustc_target", "rustc_trait_selection", "rustc_traits", "smallvec", diff --git a/compiler/rustc_borrowck/Cargo.toml b/compiler/rustc_borrowck/Cargo.toml index bafc62c7318b4..89154bf2c23c4 100644 --- a/compiler/rustc_borrowck/Cargo.toml +++ b/compiler/rustc_borrowck/Cargo.toml @@ -8,6 +8,7 @@ edition = "2021" either = "1.5.0" itertools = "0.12" polonius-engine = "0.13.0" +rustc_abi = { path = "../rustc_abi" } rustc_data_structures = { path = "../rustc_data_structures" } rustc_errors = { path = "../rustc_errors" } rustc_fluent_macro = { path = "../rustc_fluent_macro" } @@ -21,7 +22,6 @@ rustc_middle = { path = "../rustc_middle" } rustc_mir_dataflow = { path = "../rustc_mir_dataflow" } rustc_session = { path = "../rustc_session" } rustc_span = { path = "../rustc_span" } -rustc_target = { path = "../rustc_target" } rustc_trait_selection = { path = "../rustc_trait_selection" } rustc_traits = { path = "../rustc_traits" } smallvec = { version = "1.8.1", features = ["union", "may_dangle"] } diff --git a/compiler/rustc_borrowck/src/diagnostics/mod.rs b/compiler/rustc_borrowck/src/diagnostics/mod.rs index 3b60071603619..07b3c295eaa6b 100644 --- a/compiler/rustc_borrowck/src/diagnostics/mod.rs +++ b/compiler/rustc_borrowck/src/diagnostics/mod.rs @@ -1,5 +1,6 @@ //! Borrow checker diagnostics. +use rustc_abi::{FieldIdx, VariantIdx}; use rustc_errors::{Applicability, Diag, MultiSpan}; use rustc_hir::def::{CtorKind, Namespace}; use rustc_hir::{self as hir, CoroutineKind, LangItem}; @@ -21,7 +22,6 @@ use rustc_span::def_id::LocalDefId; use rustc_span::source_map::Spanned; use rustc_span::symbol::sym; use rustc_span::{DUMMY_SP, Span, Symbol}; -use rustc_target::abi::{FieldIdx, VariantIdx}; use rustc_trait_selection::error_reporting::InferCtxtErrorExt; use rustc_trait_selection::infer::InferCtxtExt; use rustc_trait_selection::traits::{ diff --git a/compiler/rustc_borrowck/src/diagnostics/mutability_errors.rs b/compiler/rustc_borrowck/src/diagnostics/mutability_errors.rs index 315851729b1e0..33bd4f37b7f1d 100644 --- a/compiler/rustc_borrowck/src/diagnostics/mutability_errors.rs +++ b/compiler/rustc_borrowck/src/diagnostics/mutability_errors.rs @@ -4,6 +4,7 @@ use core::ops::ControlFlow; use hir::{ExprKind, Param}; +use rustc_abi::FieldIdx; use rustc_errors::{Applicability, Diag}; use rustc_hir::intravisit::Visitor; use rustc_hir::{self as hir, BindingMode, ByRef, Node}; @@ -16,7 +17,6 @@ use rustc_middle::mir::{ use rustc_middle::ty::{self, InstanceKind, Ty, TyCtxt, Upcast}; use rustc_span::symbol::{Symbol, kw}; use rustc_span::{BytePos, DesugaringKind, Span, sym}; -use rustc_target::abi::FieldIdx; use rustc_trait_selection::error_reporting::InferCtxtErrorExt; use rustc_trait_selection::infer::InferCtxtExt; use rustc_trait_selection::traits; diff --git a/compiler/rustc_borrowck/src/diagnostics/region_errors.rs b/compiler/rustc_borrowck/src/diagnostics/region_errors.rs index 6333d59a1bc8d..49e999a3caab6 100644 --- a/compiler/rustc_borrowck/src/diagnostics/region_errors.rs +++ b/compiler/rustc_borrowck/src/diagnostics/region_errors.rs @@ -1103,7 +1103,7 @@ impl<'infcx, 'tcx> MirBorrowckCtxt<'_, 'infcx, 'tcx> { peeled_ty, liberated_sig.c_variadic, hir::Safety::Safe, - rustc_target::spec::abi::Abi::Rust, + rustc_abi::ExternAbi::Rust, )), ); let closure_ty = Ty::new_closure( diff --git a/compiler/rustc_borrowck/src/lib.rs b/compiler/rustc_borrowck/src/lib.rs index efcee2899c6f9..ae23f004593a2 100644 --- a/compiler/rustc_borrowck/src/lib.rs +++ b/compiler/rustc_borrowck/src/lib.rs @@ -21,6 +21,7 @@ use std::marker::PhantomData; use std::ops::Deref; use consumers::{BodyWithBorrowckFacts, ConsumerOptions}; +use rustc_abi::FieldIdx; use rustc_data_structures::fx::{FxIndexMap, FxIndexSet}; use rustc_data_structures::graph::dominators::Dominators; use rustc_errors::Diag; @@ -45,7 +46,6 @@ use rustc_mir_dataflow::move_paths::{ }; use rustc_session::lint::builtin::UNUSED_MUT; use rustc_span::{Span, Symbol}; -use rustc_target::abi::FieldIdx; use smallvec::SmallVec; use tracing::{debug, instrument}; diff --git a/compiler/rustc_borrowck/src/path_utils.rs b/compiler/rustc_borrowck/src/path_utils.rs index 1ba41cd524455..12a37f56fcf96 100644 --- a/compiler/rustc_borrowck/src/path_utils.rs +++ b/compiler/rustc_borrowck/src/path_utils.rs @@ -1,7 +1,7 @@ +use rustc_abi::FieldIdx; use rustc_data_structures::graph::dominators::Dominators; use rustc_middle::mir::{BasicBlock, Body, BorrowKind, Location, Place, PlaceRef, ProjectionElem}; use rustc_middle::ty::TyCtxt; -use rustc_target::abi::FieldIdx; use tracing::debug; use crate::borrow_set::{BorrowData, BorrowSet, TwoPhaseActivation}; diff --git a/compiler/rustc_borrowck/src/type_check/mod.rs b/compiler/rustc_borrowck/src/type_check/mod.rs index 26919bfd48861..dffdfb8ac1d8d 100644 --- a/compiler/rustc_borrowck/src/type_check/mod.rs +++ b/compiler/rustc_borrowck/src/type_check/mod.rs @@ -4,6 +4,7 @@ use std::rc::Rc; use std::{fmt, iter, mem}; use either::Either; +use rustc_abi::{FIRST_VARIANT, FieldIdx}; use rustc_data_structures::frozen::Frozen; use rustc_data_structures::fx::{FxIndexMap, FxIndexSet}; use rustc_errors::ErrorGuaranteed; @@ -40,7 +41,6 @@ use rustc_span::def_id::CRATE_DEF_ID; use rustc_span::source_map::Spanned; use rustc_span::symbol::sym; use rustc_span::{DUMMY_SP, Span}; -use rustc_target::abi::{FIRST_VARIANT, FieldIdx}; use rustc_trait_selection::traits::query::type_op::custom::{ CustomTypeOp, scrape_region_constraints, }; From bb0cd5606abd9670f8f26bcb9d6d2f87db45f614 Mon Sep 17 00:00:00 2001 From: Jubilee Young Date: Sat, 2 Nov 2024 20:24:38 -0700 Subject: [PATCH 17/21] compiler: Replace rustc_target with _abi in _hir --- Cargo.lock | 1 + compiler/rustc_hir/Cargo.toml | 1 + compiler/rustc_hir/src/hir.rs | 10 +++++----- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index feea7a9222ce5..971b5ceb02d7c 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3706,6 +3706,7 @@ name = "rustc_hir" version = "0.0.0" dependencies = [ "odht", + "rustc_abi", "rustc_arena", "rustc_ast", "rustc_data_structures", diff --git a/compiler/rustc_hir/Cargo.toml b/compiler/rustc_hir/Cargo.toml index ac24c47d0b795..85c6da83379b9 100644 --- a/compiler/rustc_hir/Cargo.toml +++ b/compiler/rustc_hir/Cargo.toml @@ -6,6 +6,7 @@ edition = "2021" [dependencies] # tidy-alphabetical-start odht = { version = "0.3.1", features = ["nightly"] } +rustc_abi = { path = "../rustc_abi" } rustc_arena = { path = "../rustc_arena" } rustc_ast = { path = "../rustc_ast" } rustc_data_structures = { path = "../rustc_data_structures" } diff --git a/compiler/rustc_hir/src/hir.rs b/compiler/rustc_hir/src/hir.rs index fa76f8652ea1f..554097bf11515 100644 --- a/compiler/rustc_hir/src/hir.rs +++ b/compiler/rustc_hir/src/hir.rs @@ -1,5 +1,6 @@ use std::fmt; +use rustc_abi::ExternAbi; use rustc_ast::util::parser::ExprPrecedence; use rustc_ast::{ self as ast, Attribute, FloatTy, InlineAsmOptions, InlineAsmTemplatePiece, IntTy, Label, @@ -19,7 +20,6 @@ use rustc_span::source_map::Spanned; use rustc_span::symbol::{Ident, Symbol, kw, sym}; use rustc_span::{BytePos, DUMMY_SP, ErrorGuaranteed, Span}; use rustc_target::asm::InlineAsmRegOrRegClass; -use rustc_target::spec::abi::Abi; use smallvec::SmallVec; use tracing::debug; @@ -2735,7 +2735,7 @@ impl PrimTy { #[derive(Debug, Clone, Copy, HashStable_Generic)] pub struct BareFnTy<'hir> { pub safety: Safety, - pub abi: Abi, + pub abi: ExternAbi, pub generic_params: &'hir [GenericParam<'hir>], pub decl: &'hir FnDecl<'hir>, pub param_names: &'hir [Ident], @@ -3313,7 +3313,7 @@ impl<'hir> Item<'hir> { expect_mod, &'hir Mod<'hir>, ItemKind::Mod(m), m; - expect_foreign_mod, (Abi, &'hir [ForeignItemRef]), + expect_foreign_mod, (ExternAbi, &'hir [ForeignItemRef]), ItemKind::ForeignMod { abi, items }, (*abi, items); expect_global_asm, &'hir InlineAsm<'hir>, ItemKind::GlobalAsm(asm), asm; @@ -3386,7 +3386,7 @@ pub struct FnHeader { pub safety: Safety, pub constness: Constness, pub asyncness: IsAsync, - pub abi: Abi, + pub abi: ExternAbi, } impl FnHeader { @@ -3428,7 +3428,7 @@ pub enum ItemKind<'hir> { /// A module. Mod(&'hir Mod<'hir>), /// An external module, e.g. `extern { .. }`. - ForeignMod { abi: Abi, items: &'hir [ForeignItemRef] }, + ForeignMod { abi: ExternAbi, items: &'hir [ForeignItemRef] }, /// Module-level inline assembly (from `global_asm!`). GlobalAsm(&'hir InlineAsm<'hir>), /// A type alias, e.g., `type Foo = Bar`. From 4046e3610c0db18aeffe0c885fe6e62f2c823344 Mon Sep 17 00:00:00 2001 From: Jubilee Young Date: Sat, 2 Nov 2024 20:25:30 -0700 Subject: [PATCH 18/21] compiler: Replace rustc_target with _abi in _trait_selection --- Cargo.lock | 2 +- compiler/rustc_trait_selection/Cargo.toml | 2 +- .../src/error_reporting/infer/mod.rs | 6 +++--- .../src/error_reporting/traits/suggestions.rs | 8 ++++---- .../rustc_trait_selection/src/traits/dyn_compatibility.rs | 2 +- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 971b5ceb02d7c..93c47a10b6223 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4468,6 +4468,7 @@ name = "rustc_trait_selection" version = "0.0.0" dependencies = [ "itertools", + "rustc_abi", "rustc_ast", "rustc_ast_ir", "rustc_attr", @@ -4484,7 +4485,6 @@ dependencies = [ "rustc_serialize", "rustc_session", "rustc_span", - "rustc_target", "rustc_transmute", "rustc_type_ir", "smallvec", diff --git a/compiler/rustc_trait_selection/Cargo.toml b/compiler/rustc_trait_selection/Cargo.toml index d4bb84838cc99..86072a6dd6064 100644 --- a/compiler/rustc_trait_selection/Cargo.toml +++ b/compiler/rustc_trait_selection/Cargo.toml @@ -6,6 +6,7 @@ edition = "2021" [dependencies] # tidy-alphabetical-start itertools = "0.12" +rustc_abi = { path = "../rustc_abi" } rustc_ast = { path = "../rustc_ast" } rustc_ast_ir = { path = "../rustc_ast_ir" } rustc_attr = { path = "../rustc_attr" } @@ -22,7 +23,6 @@ rustc_query_system = { path = "../rustc_query_system" } rustc_serialize = { path = "../rustc_serialize" } rustc_session = { path = "../rustc_session" } rustc_span = { path = "../rustc_span" } -rustc_target = { path = "../rustc_target" } rustc_transmute = { path = "../rustc_transmute", features = ["rustc"] } rustc_type_ir = { path = "../rustc_type_ir" } smallvec = { version = "1.8.1", features = ["union", "may_dangle"] } diff --git a/compiler/rustc_trait_selection/src/error_reporting/infer/mod.rs b/compiler/rustc_trait_selection/src/error_reporting/infer/mod.rs index 4725047090edf..929fa559d750c 100644 --- a/compiler/rustc_trait_selection/src/error_reporting/infer/mod.rs +++ b/compiler/rustc_trait_selection/src/error_reporting/infer/mod.rs @@ -50,6 +50,7 @@ use std::ops::ControlFlow; use std::path::PathBuf; use std::{cmp, fmt, iter}; +use rustc_abi::ExternAbi; use rustc_data_structures::fx::{FxIndexMap, FxIndexSet}; use rustc_errors::{Applicability, Diag, DiagStyledString, IntoDiagArg, StringPart, pluralize}; use rustc_hir::def::DefKind; @@ -67,7 +68,6 @@ use rustc_middle::ty::{ TypeVisitableExt, }; use rustc_span::{BytePos, DesugaringKind, Pos, Span, sym}; -use rustc_target::spec::abi; use tracing::{debug, instrument}; use crate::error_reporting::TypeErrCtxt; @@ -686,10 +686,10 @@ impl<'a, 'tcx> TypeErrCtxt<'a, 'tcx> { // unsafe extern "C" for<'a> fn(&'a T) -> &'a T // ^^^^^^^^^^ - if sig1.abi != abi::Abi::Rust { + if sig1.abi != ExternAbi::Rust { values.0.push(format!("extern {} ", sig1.abi), sig1.abi != sig2.abi); } - if sig2.abi != abi::Abi::Rust { + if sig2.abi != ExternAbi::Rust { values.1.push(format!("extern {} ", sig2.abi), sig1.abi != sig2.abi); } diff --git a/compiler/rustc_trait_selection/src/error_reporting/traits/suggestions.rs b/compiler/rustc_trait_selection/src/error_reporting/traits/suggestions.rs index 68aa9cffef207..07e3300f0f24e 100644 --- a/compiler/rustc_trait_selection/src/error_reporting/traits/suggestions.rs +++ b/compiler/rustc_trait_selection/src/error_reporting/traits/suggestions.rs @@ -6,6 +6,7 @@ use std::iter; use std::path::PathBuf; use itertools::{EitherOrBoth, Itertools}; +use rustc_abi::ExternAbi; use rustc_data_structures::fx::FxHashSet; use rustc_data_structures::stack::ensure_sufficient_stack; use rustc_errors::codes::*; @@ -38,7 +39,6 @@ use rustc_middle::{bug, span_bug}; use rustc_span::def_id::LocalDefId; use rustc_span::symbol::{Ident, Symbol, kw, sym}; use rustc_span::{BytePos, DUMMY_SP, DesugaringKind, ExpnKind, MacroKind, Span}; -use rustc_target::spec::abi; use tracing::{debug, instrument}; use super::{ @@ -1916,7 +1916,7 @@ impl<'a, 'tcx> TypeErrCtxt<'a, 'tcx> { infcx.next_ty_var(DUMMY_SP), false, hir::Safety::Safe, - abi::Abi::Rust, + ExternAbi::Rust, ) } _ => infcx.tcx.mk_fn_sig( @@ -1924,7 +1924,7 @@ impl<'a, 'tcx> TypeErrCtxt<'a, 'tcx> { infcx.next_ty_var(DUMMY_SP), false, hir::Safety::Safe, - abi::Abi::Rust, + ExternAbi::Rust, ), }; @@ -3996,7 +3996,7 @@ impl<'a, 'tcx> TypeErrCtxt<'a, 'tcx> { && let [self_ty, found_ty] = trait_ref.args.as_slice() && let Some(fn_ty) = self_ty.as_type().filter(|ty| ty.is_fn()) && let fn_sig @ ty::FnSig { - abi: abi::Abi::Rust, + abi: ExternAbi::Rust, c_variadic: false, safety: hir::Safety::Safe, .. diff --git a/compiler/rustc_trait_selection/src/traits/dyn_compatibility.rs b/compiler/rustc_trait_selection/src/traits/dyn_compatibility.rs index 0eaacbcfbea64..c00246cfd7d0f 100644 --- a/compiler/rustc_trait_selection/src/traits/dyn_compatibility.rs +++ b/compiler/rustc_trait_selection/src/traits/dyn_compatibility.rs @@ -7,6 +7,7 @@ use std::iter; use std::ops::ControlFlow; +use rustc_abi::BackendRepr; use rustc_errors::FatalError; use rustc_hir as hir; use rustc_hir::def_id::DefId; @@ -18,7 +19,6 @@ use rustc_middle::ty::{ }; use rustc_span::Span; use rustc_span::symbol::Symbol; -use rustc_target::abi::BackendRepr; use smallvec::SmallVec; use tracing::{debug, instrument}; From 31cbde037bd58aa5536970dad8bf8dd17e392f3d Mon Sep 17 00:00:00 2001 From: Jubilee Young Date: Sat, 2 Nov 2024 20:28:24 -0700 Subject: [PATCH 19/21] compiler: Add rustc_abi to _monomorphize --- Cargo.lock | 1 + compiler/rustc_monomorphize/Cargo.toml | 1 + compiler/rustc_monomorphize/src/collector.rs | 2 +- 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/Cargo.lock b/Cargo.lock index 93c47a10b6223..e7c1fbd2638cc 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4132,6 +4132,7 @@ dependencies = [ name = "rustc_monomorphize" version = "0.0.0" dependencies = [ + "rustc_abi", "rustc_data_structures", "rustc_errors", "rustc_fluent_macro", diff --git a/compiler/rustc_monomorphize/Cargo.toml b/compiler/rustc_monomorphize/Cargo.toml index c7f1b9fa78454..6c881fd7e06ba 100644 --- a/compiler/rustc_monomorphize/Cargo.toml +++ b/compiler/rustc_monomorphize/Cargo.toml @@ -5,6 +5,7 @@ edition = "2021" [dependencies] # tidy-alphabetical-start +rustc_abi = { path = "../rustc_abi" } rustc_data_structures = { path = "../rustc_data_structures" } rustc_errors = { path = "../rustc_errors" } rustc_fluent_macro = { path = "../rustc_fluent_macro" } diff --git a/compiler/rustc_monomorphize/src/collector.rs b/compiler/rustc_monomorphize/src/collector.rs index 8df6e63deeb18..50bab0da606f8 100644 --- a/compiler/rustc_monomorphize/src/collector.rs +++ b/compiler/rustc_monomorphize/src/collector.rs @@ -210,6 +210,7 @@ mod move_check; use std::path::PathBuf; use move_check::MoveCheckState; +use rustc_abi::Size; use rustc_data_structures::sync::{LRef, MTLock, par_for_each_in}; use rustc_data_structures::unord::{UnordMap, UnordSet}; use rustc_hir as hir; @@ -236,7 +237,6 @@ use rustc_session::config::EntryFnType; use rustc_span::source_map::{Spanned, dummy_spanned, respan}; use rustc_span::symbol::{Ident, sym}; use rustc_span::{DUMMY_SP, Span}; -use rustc_target::abi::Size; use tracing::{debug, instrument, trace}; use crate::errors::{self, EncounteredErrorWhileInstantiating, NoOptimizedMir, RecursionLimit}; From ab6994f880e2d7e7ec5cc23774bde157ab4c17d6 Mon Sep 17 00:00:00 2001 From: Jubilee Young Date: Sat, 2 Nov 2024 20:28:42 -0700 Subject: [PATCH 20/21] compiler: Add rustc_abi to _sanitizers --- Cargo.lock | 1 + compiler/rustc_sanitizers/Cargo.toml | 1 + .../src/cfi/typeid/itanium_cxx_abi/encode.rs | 5 ++--- .../rustc_sanitizers/src/cfi/typeid/itanium_cxx_abi/mod.rs | 2 +- compiler/rustc_sanitizers/src/cfi/typeid/mod.rs | 2 +- compiler/rustc_sanitizers/src/kcfi/typeid/mod.rs | 2 +- 6 files changed, 7 insertions(+), 6 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index e7c1fbd2638cc..500992ff8c127 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4337,6 +4337,7 @@ name = "rustc_sanitizers" version = "0.0.0" dependencies = [ "bitflags 2.6.0", + "rustc_abi", "rustc_data_structures", "rustc_hir", "rustc_middle", diff --git a/compiler/rustc_sanitizers/Cargo.toml b/compiler/rustc_sanitizers/Cargo.toml index aea2f7dda7f36..5623a493cf009 100644 --- a/compiler/rustc_sanitizers/Cargo.toml +++ b/compiler/rustc_sanitizers/Cargo.toml @@ -7,6 +7,7 @@ edition = "2021" bitflags = "2.5.0" tracing = "0.1" twox-hash = "1.6.3" +rustc_abi = { path = "../rustc_abi" } rustc_data_structures = { path = "../rustc_data_structures" } rustc_hir = { path = "../rustc_hir" } rustc_middle = { path = "../rustc_middle" } diff --git a/compiler/rustc_sanitizers/src/cfi/typeid/itanium_cxx_abi/encode.rs b/compiler/rustc_sanitizers/src/cfi/typeid/itanium_cxx_abi/encode.rs index ca75952fe3d43..0e6f905e7a106 100644 --- a/compiler/rustc_sanitizers/src/cfi/typeid/itanium_cxx_abi/encode.rs +++ b/compiler/rustc_sanitizers/src/cfi/typeid/itanium_cxx_abi/encode.rs @@ -7,6 +7,7 @@ use std::fmt::Write as _; +use rustc_abi::{ExternAbi, Integer}; use rustc_data_structures::base_n::{ALPHANUMERIC_ONLY, CASE_INSENSITIVE, ToBaseN}; use rustc_data_structures::fx::FxHashMap; use rustc_hir as hir; @@ -18,8 +19,6 @@ use rustc_middle::ty::{ }; use rustc_span::def_id::DefId; use rustc_span::sym; -use rustc_target::abi::Integer; -use rustc_target::spec::abi::Abi; use tracing::instrument; use crate::cfi::typeid::TypeIdOptions; @@ -185,7 +184,7 @@ fn encode_fnsig<'tcx>( let mut encode_ty_options = EncodeTyOptions::from_bits(options.bits()) .unwrap_or_else(|| bug!("encode_fnsig: invalid option(s) `{:?}`", options.bits())); match fn_sig.abi { - Abi::C { .. } => { + ExternAbi::C { .. } => { encode_ty_options.insert(EncodeTyOptions::GENERALIZE_REPR_C); } _ => { diff --git a/compiler/rustc_sanitizers/src/cfi/typeid/itanium_cxx_abi/mod.rs b/compiler/rustc_sanitizers/src/cfi/typeid/itanium_cxx_abi/mod.rs index 39842763bfec6..01568a0f61c3c 100644 --- a/compiler/rustc_sanitizers/src/cfi/typeid/itanium_cxx_abi/mod.rs +++ b/compiler/rustc_sanitizers/src/cfi/typeid/itanium_cxx_abi/mod.rs @@ -7,7 +7,7 @@ use rustc_data_structures::fx::FxHashMap; use rustc_middle::bug; use rustc_middle::ty::{self, Instance, Ty, TyCtxt, TypeFoldable, TypeVisitableExt}; -use rustc_target::abi::call::{Conv, FnAbi, PassMode}; +use rustc_target::callconv::{Conv, FnAbi, PassMode}; use tracing::instrument; mod encode; diff --git a/compiler/rustc_sanitizers/src/cfi/typeid/mod.rs b/compiler/rustc_sanitizers/src/cfi/typeid/mod.rs index f37ffcbc4db2f..5d1ee3d797885 100644 --- a/compiler/rustc_sanitizers/src/cfi/typeid/mod.rs +++ b/compiler/rustc_sanitizers/src/cfi/typeid/mod.rs @@ -6,7 +6,7 @@ use bitflags::bitflags; use rustc_middle::ty::{Instance, Ty, TyCtxt}; -use rustc_target::abi::call::FnAbi; +use rustc_target::callconv::FnAbi; bitflags! { /// Options for typeid_for_fnabi. diff --git a/compiler/rustc_sanitizers/src/kcfi/typeid/mod.rs b/compiler/rustc_sanitizers/src/kcfi/typeid/mod.rs index 5e2e6a2b8ed6e..3243e23fcf981 100644 --- a/compiler/rustc_sanitizers/src/kcfi/typeid/mod.rs +++ b/compiler/rustc_sanitizers/src/kcfi/typeid/mod.rs @@ -7,7 +7,7 @@ use std::hash::Hasher; use rustc_middle::ty::{Instance, InstanceKind, ReifyReason, Ty, TyCtxt}; -use rustc_target::abi::call::FnAbi; +use rustc_target::callconv::FnAbi; use twox_hash::XxHash64; pub use crate::cfi::typeid::{TypeIdOptions, itanium_cxx_abi}; From 234d3de8b441a9596e929e57d00d3c38560c5262 Mon Sep 17 00:00:00 2001 From: Ralf Jung Date: Sat, 2 Nov 2024 12:01:56 +0100 Subject: [PATCH 21/21] stabilize const_arguments_as_str --- library/core/src/fmt/mod.rs | 3 +-- library/core/src/lib.rs | 1 - library/core/src/panic/panic_info.rs | 3 +-- 3 files changed, 2 insertions(+), 5 deletions(-) diff --git a/library/core/src/fmt/mod.rs b/library/core/src/fmt/mod.rs index f3b54230bc1a5..2b1692a195e50 100644 --- a/library/core/src/fmt/mod.rs +++ b/library/core/src/fmt/mod.rs @@ -438,10 +438,9 @@ impl<'a> Arguments<'a> { /// assert_eq!(format_args!("{:?}", std::env::current_dir()).as_str(), None); /// ``` #[stable(feature = "fmt_as_str", since = "1.52.0")] - #[rustc_const_unstable(feature = "const_arguments_as_str", issue = "103900")] + #[rustc_const_stable(feature = "const_arguments_as_str", since = "CURRENT_RUSTC_VERSION")] #[must_use] #[inline] - #[cfg_attr(not(bootstrap), rustc_const_stable_indirect)] pub const fn as_str(&self) -> Option<&'static str> { match (self.pieces, self.args) { ([], []) => Some(""), diff --git a/library/core/src/lib.rs b/library/core/src/lib.rs index bbfe32027e8eb..886192bfe5e16 100644 --- a/library/core/src/lib.rs +++ b/library/core/src/lib.rs @@ -114,7 +114,6 @@ #![feature(const_align_of_val_raw)] #![feature(const_align_offset)] #![feature(const_alloc_layout)] -#![feature(const_arguments_as_str)] #![feature(const_black_box)] #![feature(const_char_encode_utf16)] #![feature(const_eval_select)] diff --git a/library/core/src/panic/panic_info.rs b/library/core/src/panic/panic_info.rs index 1d950eb362504..230a9918dbf3e 100644 --- a/library/core/src/panic/panic_info.rs +++ b/library/core/src/panic/panic_info.rs @@ -165,10 +165,9 @@ impl<'a> PanicMessage<'a> { /// /// See [`fmt::Arguments::as_str`] for details. #[stable(feature = "panic_info_message", since = "1.81.0")] - #[rustc_const_unstable(feature = "const_arguments_as_str", issue = "103900")] + #[rustc_const_stable(feature = "const_arguments_as_str", since = "CURRENT_RUSTC_VERSION")] #[must_use] #[inline] - #[cfg_attr(not(bootstrap), rustc_const_stable_indirect)] pub const fn as_str(&self) -> Option<&'static str> { self.message.as_str() }