From 0eba4c206a3c47c375cb9ead20d37cf00f6351cf Mon Sep 17 00:00:00 2001 From: Trevor Spiteri Date: Mon, 8 Jan 2018 19:22:37 +0100 Subject: [PATCH 01/19] doc: show that `f32::log` and `f64::log` are not correctly rounded --- src/libstd/f32.rs | 19 +++++++++---------- src/libstd/f64.rs | 19 +++++++++---------- 2 files changed, 18 insertions(+), 20 deletions(-) diff --git a/src/libstd/f32.rs b/src/libstd/f32.rs index 6d76c7e722c45..8a15f19e44067 100644 --- a/src/libstd/f32.rs +++ b/src/libstd/f32.rs @@ -470,22 +470,21 @@ impl f32 { return unsafe { intrinsics::logf32(self) }; } - /// Returns the logarithm of the number with respect to an arbitrary base. + /// Returns the logarithm of the number with respect to an arbitrary base, + /// calculated as `self.ln() / base.ln()`. + /// + /// `self.log2()` can produce more accurate results for base 2, and + /// `self.log10()` can produce more accurate results for base 10. /// /// ``` /// use std::f32; /// - /// let ten = 10.0f32; - /// let two = 2.0f32; - /// - /// // log10(10) - 1 == 0 - /// let abs_difference_10 = (ten.log(10.0) - 1.0).abs(); + /// let five = 5.0f32; /// - /// // log2(2) - 1 == 0 - /// let abs_difference_2 = (two.log(2.0) - 1.0).abs(); + /// // log5(5) - 1 == 0 + /// let abs_difference = (five.log(5.0) - 1.0).abs(); /// - /// assert!(abs_difference_10 <= f32::EPSILON); - /// assert!(abs_difference_2 <= f32::EPSILON); + /// assert!(abs_difference <= f32::EPSILON); /// ``` #[stable(feature = "rust1", since = "1.0.0")] #[inline] diff --git a/src/libstd/f64.rs b/src/libstd/f64.rs index dee9566f1fc68..33f447b794c9b 100644 --- a/src/libstd/f64.rs +++ b/src/libstd/f64.rs @@ -430,20 +430,19 @@ impl f64 { self.log_wrapper(|n| { unsafe { intrinsics::logf64(n) } }) } - /// Returns the logarithm of the number with respect to an arbitrary base. + /// Returns the logarithm of the number with respect to an arbitrary base, + /// calculated as `self.ln() / base.ln()`. /// - /// ``` - /// let ten = 10.0_f64; - /// let two = 2.0_f64; + /// `self.log2()` can produce more accurate results for base 2, and + /// `self.log10()` can produce more accurate results for base 10. /// - /// // log10(10) - 1 == 0 - /// let abs_difference_10 = (ten.log(10.0) - 1.0).abs(); + /// ``` + /// let five = 5.0_f64; /// - /// // log2(2) - 1 == 0 - /// let abs_difference_2 = (two.log(2.0) - 1.0).abs(); + /// // log5(5) - 1 == 0 + /// let abs_difference = (five.log(5.0) - 1.0).abs(); /// - /// assert!(abs_difference_10 < 1e-10); - /// assert!(abs_difference_2 < 1e-10); + /// assert!(abs_difference < 1e-10); /// ``` #[stable(feature = "rust1", since = "1.0.0")] #[inline] From 6d82e7814f1a387c0510ee525c6e0ac8fa890c40 Mon Sep 17 00:00:00 2001 From: Trevor Spiteri Date: Tue, 9 Jan 2018 12:26:00 +0100 Subject: [PATCH 02/19] remove implementation detail from doc --- src/libstd/f32.rs | 4 ++-- src/libstd/f64.rs | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/libstd/f32.rs b/src/libstd/f32.rs index 8a15f19e44067..5e5695f15ac3f 100644 --- a/src/libstd/f32.rs +++ b/src/libstd/f32.rs @@ -470,9 +470,9 @@ impl f32 { return unsafe { intrinsics::logf32(self) }; } - /// Returns the logarithm of the number with respect to an arbitrary base, - /// calculated as `self.ln() / base.ln()`. + /// Returns the logarithm of the number with respect to an arbitrary base. /// + /// The result may not be correctly rounded owing to implementation details; /// `self.log2()` can produce more accurate results for base 2, and /// `self.log10()` can produce more accurate results for base 10. /// diff --git a/src/libstd/f64.rs b/src/libstd/f64.rs index 33f447b794c9b..e4eea745bb77c 100644 --- a/src/libstd/f64.rs +++ b/src/libstd/f64.rs @@ -430,9 +430,9 @@ impl f64 { self.log_wrapper(|n| { unsafe { intrinsics::logf64(n) } }) } - /// Returns the logarithm of the number with respect to an arbitrary base, - /// calculated as `self.ln() / base.ln()`. + /// Returns the logarithm of the number with respect to an arbitrary base. /// + /// The result may not be correctly rounded owing to implementation details; /// `self.log2()` can produce more accurate results for base 2, and /// `self.log10()` can produce more accurate results for base 10. /// From f31204662b6d5ab343b901d9684ecda71e777cc0 Mon Sep 17 00:00:00 2001 From: Guillaume Gomez Date: Fri, 12 Jan 2018 22:47:31 +0100 Subject: [PATCH 03/19] Switch to pulldown as default markdown renderer --- src/librustdoc/lib.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/librustdoc/lib.rs b/src/librustdoc/lib.rs index 1740816ef6b16..8a3856db9b9ad 100644 --- a/src/librustdoc/lib.rs +++ b/src/librustdoc/lib.rs @@ -241,8 +241,8 @@ pub fn opts() -> Vec { or `#![doc(html_playground_url=...)]`", "URL") }), - unstable("enable-commonmark", |o| { - o.optflag("", "enable-commonmark", "to enable commonmark doc rendering/testing") + unstable("disable-commonmark", |o| { + o.optflag("", "disable-commonmark", "to disable commonmark doc rendering/testing") }), unstable("display-warnings", |o| { o.optflag("", "display-warnings", "to print code warnings when testing doc") @@ -346,10 +346,10 @@ pub fn main_args(args: &[String]) -> isize { let css_file_extension = matches.opt_str("e").map(|s| PathBuf::from(&s)); let cfgs = matches.opt_strs("cfg"); - let render_type = if matches.opt_present("enable-commonmark") { - RenderType::Pulldown - } else { + let render_type = if matches.opt_present("disable-commonmark") { RenderType::Hoedown + } else { + RenderType::Pulldown }; if let Some(ref p) = css_file_extension { From cee295e8af297bfeb5a53512ff0cb02d192378e2 Mon Sep 17 00:00:00 2001 From: Bulat Musin <9249387+bmusin@users.noreply.github.com> Date: Wed, 10 Jan 2018 20:23:01 +0300 Subject: [PATCH 04/19] fix off-by-one error --- src/libstd/io/buffered.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/libstd/io/buffered.rs b/src/libstd/io/buffered.rs index 7001d8e042196..bc1f3bb9a99f6 100644 --- a/src/libstd/io/buffered.rs +++ b/src/libstd/io/buffered.rs @@ -316,8 +316,8 @@ impl Seek for BufReader { /// /// let mut stream = TcpStream::connect("127.0.0.1:34254").unwrap(); /// -/// for i in 1..10 { -/// stream.write(&[i]).unwrap(); +/// for i in 0..10 { +/// stream.write(&[i+1]).unwrap(); /// } /// ``` /// @@ -332,8 +332,8 @@ impl Seek for BufReader { /// /// let mut stream = BufWriter::new(TcpStream::connect("127.0.0.1:34254").unwrap()); /// -/// for i in 1..10 { -/// stream.write(&[i]).unwrap(); +/// for i in 0..10 { +/// stream.write(&[i+1]).unwrap(); /// } /// ``` /// From 51d546f4aa8a94b81d2a580518d95d1ab12a3655 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Tue, 2 Jan 2018 02:13:20 +0200 Subject: [PATCH 05/19] Add slice::ExactChunks and ::ExactChunksMut iterators These guarantee that always the requested slice size will be returned and any leftoever elements at the end will be ignored. It allows llvm to get rid of bounds checks in the code using the iterator. This is inspired by the same iterators provided by ndarray. See https://github.com/rust-lang/rust/issues/47115 --- src/liballoc/lib.rs | 1 + src/liballoc/slice.rs | 56 ++++++++++ src/libcore/slice/mod.rs | 230 +++++++++++++++++++++++++++++++++++++++ 3 files changed, 287 insertions(+) diff --git a/src/liballoc/lib.rs b/src/liballoc/lib.rs index 3cc3ea467966b..d8ce28695ab6f 100644 --- a/src/liballoc/lib.rs +++ b/src/liballoc/lib.rs @@ -124,6 +124,7 @@ #![feature(unsize)] #![feature(allocator_internals)] #![feature(on_unimplemented)] +#![feature(exact_chunks)] #![cfg_attr(not(test), feature(fused, fn_traits, placement_new_protocol, swap_with_slice, i128))] #![cfg_attr(test, feature(test, box_heap))] diff --git a/src/liballoc/slice.rs b/src/liballoc/slice.rs index fa73197885be7..bae366736379c 100644 --- a/src/liballoc/slice.rs +++ b/src/liballoc/slice.rs @@ -123,6 +123,8 @@ pub use core::slice::{from_raw_parts, from_raw_parts_mut}; pub use core::slice::{from_ref, from_ref_mut}; #[unstable(feature = "slice_get_slice", issue = "35729")] pub use core::slice::SliceIndex; +#[unstable(feature = "exact_chunks", issue = "47115")] +pub use core::slice::{ExactChunks, ExactChunksMut}; //////////////////////////////////////////////////////////////////////////////// // Basic slice extension methods @@ -631,6 +633,31 @@ impl [T] { core_slice::SliceExt::chunks(self, chunk_size) } + /// Returns an iterator over `chunk_size` elements of the slice at a + /// time. The chunks are slices and do not overlap. If `chunk_size` does + /// not divide the length of the slice, then the last up to `chunk_size-1` + /// elements will be omitted. + /// + /// # Panics + /// + /// Panics if `chunk_size` is 0. + /// + /// # Examples + /// + /// ``` + /// let slice = ['l', 'o', 'r', 'e', 'm']; + /// let mut iter = slice.chunks(2); + /// assert_eq!(iter.next().unwrap(), &['l', 'o']); + /// assert_eq!(iter.next().unwrap(), &['r', 'e']); + /// assert_eq!(iter.next().unwrap(), &['m']); + /// assert!(iter.next().is_none()); + /// ``` + #[unstable(feature = "exact_chunks", issue = "47115")] + #[inline] + pub fn exact_chunks(&self, chunk_size: usize) -> ExactChunks { + core_slice::SliceExt::exact_chunks(self, chunk_size) + } + /// Returns an iterator over `chunk_size` elements of the slice at a time. /// The chunks are mutable slices, and do not overlap. If `chunk_size` does /// not divide the length of the slice, then the last chunk will not @@ -660,6 +687,35 @@ impl [T] { core_slice::SliceExt::chunks_mut(self, chunk_size) } + /// Returns an iterator over `chunk_size` elements of the slice at a time. + /// The chunks are mutable slices, and do not overlap. If `chunk_size` does + /// not divide the length of the slice, then the last up to `chunk_size-1` + /// elements will be omitted. + /// + /// # Panics + /// + /// Panics if `chunk_size` is 0. + /// + /// # Examples + /// + /// ``` + /// let v = &mut [0, 0, 0, 0, 0]; + /// let mut count = 1; + /// + /// for chunk in v.exact_chunks_mut(2) { + /// for elem in chunk.iter_mut() { + /// *elem += count; + /// } + /// count += 1; + /// } + /// assert_eq!(v, &[1, 1, 2, 2, 3]); + /// ``` + #[unstable(feature = "exact_chunks", issue = "47115")] + #[inline] + pub fn exact_chunks_mut(&mut self, chunk_size: usize) -> ExactChunksMut { + core_slice::SliceExt::exact_chunks_mut(self, chunk_size) + } + /// Divides one slice into two at an index. /// /// The first will contain all indices from `[0, mid)` (excluding diff --git a/src/libcore/slice/mod.rs b/src/libcore/slice/mod.rs index 72036d6d3a248..5791b1d6e79c6 100644 --- a/src/libcore/slice/mod.rs +++ b/src/libcore/slice/mod.rs @@ -104,6 +104,9 @@ pub trait SliceExt { #[stable(feature = "core", since = "1.6.0")] fn chunks(&self, size: usize) -> Chunks; + #[unstable(feature = "exact_chunks", issue = "47115")] + fn exact_chunks(&self, size: usize) -> ExactChunks; + #[stable(feature = "core", since = "1.6.0")] fn get(&self, index: I) -> Option<&I::Output> where I: SliceIndex; @@ -181,6 +184,9 @@ pub trait SliceExt { #[stable(feature = "core", since = "1.6.0")] fn chunks_mut(&mut self, chunk_size: usize) -> ChunksMut; + #[unstable(feature = "exact_chunks", issue = "47115")] + fn exact_chunks_mut(&mut self, size: usize) -> ExactChunksMut; + #[stable(feature = "core", since = "1.6.0")] fn swap(&mut self, a: usize, b: usize); @@ -353,6 +359,14 @@ impl SliceExt for [T] { Chunks { v: self, chunk_size: chunk_size } } + #[inline] + fn exact_chunks(&self, chunk_size: usize) -> ExactChunks { + assert!(chunk_size != 0); + let rem = self.len() % chunk_size; + let len = self.len() - rem; + ExactChunks { v: &self[..len], chunk_size: chunk_size} + } + #[inline] fn get(&self, index: I) -> Option<&I::Output> where I: SliceIndex<[T]> @@ -536,6 +550,14 @@ impl SliceExt for [T] { ChunksMut { v: self, chunk_size: chunk_size } } + #[inline] + fn exact_chunks_mut(&mut self, chunk_size: usize) -> ExactChunksMut { + assert!(chunk_size != 0); + let rem = self.len() % chunk_size; + let len = self.len() - rem; + ExactChunksMut { v: &mut self[..len], chunk_size: chunk_size} + } + #[inline] fn swap(&mut self, a: usize, b: usize) { unsafe { @@ -2365,6 +2387,214 @@ unsafe impl<'a, T> TrustedRandomAccess for ChunksMut<'a, T> { fn may_have_side_effect() -> bool { false } } +/// An iterator over a slice in (non-overlapping) chunks (`chunk_size` elements at a +/// time). +/// +/// When the slice len is not evenly divided by the chunk size, the last +/// up to `chunk_size-1` elements will be omitted. +/// +/// This struct is created by the [`exact_chunks`] method on [slices]. +/// +/// [`exact_chunks`]: ../../std/primitive.slice.html#method.exact_chunks +/// [slices]: ../../std/primitive.slice.html +#[derive(Debug)] +#[unstable(feature = "exact_chunks", issue = "47115")] +pub struct ExactChunks<'a, T:'a> { + v: &'a [T], + chunk_size: usize +} + +// FIXME(#26925) Remove in favor of `#[derive(Clone)]` +#[unstable(feature = "exact_chunks", issue = "47115")] +impl<'a, T> Clone for ExactChunks<'a, T> { + fn clone(&self) -> ExactChunks<'a, T> { + ExactChunks { + v: self.v, + chunk_size: self.chunk_size, + } + } +} + +#[unstable(feature = "exact_chunks", issue = "47115")] +impl<'a, T> Iterator for ExactChunks<'a, T> { + type Item = &'a [T]; + + #[inline] + fn next(&mut self) -> Option<&'a [T]> { + if self.v.len() < self.chunk_size { + None + } else { + let (fst, snd) = self.v.split_at(self.chunk_size); + self.v = snd; + Some(fst) + } + } + + #[inline] + fn size_hint(&self) -> (usize, Option) { + let n = self.v.len() / self.chunk_size; + (n, Some(n)) + } + + #[inline] + fn count(self) -> usize { + self.len() + } + + #[inline] + fn nth(&mut self, n: usize) -> Option { + let (start, overflow) = n.overflowing_mul(self.chunk_size); + if start >= self.v.len() || overflow { + self.v = &[]; + None + } else { + let end = match start.checked_add(self.chunk_size) { + Some(sum) => cmp::min(self.v.len(), sum), + None => self.v.len(), + }; + + if end - start != self.chunk_size { + self.v = &[]; + None + } else { + let nth = &self.v[start..end]; + self.v = &self.v[end..]; + Some(nth) + } + } + } + + #[inline] + fn last(self) -> Option { + if self.v.len() < self.chunk_size { + None + } else { + let start = self.v.len() - self.chunk_size; + Some(&self.v[start..]) + } + } +} + +#[unstable(feature = "exact_chunks", issue = "47115")] +impl<'a, T> DoubleEndedIterator for ExactChunks<'a, T> { + #[inline] + fn next_back(&mut self) -> Option<&'a [T]> { + if self.v.len() < self.chunk_size { + None + } else { + let (fst, snd) = self.v.split_at(self.v.len() - self.chunk_size); + self.v = fst; + Some(snd) + } + } +} + +#[unstable(feature = "exact_chunks", issue = "47115")] +impl<'a, T> ExactSizeIterator for ExactChunks<'a, T> {} + +#[unstable(feature = "fused", issue = "35602")] +impl<'a, T> FusedIterator for ExactChunks<'a, T> {} + +/// An iterator over a slice in (non-overlapping) mutable chunks (`chunk_size` +/// elements at a time). When the slice len is not evenly divided by the chunk +/// size, the last up to `chunk_size-1` elements will be omitted. +/// +/// This struct is created by the [`exact_chunks_mut`] method on [slices]. +/// +/// [`exact_chunks_mut`]: ../../std/primitive.slice.html#method.exact_chunks_mut +/// [slices]: ../../std/primitive.slice.html +#[derive(Debug)] +#[unstable(feature = "exact_chunks", issue = "47115")] +pub struct ExactChunksMut<'a, T:'a> { + v: &'a mut [T], + chunk_size: usize +} + +#[unstable(feature = "exact_chunks", issue = "47115")] +impl<'a, T> Iterator for ExactChunksMut<'a, T> { + type Item = &'a mut [T]; + + #[inline] + fn next(&mut self) -> Option<&'a mut [T]> { + if self.v.len() < self.chunk_size { + None + } else { + let tmp = mem::replace(&mut self.v, &mut []); + let (head, tail) = tmp.split_at_mut(self.chunk_size); + self.v = tail; + Some(head) + } + } + + #[inline] + fn size_hint(&self) -> (usize, Option) { + let n = self.v.len() / self.chunk_size; + (n, Some(n)) + } + + #[inline] + fn count(self) -> usize { + self.len() + } + + #[inline] + fn nth(&mut self, n: usize) -> Option<&'a mut [T]> { + let (start, overflow) = n.overflowing_mul(self.chunk_size); + if start >= self.v.len() || overflow { + self.v = &mut []; + None + } else { + let end = match start.checked_add(self.chunk_size) { + Some(sum) => cmp::min(self.v.len(), sum), + None => self.v.len(), + }; + + if end - start != self.chunk_size { + self.v = &mut []; + None + } else { + let tmp = mem::replace(&mut self.v, &mut []); + let (head, tail) = tmp.split_at_mut(end); + let (_, nth) = head.split_at_mut(start); + self.v = tail; + Some(nth) + } + } + } + + #[inline] + fn last(self) -> Option { + if self.v.len() < self.chunk_size { + None + } else { + let start = (self.v.len() - self.chunk_size) / self.chunk_size * self.chunk_size; + Some(&mut self.v[start..]) + } + } +} + +#[unstable(feature = "exact_chunks", issue = "47115")] +impl<'a, T> DoubleEndedIterator for ExactChunksMut<'a, T> { + #[inline] + fn next_back(&mut self) -> Option<&'a mut [T]> { + if self.v.len() < self.chunk_size { + None + } else { + let tmp = mem::replace(&mut self.v, &mut []); + let tmp_len = tmp.len(); + let (head, tail) = tmp.split_at_mut(tmp_len - self.chunk_size); + self.v = head; + Some(tail) + } + } +} + +#[unstable(feature = "exact_chunks", issue = "47115")] +impl<'a, T> ExactSizeIterator for ExactChunksMut<'a, T> {} + +#[unstable(feature = "fused", issue = "35602")] +impl<'a, T> FusedIterator for ExactChunksMut<'a, T> {} + // // Free functions // From 83396fc712aefd24531f7925d377b148da8ed04f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Tue, 2 Jan 2018 14:54:18 +0200 Subject: [PATCH 06/19] Add #![feature(exact_chunks)] to the documentation examples to fix the doc tests --- src/liballoc/slice.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/liballoc/slice.rs b/src/liballoc/slice.rs index bae366736379c..6a3970f37285c 100644 --- a/src/liballoc/slice.rs +++ b/src/liballoc/slice.rs @@ -645,6 +645,8 @@ impl [T] { /// # Examples /// /// ``` + /// #![feature(exact_chunks)] + /// /// let slice = ['l', 'o', 'r', 'e', 'm']; /// let mut iter = slice.chunks(2); /// assert_eq!(iter.next().unwrap(), &['l', 'o']); @@ -699,6 +701,8 @@ impl [T] { /// # Examples /// /// ``` + /// #![feature(exact_chunks)] + /// /// let v = &mut [0, 0, 0, 0, 0]; /// let mut count = 1; /// From 802ba9ea5b432d36444d8da8646bd2a1624b9dfa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Tue, 2 Jan 2018 14:55:25 +0200 Subject: [PATCH 07/19] Fix assertions in examples of the exact_chunk() documentation --- src/liballoc/slice.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/liballoc/slice.rs b/src/liballoc/slice.rs index 6a3970f37285c..9ff39363fd7ef 100644 --- a/src/liballoc/slice.rs +++ b/src/liballoc/slice.rs @@ -651,7 +651,6 @@ impl [T] { /// let mut iter = slice.chunks(2); /// assert_eq!(iter.next().unwrap(), &['l', 'o']); /// assert_eq!(iter.next().unwrap(), &['r', 'e']); - /// assert_eq!(iter.next().unwrap(), &['m']); /// assert!(iter.next().is_none()); /// ``` #[unstable(feature = "exact_chunks", issue = "47115")] @@ -712,7 +711,7 @@ impl [T] { /// } /// count += 1; /// } - /// assert_eq!(v, &[1, 1, 2, 2, 3]); + /// assert_eq!(v, &[1, 1, 2, 2]); /// ``` #[unstable(feature = "exact_chunks", issue = "47115")] #[inline] From e51a89a0ad35f42af9c39d4ada25a5ad9746cd62 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Tue, 2 Jan 2018 19:21:39 +0200 Subject: [PATCH 08/19] Fix doctests for slice::exact_chunks() for real --- src/liballoc/slice.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/liballoc/slice.rs b/src/liballoc/slice.rs index 9ff39363fd7ef..182e9b0a00ed6 100644 --- a/src/liballoc/slice.rs +++ b/src/liballoc/slice.rs @@ -648,7 +648,7 @@ impl [T] { /// #![feature(exact_chunks)] /// /// let slice = ['l', 'o', 'r', 'e', 'm']; - /// let mut iter = slice.chunks(2); + /// let mut iter = slice.exact_chunks(2); /// assert_eq!(iter.next().unwrap(), &['l', 'o']); /// assert_eq!(iter.next().unwrap(), &['r', 'e']); /// assert!(iter.next().is_none()); @@ -711,7 +711,7 @@ impl [T] { /// } /// count += 1; /// } - /// assert_eq!(v, &[1, 1, 2, 2]); + /// assert_eq!(v, &[1, 1, 2, 2, 0]); /// ``` #[unstable(feature = "exact_chunks", issue = "47115")] #[inline] From aa0c08a22c32da5cc1db16fba2e5e6b762a47de5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Tue, 2 Jan 2018 23:54:42 +0200 Subject: [PATCH 09/19] Apply review comments from @bluss - Simplify nth() by making use of the fact that the slice is evenly divisible by the chunk size, and calling next() instead of duplicating it - Call next_back() in last(), they are equivalent - Implement ExactSizeIterator::is_empty() --- src/libcore/slice/mod.rs | 67 ++++++++++++++-------------------------- 1 file changed, 23 insertions(+), 44 deletions(-) diff --git a/src/libcore/slice/mod.rs b/src/libcore/slice/mod.rs index 5791b1d6e79c6..2d606f43084ba 100644 --- a/src/libcore/slice/mod.rs +++ b/src/libcore/slice/mod.rs @@ -2448,30 +2448,16 @@ impl<'a, T> Iterator for ExactChunks<'a, T> { self.v = &[]; None } else { - let end = match start.checked_add(self.chunk_size) { - Some(sum) => cmp::min(self.v.len(), sum), - None => self.v.len(), - }; - - if end - start != self.chunk_size { - self.v = &[]; - None - } else { - let nth = &self.v[start..end]; - self.v = &self.v[end..]; - Some(nth) - } + let (_, snd) = self.v.split_at(start); + self.v = snd; + assert!(self.v.len() == self.chunk_size); + self.next() } } #[inline] - fn last(self) -> Option { - if self.v.len() < self.chunk_size { - None - } else { - let start = self.v.len() - self.chunk_size; - Some(&self.v[start..]) - } + fn last(mut self) -> Option { + self.next_back() } } @@ -2490,7 +2476,11 @@ impl<'a, T> DoubleEndedIterator for ExactChunks<'a, T> { } #[unstable(feature = "exact_chunks", issue = "47115")] -impl<'a, T> ExactSizeIterator for ExactChunks<'a, T> {} +impl<'a, T> ExactSizeIterator for ExactChunks<'a, T> { + fn is_empty(&self) -> bool { + self.v.is_empty() + } +} #[unstable(feature = "fused", issue = "35602")] impl<'a, T> FusedIterator for ExactChunks<'a, T> {} @@ -2544,32 +2534,17 @@ impl<'a, T> Iterator for ExactChunksMut<'a, T> { self.v = &mut []; None } else { - let end = match start.checked_add(self.chunk_size) { - Some(sum) => cmp::min(self.v.len(), sum), - None => self.v.len(), - }; - - if end - start != self.chunk_size { - self.v = &mut []; - None - } else { - let tmp = mem::replace(&mut self.v, &mut []); - let (head, tail) = tmp.split_at_mut(end); - let (_, nth) = head.split_at_mut(start); - self.v = tail; - Some(nth) - } + let tmp = mem::replace(&mut self.v, &mut []); + let (_, snd) = tmp.split_at_mut(start); + self.v = snd; + assert!(self.v.len() == self.chunk_size); + self.next() } } #[inline] - fn last(self) -> Option { - if self.v.len() < self.chunk_size { - None - } else { - let start = (self.v.len() - self.chunk_size) / self.chunk_size * self.chunk_size; - Some(&mut self.v[start..]) - } + fn last(mut self) -> Option { + self.next_back() } } @@ -2590,7 +2565,11 @@ impl<'a, T> DoubleEndedIterator for ExactChunksMut<'a, T> { } #[unstable(feature = "exact_chunks", issue = "47115")] -impl<'a, T> ExactSizeIterator for ExactChunksMut<'a, T> {} +impl<'a, T> ExactSizeIterator for ExactChunksMut<'a, T> { + fn is_empty(&self) -> bool { + self.v.is_empty() + } +} #[unstable(feature = "fused", issue = "35602")] impl<'a, T> FusedIterator for ExactChunksMut<'a, T> {} From cea36f447ea746397003f1ee98ee41e858b1951b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Wed, 3 Jan 2018 00:05:13 +0200 Subject: [PATCH 10/19] Remove useless assertion --- src/libcore/slice/mod.rs | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/libcore/slice/mod.rs b/src/libcore/slice/mod.rs index 2d606f43084ba..c61d17290c89d 100644 --- a/src/libcore/slice/mod.rs +++ b/src/libcore/slice/mod.rs @@ -2450,7 +2450,6 @@ impl<'a, T> Iterator for ExactChunks<'a, T> { } else { let (_, snd) = self.v.split_at(start); self.v = snd; - assert!(self.v.len() == self.chunk_size); self.next() } } @@ -2537,7 +2536,6 @@ impl<'a, T> Iterator for ExactChunksMut<'a, T> { let tmp = mem::replace(&mut self.v, &mut []); let (_, snd) = tmp.split_at_mut(start); self.v = snd; - assert!(self.v.len() == self.chunk_size); self.next() } } From 6bf1dfdd76625ba753de0d1b87a2825606cf6f2b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Wed, 3 Jan 2018 01:01:40 +0200 Subject: [PATCH 11/19] Implement TrustedRandomAccess for slice::{ExactChunks, ExactChunksMut} --- src/libcore/slice/mod.rs | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/src/libcore/slice/mod.rs b/src/libcore/slice/mod.rs index c61d17290c89d..9379a064a6c11 100644 --- a/src/libcore/slice/mod.rs +++ b/src/libcore/slice/mod.rs @@ -2484,6 +2484,15 @@ impl<'a, T> ExactSizeIterator for ExactChunks<'a, T> { #[unstable(feature = "fused", issue = "35602")] impl<'a, T> FusedIterator for ExactChunks<'a, T> {} +#[doc(hidden)] +unsafe impl<'a, T> TrustedRandomAccess for ExactChunks<'a, T> { + unsafe fn get_unchecked(&mut self, i: usize) -> &'a [T] { + let start = i * self.chunk_size; + from_raw_parts(self.v.as_ptr().offset(start as isize), self.chunk_size) + } + fn may_have_side_effect() -> bool { false } +} + /// An iterator over a slice in (non-overlapping) mutable chunks (`chunk_size` /// elements at a time). When the slice len is not evenly divided by the chunk /// size, the last up to `chunk_size-1` elements will be omitted. @@ -2572,6 +2581,15 @@ impl<'a, T> ExactSizeIterator for ExactChunksMut<'a, T> { #[unstable(feature = "fused", issue = "35602")] impl<'a, T> FusedIterator for ExactChunksMut<'a, T> {} +#[doc(hidden)] +unsafe impl<'a, T> TrustedRandomAccess for ExactChunksMut<'a, T> { + unsafe fn get_unchecked(&mut self, i: usize) -> &'a mut [T] { + let start = i * self.chunk_size; + from_raw_parts_mut(self.v.as_mut_ptr().offset(start as isize), self.chunk_size) + } + fn may_have_side_effect() -> bool { false } +} + // // Free functions // From 8a82e8e89f6eec3744f12d45c12ce05d48233d8d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Tue, 9 Jan 2018 22:58:41 +0200 Subject: [PATCH 12/19] Mention in the exact_chunks docs that this can often be optimized better by the compiler And also link from the normal chunks iterator to the exact_chunks one. --- src/liballoc/slice.rs | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/src/liballoc/slice.rs b/src/liballoc/slice.rs index 182e9b0a00ed6..f8980b8777e93 100644 --- a/src/liballoc/slice.rs +++ b/src/liballoc/slice.rs @@ -613,6 +613,9 @@ impl [T] { /// not divide the length of the slice, then the last chunk will /// not have length `chunk_size`. /// + /// See [`exact_chunks`] for a variant of this iterator that returns chunks + /// of always exactly `chunk_size` elements. + /// /// # Panics /// /// Panics if `chunk_size` is 0. @@ -638,6 +641,10 @@ impl [T] { /// not divide the length of the slice, then the last up to `chunk_size-1` /// elements will be omitted. /// + /// Due to each chunk having exactly `chunk_size` elements, the compiler + /// can often optimize the resulting code better than in the case of + /// [`chunks`]. + /// /// # Panics /// /// Panics if `chunk_size` is 0. @@ -664,6 +671,9 @@ impl [T] { /// not divide the length of the slice, then the last chunk will not /// have length `chunk_size`. /// + /// See [`exact_chunks_mut`] for a variant of this iterator that returns chunks + /// of always exactly `chunk_size` elements. + /// /// # Panics /// /// Panics if `chunk_size` is 0. @@ -693,6 +703,11 @@ impl [T] { /// not divide the length of the slice, then the last up to `chunk_size-1` /// elements will be omitted. /// + /// + /// Due to each chunk having exactly `chunk_size` elements, the compiler + /// can often optimize the resulting code better than in the case of + /// [`chunks_mut`]. + /// /// # Panics /// /// Panics if `chunk_size` is 0. From baa81dc77f0a46b35c6b103cba79334d87622f2b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Thu, 11 Jan 2018 12:11:32 +0200 Subject: [PATCH 13/19] Use assert_eq!() instead of assert!(a == b) in slice chunks_mut() unit test This way more useful information is printed if the test ever fails. --- src/liballoc/tests/slice.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/liballoc/tests/slice.rs b/src/liballoc/tests/slice.rs index 85d5ce304b88d..c2f7522c5f054 100644 --- a/src/liballoc/tests/slice.rs +++ b/src/liballoc/tests/slice.rs @@ -1124,7 +1124,7 @@ fn test_mut_chunks() { } } let result = [0, 0, 0, 1, 1, 1, 2]; - assert!(v == result); + assert_eq!(v, result); } #[test] @@ -1136,7 +1136,7 @@ fn test_mut_chunks_rev() { } } let result = [2, 2, 2, 1, 1, 1, 0]; - assert!(v == result); + assert_eq!(v, result); } #[test] From ed774838b372bf532a3fb221601bdcd1c8856277 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Thu, 11 Jan 2018 12:12:55 +0200 Subject: [PATCH 14/19] Test the whole chunks instead of just an element in the chunks/chunks_mut tests Easy enough to do and ensures that the whole chunk is as expected instead of just the element that was looked at before. --- src/libcore/tests/slice.rs | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/libcore/tests/slice.rs b/src/libcore/tests/slice.rs index d6230e93f998d..4f9fc30785c73 100644 --- a/src/libcore/tests/slice.rs +++ b/src/libcore/tests/slice.rs @@ -117,12 +117,12 @@ fn test_chunks_count() { fn test_chunks_nth() { let v: &[i32] = &[0, 1, 2, 3, 4, 5]; let mut c = v.chunks(2); - assert_eq!(c.nth(1).unwrap()[1], 3); - assert_eq!(c.next().unwrap()[0], 4); + assert_eq!(c.nth(1).unwrap(), &[2, 3]); + assert_eq!(c.next().unwrap(), &[4, 5]); let v2: &[i32] = &[0, 1, 2, 3, 4]; let mut c2 = v2.chunks(3); - assert_eq!(c2.nth(1).unwrap()[1], 4); + assert_eq!(c2.nth(1).unwrap(), &[3, 4]); assert_eq!(c2.next(), None); } @@ -168,12 +168,12 @@ fn test_chunks_mut_count() { fn test_chunks_mut_nth() { let v: &mut [i32] = &mut [0, 1, 2, 3, 4, 5]; let mut c = v.chunks_mut(2); - assert_eq!(c.nth(1).unwrap()[1], 3); - assert_eq!(c.next().unwrap()[0], 4); + assert_eq!(c.nth(1).unwrap(), &[2, 3]); + assert_eq!(c.next().unwrap(), &[4, 5]); let v2: &mut [i32] = &mut [0, 1, 2, 3, 4]; let mut c2 = v2.chunks_mut(3); - assert_eq!(c2.nth(1).unwrap()[1], 4); + assert_eq!(c2.nth(1).unwrap(), &[3, 4]); assert_eq!(c2.next(), None); } @@ -181,11 +181,11 @@ fn test_chunks_mut_nth() { fn test_chunks_mut_last() { let v: &mut [i32] = &mut [0, 1, 2, 3, 4, 5]; let c = v.chunks_mut(2); - assert_eq!(c.last().unwrap()[1], 5); + assert_eq!(c.last().unwrap(), &[4, 5]); let v2: &mut [i32] = &mut [0, 1, 2, 3, 4]; let c2 = v2.chunks_mut(2); - assert_eq!(c2.last().unwrap()[0], 4); + assert_eq!(c2.last().unwrap(), &[4]); } #[test] From 5f4fc8214279f2ffadbf2cc3a4c22b748c17bd15 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Thu, 11 Jan 2018 12:13:45 +0200 Subject: [PATCH 15/19] Add unit tests for exact_chunks/exact_chunks_mut These are basically modified copies of the chunks/chunks_mut tests. --- src/liballoc/tests/lib.rs | 1 + src/liballoc/tests/slice.rs | 56 +++++++++++++++++++ src/libcore/tests/lib.rs | 1 + src/libcore/tests/slice.rs | 104 ++++++++++++++++++++++++++++++++++++ 4 files changed, 162 insertions(+) diff --git a/src/liballoc/tests/lib.rs b/src/liballoc/tests/lib.rs index f1e95883b3827..eee229bc6fdfa 100644 --- a/src/liballoc/tests/lib.rs +++ b/src/liballoc/tests/lib.rs @@ -30,6 +30,7 @@ #![feature(string_retain)] #![feature(unboxed_closures)] #![feature(unicode)] +#![feature(exact_chunks)] extern crate alloc_system; extern crate std_unicode; diff --git a/src/liballoc/tests/slice.rs b/src/liballoc/tests/slice.rs index c2f7522c5f054..5a3e5e6cb780d 100644 --- a/src/liballoc/tests/slice.rs +++ b/src/liballoc/tests/slice.rs @@ -910,6 +910,30 @@ fn test_chunksator_0() { let _it = v.chunks(0); } +#[test] +fn test_exact_chunksator() { + let v = &[1, 2, 3, 4, 5]; + + assert_eq!(v.exact_chunks(2).len(), 2); + + let chunks: &[&[_]] = &[&[1, 2], &[3, 4]]; + assert_eq!(v.exact_chunks(2).collect::>(), chunks); + let chunks: &[&[_]] = &[&[1, 2, 3]]; + assert_eq!(v.exact_chunks(3).collect::>(), chunks); + let chunks: &[&[_]] = &[]; + assert_eq!(v.exact_chunks(6).collect::>(), chunks); + + let chunks: &[&[_]] = &[&[3, 4], &[1, 2]]; + assert_eq!(v.exact_chunks(2).rev().collect::>(), chunks); +} + +#[test] +#[should_panic] +fn test_exact_chunksator_0() { + let v = &[1, 2, 3, 4]; + let _it = v.exact_chunks(0); +} + #[test] fn test_reverse_part() { let mut values = [1, 2, 3, 4, 5]; @@ -1146,6 +1170,38 @@ fn test_mut_chunks_0() { let _it = v.chunks_mut(0); } +#[test] +fn test_mut_exact_chunks() { + let mut v = [0, 1, 2, 3, 4, 5, 6]; + assert_eq!(v.exact_chunks_mut(2).len(), 3); + for (i, chunk) in v.exact_chunks_mut(3).enumerate() { + for x in chunk { + *x = i as u8; + } + } + let result = [0, 0, 0, 1, 1, 1, 6]; + assert_eq!(v, result); +} + +#[test] +fn test_mut_exact_chunks_rev() { + let mut v = [0, 1, 2, 3, 4, 5, 6]; + for (i, chunk) in v.exact_chunks_mut(3).rev().enumerate() { + for x in chunk { + *x = i as u8; + } + } + let result = [1, 1, 1, 0, 0, 0, 6]; + assert_eq!(v, result); +} + +#[test] +#[should_panic] +fn test_mut_exact_chunks_0() { + let mut v = [1, 2, 3, 4]; + let _it = v.exact_chunks_mut(0); +} + #[test] fn test_mut_last() { let mut x = [1, 2, 3, 4, 5]; diff --git a/src/libcore/tests/lib.rs b/src/libcore/tests/lib.rs index c4b85b829812c..2c0009569d75d 100644 --- a/src/libcore/tests/lib.rs +++ b/src/libcore/tests/lib.rs @@ -42,6 +42,7 @@ #![feature(try_from)] #![feature(try_trait)] #![feature(unique)] +#![feature(exact_chunks)] extern crate core; extern crate test; diff --git a/src/libcore/tests/slice.rs b/src/libcore/tests/slice.rs index 4f9fc30785c73..a89a88ac0af1e 100644 --- a/src/libcore/tests/slice.rs +++ b/src/libcore/tests/slice.rs @@ -202,6 +202,110 @@ fn test_chunks_mut_zip() { assert_eq!(v1, [13, 14, 19, 20, 14]); } +#[test] +fn test_exact_chunks_count() { + let v: &[i32] = &[0, 1, 2, 3, 4, 5]; + let c = v.exact_chunks(3); + assert_eq!(c.count(), 2); + + let v2: &[i32] = &[0, 1, 2, 3, 4]; + let c2 = v2.exact_chunks(2); + assert_eq!(c2.count(), 2); + + let v3: &[i32] = &[]; + let c3 = v3.exact_chunks(2); + assert_eq!(c3.count(), 0); +} + +#[test] +fn test_exact_chunks_nth() { + let v: &[i32] = &[0, 1, 2, 3, 4, 5]; + let mut c = v.exact_chunks(2); + assert_eq!(c.nth(1).unwrap(), &[2, 3]); + assert_eq!(c.next().unwrap(), &[4, 5]); + + let v2: &[i32] = &[0, 1, 2, 3, 4, 5, 6]; + let mut c2 = v2.exact_chunks(3); + assert_eq!(c2.nth(1).unwrap(), &[3, 4, 5]); + assert_eq!(c2.next(), None); +} + +#[test] +fn test_exact_chunks_last() { + let v: &[i32] = &[0, 1, 2, 3, 4, 5]; + let c = v.exact_chunks(2); + assert_eq!(c.last().unwrap(), &[4, 5]); + + let v2: &[i32] = &[0, 1, 2, 3, 4]; + let c2 = v2.exact_chunks(2); + assert_eq!(c2.last().unwrap(), &[2, 3]); +} + +#[test] +fn test_exact_chunks_zip() { + let v1: &[i32] = &[0, 1, 2, 3, 4]; + let v2: &[i32] = &[6, 7, 8, 9, 10]; + + let res = v1.exact_chunks(2) + .zip(v2.exact_chunks(2)) + .map(|(a, b)| a.iter().sum::() + b.iter().sum::()) + .collect::>(); + assert_eq!(res, vec![14, 22]); +} + +#[test] +fn test_exact_chunks_mut_count() { + let v: &mut [i32] = &mut [0, 1, 2, 3, 4, 5]; + let c = v.exact_chunks_mut(3); + assert_eq!(c.count(), 2); + + let v2: &mut [i32] = &mut [0, 1, 2, 3, 4]; + let c2 = v2.exact_chunks_mut(2); + assert_eq!(c2.count(), 2); + + let v3: &mut [i32] = &mut []; + let c3 = v3.exact_chunks_mut(2); + assert_eq!(c3.count(), 0); +} + +#[test] +fn test_exact_chunks_mut_nth() { + let v: &mut [i32] = &mut [0, 1, 2, 3, 4, 5]; + let mut c = v.exact_chunks_mut(2); + assert_eq!(c.nth(1).unwrap(), &[2, 3]); + assert_eq!(c.next().unwrap(), &[4, 5]); + + let v2: &mut [i32] = &mut [0, 1, 2, 3, 4, 5, 6]; + let mut c2 = v2.exact_chunks_mut(3); + assert_eq!(c2.nth(1).unwrap(), &[3, 4, 5]); + assert_eq!(c2.next(), None); +} + +#[test] +fn test_exact_chunks_mut_last() { + let v: &mut [i32] = &mut [0, 1, 2, 3, 4, 5]; + let c = v.exact_chunks_mut(2); + assert_eq!(c.last().unwrap(), &[4, 5]); + + let v2: &mut [i32] = &mut [0, 1, 2, 3, 4]; + let c2 = v2.exact_chunks_mut(2); + assert_eq!(c2.last().unwrap(), &[2, 3]); +} + +#[test] +fn test_exact_chunks_mut_zip() { + let v1: &mut [i32] = &mut [0, 1, 2, 3, 4]; + let v2: &[i32] = &[6, 7, 8, 9, 10]; + + for (a, b) in v1.exact_chunks_mut(2).zip(v2.exact_chunks(2)) { + let sum = b.iter().sum::(); + for v in a { + *v += sum; + } + } + assert_eq!(v1, [13, 14, 19, 20, 4]); +} + #[test] fn test_windows_count() { let v: &[i32] = &[0, 1, 2, 3, 4, 5]; From 52e074e40ee3eaf04415b2044c93bcfddad52f35 Mon Sep 17 00:00:00 2001 From: Clar Charr Date: Mon, 1 Jan 2018 21:56:22 -0500 Subject: [PATCH 16/19] Better Debug impl for io::Error. --- src/libstd/io/error.rs | 43 ++++++++++++++++++++++++++++++++++-------- 1 file changed, 35 insertions(+), 8 deletions(-) diff --git a/src/libstd/io/error.rs b/src/libstd/io/error.rs index bb9383d3d6e02..f0b41f30251e0 100644 --- a/src/libstd/io/error.rs +++ b/src/libstd/io/error.rs @@ -62,12 +62,18 @@ pub type Result = result::Result; /// [`Write`]: ../io/trait.Write.html /// [`Seek`]: ../io/trait.Seek.html /// [`ErrorKind`]: enum.ErrorKind.html -#[derive(Debug)] #[stable(feature = "rust1", since = "1.0.0")] pub struct Error { repr: Repr, } +#[stable(feature = "rust1", since = "1.0.0")] +impl fmt::Debug for Error { + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + fmt::Debug::fmt(&self.repr, f) + } +} + enum Repr { Os(i32), Simple(ErrorKind), @@ -511,10 +517,12 @@ impl Error { impl fmt::Debug for Repr { fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result { match *self { - Repr::Os(ref code) => - fmt.debug_struct("Os").field("code", code) - .field("message", &sys::os::error_string(*code)).finish(), - Repr::Custom(ref c) => fmt.debug_tuple("Custom").field(c).finish(), + Repr::Os(code) => + fmt.debug_struct("Os") + .field("code", &code) + .field("kind", &sys::decode_error_kind(code)) + .field("message", &sys::os::error_string(code)).finish(), + Repr::Custom(ref c) => fmt::Debug::fmt(&c, fmt), Repr::Simple(kind) => fmt.debug_tuple("Kind").field(&kind).finish(), } } @@ -559,17 +567,36 @@ fn _assert_error_is_sync_send() { #[cfg(test)] mod test { - use super::{Error, ErrorKind}; + use super::{Error, ErrorKind, Repr, Custom}; use error; use fmt; use sys::os::error_string; + use sys::decode_error_kind; #[test] fn test_debug_error() { let code = 6; let msg = error_string(code); - let err = Error { repr: super::Repr::Os(code) }; - let expected = format!("Error {{ repr: Os {{ code: {:?}, message: {:?} }} }}", code, msg); + let kind = decode_error_kind(code); + let err = Error { + repr: Repr::Custom(box Custom { + kind: ErrorKind::InvalidInput, + error: box Error { + repr: super::Repr::Os(code) + }, + }) + }; + let expected = format!( + "Custom {{ \ + kind: InvalidInput, \ + error: Os {{ \ + code: {:?}, \ + kind: {:?}, \ + message: {:?} \ + }} \ + }}", + code, kind, msg + ); assert_eq!(format!("{:?}", err), expected); } From 318cf22bd1955ba870a0a3189cb5dfdbce31b53e Mon Sep 17 00:00:00 2001 From: Vadim Petrochenkov Date: Sat, 13 Jan 2018 23:13:49 +0300 Subject: [PATCH 17/19] Move "no asm" check into AST validation --- src/librustc_driver/driver.rs | 6 +--- src/librustc_passes/ast_validation.rs | 3 ++ src/librustc_passes/lib.rs | 1 - src/librustc_passes/no_asm.rs | 47 --------------------------- 4 files changed, 4 insertions(+), 53 deletions(-) delete mode 100644 src/librustc_passes/no_asm.rs diff --git a/src/librustc_driver/driver.rs b/src/librustc_driver/driver.rs index b726576220801..75a7f99084133 100644 --- a/src/librustc_driver/driver.rs +++ b/src/librustc_driver/driver.rs @@ -37,7 +37,7 @@ use rustc_typeck as typeck; use rustc_privacy; use rustc_plugin::registry::Registry; use rustc_plugin as plugin; -use rustc_passes::{self, ast_validation, no_asm, loops, consts, static_recursion, hir_stats}; +use rustc_passes::{self, ast_validation, loops, consts, static_recursion, hir_stats}; use rustc_const_eval::{self, check_match}; use super::Compilation; use ::DefaultTransCrate; @@ -856,10 +856,6 @@ pub fn phase_2_configure_and_expand(sess: &Session, println!("{}", json::as_json(&krate)); } - time(time_passes, - "checking for inline asm in case the target doesn't support it", - || no_asm::check_crate(sess, &krate)); - time(time_passes, "AST validation", || ast_validation::check_crate(sess, &krate)); diff --git a/src/librustc_passes/ast_validation.rs b/src/librustc_passes/ast_validation.rs index 61f54774163d4..dbad82ed97725 100644 --- a/src/librustc_passes/ast_validation.rs +++ b/src/librustc_passes/ast_validation.rs @@ -149,6 +149,9 @@ impl<'a> Visitor<'a> for AstValidator<'a> { ExprKind::Continue(Some(ident)) => { self.check_label(ident.node, ident.span); } + ExprKind::InlineAsm(..) if !self.session.target.target.options.allow_asm => { + span_err!(self.session, expr.span, E0472, "asm! is unsupported on this target"); + } _ => {} } diff --git a/src/librustc_passes/lib.rs b/src/librustc_passes/lib.rs index 754c3bbd07406..73c71ec0b2f00 100644 --- a/src/librustc_passes/lib.rs +++ b/src/librustc_passes/lib.rs @@ -42,7 +42,6 @@ pub mod consts; pub mod hir_stats; pub mod loops; mod mir_stats; -pub mod no_asm; pub mod static_recursion; #[cfg(not(stage0))] // remove after the next snapshot diff --git a/src/librustc_passes/no_asm.rs b/src/librustc_passes/no_asm.rs deleted file mode 100644 index 4dbf57a99bcbe..0000000000000 --- a/src/librustc_passes/no_asm.rs +++ /dev/null @@ -1,47 +0,0 @@ -// Copyright 2015 The Rust Project Developers. See the COPYRIGHT -// file at the top-level directory of this distribution and at -// http://rust-lang.org/COPYRIGHT. -// -// Licensed under the Apache License, Version 2.0 or the MIT license -// , at your -// option. This file may not be copied, modified, or distributed -// except according to those terms. - -/// Run over the whole crate and check for ExprInlineAsm. -/// Inline asm isn't allowed on virtual ISA based targets, so we reject it -/// here. - -use rustc::session::Session; - -use syntax::ast; -use syntax::visit::Visitor; -use syntax::visit; - -pub fn check_crate(sess: &Session, krate: &ast::Crate) { - if sess.target.target.options.allow_asm { - return; - } - - visit::walk_crate(&mut CheckNoAsm { sess: sess }, krate); -} - -#[derive(Copy, Clone)] -struct CheckNoAsm<'a> { - sess: &'a Session, -} - -impl<'a> Visitor<'a> for CheckNoAsm<'a> { - fn visit_expr(&mut self, e: &'a ast::Expr) { - match e.node { - ast::ExprKind::InlineAsm(_) => { - span_err!(self.sess, - e.span, - E0472, - "asm! is unsupported on this target") - } - _ => {} - } - visit::walk_expr(self, e) - } -} From 46c59aef6250cafdb5e845e03ab1664d1553f92f Mon Sep 17 00:00:00 2001 From: Ryan Cumming Date: Mon, 15 Jan 2018 08:09:55 +1100 Subject: [PATCH 18/19] Make ui-fulldeps/update-references executable When a ui-fulldeps comparison fails it suggests running update-references.sh: ``` src/test/ui-fulldeps/update-references.sh 'rust/build/x86_64-apple-darwin/test/ui-fulldeps' 'resolve-error.rs' ``` This does not work as update-references.sh isn't executable. The other update-references.sh in the ui directory is already executable so this looks like an oversight. --- src/test/ui-fulldeps/update-references.sh | 0 1 file changed, 0 insertions(+), 0 deletions(-) mode change 100644 => 100755 src/test/ui-fulldeps/update-references.sh diff --git a/src/test/ui-fulldeps/update-references.sh b/src/test/ui-fulldeps/update-references.sh old mode 100644 new mode 100755 From 2c99ace2282736725a9d8876d03d7ccdd9badbeb Mon Sep 17 00:00:00 2001 From: Guillaume Gomez Date: Sat, 13 Jan 2018 14:05:51 +0100 Subject: [PATCH 19/19] Add error code for unstable feature errors --- src/libsyntax/diagnostic_list.rs | 25 ++++ src/libsyntax/diagnostics/macros.rs | 8 ++ src/libsyntax/feature_gate.rs | 4 +- src/test/compile-fail/E0658.rs | 13 ++ .../feature-gate-abi-msp430-interrupt.stderr | 2 +- src/test/ui/feature-gate-abi.stderr | 112 +++++++++--------- .../ui/feature-gate-abi_unadjusted.stderr | 2 +- ...eature-gate-advanced-slice-features.stderr | 4 +- .../feature-gate-allocator_internals.stderr | 2 +- ...-allow-internal-unsafe-nested-macro.stderr | 2 +- ...llow-internal-unstable-nested-macro.stderr | 2 +- ...gate-allow-internal-unstable-struct.stderr | 2 +- ...eature-gate-allow-internal-unstable.stderr | 2 +- src/test/ui/feature-gate-allow_fail.stderr | 2 +- .../feature-gate-arbitrary-self-types.stderr | 6 +- ...te-arbitrary_self_types-raw-pointer.stderr | 6 +- src/test/ui/feature-gate-asm.stderr | 2 +- src/test/ui/feature-gate-asm2.stderr | 2 +- .../feature-gate-assoc-type-defaults.stderr | 2 +- src/test/ui/feature-gate-box-expr.stderr | 2 +- src/test/ui/feature-gate-box_patterns.stderr | 2 +- src/test/ui/feature-gate-box_syntax.stderr | 2 +- src/test/ui/feature-gate-catch_expr.stderr | 2 +- .../ui/feature-gate-cfg-target-feature.stderr | 8 +- .../feature-gate-cfg-target-has-atomic.stderr | 30 ++--- ...eature-gate-cfg-target-thread-local.stderr | 2 +- .../ui/feature-gate-cfg-target-vendor.stderr | 8 +- .../ui/feature-gate-compiler-builtins.stderr | 2 +- src/test/ui/feature-gate-concat_idents.stderr | 4 +- .../ui/feature-gate-concat_idents2.stderr | 2 +- .../ui/feature-gate-concat_idents3.stderr | 4 +- ...eature-gate-conservative_impl_trait.stderr | 2 +- src/test/ui/feature-gate-const_fn.stderr | 10 +- .../ui/feature-gate-crate_in_paths.stderr | 2 +- ...ture-gate-crate_visibility_modifier.stderr | 2 +- .../ui/feature-gate-custom_attribute.stderr | 26 ++-- .../ui/feature-gate-custom_attribute2.stderr | 34 +++--- src/test/ui/feature-gate-custom_derive.stderr | 2 +- src/test/ui/feature-gate-decl_macro.stderr | 2 +- src/test/ui/feature-gate-doc_cfg.stderr | 2 +- src/test/ui/feature-gate-doc_masked.stderr | 2 +- src/test/ui/feature-gate-doc_spotlight.stderr | 2 +- .../feature-gate-dotdoteq_in_patterns.stderr | 2 +- src/test/ui/feature-gate-dropck-ugeh.stderr | 2 +- src/test/ui/feature-gate-dyn-trait.stderr | 2 +- ...eature-gate-exclusive-range-pattern.stderr | 2 +- .../ui/feature-gate-extern_in_paths.stderr | 2 +- src/test/ui/feature-gate-extern_types.stderr | 2 +- src/test/ui/feature-gate-external_doc.stderr | 2 +- src/test/ui/feature-gate-fundamental.stderr | 2 +- src/test/ui/feature-gate-generators.stderr | 2 +- ...ature-gate-generic_associated_types.stderr | 8 +- .../feature-gate-generic_param_attrs.stderr | 34 +++--- .../ui/feature-gate-global_allocator.stderr | 2 +- src/test/ui/feature-gate-global_asm.stderr | 2 +- src/test/ui/feature-gate-i128_type.stderr | 4 +- src/test/ui/feature-gate-i128_type2.stderr | 10 +- src/test/ui/feature-gate-intrinsics.stderr | 4 +- src/test/ui/feature-gate-lang-items.stderr | 2 +- src/test/ui/feature-gate-link_args.stderr | 6 +- src/test/ui/feature-gate-link_cfg.stderr | 2 +- .../feature-gate-link_llvm_intrinsics.stderr | 2 +- src/test/ui/feature-gate-linkage.stderr | 2 +- src/test/ui/feature-gate-linker-flavor.stderr | 2 +- src/test/ui/feature-gate-log_syntax.stderr | 2 +- src/test/ui/feature-gate-log_syntax2.stderr | 2 +- ...feature-gate-macro-lifetime-matcher.stderr | 2 +- .../ui/feature-gate-macro-vis-matcher.stderr | 2 +- src/test/ui/feature-gate-main.stderr | 2 +- .../feature-gate-match_beginning_vert.stderr | 6 +- ...feature-gate-match_default_bindings.stderr | 2 +- src/test/ui/feature-gate-may-dangle.stderr | 2 +- .../ui/feature-gate-naked_functions.stderr | 4 +- .../ui/feature-gate-needs-allocator.stderr | 2 +- src/test/ui/feature-gate-never_type.stderr | 10 +- src/test/ui/feature-gate-no-debug.stderr | 2 +- src/test/ui/feature-gate-no_core.stderr | 2 +- .../ui/feature-gate-non_ascii_idents.stderr | 26 ++-- .../ui/feature-gate-non_exhaustive.stderr | 2 +- ...ate-omit-gdb-pretty-printer-section.stderr | 2 +- .../ui/feature-gate-on-unimplemented.stderr | 2 +- .../feature-gate-optin-builtin-traits.stderr | 5 +- .../ui/feature-gate-placement-expr.stderr | 2 +- src/test/ui/feature-gate-plugin.stderr | 2 +- .../ui/feature-gate-plugin_registrar.stderr | 2 +- .../ui/feature-gate-prelude_import.stderr | 2 +- .../ui/feature-gate-profiler-runtime.stderr | 2 +- src/test/ui/feature-gate-repr-simd.stderr | 2 +- src/test/ui/feature-gate-repr128.stderr | 2 +- src/test/ui/feature-gate-repr_align.stderr | 2 +- src/test/ui/feature-gate-rustc-attrs.stderr | 6 +- .../feature-gate-rustc_const_unstable.stderr | 2 +- .../ui/feature-gate-sanitizer-runtime.stderr | 2 +- src/test/ui/feature-gate-simd.stderr | 2 +- .../ui/feature-gate-slice-patterns.stderr | 2 +- src/test/ui/feature-gate-start.stderr | 2 +- .../ui/feature-gate-static-nobundle.stderr | 2 +- .../feature-gate-stmt_expr_attributes.stderr | 2 +- .../ui/feature-gate-target_feature.stderr | 2 +- src/test/ui/feature-gate-thread_local.stderr | 2 +- src/test/ui/feature-gate-trace_macros.stderr | 2 +- .../ui/feature-gate-type_ascription.stderr | 2 +- ...-gate-unboxed-closures-manual-impls.stderr | 8 +- ...-gate-unboxed-closures-method-calls.stderr | 6 +- ...re-gate-unboxed-closures-ufcs-calls.stderr | 6 +- .../ui/feature-gate-unboxed-closures.stderr | 2 +- .../feature-gate-underscore-lifetimes.stderr | 2 +- src/test/ui/feature-gate-universal.stderr | 2 +- ...feature-gate-unsized_tuple_coercion.stderr | 2 +- .../ui/feature-gate-untagged_unions.stderr | 6 +- .../ui/feature-gate-unwind-attributes.stderr | 2 +- .../ui/feature-gate-use_nested_groups.stderr | 6 +- src/test/ui/feature-gate-used.stderr | 2 +- .../ui/feature-gate-wasm_import_memory.stderr | 2 +- .../ui/non_modrs_mods/non_modrs_mods.stderr | 8 +- src/test/ui/pat-slice-old-style.stderr | 2 +- .../suggestion.stderr | 2 +- .../ui/span/gated-features-attr-spans.stderr | 4 +- src/test/ui/span/issue-36530.stderr | 4 +- ...specialization-feature-gate-default.stderr | 2 +- .../dont-suggest-dereference-on-arg.stderr | 2 +- 121 files changed, 346 insertions(+), 297 deletions(-) create mode 100644 src/test/compile-fail/E0658.rs diff --git a/src/libsyntax/diagnostic_list.rs b/src/libsyntax/diagnostic_list.rs index c3cf474783505..d841281e48580 100644 --- a/src/libsyntax/diagnostic_list.rs +++ b/src/libsyntax/diagnostic_list.rs @@ -317,6 +317,31 @@ fn main() { ``` "##, +E0658: r##" +An unstable feature was used. + +Erroneous code example: + +```compile_fail,E658 +let x = ::std::u128::MAX; // error: use of unstable library feature 'i128' +``` + +If you're using a stable or a beta version of rustc, you won't be able to use +any unstable features. In order to do so, please switch to a nightly version of +rustc (by using rustup). + +If you're using a nightly version of rustc, just add the corresponding feature +to be able to use it: + +``` +#![feature(i128)] + +fn main() { + let x = ::std::u128::MAX; // ok! +} +``` +"##, + } register_diagnostics! { diff --git a/src/libsyntax/diagnostics/macros.rs b/src/libsyntax/diagnostics/macros.rs index c01836b619411..61f3e7046f149 100644 --- a/src/libsyntax/diagnostics/macros.rs +++ b/src/libsyntax/diagnostics/macros.rs @@ -105,6 +105,14 @@ macro_rules! struct_span_err { }) } +#[macro_export] +macro_rules! stringify_error_code { + ($code:ident) => ({ + __diagnostic_used!($code); + $crate::errors::DiagnosticId::Error(stringify!($code).to_owned()) + }) +} + #[macro_export] macro_rules! type_error_struct { ($session:expr, $span:expr, $typ:expr, $code:ident, $($message:tt)*) => ({ diff --git a/src/libsyntax/feature_gate.rs b/src/libsyntax/feature_gate.rs index c3bf5dbff5c58..196fadcc997f5 100644 --- a/src/libsyntax/feature_gate.rs +++ b/src/libsyntax/feature_gate.rs @@ -1179,7 +1179,9 @@ fn leveled_feature_err<'a>(sess: &'a ParseSess, feature: &str, span: Span, issue }; let mut err = match level { - GateStrength::Hard => diag.struct_span_err(span, &explanation), + GateStrength::Hard => { + diag.struct_span_err_with_code(span, &explanation, stringify_error_code!(E0658)) + } GateStrength::Soft => diag.struct_span_warn(span, &explanation), }; diff --git a/src/test/compile-fail/E0658.rs b/src/test/compile-fail/E0658.rs new file mode 100644 index 0000000000000..d30068eb1fe2e --- /dev/null +++ b/src/test/compile-fail/E0658.rs @@ -0,0 +1,13 @@ +// Copyright 2018 The Rust Project Developers. See the COPYRIGHT +// file at the top-level directory of this distribution and at +// http://rust-lang.org/COPYRIGHT. +// +// Licensed under the Apache License, Version 2.0 or the MIT license +// , at your +// option. This file may not be copied, modified, or distributed +// except according to those terms. + +fn main() { + let _ = ::std::u128::MAX; //~ ERROR E0658 +} diff --git a/src/test/ui/feature-gate-abi-msp430-interrupt.stderr b/src/test/ui/feature-gate-abi-msp430-interrupt.stderr index b05be6e4391b4..e1621d34d46ac 100644 --- a/src/test/ui/feature-gate-abi-msp430-interrupt.stderr +++ b/src/test/ui/feature-gate-abi-msp430-interrupt.stderr @@ -1,4 +1,4 @@ -error: msp430-interrupt ABI is experimental and subject to change (see issue #38487) +error[E0658]: msp430-interrupt ABI is experimental and subject to change (see issue #38487) --> $DIR/feature-gate-abi-msp430-interrupt.rs:14:1 | 14 | extern "msp430-interrupt" fn foo() {} diff --git a/src/test/ui/feature-gate-abi.stderr b/src/test/ui/feature-gate-abi.stderr index 7d2ad0be391c1..ce31474caed9b 100644 --- a/src/test/ui/feature-gate-abi.stderr +++ b/src/test/ui/feature-gate-abi.stderr @@ -1,4 +1,4 @@ -error: intrinsics are subject to change +error[E0658]: intrinsics are subject to change --> $DIR/feature-gate-abi.rs:19:1 | 19 | extern "rust-intrinsic" fn f1() {} //~ ERROR intrinsics are subject to change @@ -6,7 +6,7 @@ error: intrinsics are subject to change | = help: add #![feature(intrinsics)] to the crate attributes to enable -error: platform intrinsics are experimental and possibly buggy (see issue #27731) +error[E0658]: platform intrinsics are experimental and possibly buggy (see issue #27731) --> $DIR/feature-gate-abi.rs:20:1 | 20 | extern "platform-intrinsic" fn f2() {} //~ ERROR platform intrinsics are experimental @@ -14,7 +14,7 @@ error: platform intrinsics are experimental and possibly buggy (see issue #27731 | = help: add #![feature(platform_intrinsics)] to the crate attributes to enable -error: vectorcall is experimental and subject to change +error[E0658]: vectorcall is experimental and subject to change --> $DIR/feature-gate-abi.rs:21:1 | 21 | extern "vectorcall" fn f3() {} //~ ERROR vectorcall is experimental and subject to change @@ -22,7 +22,7 @@ error: vectorcall is experimental and subject to change | = help: add #![feature(abi_vectorcall)] to the crate attributes to enable -error: rust-call ABI is subject to change (see issue #29625) +error[E0658]: rust-call ABI is subject to change (see issue #29625) --> $DIR/feature-gate-abi.rs:22:1 | 22 | extern "rust-call" fn f4() {} //~ ERROR rust-call ABI is subject to change @@ -30,7 +30,7 @@ error: rust-call ABI is subject to change (see issue #29625) | = help: add #![feature(unboxed_closures)] to the crate attributes to enable -error: msp430-interrupt ABI is experimental and subject to change (see issue #38487) +error[E0658]: msp430-interrupt ABI is experimental and subject to change (see issue #38487) --> $DIR/feature-gate-abi.rs:23:1 | 23 | extern "msp430-interrupt" fn f5() {} //~ ERROR msp430-interrupt ABI is experimental @@ -38,7 +38,7 @@ error: msp430-interrupt ABI is experimental and subject to change (see issue #38 | = help: add #![feature(abi_msp430_interrupt)] to the crate attributes to enable -error: PTX ABIs are experimental and subject to change +error[E0658]: PTX ABIs are experimental and subject to change --> $DIR/feature-gate-abi.rs:24:1 | 24 | extern "ptx-kernel" fn f6() {} //~ ERROR PTX ABIs are experimental and subject to change @@ -46,7 +46,7 @@ error: PTX ABIs are experimental and subject to change | = help: add #![feature(abi_ptx)] to the crate attributes to enable -error: x86-interrupt ABI is experimental and subject to change (see issue #40180) +error[E0658]: x86-interrupt ABI is experimental and subject to change (see issue #40180) --> $DIR/feature-gate-abi.rs:25:1 | 25 | extern "x86-interrupt" fn f7() {} //~ ERROR x86-interrupt ABI is experimental @@ -54,7 +54,7 @@ error: x86-interrupt ABI is experimental and subject to change (see issue #40180 | = help: add #![feature(abi_x86_interrupt)] to the crate attributes to enable -error: thiscall is experimental and subject to change +error[E0658]: thiscall is experimental and subject to change --> $DIR/feature-gate-abi.rs:26:1 | 26 | extern "thiscall" fn f8() {} //~ ERROR thiscall is experimental and subject to change @@ -62,7 +62,7 @@ error: thiscall is experimental and subject to change | = help: add #![feature(abi_thiscall)] to the crate attributes to enable -error: intrinsics are subject to change +error[E0658]: intrinsics are subject to change --> $DIR/feature-gate-abi.rs:30:5 | 30 | extern "rust-intrinsic" fn m1(); //~ ERROR intrinsics are subject to change @@ -70,7 +70,7 @@ error: intrinsics are subject to change | = help: add #![feature(intrinsics)] to the crate attributes to enable -error: platform intrinsics are experimental and possibly buggy (see issue #27731) +error[E0658]: platform intrinsics are experimental and possibly buggy (see issue #27731) --> $DIR/feature-gate-abi.rs:31:5 | 31 | extern "platform-intrinsic" fn m2(); //~ ERROR platform intrinsics are experimental @@ -78,7 +78,7 @@ error: platform intrinsics are experimental and possibly buggy (see issue #27731 | = help: add #![feature(platform_intrinsics)] to the crate attributes to enable -error: vectorcall is experimental and subject to change +error[E0658]: vectorcall is experimental and subject to change --> $DIR/feature-gate-abi.rs:32:5 | 32 | extern "vectorcall" fn m3(); //~ ERROR vectorcall is experimental and subject to change @@ -86,7 +86,7 @@ error: vectorcall is experimental and subject to change | = help: add #![feature(abi_vectorcall)] to the crate attributes to enable -error: rust-call ABI is subject to change (see issue #29625) +error[E0658]: rust-call ABI is subject to change (see issue #29625) --> $DIR/feature-gate-abi.rs:33:5 | 33 | extern "rust-call" fn m4(); //~ ERROR rust-call ABI is subject to change @@ -94,7 +94,7 @@ error: rust-call ABI is subject to change (see issue #29625) | = help: add #![feature(unboxed_closures)] to the crate attributes to enable -error: msp430-interrupt ABI is experimental and subject to change (see issue #38487) +error[E0658]: msp430-interrupt ABI is experimental and subject to change (see issue #38487) --> $DIR/feature-gate-abi.rs:34:5 | 34 | extern "msp430-interrupt" fn m5(); //~ ERROR msp430-interrupt ABI is experimental @@ -102,7 +102,7 @@ error: msp430-interrupt ABI is experimental and subject to change (see issue #38 | = help: add #![feature(abi_msp430_interrupt)] to the crate attributes to enable -error: PTX ABIs are experimental and subject to change +error[E0658]: PTX ABIs are experimental and subject to change --> $DIR/feature-gate-abi.rs:35:5 | 35 | extern "ptx-kernel" fn m6(); //~ ERROR PTX ABIs are experimental and subject to change @@ -110,7 +110,7 @@ error: PTX ABIs are experimental and subject to change | = help: add #![feature(abi_ptx)] to the crate attributes to enable -error: x86-interrupt ABI is experimental and subject to change (see issue #40180) +error[E0658]: x86-interrupt ABI is experimental and subject to change (see issue #40180) --> $DIR/feature-gate-abi.rs:36:5 | 36 | extern "x86-interrupt" fn m7(); //~ ERROR x86-interrupt ABI is experimental @@ -118,7 +118,7 @@ error: x86-interrupt ABI is experimental and subject to change (see issue #40180 | = help: add #![feature(abi_x86_interrupt)] to the crate attributes to enable -error: thiscall is experimental and subject to change +error[E0658]: thiscall is experimental and subject to change --> $DIR/feature-gate-abi.rs:37:5 | 37 | extern "thiscall" fn m8(); //~ ERROR thiscall is experimental and subject to change @@ -126,7 +126,7 @@ error: thiscall is experimental and subject to change | = help: add #![feature(abi_thiscall)] to the crate attributes to enable -error: intrinsics are subject to change +error[E0658]: intrinsics are subject to change --> $DIR/feature-gate-abi.rs:39:5 | 39 | extern "rust-intrinsic" fn dm1() {} //~ ERROR intrinsics are subject to change @@ -134,7 +134,7 @@ error: intrinsics are subject to change | = help: add #![feature(intrinsics)] to the crate attributes to enable -error: platform intrinsics are experimental and possibly buggy (see issue #27731) +error[E0658]: platform intrinsics are experimental and possibly buggy (see issue #27731) --> $DIR/feature-gate-abi.rs:40:5 | 40 | extern "platform-intrinsic" fn dm2() {} //~ ERROR platform intrinsics are experimental @@ -142,7 +142,7 @@ error: platform intrinsics are experimental and possibly buggy (see issue #27731 | = help: add #![feature(platform_intrinsics)] to the crate attributes to enable -error: vectorcall is experimental and subject to change +error[E0658]: vectorcall is experimental and subject to change --> $DIR/feature-gate-abi.rs:41:5 | 41 | extern "vectorcall" fn dm3() {} //~ ERROR vectorcall is experimental and subject to change @@ -150,7 +150,7 @@ error: vectorcall is experimental and subject to change | = help: add #![feature(abi_vectorcall)] to the crate attributes to enable -error: rust-call ABI is subject to change (see issue #29625) +error[E0658]: rust-call ABI is subject to change (see issue #29625) --> $DIR/feature-gate-abi.rs:42:5 | 42 | extern "rust-call" fn dm4() {} //~ ERROR rust-call ABI is subject to change @@ -158,7 +158,7 @@ error: rust-call ABI is subject to change (see issue #29625) | = help: add #![feature(unboxed_closures)] to the crate attributes to enable -error: msp430-interrupt ABI is experimental and subject to change (see issue #38487) +error[E0658]: msp430-interrupt ABI is experimental and subject to change (see issue #38487) --> $DIR/feature-gate-abi.rs:43:5 | 43 | extern "msp430-interrupt" fn dm5() {} //~ ERROR msp430-interrupt ABI is experimental @@ -166,7 +166,7 @@ error: msp430-interrupt ABI is experimental and subject to change (see issue #38 | = help: add #![feature(abi_msp430_interrupt)] to the crate attributes to enable -error: PTX ABIs are experimental and subject to change +error[E0658]: PTX ABIs are experimental and subject to change --> $DIR/feature-gate-abi.rs:44:5 | 44 | extern "ptx-kernel" fn dm6() {} //~ ERROR PTX ABIs are experimental and subject to change @@ -174,7 +174,7 @@ error: PTX ABIs are experimental and subject to change | = help: add #![feature(abi_ptx)] to the crate attributes to enable -error: x86-interrupt ABI is experimental and subject to change (see issue #40180) +error[E0658]: x86-interrupt ABI is experimental and subject to change (see issue #40180) --> $DIR/feature-gate-abi.rs:45:5 | 45 | extern "x86-interrupt" fn dm7() {} //~ ERROR x86-interrupt ABI is experimental @@ -182,7 +182,7 @@ error: x86-interrupt ABI is experimental and subject to change (see issue #40180 | = help: add #![feature(abi_x86_interrupt)] to the crate attributes to enable -error: thiscall is experimental and subject to change +error[E0658]: thiscall is experimental and subject to change --> $DIR/feature-gate-abi.rs:46:5 | 46 | extern "thiscall" fn dm8() {} //~ ERROR thiscall is experimental and subject to change @@ -190,7 +190,7 @@ error: thiscall is experimental and subject to change | = help: add #![feature(abi_thiscall)] to the crate attributes to enable -error: intrinsics are subject to change +error[E0658]: intrinsics are subject to change --> $DIR/feature-gate-abi.rs:53:5 | 53 | extern "rust-intrinsic" fn m1() {} //~ ERROR intrinsics are subject to change @@ -198,7 +198,7 @@ error: intrinsics are subject to change | = help: add #![feature(intrinsics)] to the crate attributes to enable -error: platform intrinsics are experimental and possibly buggy (see issue #27731) +error[E0658]: platform intrinsics are experimental and possibly buggy (see issue #27731) --> $DIR/feature-gate-abi.rs:54:5 | 54 | extern "platform-intrinsic" fn m2() {} //~ ERROR platform intrinsics are experimental @@ -206,7 +206,7 @@ error: platform intrinsics are experimental and possibly buggy (see issue #27731 | = help: add #![feature(platform_intrinsics)] to the crate attributes to enable -error: vectorcall is experimental and subject to change +error[E0658]: vectorcall is experimental and subject to change --> $DIR/feature-gate-abi.rs:55:5 | 55 | extern "vectorcall" fn m3() {} //~ ERROR vectorcall is experimental and subject to change @@ -214,7 +214,7 @@ error: vectorcall is experimental and subject to change | = help: add #![feature(abi_vectorcall)] to the crate attributes to enable -error: rust-call ABI is subject to change (see issue #29625) +error[E0658]: rust-call ABI is subject to change (see issue #29625) --> $DIR/feature-gate-abi.rs:56:5 | 56 | extern "rust-call" fn m4() {} //~ ERROR rust-call ABI is subject to change @@ -222,7 +222,7 @@ error: rust-call ABI is subject to change (see issue #29625) | = help: add #![feature(unboxed_closures)] to the crate attributes to enable -error: msp430-interrupt ABI is experimental and subject to change (see issue #38487) +error[E0658]: msp430-interrupt ABI is experimental and subject to change (see issue #38487) --> $DIR/feature-gate-abi.rs:57:5 | 57 | extern "msp430-interrupt" fn m5() {} //~ ERROR msp430-interrupt ABI is experimental @@ -230,7 +230,7 @@ error: msp430-interrupt ABI is experimental and subject to change (see issue #38 | = help: add #![feature(abi_msp430_interrupt)] to the crate attributes to enable -error: PTX ABIs are experimental and subject to change +error[E0658]: PTX ABIs are experimental and subject to change --> $DIR/feature-gate-abi.rs:58:5 | 58 | extern "ptx-kernel" fn m6() {} //~ ERROR PTX ABIs are experimental and subject to change @@ -238,7 +238,7 @@ error: PTX ABIs are experimental and subject to change | = help: add #![feature(abi_ptx)] to the crate attributes to enable -error: x86-interrupt ABI is experimental and subject to change (see issue #40180) +error[E0658]: x86-interrupt ABI is experimental and subject to change (see issue #40180) --> $DIR/feature-gate-abi.rs:59:5 | 59 | extern "x86-interrupt" fn m7() {} //~ ERROR x86-interrupt ABI is experimental @@ -246,7 +246,7 @@ error: x86-interrupt ABI is experimental and subject to change (see issue #40180 | = help: add #![feature(abi_x86_interrupt)] to the crate attributes to enable -error: thiscall is experimental and subject to change +error[E0658]: thiscall is experimental and subject to change --> $DIR/feature-gate-abi.rs:60:5 | 60 | extern "thiscall" fn m8() {} //~ ERROR thiscall is experimental and subject to change @@ -254,7 +254,7 @@ error: thiscall is experimental and subject to change | = help: add #![feature(abi_thiscall)] to the crate attributes to enable -error: intrinsics are subject to change +error[E0658]: intrinsics are subject to change --> $DIR/feature-gate-abi.rs:65:5 | 65 | extern "rust-intrinsic" fn im1() {} //~ ERROR intrinsics are subject to change @@ -262,7 +262,7 @@ error: intrinsics are subject to change | = help: add #![feature(intrinsics)] to the crate attributes to enable -error: platform intrinsics are experimental and possibly buggy (see issue #27731) +error[E0658]: platform intrinsics are experimental and possibly buggy (see issue #27731) --> $DIR/feature-gate-abi.rs:66:5 | 66 | extern "platform-intrinsic" fn im2() {} //~ ERROR platform intrinsics are experimental @@ -270,7 +270,7 @@ error: platform intrinsics are experimental and possibly buggy (see issue #27731 | = help: add #![feature(platform_intrinsics)] to the crate attributes to enable -error: vectorcall is experimental and subject to change +error[E0658]: vectorcall is experimental and subject to change --> $DIR/feature-gate-abi.rs:67:5 | 67 | extern "vectorcall" fn im3() {} //~ ERROR vectorcall is experimental and subject to change @@ -278,7 +278,7 @@ error: vectorcall is experimental and subject to change | = help: add #![feature(abi_vectorcall)] to the crate attributes to enable -error: rust-call ABI is subject to change (see issue #29625) +error[E0658]: rust-call ABI is subject to change (see issue #29625) --> $DIR/feature-gate-abi.rs:68:5 | 68 | extern "rust-call" fn im4() {} //~ ERROR rust-call ABI is subject to change @@ -286,7 +286,7 @@ error: rust-call ABI is subject to change (see issue #29625) | = help: add #![feature(unboxed_closures)] to the crate attributes to enable -error: msp430-interrupt ABI is experimental and subject to change (see issue #38487) +error[E0658]: msp430-interrupt ABI is experimental and subject to change (see issue #38487) --> $DIR/feature-gate-abi.rs:69:5 | 69 | extern "msp430-interrupt" fn im5() {} //~ ERROR msp430-interrupt ABI is experimental @@ -294,7 +294,7 @@ error: msp430-interrupt ABI is experimental and subject to change (see issue #38 | = help: add #![feature(abi_msp430_interrupt)] to the crate attributes to enable -error: PTX ABIs are experimental and subject to change +error[E0658]: PTX ABIs are experimental and subject to change --> $DIR/feature-gate-abi.rs:70:5 | 70 | extern "ptx-kernel" fn im6() {} //~ ERROR PTX ABIs are experimental and subject to change @@ -302,7 +302,7 @@ error: PTX ABIs are experimental and subject to change | = help: add #![feature(abi_ptx)] to the crate attributes to enable -error: x86-interrupt ABI is experimental and subject to change (see issue #40180) +error[E0658]: x86-interrupt ABI is experimental and subject to change (see issue #40180) --> $DIR/feature-gate-abi.rs:71:5 | 71 | extern "x86-interrupt" fn im7() {} //~ ERROR x86-interrupt ABI is experimental @@ -310,7 +310,7 @@ error: x86-interrupt ABI is experimental and subject to change (see issue #40180 | = help: add #![feature(abi_x86_interrupt)] to the crate attributes to enable -error: thiscall is experimental and subject to change +error[E0658]: thiscall is experimental and subject to change --> $DIR/feature-gate-abi.rs:72:5 | 72 | extern "thiscall" fn im8() {} //~ ERROR thiscall is experimental and subject to change @@ -318,7 +318,7 @@ error: thiscall is experimental and subject to change | = help: add #![feature(abi_thiscall)] to the crate attributes to enable -error: intrinsics are subject to change +error[E0658]: intrinsics are subject to change --> $DIR/feature-gate-abi.rs:76:11 | 76 | type A1 = extern "rust-intrinsic" fn(); //~ ERROR intrinsics are subject to change @@ -326,7 +326,7 @@ error: intrinsics are subject to change | = help: add #![feature(intrinsics)] to the crate attributes to enable -error: platform intrinsics are experimental and possibly buggy (see issue #27731) +error[E0658]: platform intrinsics are experimental and possibly buggy (see issue #27731) --> $DIR/feature-gate-abi.rs:77:11 | 77 | type A2 = extern "platform-intrinsic" fn(); //~ ERROR platform intrinsics are experimental @@ -334,7 +334,7 @@ error: platform intrinsics are experimental and possibly buggy (see issue #27731 | = help: add #![feature(platform_intrinsics)] to the crate attributes to enable -error: vectorcall is experimental and subject to change +error[E0658]: vectorcall is experimental and subject to change --> $DIR/feature-gate-abi.rs:78:11 | 78 | type A3 = extern "vectorcall" fn(); //~ ERROR vectorcall is experimental and subject to change @@ -342,7 +342,7 @@ error: vectorcall is experimental and subject to change | = help: add #![feature(abi_vectorcall)] to the crate attributes to enable -error: rust-call ABI is subject to change (see issue #29625) +error[E0658]: rust-call ABI is subject to change (see issue #29625) --> $DIR/feature-gate-abi.rs:79:11 | 79 | type A4 = extern "rust-call" fn(); //~ ERROR rust-call ABI is subject to change @@ -350,7 +350,7 @@ error: rust-call ABI is subject to change (see issue #29625) | = help: add #![feature(unboxed_closures)] to the crate attributes to enable -error: msp430-interrupt ABI is experimental and subject to change (see issue #38487) +error[E0658]: msp430-interrupt ABI is experimental and subject to change (see issue #38487) --> $DIR/feature-gate-abi.rs:80:11 | 80 | type A5 = extern "msp430-interrupt" fn(); //~ ERROR msp430-interrupt ABI is experimental @@ -358,7 +358,7 @@ error: msp430-interrupt ABI is experimental and subject to change (see issue #38 | = help: add #![feature(abi_msp430_interrupt)] to the crate attributes to enable -error: PTX ABIs are experimental and subject to change +error[E0658]: PTX ABIs are experimental and subject to change --> $DIR/feature-gate-abi.rs:81:11 | 81 | type A6 = extern "ptx-kernel" fn (); //~ ERROR PTX ABIs are experimental and subject to change @@ -366,7 +366,7 @@ error: PTX ABIs are experimental and subject to change | = help: add #![feature(abi_ptx)] to the crate attributes to enable -error: x86-interrupt ABI is experimental and subject to change (see issue #40180) +error[E0658]: x86-interrupt ABI is experimental and subject to change (see issue #40180) --> $DIR/feature-gate-abi.rs:82:11 | 82 | type A7 = extern "x86-interrupt" fn(); //~ ERROR x86-interrupt ABI is experimental @@ -374,7 +374,7 @@ error: x86-interrupt ABI is experimental and subject to change (see issue #40180 | = help: add #![feature(abi_x86_interrupt)] to the crate attributes to enable -error: thiscall is experimental and subject to change +error[E0658]: thiscall is experimental and subject to change --> $DIR/feature-gate-abi.rs:83:11 | 83 | type A8 = extern "thiscall" fn(); //~ ERROR thiscall is experimental and subject to change @@ -382,7 +382,7 @@ error: thiscall is experimental and subject to change | = help: add #![feature(abi_thiscall)] to the crate attributes to enable -error: intrinsics are subject to change +error[E0658]: intrinsics are subject to change --> $DIR/feature-gate-abi.rs:86:1 | 86 | extern "rust-intrinsic" {} //~ ERROR intrinsics are subject to change @@ -390,7 +390,7 @@ error: intrinsics are subject to change | = help: add #![feature(intrinsics)] to the crate attributes to enable -error: platform intrinsics are experimental and possibly buggy (see issue #27731) +error[E0658]: platform intrinsics are experimental and possibly buggy (see issue #27731) --> $DIR/feature-gate-abi.rs:87:1 | 87 | extern "platform-intrinsic" {} //~ ERROR platform intrinsics are experimental @@ -398,7 +398,7 @@ error: platform intrinsics are experimental and possibly buggy (see issue #27731 | = help: add #![feature(platform_intrinsics)] to the crate attributes to enable -error: vectorcall is experimental and subject to change +error[E0658]: vectorcall is experimental and subject to change --> $DIR/feature-gate-abi.rs:88:1 | 88 | extern "vectorcall" {} //~ ERROR vectorcall is experimental and subject to change @@ -406,7 +406,7 @@ error: vectorcall is experimental and subject to change | = help: add #![feature(abi_vectorcall)] to the crate attributes to enable -error: rust-call ABI is subject to change (see issue #29625) +error[E0658]: rust-call ABI is subject to change (see issue #29625) --> $DIR/feature-gate-abi.rs:89:1 | 89 | extern "rust-call" {} //~ ERROR rust-call ABI is subject to change @@ -414,7 +414,7 @@ error: rust-call ABI is subject to change (see issue #29625) | = help: add #![feature(unboxed_closures)] to the crate attributes to enable -error: msp430-interrupt ABI is experimental and subject to change (see issue #38487) +error[E0658]: msp430-interrupt ABI is experimental and subject to change (see issue #38487) --> $DIR/feature-gate-abi.rs:90:1 | 90 | extern "msp430-interrupt" {} //~ ERROR msp430-interrupt ABI is experimental @@ -422,7 +422,7 @@ error: msp430-interrupt ABI is experimental and subject to change (see issue #38 | = help: add #![feature(abi_msp430_interrupt)] to the crate attributes to enable -error: PTX ABIs are experimental and subject to change +error[E0658]: PTX ABIs are experimental and subject to change --> $DIR/feature-gate-abi.rs:91:1 | 91 | extern "ptx-kernel" {} //~ ERROR PTX ABIs are experimental and subject to change @@ -430,7 +430,7 @@ error: PTX ABIs are experimental and subject to change | = help: add #![feature(abi_ptx)] to the crate attributes to enable -error: x86-interrupt ABI is experimental and subject to change (see issue #40180) +error[E0658]: x86-interrupt ABI is experimental and subject to change (see issue #40180) --> $DIR/feature-gate-abi.rs:92:1 | 92 | extern "x86-interrupt" {} //~ ERROR x86-interrupt ABI is experimental @@ -438,7 +438,7 @@ error: x86-interrupt ABI is experimental and subject to change (see issue #40180 | = help: add #![feature(abi_x86_interrupt)] to the crate attributes to enable -error: thiscall is experimental and subject to change +error[E0658]: thiscall is experimental and subject to change --> $DIR/feature-gate-abi.rs:93:1 | 93 | extern "thiscall" {} //~ ERROR thiscall is experimental and subject to change diff --git a/src/test/ui/feature-gate-abi_unadjusted.stderr b/src/test/ui/feature-gate-abi_unadjusted.stderr index 3cc43847156a1..b3f7cd218d3e9 100644 --- a/src/test/ui/feature-gate-abi_unadjusted.stderr +++ b/src/test/ui/feature-gate-abi_unadjusted.stderr @@ -1,4 +1,4 @@ -error: unadjusted ABI is an implementation detail and perma-unstable +error[E0658]: unadjusted ABI is an implementation detail and perma-unstable --> $DIR/feature-gate-abi_unadjusted.rs:11:1 | 11 | / extern "unadjusted" fn foo() { diff --git a/src/test/ui/feature-gate-advanced-slice-features.stderr b/src/test/ui/feature-gate-advanced-slice-features.stderr index 815593d07a5f4..63ede50e1ea3a 100644 --- a/src/test/ui/feature-gate-advanced-slice-features.stderr +++ b/src/test/ui/feature-gate-advanced-slice-features.stderr @@ -1,4 +1,4 @@ -error: multiple-element slice matches anywhere but at the end of a slice (e.g. `[0, ..xs, 0]`) are experimental (see issue #23121) +error[E0658]: multiple-element slice matches anywhere but at the end of a slice (e.g. `[0, ..xs, 0]`) are experimental (see issue #23121) --> $DIR/feature-gate-advanced-slice-features.rs:18:9 | 18 | [ xs.., 4, 5 ] => {} //~ ERROR multiple-element slice matches @@ -6,7 +6,7 @@ error: multiple-element slice matches anywhere but at the end of a slice (e.g. ` | = help: add #![feature(advanced_slice_patterns)] to the crate attributes to enable -error: multiple-element slice matches anywhere but at the end of a slice (e.g. `[0, ..xs, 0]`) are experimental (see issue #23121) +error[E0658]: multiple-element slice matches anywhere but at the end of a slice (e.g. `[0, ..xs, 0]`) are experimental (see issue #23121) --> $DIR/feature-gate-advanced-slice-features.rs:19:9 | 19 | [ 1, xs.., 5 ] => {} //~ ERROR multiple-element slice matches diff --git a/src/test/ui/feature-gate-allocator_internals.stderr b/src/test/ui/feature-gate-allocator_internals.stderr index f1f4705b3bbc1..76d96f929bec1 100644 --- a/src/test/ui/feature-gate-allocator_internals.stderr +++ b/src/test/ui/feature-gate-allocator_internals.stderr @@ -1,4 +1,4 @@ -error: the `#[default_lib_allocator]` attribute is an experimental feature +error[E0658]: the `#[default_lib_allocator]` attribute is an experimental feature --> $DIR/feature-gate-allocator_internals.rs:11:1 | 11 | #![default_lib_allocator] //~ ERROR: attribute is an experimental feature diff --git a/src/test/ui/feature-gate-allow-internal-unsafe-nested-macro.stderr b/src/test/ui/feature-gate-allow-internal-unsafe-nested-macro.stderr index 40bdde37ee8ce..31de8d7628556 100644 --- a/src/test/ui/feature-gate-allow-internal-unsafe-nested-macro.stderr +++ b/src/test/ui/feature-gate-allow-internal-unsafe-nested-macro.stderr @@ -1,4 +1,4 @@ -error: allow_internal_unsafe side-steps the unsafe_code lint +error[E0658]: allow_internal_unsafe side-steps the unsafe_code lint --> $DIR/feature-gate-allow-internal-unsafe-nested-macro.rs:18:9 | 18 | #[allow_internal_unsafe] //~ ERROR allow_internal_unsafe side-steps diff --git a/src/test/ui/feature-gate-allow-internal-unstable-nested-macro.stderr b/src/test/ui/feature-gate-allow-internal-unstable-nested-macro.stderr index 60d72fbc3b335..3e2573eda21cb 100644 --- a/src/test/ui/feature-gate-allow-internal-unstable-nested-macro.stderr +++ b/src/test/ui/feature-gate-allow-internal-unstable-nested-macro.stderr @@ -1,4 +1,4 @@ -error: allow_internal_unstable side-steps feature gating and stability checks +error[E0658]: allow_internal_unstable side-steps feature gating and stability checks --> $DIR/feature-gate-allow-internal-unstable-nested-macro.rs:18:9 | 18 | #[allow_internal_unstable] //~ ERROR allow_internal_unstable side-steps diff --git a/src/test/ui/feature-gate-allow-internal-unstable-struct.stderr b/src/test/ui/feature-gate-allow-internal-unstable-struct.stderr index 2fb86ce8f4e5b..e19f3288e8163 100644 --- a/src/test/ui/feature-gate-allow-internal-unstable-struct.stderr +++ b/src/test/ui/feature-gate-allow-internal-unstable-struct.stderr @@ -1,4 +1,4 @@ -error: allow_internal_unstable side-steps feature gating and stability checks +error[E0658]: allow_internal_unstable side-steps feature gating and stability checks --> $DIR/feature-gate-allow-internal-unstable-struct.rs:14:1 | 14 | #[allow_internal_unstable] //~ ERROR allow_internal_unstable side-steps diff --git a/src/test/ui/feature-gate-allow-internal-unstable.stderr b/src/test/ui/feature-gate-allow-internal-unstable.stderr index a5740a1a78927..f110afb35a034 100644 --- a/src/test/ui/feature-gate-allow-internal-unstable.stderr +++ b/src/test/ui/feature-gate-allow-internal-unstable.stderr @@ -1,4 +1,4 @@ -error: allow_internal_unstable side-steps feature gating and stability checks +error[E0658]: allow_internal_unstable side-steps feature gating and stability checks --> $DIR/feature-gate-allow-internal-unstable.rs:13:1 | 13 | #[allow_internal_unstable] //~ ERROR allow_internal_unstable side-steps diff --git a/src/test/ui/feature-gate-allow_fail.stderr b/src/test/ui/feature-gate-allow_fail.stderr index 65cd137459ae8..e04f44886dd2e 100644 --- a/src/test/ui/feature-gate-allow_fail.stderr +++ b/src/test/ui/feature-gate-allow_fail.stderr @@ -1,4 +1,4 @@ -error: allow_fail attribute is currently unstable (see issue #42219) +error[E0658]: allow_fail attribute is currently unstable (see issue #42219) --> $DIR/feature-gate-allow_fail.rs:13:1 | 13 | #[allow_fail] //~ ERROR allow_fail attribute is currently unstable diff --git a/src/test/ui/feature-gate-arbitrary-self-types.stderr b/src/test/ui/feature-gate-arbitrary-self-types.stderr index 2ef517cc9e131..ca47d40dc8f86 100644 --- a/src/test/ui/feature-gate-arbitrary-self-types.stderr +++ b/src/test/ui/feature-gate-arbitrary-self-types.stderr @@ -1,4 +1,4 @@ -error: arbitrary `self` types are unstable (see issue #44874) +error[E0658]: arbitrary `self` types are unstable (see issue #44874) --> $DIR/feature-gate-arbitrary-self-types.rs:14:18 | 14 | fn foo(self: Rc>); //~ ERROR arbitrary `self` types are unstable @@ -7,7 +7,7 @@ error: arbitrary `self` types are unstable (see issue #44874) = help: add #![feature(arbitrary_self_types)] to the crate attributes to enable = help: consider changing to `self`, `&self`, `&mut self`, or `self: Box` -error: arbitrary `self` types are unstable (see issue #44874) +error[E0658]: arbitrary `self` types are unstable (see issue #44874) --> $DIR/feature-gate-arbitrary-self-types.rs:20:18 | 20 | fn foo(self: Rc>) {} //~ ERROR arbitrary `self` types are unstable @@ -16,7 +16,7 @@ error: arbitrary `self` types are unstable (see issue #44874) = help: add #![feature(arbitrary_self_types)] to the crate attributes to enable = help: consider changing to `self`, `&self`, `&mut self`, or `self: Box` -error: arbitrary `self` types are unstable (see issue #44874) +error[E0658]: arbitrary `self` types are unstable (see issue #44874) --> $DIR/feature-gate-arbitrary-self-types.rs:24:18 | 24 | fn bar(self: Box>) {} //~ ERROR arbitrary `self` types are unstable diff --git a/src/test/ui/feature-gate-arbitrary_self_types-raw-pointer.stderr b/src/test/ui/feature-gate-arbitrary_self_types-raw-pointer.stderr index d629ac4c60fc0..33e8806678d66 100644 --- a/src/test/ui/feature-gate-arbitrary_self_types-raw-pointer.stderr +++ b/src/test/ui/feature-gate-arbitrary_self_types-raw-pointer.stderr @@ -1,4 +1,4 @@ -error: raw pointer `self` is unstable (see issue #44874) +error[E0658]: raw pointer `self` is unstable (see issue #44874) --> $DIR/feature-gate-arbitrary_self_types-raw-pointer.rs:19:18 | 19 | fn bar(self: *const Self); @@ -7,7 +7,7 @@ error: raw pointer `self` is unstable (see issue #44874) = help: add #![feature(arbitrary_self_types)] to the crate attributes to enable = help: consider changing to `self`, `&self`, `&mut self`, or `self: Box` -error: raw pointer `self` is unstable (see issue #44874) +error[E0658]: raw pointer `self` is unstable (see issue #44874) --> $DIR/feature-gate-arbitrary_self_types-raw-pointer.rs:14:18 | 14 | fn foo(self: *const Self) {} @@ -16,7 +16,7 @@ error: raw pointer `self` is unstable (see issue #44874) = help: add #![feature(arbitrary_self_types)] to the crate attributes to enable = help: consider changing to `self`, `&self`, `&mut self`, or `self: Box` -error: raw pointer `self` is unstable (see issue #44874) +error[E0658]: raw pointer `self` is unstable (see issue #44874) --> $DIR/feature-gate-arbitrary_self_types-raw-pointer.rs:24:18 | 24 | fn bar(self: *const Self) {} diff --git a/src/test/ui/feature-gate-asm.stderr b/src/test/ui/feature-gate-asm.stderr index ff68a4fb23ee1..481e6dc7055cc 100644 --- a/src/test/ui/feature-gate-asm.stderr +++ b/src/test/ui/feature-gate-asm.stderr @@ -1,4 +1,4 @@ -error: inline assembly is not stable enough for use and is subject to change (see issue #29722) +error[E0658]: inline assembly is not stable enough for use and is subject to change (see issue #29722) --> $DIR/feature-gate-asm.rs:13:9 | 13 | asm!(""); //~ ERROR inline assembly is not stable enough diff --git a/src/test/ui/feature-gate-asm2.stderr b/src/test/ui/feature-gate-asm2.stderr index 1e02cede61dc7..aba0f72d35c1d 100644 --- a/src/test/ui/feature-gate-asm2.stderr +++ b/src/test/ui/feature-gate-asm2.stderr @@ -1,4 +1,4 @@ -error: inline assembly is not stable enough for use and is subject to change (see issue #29722) +error[E0658]: inline assembly is not stable enough for use and is subject to change (see issue #29722) --> $DIR/feature-gate-asm2.rs:15:24 | 15 | println!("{}", asm!("")); //~ ERROR inline assembly is not stable diff --git a/src/test/ui/feature-gate-assoc-type-defaults.stderr b/src/test/ui/feature-gate-assoc-type-defaults.stderr index 5e2884691682d..1d44797cddc9b 100644 --- a/src/test/ui/feature-gate-assoc-type-defaults.stderr +++ b/src/test/ui/feature-gate-assoc-type-defaults.stderr @@ -1,4 +1,4 @@ -error: associated type defaults are unstable (see issue #29661) +error[E0658]: associated type defaults are unstable (see issue #29661) --> $DIR/feature-gate-assoc-type-defaults.rs:14:5 | 14 | type Bar = u8; //~ ERROR associated type defaults are unstable diff --git a/src/test/ui/feature-gate-box-expr.stderr b/src/test/ui/feature-gate-box-expr.stderr index cef5adbd15a7d..f9cccde376158 100644 --- a/src/test/ui/feature-gate-box-expr.stderr +++ b/src/test/ui/feature-gate-box-expr.stderr @@ -1,4 +1,4 @@ -error: box expression syntax is experimental; you can call `Box::new` instead. (see issue #27779) +error[E0658]: box expression syntax is experimental; you can call `Box::new` instead. (see issue #27779) --> $DIR/feature-gate-box-expr.rs:22:13 | 22 | let x = box 'c'; //~ ERROR box expression syntax is experimental diff --git a/src/test/ui/feature-gate-box_patterns.stderr b/src/test/ui/feature-gate-box_patterns.stderr index 0a30de58a1fce..ca009331b69c6 100644 --- a/src/test/ui/feature-gate-box_patterns.stderr +++ b/src/test/ui/feature-gate-box_patterns.stderr @@ -1,4 +1,4 @@ -error: box pattern syntax is experimental (see issue #29641) +error[E0658]: box pattern syntax is experimental (see issue #29641) --> $DIR/feature-gate-box_patterns.rs:12:9 | 12 | let box x = Box::new('c'); //~ ERROR box pattern syntax is experimental diff --git a/src/test/ui/feature-gate-box_syntax.stderr b/src/test/ui/feature-gate-box_syntax.stderr index 9b21dd03051bf..eefaa724650da 100644 --- a/src/test/ui/feature-gate-box_syntax.stderr +++ b/src/test/ui/feature-gate-box_syntax.stderr @@ -1,4 +1,4 @@ -error: box expression syntax is experimental; you can call `Box::new` instead. (see issue #27779) +error[E0658]: box expression syntax is experimental; you can call `Box::new` instead. (see issue #27779) --> $DIR/feature-gate-box_syntax.rs:14:13 | 14 | let x = box 3; diff --git a/src/test/ui/feature-gate-catch_expr.stderr b/src/test/ui/feature-gate-catch_expr.stderr index f486373d225c3..4b3bfbbe27ac8 100644 --- a/src/test/ui/feature-gate-catch_expr.stderr +++ b/src/test/ui/feature-gate-catch_expr.stderr @@ -1,4 +1,4 @@ -error: `catch` expression is experimental (see issue #31436) +error[E0658]: `catch` expression is experimental (see issue #31436) --> $DIR/feature-gate-catch_expr.rs:12:24 | 12 | let catch_result = do catch { //~ ERROR `catch` expression is experimental diff --git a/src/test/ui/feature-gate-cfg-target-feature.stderr b/src/test/ui/feature-gate-cfg-target-feature.stderr index 60dc6fbb57e96..f808e78acce1a 100644 --- a/src/test/ui/feature-gate-cfg-target-feature.stderr +++ b/src/test/ui/feature-gate-cfg-target-feature.stderr @@ -1,4 +1,4 @@ -error: `cfg(target_feature)` is experimental and subject to change (see issue #29717) +error[E0658]: `cfg(target_feature)` is experimental and subject to change (see issue #29717) --> $DIR/feature-gate-cfg-target-feature.rs:12:12 | 12 | #[cfg_attr(target_feature = "x", x)] //~ ERROR `cfg(target_feature)` is experimental @@ -6,7 +6,7 @@ error: `cfg(target_feature)` is experimental and subject to change (see issue #2 | = help: add #![feature(cfg_target_feature)] to the crate attributes to enable -error: `cfg(target_feature)` is experimental and subject to change (see issue #29717) +error[E0658]: `cfg(target_feature)` is experimental and subject to change (see issue #29717) --> $DIR/feature-gate-cfg-target-feature.rs:11:7 | 11 | #[cfg(target_feature = "x")] //~ ERROR `cfg(target_feature)` is experimental @@ -14,7 +14,7 @@ error: `cfg(target_feature)` is experimental and subject to change (see issue #2 | = help: add #![feature(cfg_target_feature)] to the crate attributes to enable -error: `cfg(target_feature)` is experimental and subject to change (see issue #29717) +error[E0658]: `cfg(target_feature)` is experimental and subject to change (see issue #29717) --> $DIR/feature-gate-cfg-target-feature.rs:15:19 | 15 | #[cfg(not(any(all(target_feature = "x"))))] //~ ERROR `cfg(target_feature)` is experimental @@ -22,7 +22,7 @@ error: `cfg(target_feature)` is experimental and subject to change (see issue #2 | = help: add #![feature(cfg_target_feature)] to the crate attributes to enable -error: `cfg(target_feature)` is experimental and subject to change (see issue #29717) +error[E0658]: `cfg(target_feature)` is experimental and subject to change (see issue #29717) --> $DIR/feature-gate-cfg-target-feature.rs:19:10 | 19 | cfg!(target_feature = "x"); diff --git a/src/test/ui/feature-gate-cfg-target-has-atomic.stderr b/src/test/ui/feature-gate-cfg-target-has-atomic.stderr index 5daf5de7123d5..ace23b38d2dc5 100644 --- a/src/test/ui/feature-gate-cfg-target-has-atomic.stderr +++ b/src/test/ui/feature-gate-cfg-target-has-atomic.stderr @@ -1,4 +1,4 @@ -error: `cfg(target_has_atomic)` is experimental and subject to change (see issue #32976) +error[E0658]: `cfg(target_has_atomic)` is experimental and subject to change (see issue #32976) --> $DIR/feature-gate-cfg-target-has-atomic.rs:23:7 | 23 | #[cfg(target_has_atomic = "8")] @@ -6,7 +6,7 @@ error: `cfg(target_has_atomic)` is experimental and subject to change (see issue | = help: add #![feature(cfg_target_has_atomic)] to the crate attributes to enable -error: `cfg(target_has_atomic)` is experimental and subject to change (see issue #32976) +error[E0658]: `cfg(target_has_atomic)` is experimental and subject to change (see issue #32976) --> $DIR/feature-gate-cfg-target-has-atomic.rs:29:7 | 29 | #[cfg(target_has_atomic = "8")] @@ -14,7 +14,7 @@ error: `cfg(target_has_atomic)` is experimental and subject to change (see issue | = help: add #![feature(cfg_target_has_atomic)] to the crate attributes to enable -error: `cfg(target_has_atomic)` is experimental and subject to change (see issue #32976) +error[E0658]: `cfg(target_has_atomic)` is experimental and subject to change (see issue #32976) --> $DIR/feature-gate-cfg-target-has-atomic.rs:34:7 | 34 | #[cfg(target_has_atomic = "16")] @@ -22,7 +22,7 @@ error: `cfg(target_has_atomic)` is experimental and subject to change (see issue | = help: add #![feature(cfg_target_has_atomic)] to the crate attributes to enable -error: `cfg(target_has_atomic)` is experimental and subject to change (see issue #32976) +error[E0658]: `cfg(target_has_atomic)` is experimental and subject to change (see issue #32976) --> $DIR/feature-gate-cfg-target-has-atomic.rs:39:7 | 39 | #[cfg(target_has_atomic = "16")] @@ -30,7 +30,7 @@ error: `cfg(target_has_atomic)` is experimental and subject to change (see issue | = help: add #![feature(cfg_target_has_atomic)] to the crate attributes to enable -error: `cfg(target_has_atomic)` is experimental and subject to change (see issue #32976) +error[E0658]: `cfg(target_has_atomic)` is experimental and subject to change (see issue #32976) --> $DIR/feature-gate-cfg-target-has-atomic.rs:44:7 | 44 | #[cfg(target_has_atomic = "32")] @@ -38,7 +38,7 @@ error: `cfg(target_has_atomic)` is experimental and subject to change (see issue | = help: add #![feature(cfg_target_has_atomic)] to the crate attributes to enable -error: `cfg(target_has_atomic)` is experimental and subject to change (see issue #32976) +error[E0658]: `cfg(target_has_atomic)` is experimental and subject to change (see issue #32976) --> $DIR/feature-gate-cfg-target-has-atomic.rs:49:7 | 49 | #[cfg(target_has_atomic = "32")] @@ -46,7 +46,7 @@ error: `cfg(target_has_atomic)` is experimental and subject to change (see issue | = help: add #![feature(cfg_target_has_atomic)] to the crate attributes to enable -error: `cfg(target_has_atomic)` is experimental and subject to change (see issue #32976) +error[E0658]: `cfg(target_has_atomic)` is experimental and subject to change (see issue #32976) --> $DIR/feature-gate-cfg-target-has-atomic.rs:54:7 | 54 | #[cfg(target_has_atomic = "64")] @@ -54,7 +54,7 @@ error: `cfg(target_has_atomic)` is experimental and subject to change (see issue | = help: add #![feature(cfg_target_has_atomic)] to the crate attributes to enable -error: `cfg(target_has_atomic)` is experimental and subject to change (see issue #32976) +error[E0658]: `cfg(target_has_atomic)` is experimental and subject to change (see issue #32976) --> $DIR/feature-gate-cfg-target-has-atomic.rs:59:7 | 59 | #[cfg(target_has_atomic = "64")] @@ -62,7 +62,7 @@ error: `cfg(target_has_atomic)` is experimental and subject to change (see issue | = help: add #![feature(cfg_target_has_atomic)] to the crate attributes to enable -error: `cfg(target_has_atomic)` is experimental and subject to change (see issue #32976) +error[E0658]: `cfg(target_has_atomic)` is experimental and subject to change (see issue #32976) --> $DIR/feature-gate-cfg-target-has-atomic.rs:64:7 | 64 | #[cfg(target_has_atomic = "ptr")] @@ -70,7 +70,7 @@ error: `cfg(target_has_atomic)` is experimental and subject to change (see issue | = help: add #![feature(cfg_target_has_atomic)] to the crate attributes to enable -error: `cfg(target_has_atomic)` is experimental and subject to change (see issue #32976) +error[E0658]: `cfg(target_has_atomic)` is experimental and subject to change (see issue #32976) --> $DIR/feature-gate-cfg-target-has-atomic.rs:69:7 | 69 | #[cfg(target_has_atomic = "ptr")] @@ -78,7 +78,7 @@ error: `cfg(target_has_atomic)` is experimental and subject to change (see issue | = help: add #![feature(cfg_target_has_atomic)] to the crate attributes to enable -error: `cfg(target_has_atomic)` is experimental and subject to change (see issue #32976) +error[E0658]: `cfg(target_has_atomic)` is experimental and subject to change (see issue #32976) --> $DIR/feature-gate-cfg-target-has-atomic.rs:76:10 | 76 | cfg!(target_has_atomic = "8"); @@ -86,7 +86,7 @@ error: `cfg(target_has_atomic)` is experimental and subject to change (see issue | = help: add #![feature(cfg_target_has_atomic)] to the crate attributes to enable -error: `cfg(target_has_atomic)` is experimental and subject to change (see issue #32976) +error[E0658]: `cfg(target_has_atomic)` is experimental and subject to change (see issue #32976) --> $DIR/feature-gate-cfg-target-has-atomic.rs:78:10 | 78 | cfg!(target_has_atomic = "16"); @@ -94,7 +94,7 @@ error: `cfg(target_has_atomic)` is experimental and subject to change (see issue | = help: add #![feature(cfg_target_has_atomic)] to the crate attributes to enable -error: `cfg(target_has_atomic)` is experimental and subject to change (see issue #32976) +error[E0658]: `cfg(target_has_atomic)` is experimental and subject to change (see issue #32976) --> $DIR/feature-gate-cfg-target-has-atomic.rs:80:10 | 80 | cfg!(target_has_atomic = "32"); @@ -102,7 +102,7 @@ error: `cfg(target_has_atomic)` is experimental and subject to change (see issue | = help: add #![feature(cfg_target_has_atomic)] to the crate attributes to enable -error: `cfg(target_has_atomic)` is experimental and subject to change (see issue #32976) +error[E0658]: `cfg(target_has_atomic)` is experimental and subject to change (see issue #32976) --> $DIR/feature-gate-cfg-target-has-atomic.rs:82:10 | 82 | cfg!(target_has_atomic = "64"); @@ -110,7 +110,7 @@ error: `cfg(target_has_atomic)` is experimental and subject to change (see issue | = help: add #![feature(cfg_target_has_atomic)] to the crate attributes to enable -error: `cfg(target_has_atomic)` is experimental and subject to change (see issue #32976) +error[E0658]: `cfg(target_has_atomic)` is experimental and subject to change (see issue #32976) --> $DIR/feature-gate-cfg-target-has-atomic.rs:84:10 | 84 | cfg!(target_has_atomic = "ptr"); diff --git a/src/test/ui/feature-gate-cfg-target-thread-local.stderr b/src/test/ui/feature-gate-cfg-target-thread-local.stderr index 9e2eea6e0a48e..a0a03bdcd4696 100644 --- a/src/test/ui/feature-gate-cfg-target-thread-local.stderr +++ b/src/test/ui/feature-gate-cfg-target-thread-local.stderr @@ -1,4 +1,4 @@ -error: `cfg(target_thread_local)` is experimental and subject to change (see issue #29594) +error[E0658]: `cfg(target_thread_local)` is experimental and subject to change (see issue #29594) --> $DIR/feature-gate-cfg-target-thread-local.rs:19:16 | 19 | #[cfg_attr(target_thread_local, thread_local)] diff --git a/src/test/ui/feature-gate-cfg-target-vendor.stderr b/src/test/ui/feature-gate-cfg-target-vendor.stderr index c5709600dba70..3e4a74636f923 100644 --- a/src/test/ui/feature-gate-cfg-target-vendor.stderr +++ b/src/test/ui/feature-gate-cfg-target-vendor.stderr @@ -1,4 +1,4 @@ -error: `cfg(target_vendor)` is experimental and subject to change (see issue #29718) +error[E0658]: `cfg(target_vendor)` is experimental and subject to change (see issue #29718) --> $DIR/feature-gate-cfg-target-vendor.rs:12:12 | 12 | #[cfg_attr(target_vendor = "x", x)] //~ ERROR `cfg(target_vendor)` is experimental @@ -6,7 +6,7 @@ error: `cfg(target_vendor)` is experimental and subject to change (see issue #29 | = help: add #![feature(cfg_target_vendor)] to the crate attributes to enable -error: `cfg(target_vendor)` is experimental and subject to change (see issue #29718) +error[E0658]: `cfg(target_vendor)` is experimental and subject to change (see issue #29718) --> $DIR/feature-gate-cfg-target-vendor.rs:11:7 | 11 | #[cfg(target_vendor = "x")] //~ ERROR `cfg(target_vendor)` is experimental @@ -14,7 +14,7 @@ error: `cfg(target_vendor)` is experimental and subject to change (see issue #29 | = help: add #![feature(cfg_target_vendor)] to the crate attributes to enable -error: `cfg(target_vendor)` is experimental and subject to change (see issue #29718) +error[E0658]: `cfg(target_vendor)` is experimental and subject to change (see issue #29718) --> $DIR/feature-gate-cfg-target-vendor.rs:15:19 | 15 | #[cfg(not(any(all(target_vendor = "x"))))] //~ ERROR `cfg(target_vendor)` is experimental @@ -22,7 +22,7 @@ error: `cfg(target_vendor)` is experimental and subject to change (see issue #29 | = help: add #![feature(cfg_target_vendor)] to the crate attributes to enable -error: `cfg(target_vendor)` is experimental and subject to change (see issue #29718) +error[E0658]: `cfg(target_vendor)` is experimental and subject to change (see issue #29718) --> $DIR/feature-gate-cfg-target-vendor.rs:19:10 | 19 | cfg!(target_vendor = "x"); diff --git a/src/test/ui/feature-gate-compiler-builtins.stderr b/src/test/ui/feature-gate-compiler-builtins.stderr index ebf42b2bdd894..edb3c5d62aeed 100644 --- a/src/test/ui/feature-gate-compiler-builtins.stderr +++ b/src/test/ui/feature-gate-compiler-builtins.stderr @@ -1,4 +1,4 @@ -error: the `#[compiler_builtins]` attribute is used to identify the `compiler_builtins` crate which contains compiler-rt intrinsics and will never be stable +error[E0658]: the `#[compiler_builtins]` attribute is used to identify the `compiler_builtins` crate which contains compiler-rt intrinsics and will never be stable --> $DIR/feature-gate-compiler-builtins.rs:11:1 | 11 | #![compiler_builtins] //~ ERROR the `#[compiler_builtins]` attribute is diff --git a/src/test/ui/feature-gate-concat_idents.stderr b/src/test/ui/feature-gate-concat_idents.stderr index c980668c298b4..d0a07e3d3c9ed 100644 --- a/src/test/ui/feature-gate-concat_idents.stderr +++ b/src/test/ui/feature-gate-concat_idents.stderr @@ -1,4 +1,4 @@ -error: `concat_idents` is not stable enough for use and is subject to change (see issue #29599) +error[E0658]: `concat_idents` is not stable enough for use and is subject to change (see issue #29599) --> $DIR/feature-gate-concat_idents.rs:15:13 | 15 | let a = concat_idents!(X, Y_1); //~ ERROR `concat_idents` is not stable @@ -6,7 +6,7 @@ error: `concat_idents` is not stable enough for use and is subject to change (se | = help: add #![feature(concat_idents)] to the crate attributes to enable -error: `concat_idents` is not stable enough for use and is subject to change (see issue #29599) +error[E0658]: `concat_idents` is not stable enough for use and is subject to change (see issue #29599) --> $DIR/feature-gate-concat_idents.rs:16:13 | 16 | let b = concat_idents!(X, Y_2); //~ ERROR `concat_idents` is not stable diff --git a/src/test/ui/feature-gate-concat_idents2.stderr b/src/test/ui/feature-gate-concat_idents2.stderr index 9cfd954eec860..0ef6921c64d8b 100644 --- a/src/test/ui/feature-gate-concat_idents2.stderr +++ b/src/test/ui/feature-gate-concat_idents2.stderr @@ -1,4 +1,4 @@ -error: `concat_idents` is not stable enough for use and is subject to change (see issue #29599) +error[E0658]: `concat_idents` is not stable enough for use and is subject to change (see issue #29599) --> $DIR/feature-gate-concat_idents2.rs:14:5 | 14 | concat_idents!(a, b); //~ ERROR `concat_idents` is not stable enough diff --git a/src/test/ui/feature-gate-concat_idents3.stderr b/src/test/ui/feature-gate-concat_idents3.stderr index 8399ca3c5018c..a9a1e493a45f7 100644 --- a/src/test/ui/feature-gate-concat_idents3.stderr +++ b/src/test/ui/feature-gate-concat_idents3.stderr @@ -1,4 +1,4 @@ -error: `concat_idents` is not stable enough for use and is subject to change (see issue #29599) +error[E0658]: `concat_idents` is not stable enough for use and is subject to change (see issue #29599) --> $DIR/feature-gate-concat_idents3.rs:17:20 | 17 | assert_eq!(10, concat_idents!(X, Y_1)); //~ ERROR `concat_idents` is not stable @@ -6,7 +6,7 @@ error: `concat_idents` is not stable enough for use and is subject to change (se | = help: add #![feature(concat_idents)] to the crate attributes to enable -error: `concat_idents` is not stable enough for use and is subject to change (see issue #29599) +error[E0658]: `concat_idents` is not stable enough for use and is subject to change (see issue #29599) --> $DIR/feature-gate-concat_idents3.rs:18:20 | 18 | assert_eq!(20, concat_idents!(X, Y_2)); //~ ERROR `concat_idents` is not stable diff --git a/src/test/ui/feature-gate-conservative_impl_trait.stderr b/src/test/ui/feature-gate-conservative_impl_trait.stderr index 72a4f52926a6c..f3d39477387a4 100644 --- a/src/test/ui/feature-gate-conservative_impl_trait.stderr +++ b/src/test/ui/feature-gate-conservative_impl_trait.stderr @@ -1,4 +1,4 @@ -error: `impl Trait` in return position is experimental (see issue #34511) +error[E0658]: `impl Trait` in return position is experimental (see issue #34511) --> $DIR/feature-gate-conservative_impl_trait.rs:11:13 | 11 | fn foo() -> impl Fn() { || {} } diff --git a/src/test/ui/feature-gate-const_fn.stderr b/src/test/ui/feature-gate-const_fn.stderr index c62229ac71bad..ecd1ff5a6c455 100644 --- a/src/test/ui/feature-gate-const_fn.stderr +++ b/src/test/ui/feature-gate-const_fn.stderr @@ -16,7 +16,7 @@ error[E0379]: trait fns cannot be declared const 27 | const fn foo() -> u32 { 0 } //~ ERROR const fn is unstable | ^^^^^ trait fns cannot be const -error: const fn is unstable (see issue #24111) +error[E0658]: const fn is unstable (see issue #24111) --> $DIR/feature-gate-const_fn.rs:13:1 | 13 | const fn foo() -> usize { 0 } //~ ERROR const fn is unstable @@ -24,7 +24,7 @@ error: const fn is unstable (see issue #24111) | = help: add #![feature(const_fn)] to the crate attributes to enable -error: const fn is unstable (see issue #24111) +error[E0658]: const fn is unstable (see issue #24111) --> $DIR/feature-gate-const_fn.rs:16:5 | 16 | const fn foo() -> u32; //~ ERROR const fn is unstable @@ -32,7 +32,7 @@ error: const fn is unstable (see issue #24111) | = help: add #![feature(const_fn)] to the crate attributes to enable -error: const fn is unstable (see issue #24111) +error[E0658]: const fn is unstable (see issue #24111) --> $DIR/feature-gate-const_fn.rs:18:5 | 18 | const fn bar() -> u32 { 0 } //~ ERROR const fn is unstable @@ -40,7 +40,7 @@ error: const fn is unstable (see issue #24111) | = help: add #![feature(const_fn)] to the crate attributes to enable -error: const fn is unstable (see issue #24111) +error[E0658]: const fn is unstable (see issue #24111) --> $DIR/feature-gate-const_fn.rs:23:5 | 23 | const fn baz() -> u32 { 0 } //~ ERROR const fn is unstable @@ -48,7 +48,7 @@ error: const fn is unstable (see issue #24111) | = help: add #![feature(const_fn)] to the crate attributes to enable -error: const fn is unstable (see issue #24111) +error[E0658]: const fn is unstable (see issue #24111) --> $DIR/feature-gate-const_fn.rs:27:5 | 27 | const fn foo() -> u32 { 0 } //~ ERROR const fn is unstable diff --git a/src/test/ui/feature-gate-crate_in_paths.stderr b/src/test/ui/feature-gate-crate_in_paths.stderr index b13c82ecfc907..322a38a996f77 100644 --- a/src/test/ui/feature-gate-crate_in_paths.stderr +++ b/src/test/ui/feature-gate-crate_in_paths.stderr @@ -1,4 +1,4 @@ -error: `crate` in paths is experimental (see issue #45477) +error[E0658]: `crate` in paths is experimental (see issue #45477) --> $DIR/feature-gate-crate_in_paths.rs:14:15 | 14 | let _ = ::crate::S; //~ ERROR `crate` in paths is experimental diff --git a/src/test/ui/feature-gate-crate_visibility_modifier.stderr b/src/test/ui/feature-gate-crate_visibility_modifier.stderr index 0862744b87b32..fadc76bc0c036 100644 --- a/src/test/ui/feature-gate-crate_visibility_modifier.stderr +++ b/src/test/ui/feature-gate-crate_visibility_modifier.stderr @@ -1,4 +1,4 @@ -error: `crate` visibility modifier is experimental (see issue #45388) +error[E0658]: `crate` visibility modifier is experimental (see issue #45388) --> $DIR/feature-gate-crate_visibility_modifier.rs:11:1 | 11 | crate struct Bender { //~ ERROR `crate` visibility modifier is experimental diff --git a/src/test/ui/feature-gate-custom_attribute.stderr b/src/test/ui/feature-gate-custom_attribute.stderr index 866ebfe8f2f3a..f4d726c8c41c9 100644 --- a/src/test/ui/feature-gate-custom_attribute.stderr +++ b/src/test/ui/feature-gate-custom_attribute.stderr @@ -1,4 +1,4 @@ -error: The attribute `fake_attr` is currently unknown to the compiler and may have meaning added to it in the future (see issue #29642) +error[E0658]: The attribute `fake_attr` is currently unknown to the compiler and may have meaning added to it in the future (see issue #29642) --> $DIR/feature-gate-custom_attribute.rs:17:1 | 17 | #[fake_attr] //~ ERROR attribute `fake_attr` is currently unknown @@ -6,7 +6,7 @@ error: The attribute `fake_attr` is currently unknown to the compiler and may ha | = help: add #![feature(custom_attribute)] to the crate attributes to enable -error: The attribute `fake_attr` is currently unknown to the compiler and may have meaning added to it in the future (see issue #29642) +error[E0658]: The attribute `fake_attr` is currently unknown to the compiler and may have meaning added to it in the future (see issue #29642) --> $DIR/feature-gate-custom_attribute.rs:18:1 | 18 | #[fake_attr(100)] //~ ERROR attribute `fake_attr` is currently unknown @@ -14,7 +14,7 @@ error: The attribute `fake_attr` is currently unknown to the compiler and may ha | = help: add #![feature(custom_attribute)] to the crate attributes to enable -error: The attribute `fake_attr` is currently unknown to the compiler and may have meaning added to it in the future (see issue #29642) +error[E0658]: The attribute `fake_attr` is currently unknown to the compiler and may have meaning added to it in the future (see issue #29642) --> $DIR/feature-gate-custom_attribute.rs:19:1 | 19 | #[fake_attr(1, 2, 3)] //~ ERROR attribute `fake_attr` is currently unknown @@ -22,7 +22,7 @@ error: The attribute `fake_attr` is currently unknown to the compiler and may ha | = help: add #![feature(custom_attribute)] to the crate attributes to enable -error: The attribute `fake_attr` is currently unknown to the compiler and may have meaning added to it in the future (see issue #29642) +error[E0658]: The attribute `fake_attr` is currently unknown to the compiler and may have meaning added to it in the future (see issue #29642) --> $DIR/feature-gate-custom_attribute.rs:20:1 | 20 | #[fake_attr("hello")] //~ ERROR attribute `fake_attr` is currently unknown @@ -30,7 +30,7 @@ error: The attribute `fake_attr` is currently unknown to the compiler and may ha | = help: add #![feature(custom_attribute)] to the crate attributes to enable -error: The attribute `fake_attr` is currently unknown to the compiler and may have meaning added to it in the future (see issue #29642) +error[E0658]: The attribute `fake_attr` is currently unknown to the compiler and may have meaning added to it in the future (see issue #29642) --> $DIR/feature-gate-custom_attribute.rs:21:1 | 21 | #[fake_attr(name = "hello")] //~ ERROR attribute `fake_attr` is currently unknown @@ -38,7 +38,7 @@ error: The attribute `fake_attr` is currently unknown to the compiler and may ha | = help: add #![feature(custom_attribute)] to the crate attributes to enable -error: The attribute `fake_attr` is currently unknown to the compiler and may have meaning added to it in the future (see issue #29642) +error[E0658]: The attribute `fake_attr` is currently unknown to the compiler and may have meaning added to it in the future (see issue #29642) --> $DIR/feature-gate-custom_attribute.rs:22:1 | 22 | #[fake_attr(1, "hi", key = 12, true, false)] //~ ERROR attribute `fake_attr` is currently unknown @@ -46,7 +46,7 @@ error: The attribute `fake_attr` is currently unknown to the compiler and may ha | = help: add #![feature(custom_attribute)] to the crate attributes to enable -error: The attribute `fake_attr` is currently unknown to the compiler and may have meaning added to it in the future (see issue #29642) +error[E0658]: The attribute `fake_attr` is currently unknown to the compiler and may have meaning added to it in the future (see issue #29642) --> $DIR/feature-gate-custom_attribute.rs:23:1 | 23 | #[fake_attr(key = "hello", val = 10)] //~ ERROR attribute `fake_attr` is currently unknown @@ -54,7 +54,7 @@ error: The attribute `fake_attr` is currently unknown to the compiler and may ha | = help: add #![feature(custom_attribute)] to the crate attributes to enable -error: The attribute `fake_attr` is currently unknown to the compiler and may have meaning added to it in the future (see issue #29642) +error[E0658]: The attribute `fake_attr` is currently unknown to the compiler and may have meaning added to it in the future (see issue #29642) --> $DIR/feature-gate-custom_attribute.rs:24:1 | 24 | #[fake_attr(key("hello"), val(10))] //~ ERROR attribute `fake_attr` is currently unknown @@ -62,7 +62,7 @@ error: The attribute `fake_attr` is currently unknown to the compiler and may ha | = help: add #![feature(custom_attribute)] to the crate attributes to enable -error: The attribute `fake_attr` is currently unknown to the compiler and may have meaning added to it in the future (see issue #29642) +error[E0658]: The attribute `fake_attr` is currently unknown to the compiler and may have meaning added to it in the future (see issue #29642) --> $DIR/feature-gate-custom_attribute.rs:25:1 | 25 | #[fake_attr(enabled = true, disabled = false)] //~ ERROR attribute `fake_attr` is currently unknown @@ -70,7 +70,7 @@ error: The attribute `fake_attr` is currently unknown to the compiler and may ha | = help: add #![feature(custom_attribute)] to the crate attributes to enable -error: The attribute `fake_attr` is currently unknown to the compiler and may have meaning added to it in the future (see issue #29642) +error[E0658]: The attribute `fake_attr` is currently unknown to the compiler and may have meaning added to it in the future (see issue #29642) --> $DIR/feature-gate-custom_attribute.rs:26:1 | 26 | #[fake_attr(true)] //~ ERROR attribute `fake_attr` is currently unknown @@ -78,7 +78,7 @@ error: The attribute `fake_attr` is currently unknown to the compiler and may ha | = help: add #![feature(custom_attribute)] to the crate attributes to enable -error: The attribute `fake_attr` is currently unknown to the compiler and may have meaning added to it in the future (see issue #29642) +error[E0658]: The attribute `fake_attr` is currently unknown to the compiler and may have meaning added to it in the future (see issue #29642) --> $DIR/feature-gate-custom_attribute.rs:27:1 | 27 | #[fake_attr(pi = 3.14159)] //~ ERROR attribute `fake_attr` is currently unknown @@ -86,7 +86,7 @@ error: The attribute `fake_attr` is currently unknown to the compiler and may ha | = help: add #![feature(custom_attribute)] to the crate attributes to enable -error: The attribute `fake_attr` is currently unknown to the compiler and may have meaning added to it in the future (see issue #29642) +error[E0658]: The attribute `fake_attr` is currently unknown to the compiler and may have meaning added to it in the future (see issue #29642) --> $DIR/feature-gate-custom_attribute.rs:28:1 | 28 | #[fake_attr(b"hi")] //~ ERROR attribute `fake_attr` is currently unknown @@ -94,7 +94,7 @@ error: The attribute `fake_attr` is currently unknown to the compiler and may ha | = help: add #![feature(custom_attribute)] to the crate attributes to enable -error: The attribute `fake_doc` is currently unknown to the compiler and may have meaning added to it in the future (see issue #29642) +error[E0658]: The attribute `fake_doc` is currently unknown to the compiler and may have meaning added to it in the future (see issue #29642) --> $DIR/feature-gate-custom_attribute.rs:29:1 | 29 | #[fake_doc(r"doc")] //~ ERROR attribute `fake_doc` is currently unknown diff --git a/src/test/ui/feature-gate-custom_attribute2.stderr b/src/test/ui/feature-gate-custom_attribute2.stderr index 3e4ea58a7a3fb..08878e172042b 100644 --- a/src/test/ui/feature-gate-custom_attribute2.stderr +++ b/src/test/ui/feature-gate-custom_attribute2.stderr @@ -1,4 +1,4 @@ -error: The attribute `lt_struct` is currently unknown to the compiler and may have meaning added to it in the future (see issue #29642) +error[E0658]: The attribute `lt_struct` is currently unknown to the compiler and may have meaning added to it in the future (see issue #29642) --> $DIR/feature-gate-custom_attribute2.rs:23:13 | 23 | struct StLt<#[lt_struct] 'a>(&'a u32); @@ -6,7 +6,7 @@ error: The attribute `lt_struct` is currently unknown to the compiler and may ha | = help: add #![feature(custom_attribute)] to the crate attributes to enable -error: The attribute `ty_struct` is currently unknown to the compiler and may have meaning added to it in the future (see issue #29642) +error[E0658]: The attribute `ty_struct` is currently unknown to the compiler and may have meaning added to it in the future (see issue #29642) --> $DIR/feature-gate-custom_attribute2.rs:25:13 | 25 | struct StTy<#[ty_struct] I>(I); @@ -14,7 +14,7 @@ error: The attribute `ty_struct` is currently unknown to the compiler and may ha | = help: add #![feature(custom_attribute)] to the crate attributes to enable -error: The attribute `lt_enum` is currently unknown to the compiler and may have meaning added to it in the future (see issue #29642) +error[E0658]: The attribute `lt_enum` is currently unknown to the compiler and may have meaning added to it in the future (see issue #29642) --> $DIR/feature-gate-custom_attribute2.rs:28:11 | 28 | enum EnLt<#[lt_enum] 'b> { A(&'b u32), B } @@ -22,7 +22,7 @@ error: The attribute `lt_enum` is currently unknown to the compiler and may have | = help: add #![feature(custom_attribute)] to the crate attributes to enable -error: The attribute `ty_enum` is currently unknown to the compiler and may have meaning added to it in the future (see issue #29642) +error[E0658]: The attribute `ty_enum` is currently unknown to the compiler and may have meaning added to it in the future (see issue #29642) --> $DIR/feature-gate-custom_attribute2.rs:30:11 | 30 | enum EnTy<#[ty_enum] J> { A(J), B } @@ -30,7 +30,7 @@ error: The attribute `ty_enum` is currently unknown to the compiler and may have | = help: add #![feature(custom_attribute)] to the crate attributes to enable -error: The attribute `lt_trait` is currently unknown to the compiler and may have meaning added to it in the future (see issue #29642) +error[E0658]: The attribute `lt_trait` is currently unknown to the compiler and may have meaning added to it in the future (see issue #29642) --> $DIR/feature-gate-custom_attribute2.rs:33:12 | 33 | trait TrLt<#[lt_trait] 'c> { fn foo(&self, _: &'c [u32]) -> &'c u32; } @@ -38,7 +38,7 @@ error: The attribute `lt_trait` is currently unknown to the compiler and may hav | = help: add #![feature(custom_attribute)] to the crate attributes to enable -error: The attribute `ty_trait` is currently unknown to the compiler and may have meaning added to it in the future (see issue #29642) +error[E0658]: The attribute `ty_trait` is currently unknown to the compiler and may have meaning added to it in the future (see issue #29642) --> $DIR/feature-gate-custom_attribute2.rs:35:12 | 35 | trait TrTy<#[ty_trait] K> { fn foo(&self, _: K); } @@ -46,7 +46,7 @@ error: The attribute `ty_trait` is currently unknown to the compiler and may hav | = help: add #![feature(custom_attribute)] to the crate attributes to enable -error: The attribute `lt_type` is currently unknown to the compiler and may have meaning added to it in the future (see issue #29642) +error[E0658]: The attribute `lt_type` is currently unknown to the compiler and may have meaning added to it in the future (see issue #29642) --> $DIR/feature-gate-custom_attribute2.rs:38:11 | 38 | type TyLt<#[lt_type] 'd> = &'d u32; @@ -54,7 +54,7 @@ error: The attribute `lt_type` is currently unknown to the compiler and may have | = help: add #![feature(custom_attribute)] to the crate attributes to enable -error: The attribute `ty_type` is currently unknown to the compiler and may have meaning added to it in the future (see issue #29642) +error[E0658]: The attribute `ty_type` is currently unknown to the compiler and may have meaning added to it in the future (see issue #29642) --> $DIR/feature-gate-custom_attribute2.rs:40:11 | 40 | type TyTy<#[ty_type] L> = (L, ); @@ -62,7 +62,7 @@ error: The attribute `ty_type` is currently unknown to the compiler and may have | = help: add #![feature(custom_attribute)] to the crate attributes to enable -error: The attribute `lt_inherent` is currently unknown to the compiler and may have meaning added to it in the future (see issue #29642) +error[E0658]: The attribute `lt_inherent` is currently unknown to the compiler and may have meaning added to it in the future (see issue #29642) --> $DIR/feature-gate-custom_attribute2.rs:43:6 | 43 | impl<#[lt_inherent] 'e> StLt<'e> { } @@ -70,7 +70,7 @@ error: The attribute `lt_inherent` is currently unknown to the compiler and may | = help: add #![feature(custom_attribute)] to the crate attributes to enable -error: The attribute `ty_inherent` is currently unknown to the compiler and may have meaning added to it in the future (see issue #29642) +error[E0658]: The attribute `ty_inherent` is currently unknown to the compiler and may have meaning added to it in the future (see issue #29642) --> $DIR/feature-gate-custom_attribute2.rs:45:6 | 45 | impl<#[ty_inherent] M> StTy { } @@ -78,7 +78,7 @@ error: The attribute `ty_inherent` is currently unknown to the compiler and may | = help: add #![feature(custom_attribute)] to the crate attributes to enable -error: The attribute `lt_impl_for` is currently unknown to the compiler and may have meaning added to it in the future (see issue #29642) +error[E0658]: The attribute `lt_impl_for` is currently unknown to the compiler and may have meaning added to it in the future (see issue #29642) --> $DIR/feature-gate-custom_attribute2.rs:48:6 | 48 | impl<#[lt_impl_for] 'f> TrLt<'f> for StLt<'f> { @@ -86,7 +86,7 @@ error: The attribute `lt_impl_for` is currently unknown to the compiler and may | = help: add #![feature(custom_attribute)] to the crate attributes to enable -error: The attribute `ty_impl_for` is currently unknown to the compiler and may have meaning added to it in the future (see issue #29642) +error[E0658]: The attribute `ty_impl_for` is currently unknown to the compiler and may have meaning added to it in the future (see issue #29642) --> $DIR/feature-gate-custom_attribute2.rs:52:6 | 52 | impl<#[ty_impl_for] N> TrTy for StTy { @@ -94,7 +94,7 @@ error: The attribute `ty_impl_for` is currently unknown to the compiler and may | = help: add #![feature(custom_attribute)] to the crate attributes to enable -error: The attribute `lt_fn` is currently unknown to the compiler and may have meaning added to it in the future (see issue #29642) +error[E0658]: The attribute `lt_fn` is currently unknown to the compiler and may have meaning added to it in the future (see issue #29642) --> $DIR/feature-gate-custom_attribute2.rs:57:9 | 57 | fn f_lt<#[lt_fn] 'g>(_: &'g [u32]) -> &'g u32 { loop { } } @@ -102,7 +102,7 @@ error: The attribute `lt_fn` is currently unknown to the compiler and may have m | = help: add #![feature(custom_attribute)] to the crate attributes to enable -error: The attribute `ty_fn` is currently unknown to the compiler and may have meaning added to it in the future (see issue #29642) +error[E0658]: The attribute `ty_fn` is currently unknown to the compiler and may have meaning added to it in the future (see issue #29642) --> $DIR/feature-gate-custom_attribute2.rs:59:9 | 59 | fn f_ty<#[ty_fn] O>(_: O) { } @@ -110,7 +110,7 @@ error: The attribute `ty_fn` is currently unknown to the compiler and may have m | = help: add #![feature(custom_attribute)] to the crate attributes to enable -error: The attribute `lt_meth` is currently unknown to the compiler and may have meaning added to it in the future (see issue #29642) +error[E0658]: The attribute `lt_meth` is currently unknown to the compiler and may have meaning added to it in the future (see issue #29642) --> $DIR/feature-gate-custom_attribute2.rs:63:13 | 63 | fn m_lt<#[lt_meth] 'h>(_: &'h [u32]) -> &'h u32 { loop { } } @@ -118,7 +118,7 @@ error: The attribute `lt_meth` is currently unknown to the compiler and may have | = help: add #![feature(custom_attribute)] to the crate attributes to enable -error: The attribute `ty_meth` is currently unknown to the compiler and may have meaning added to it in the future (see issue #29642) +error[E0658]: The attribute `ty_meth` is currently unknown to the compiler and may have meaning added to it in the future (see issue #29642) --> $DIR/feature-gate-custom_attribute2.rs:65:13 | 65 | fn m_ty<#[ty_meth] P>(_: P) { } @@ -126,7 +126,7 @@ error: The attribute `ty_meth` is currently unknown to the compiler and may have | = help: add #![feature(custom_attribute)] to the crate attributes to enable -error: The attribute `lt_hof` is currently unknown to the compiler and may have meaning added to it in the future (see issue #29642) +error[E0658]: The attribute `lt_hof` is currently unknown to the compiler and may have meaning added to it in the future (see issue #29642) --> $DIR/feature-gate-custom_attribute2.rs:70:19 | 70 | where Q: for <#[lt_hof] 'i> Fn(&'i [u32]) -> &'i u32 diff --git a/src/test/ui/feature-gate-custom_derive.stderr b/src/test/ui/feature-gate-custom_derive.stderr index e806c80863119..86066285a55b3 100644 --- a/src/test/ui/feature-gate-custom_derive.stderr +++ b/src/test/ui/feature-gate-custom_derive.stderr @@ -1,4 +1,4 @@ -error: attributes of the form `#[derive_*]` are reserved for the compiler (see issue #29644) +error[E0658]: attributes of the form `#[derive_*]` are reserved for the compiler (see issue #29644) --> $DIR/feature-gate-custom_derive.rs:11:1 | 11 | #[derive_Clone] diff --git a/src/test/ui/feature-gate-decl_macro.stderr b/src/test/ui/feature-gate-decl_macro.stderr index 49ce4eb10b615..c7144f09bd613 100644 --- a/src/test/ui/feature-gate-decl_macro.stderr +++ b/src/test/ui/feature-gate-decl_macro.stderr @@ -1,4 +1,4 @@ -error: `macro` is experimental (see issue #39412) +error[E0658]: `macro` is experimental (see issue #39412) --> $DIR/feature-gate-decl_macro.rs:13:1 | 13 | macro m() {} //~ ERROR `macro` is experimental (see issue #39412) diff --git a/src/test/ui/feature-gate-doc_cfg.stderr b/src/test/ui/feature-gate-doc_cfg.stderr index c2d8a934ab8e4..e009e0bc3c471 100644 --- a/src/test/ui/feature-gate-doc_cfg.stderr +++ b/src/test/ui/feature-gate-doc_cfg.stderr @@ -1,4 +1,4 @@ -error: #[doc(cfg(...))] is experimental (see issue #43781) +error[E0658]: #[doc(cfg(...))] is experimental (see issue #43781) --> $DIR/feature-gate-doc_cfg.rs:11:1 | 11 | #[doc(cfg(unix))] //~ ERROR: #[doc(cfg(...))] is experimental diff --git a/src/test/ui/feature-gate-doc_masked.stderr b/src/test/ui/feature-gate-doc_masked.stderr index 11020765304f7..ee2d384e99841 100644 --- a/src/test/ui/feature-gate-doc_masked.stderr +++ b/src/test/ui/feature-gate-doc_masked.stderr @@ -1,4 +1,4 @@ -error: #[doc(masked)] is experimental (see issue #44027) +error[E0658]: #[doc(masked)] is experimental (see issue #44027) --> $DIR/feature-gate-doc_masked.rs:11:1 | 11 | #[doc(masked)] //~ ERROR: #[doc(masked)] is experimental diff --git a/src/test/ui/feature-gate-doc_spotlight.stderr b/src/test/ui/feature-gate-doc_spotlight.stderr index b743a1e94bc75..36d854892be28 100644 --- a/src/test/ui/feature-gate-doc_spotlight.stderr +++ b/src/test/ui/feature-gate-doc_spotlight.stderr @@ -1,4 +1,4 @@ -error: #[doc(spotlight)] is experimental (see issue #45040) +error[E0658]: #[doc(spotlight)] is experimental (see issue #45040) --> $DIR/feature-gate-doc_spotlight.rs:11:1 | 11 | #[doc(spotlight)] //~ ERROR: #[doc(spotlight)] is experimental diff --git a/src/test/ui/feature-gate-dotdoteq_in_patterns.stderr b/src/test/ui/feature-gate-dotdoteq_in_patterns.stderr index 5319dcef2d5e6..2d26c6ae8ebe7 100644 --- a/src/test/ui/feature-gate-dotdoteq_in_patterns.stderr +++ b/src/test/ui/feature-gate-dotdoteq_in_patterns.stderr @@ -1,4 +1,4 @@ -error: `..=` syntax in patterns is experimental (see issue #28237) +error[E0658]: `..=` syntax in patterns is experimental (see issue #28237) --> $DIR/feature-gate-dotdoteq_in_patterns.rs:13:9 | 13 | 0 ..= 3 => {} //~ ERROR `..=` syntax in patterns is experimental diff --git a/src/test/ui/feature-gate-dropck-ugeh.stderr b/src/test/ui/feature-gate-dropck-ugeh.stderr index b030ebcd88141..cdeca7026b0c6 100644 --- a/src/test/ui/feature-gate-dropck-ugeh.stderr +++ b/src/test/ui/feature-gate-dropck-ugeh.stderr @@ -1,4 +1,4 @@ -error: unsafe_destructor_blind_to_params has been replaced by may_dangle and will be removed in the future (see issue #28498) +error[E0658]: unsafe_destructor_blind_to_params has been replaced by may_dangle and will be removed in the future (see issue #28498) --> $DIR/feature-gate-dropck-ugeh.rs:29:5 | 29 | #[unsafe_destructor_blind_to_params] // This is the UGEH attribute diff --git a/src/test/ui/feature-gate-dyn-trait.stderr b/src/test/ui/feature-gate-dyn-trait.stderr index 28ecfdf1131da..d6ba4b8ad6698 100644 --- a/src/test/ui/feature-gate-dyn-trait.stderr +++ b/src/test/ui/feature-gate-dyn-trait.stderr @@ -1,4 +1,4 @@ -error: `dyn Trait` syntax is unstable (see issue #44662) +error[E0658]: `dyn Trait` syntax is unstable (see issue #44662) --> $DIR/feature-gate-dyn-trait.rs:12:14 | 12 | type A = Box; //~ ERROR `dyn Trait` syntax is unstable diff --git a/src/test/ui/feature-gate-exclusive-range-pattern.stderr b/src/test/ui/feature-gate-exclusive-range-pattern.stderr index c6785d6f29da4..3185281ce4bb4 100644 --- a/src/test/ui/feature-gate-exclusive-range-pattern.stderr +++ b/src/test/ui/feature-gate-exclusive-range-pattern.stderr @@ -1,4 +1,4 @@ -error: exclusive range pattern syntax is experimental (see issue #37854) +error[E0658]: exclusive range pattern syntax is experimental (see issue #37854) --> $DIR/feature-gate-exclusive-range-pattern.rs:13:9 | 13 | 0 .. 3 => {} //~ ERROR exclusive range pattern syntax is experimental diff --git a/src/test/ui/feature-gate-extern_in_paths.stderr b/src/test/ui/feature-gate-extern_in_paths.stderr index ac68e79e1ca0f..022e53b6be096 100644 --- a/src/test/ui/feature-gate-extern_in_paths.stderr +++ b/src/test/ui/feature-gate-extern_in_paths.stderr @@ -1,4 +1,4 @@ -error: `extern` in paths is experimental (see issue #44660) +error[E0658]: `extern` in paths is experimental (see issue #44660) --> $DIR/feature-gate-extern_in_paths.rs:14:13 | 14 | let _ = extern::std::vec::Vec::new(); //~ ERROR `extern` in paths is experimental diff --git a/src/test/ui/feature-gate-extern_types.stderr b/src/test/ui/feature-gate-extern_types.stderr index 3815862e89912..71caa37963f4f 100644 --- a/src/test/ui/feature-gate-extern_types.stderr +++ b/src/test/ui/feature-gate-extern_types.stderr @@ -1,4 +1,4 @@ -error: extern types are experimental (see issue #43467) +error[E0658]: extern types are experimental (see issue #43467) --> $DIR/feature-gate-extern_types.rs:12:5 | 12 | type T; //~ ERROR extern types are experimental diff --git a/src/test/ui/feature-gate-external_doc.stderr b/src/test/ui/feature-gate-external_doc.stderr index 5479ab8bc9128..db6c99bceede6 100644 --- a/src/test/ui/feature-gate-external_doc.stderr +++ b/src/test/ui/feature-gate-external_doc.stderr @@ -1,4 +1,4 @@ -error: #[doc(include = "...")] is experimental (see issue #44732) +error[E0658]: #[doc(include = "...")] is experimental (see issue #44732) --> $DIR/feature-gate-external_doc.rs:11:1 | 11 | #[doc(include="asdf.md")] //~ ERROR: #[doc(include = "...")] is experimental diff --git a/src/test/ui/feature-gate-fundamental.stderr b/src/test/ui/feature-gate-fundamental.stderr index 0fc75ee30b96a..28d8a80e602ab 100644 --- a/src/test/ui/feature-gate-fundamental.stderr +++ b/src/test/ui/feature-gate-fundamental.stderr @@ -1,4 +1,4 @@ -error: the `#[fundamental]` attribute is an experimental feature (see issue #29635) +error[E0658]: the `#[fundamental]` attribute is an experimental feature (see issue #29635) --> $DIR/feature-gate-fundamental.rs:11:1 | 11 | #[fundamental] //~ ERROR the `#[fundamental]` attribute is an experimental feature diff --git a/src/test/ui/feature-gate-generators.stderr b/src/test/ui/feature-gate-generators.stderr index 82acb40133802..f559227f717e4 100644 --- a/src/test/ui/feature-gate-generators.stderr +++ b/src/test/ui/feature-gate-generators.stderr @@ -1,4 +1,4 @@ -error: yield syntax is experimental +error[E0658]: yield syntax is experimental --> $DIR/feature-gate-generators.rs:12:5 | 12 | yield true; //~ ERROR yield syntax is experimental diff --git a/src/test/ui/feature-gate-generic_associated_types.stderr b/src/test/ui/feature-gate-generic_associated_types.stderr index 7b2507e1fb141..c047914fb3b84 100644 --- a/src/test/ui/feature-gate-generic_associated_types.stderr +++ b/src/test/ui/feature-gate-generic_associated_types.stderr @@ -1,4 +1,4 @@ -error: generic associated types are unstable (see issue #44265) +error[E0658]: generic associated types are unstable (see issue #44265) --> $DIR/feature-gate-generic_associated_types.rs:14:5 | 14 | type Pointer: Deref; @@ -6,7 +6,7 @@ error: generic associated types are unstable (see issue #44265) | = help: add #![feature(generic_associated_types)] to the crate attributes to enable -error: generic associated types are unstable (see issue #44265) +error[E0658]: generic associated types are unstable (see issue #44265) --> $DIR/feature-gate-generic_associated_types.rs:16:5 | 16 | type Pointer2: Deref where T: Clone, U: Clone; @@ -14,7 +14,7 @@ error: generic associated types are unstable (see issue #44265) | = help: add #![feature(generic_associated_types)] to the crate attributes to enable -error: generic associated types are unstable (see issue #44265) +error[E0658]: generic associated types are unstable (see issue #44265) --> $DIR/feature-gate-generic_associated_types.rs:22:5 | 22 | type Pointer = Box; @@ -22,7 +22,7 @@ error: generic associated types are unstable (see issue #44265) | = help: add #![feature(generic_associated_types)] to the crate attributes to enable -error: generic associated types are unstable (see issue #44265) +error[E0658]: generic associated types are unstable (see issue #44265) --> $DIR/feature-gate-generic_associated_types.rs:24:5 | 24 | type Pointer2 = Box; diff --git a/src/test/ui/feature-gate-generic_param_attrs.stderr b/src/test/ui/feature-gate-generic_param_attrs.stderr index da2e64030292c..a18d104cc2b33 100644 --- a/src/test/ui/feature-gate-generic_param_attrs.stderr +++ b/src/test/ui/feature-gate-generic_param_attrs.stderr @@ -1,4 +1,4 @@ -error: attributes on lifetime bindings are experimental (see issue #34761) +error[E0658]: attributes on lifetime bindings are experimental (see issue #34761) --> $DIR/feature-gate-generic_param_attrs.rs:22:13 | 22 | struct StLt<#[rustc_lt_struct] 'a>(&'a u32); @@ -6,7 +6,7 @@ error: attributes on lifetime bindings are experimental (see issue #34761) | = help: add #![feature(generic_param_attrs)] to the crate attributes to enable -error: attributes on type parameter bindings are experimental (see issue #34761) +error[E0658]: attributes on type parameter bindings are experimental (see issue #34761) --> $DIR/feature-gate-generic_param_attrs.rs:24:13 | 24 | struct StTy<#[rustc_ty_struct] I>(I); @@ -14,7 +14,7 @@ error: attributes on type parameter bindings are experimental (see issue #34761) | = help: add #![feature(generic_param_attrs)] to the crate attributes to enable -error: attributes on lifetime bindings are experimental (see issue #34761) +error[E0658]: attributes on lifetime bindings are experimental (see issue #34761) --> $DIR/feature-gate-generic_param_attrs.rs:27:11 | 27 | enum EnLt<#[rustc_lt_enum] 'b> { A(&'b u32), B } @@ -22,7 +22,7 @@ error: attributes on lifetime bindings are experimental (see issue #34761) | = help: add #![feature(generic_param_attrs)] to the crate attributes to enable -error: attributes on type parameter bindings are experimental (see issue #34761) +error[E0658]: attributes on type parameter bindings are experimental (see issue #34761) --> $DIR/feature-gate-generic_param_attrs.rs:29:11 | 29 | enum EnTy<#[rustc_ty_enum] J> { A(J), B } @@ -30,7 +30,7 @@ error: attributes on type parameter bindings are experimental (see issue #34761) | = help: add #![feature(generic_param_attrs)] to the crate attributes to enable -error: attributes on lifetime bindings are experimental (see issue #34761) +error[E0658]: attributes on lifetime bindings are experimental (see issue #34761) --> $DIR/feature-gate-generic_param_attrs.rs:32:12 | 32 | trait TrLt<#[rustc_lt_trait] 'c> { fn foo(&self, _: &'c [u32]) -> &'c u32; } @@ -38,7 +38,7 @@ error: attributes on lifetime bindings are experimental (see issue #34761) | = help: add #![feature(generic_param_attrs)] to the crate attributes to enable -error: attributes on type parameter bindings are experimental (see issue #34761) +error[E0658]: attributes on type parameter bindings are experimental (see issue #34761) --> $DIR/feature-gate-generic_param_attrs.rs:34:12 | 34 | trait TrTy<#[rustc_ty_trait] K> { fn foo(&self, _: K); } @@ -46,7 +46,7 @@ error: attributes on type parameter bindings are experimental (see issue #34761) | = help: add #![feature(generic_param_attrs)] to the crate attributes to enable -error: attributes on lifetime bindings are experimental (see issue #34761) +error[E0658]: attributes on lifetime bindings are experimental (see issue #34761) --> $DIR/feature-gate-generic_param_attrs.rs:37:11 | 37 | type TyLt<#[rustc_lt_type] 'd> = &'d u32; @@ -54,7 +54,7 @@ error: attributes on lifetime bindings are experimental (see issue #34761) | = help: add #![feature(generic_param_attrs)] to the crate attributes to enable -error: attributes on type parameter bindings are experimental (see issue #34761) +error[E0658]: attributes on type parameter bindings are experimental (see issue #34761) --> $DIR/feature-gate-generic_param_attrs.rs:39:11 | 39 | type TyTy<#[rustc_ty_type] L> = (L, ); @@ -62,7 +62,7 @@ error: attributes on type parameter bindings are experimental (see issue #34761) | = help: add #![feature(generic_param_attrs)] to the crate attributes to enable -error: attributes on lifetime bindings are experimental (see issue #34761) +error[E0658]: attributes on lifetime bindings are experimental (see issue #34761) --> $DIR/feature-gate-generic_param_attrs.rs:42:6 | 42 | impl<#[rustc_lt_inherent] 'e> StLt<'e> { } @@ -70,7 +70,7 @@ error: attributes on lifetime bindings are experimental (see issue #34761) | = help: add #![feature(generic_param_attrs)] to the crate attributes to enable -error: attributes on type parameter bindings are experimental (see issue #34761) +error[E0658]: attributes on type parameter bindings are experimental (see issue #34761) --> $DIR/feature-gate-generic_param_attrs.rs:44:6 | 44 | impl<#[rustc_ty_inherent] M> StTy { } @@ -78,7 +78,7 @@ error: attributes on type parameter bindings are experimental (see issue #34761) | = help: add #![feature(generic_param_attrs)] to the crate attributes to enable -error: attributes on lifetime bindings are experimental (see issue #34761) +error[E0658]: attributes on lifetime bindings are experimental (see issue #34761) --> $DIR/feature-gate-generic_param_attrs.rs:47:6 | 47 | impl<#[rustc_lt_impl_for] 'f> TrLt<'f> for StLt<'f> { @@ -86,7 +86,7 @@ error: attributes on lifetime bindings are experimental (see issue #34761) | = help: add #![feature(generic_param_attrs)] to the crate attributes to enable -error: attributes on type parameter bindings are experimental (see issue #34761) +error[E0658]: attributes on type parameter bindings are experimental (see issue #34761) --> $DIR/feature-gate-generic_param_attrs.rs:51:6 | 51 | impl<#[rustc_ty_impl_for] N> TrTy for StTy { @@ -94,7 +94,7 @@ error: attributes on type parameter bindings are experimental (see issue #34761) | = help: add #![feature(generic_param_attrs)] to the crate attributes to enable -error: attributes on lifetime bindings are experimental (see issue #34761) +error[E0658]: attributes on lifetime bindings are experimental (see issue #34761) --> $DIR/feature-gate-generic_param_attrs.rs:56:9 | 56 | fn f_lt<#[rustc_lt_fn] 'g>(_: &'g [u32]) -> &'g u32 { loop { } } @@ -102,7 +102,7 @@ error: attributes on lifetime bindings are experimental (see issue #34761) | = help: add #![feature(generic_param_attrs)] to the crate attributes to enable -error: attributes on type parameter bindings are experimental (see issue #34761) +error[E0658]: attributes on type parameter bindings are experimental (see issue #34761) --> $DIR/feature-gate-generic_param_attrs.rs:58:9 | 58 | fn f_ty<#[rustc_ty_fn] O>(_: O) { } @@ -110,7 +110,7 @@ error: attributes on type parameter bindings are experimental (see issue #34761) | = help: add #![feature(generic_param_attrs)] to the crate attributes to enable -error: attributes on lifetime bindings are experimental (see issue #34761) +error[E0658]: attributes on lifetime bindings are experimental (see issue #34761) --> $DIR/feature-gate-generic_param_attrs.rs:62:13 | 62 | fn m_lt<#[rustc_lt_meth] 'h>(_: &'h [u32]) -> &'h u32 { loop { } } @@ -118,7 +118,7 @@ error: attributes on lifetime bindings are experimental (see issue #34761) | = help: add #![feature(generic_param_attrs)] to the crate attributes to enable -error: attributes on type parameter bindings are experimental (see issue #34761) +error[E0658]: attributes on type parameter bindings are experimental (see issue #34761) --> $DIR/feature-gate-generic_param_attrs.rs:64:13 | 64 | fn m_ty<#[rustc_ty_meth] P>(_: P) { } @@ -126,7 +126,7 @@ error: attributes on type parameter bindings are experimental (see issue #34761) | = help: add #![feature(generic_param_attrs)] to the crate attributes to enable -error: attributes on lifetime bindings are experimental (see issue #34761) +error[E0658]: attributes on lifetime bindings are experimental (see issue #34761) --> $DIR/feature-gate-generic_param_attrs.rs:69:19 | 69 | where Q: for <#[rustc_lt_hof] 'i> Fn(&'i [u32]) -> &'i u32 diff --git a/src/test/ui/feature-gate-global_allocator.stderr b/src/test/ui/feature-gate-global_allocator.stderr index 7e6c4288ff39c..8d82f6ee9e395 100644 --- a/src/test/ui/feature-gate-global_allocator.stderr +++ b/src/test/ui/feature-gate-global_allocator.stderr @@ -1,4 +1,4 @@ -error: the `#[global_allocator]` attribute is an experimental feature +error[E0658]: the `#[global_allocator]` attribute is an experimental feature --> $DIR/feature-gate-global_allocator.rs:11:1 | 11 | #[global_allocator] //~ ERROR: attribute is an experimental feature diff --git a/src/test/ui/feature-gate-global_asm.stderr b/src/test/ui/feature-gate-global_asm.stderr index de0ba1a7b3278..ca946579f5dbe 100644 --- a/src/test/ui/feature-gate-global_asm.stderr +++ b/src/test/ui/feature-gate-global_asm.stderr @@ -1,4 +1,4 @@ -error: `global_asm!` is not stable enough for use and is subject to change (see issue #35119) +error[E0658]: `global_asm!` is not stable enough for use and is subject to change (see issue #35119) --> $DIR/feature-gate-global_asm.rs:11:1 | 11 | global_asm!(""); //~ ERROR `global_asm!` is not stable diff --git a/src/test/ui/feature-gate-i128_type.stderr b/src/test/ui/feature-gate-i128_type.stderr index df623cac49a94..06fdeadbbf693 100644 --- a/src/test/ui/feature-gate-i128_type.stderr +++ b/src/test/ui/feature-gate-i128_type.stderr @@ -1,4 +1,4 @@ -error: 128-bit integers are not stable (see issue #35118) +error[E0658]: 128-bit integers are not stable (see issue #35118) --> $DIR/feature-gate-i128_type.rs:12:5 | 12 | 0i128; //~ ERROR 128-bit integers are not stable @@ -6,7 +6,7 @@ error: 128-bit integers are not stable (see issue #35118) | = help: add #![feature(i128_type)] to the crate attributes to enable -error: 128-bit integers are not stable (see issue #35118) +error[E0658]: 128-bit integers are not stable (see issue #35118) --> $DIR/feature-gate-i128_type.rs:16:5 | 16 | 0u128; //~ ERROR 128-bit integers are not stable diff --git a/src/test/ui/feature-gate-i128_type2.stderr b/src/test/ui/feature-gate-i128_type2.stderr index 26653a5739b2c..ee81a26921498 100644 --- a/src/test/ui/feature-gate-i128_type2.stderr +++ b/src/test/ui/feature-gate-i128_type2.stderr @@ -1,4 +1,4 @@ -error: 128-bit type is unstable (see issue #35118) +error[E0658]: 128-bit type is unstable (see issue #35118) --> $DIR/feature-gate-i128_type2.rs:13:15 | 13 | fn test1() -> i128 { //~ ERROR 128-bit type is unstable @@ -6,7 +6,7 @@ error: 128-bit type is unstable (see issue #35118) | = help: add #![feature(i128_type)] to the crate attributes to enable -error: 128-bit type is unstable (see issue #35118) +error[E0658]: 128-bit type is unstable (see issue #35118) --> $DIR/feature-gate-i128_type2.rs:17:17 | 17 | fn test1_2() -> u128 { //~ ERROR 128-bit type is unstable @@ -14,7 +14,7 @@ error: 128-bit type is unstable (see issue #35118) | = help: add #![feature(i128_type)] to the crate attributes to enable -error: 128-bit type is unstable (see issue #35118) +error[E0658]: 128-bit type is unstable (see issue #35118) --> $DIR/feature-gate-i128_type2.rs:22:12 | 22 | let x: i128 = 0; //~ ERROR 128-bit type is unstable @@ -22,7 +22,7 @@ error: 128-bit type is unstable (see issue #35118) | = help: add #![feature(i128_type)] to the crate attributes to enable -error: 128-bit type is unstable (see issue #35118) +error[E0658]: 128-bit type is unstable (see issue #35118) --> $DIR/feature-gate-i128_type2.rs:26:12 | 26 | let x: u128 = 0; //~ ERROR 128-bit type is unstable @@ -32,7 +32,7 @@ error: 128-bit type is unstable (see issue #35118) error[E0601]: main function not found -error: repr with 128-bit type is unstable (see issue #35118) +error[E0658]: repr with 128-bit type is unstable (see issue #35118) --> $DIR/feature-gate-i128_type2.rs:30:1 | 30 | / enum A { //~ ERROR 128-bit type is unstable diff --git a/src/test/ui/feature-gate-intrinsics.stderr b/src/test/ui/feature-gate-intrinsics.stderr index 5382122e30edd..918c749504aea 100644 --- a/src/test/ui/feature-gate-intrinsics.stderr +++ b/src/test/ui/feature-gate-intrinsics.stderr @@ -1,4 +1,4 @@ -error: intrinsics are subject to change +error[E0658]: intrinsics are subject to change --> $DIR/feature-gate-intrinsics.rs:11:1 | 11 | / extern "rust-intrinsic" { //~ ERROR intrinsics are subject to change @@ -8,7 +8,7 @@ error: intrinsics are subject to change | = help: add #![feature(intrinsics)] to the crate attributes to enable -error: intrinsics are subject to change +error[E0658]: intrinsics are subject to change --> $DIR/feature-gate-intrinsics.rs:15:1 | 15 | / extern "rust-intrinsic" fn baz() { //~ ERROR intrinsics are subject to change diff --git a/src/test/ui/feature-gate-lang-items.stderr b/src/test/ui/feature-gate-lang-items.stderr index dab8ce23192a8..28e3dab8fa72a 100644 --- a/src/test/ui/feature-gate-lang-items.stderr +++ b/src/test/ui/feature-gate-lang-items.stderr @@ -1,4 +1,4 @@ -error: language items are subject to change +error[E0658]: language items are subject to change --> $DIR/feature-gate-lang-items.rs:11:1 | 11 | #[lang="foo"] //~ ERROR language items are subject to change diff --git a/src/test/ui/feature-gate-link_args.stderr b/src/test/ui/feature-gate-link_args.stderr index d6d059007d1f3..78070d52f1f15 100644 --- a/src/test/ui/feature-gate-link_args.stderr +++ b/src/test/ui/feature-gate-link_args.stderr @@ -1,4 +1,4 @@ -error: the `link_args` attribute is experimental and not portable across platforms, it is recommended to use `#[link(name = "foo")] instead (see issue #29596) +error[E0658]: the `link_args` attribute is experimental and not portable across platforms, it is recommended to use `#[link(name = "foo")] instead (see issue #29596) --> $DIR/feature-gate-link_args.rs:22:1 | 22 | #[link_args = "-l expected_use_case"] @@ -6,7 +6,7 @@ error: the `link_args` attribute is experimental and not portable across platfor | = help: add #![feature(link_args)] to the crate attributes to enable -error: the `link_args` attribute is experimental and not portable across platforms, it is recommended to use `#[link(name = "foo")] instead (see issue #29596) +error[E0658]: the `link_args` attribute is experimental and not portable across platforms, it is recommended to use `#[link(name = "foo")] instead (see issue #29596) --> $DIR/feature-gate-link_args.rs:26:1 | 26 | #[link_args = "-l unexected_use_on_non_extern_item"] @@ -14,7 +14,7 @@ error: the `link_args` attribute is experimental and not portable across platfor | = help: add #![feature(link_args)] to the crate attributes to enable -error: the `link_args` attribute is experimental and not portable across platforms, it is recommended to use `#[link(name = "foo")] instead (see issue #29596) +error[E0658]: the `link_args` attribute is experimental and not portable across platforms, it is recommended to use `#[link(name = "foo")] instead (see issue #29596) --> $DIR/feature-gate-link_args.rs:19:1 | 19 | #![link_args = "-l unexpected_use_as_inner_attr_on_mod"] diff --git a/src/test/ui/feature-gate-link_cfg.stderr b/src/test/ui/feature-gate-link_cfg.stderr index bbc52bd9d20af..8aada72fb0c8b 100644 --- a/src/test/ui/feature-gate-link_cfg.stderr +++ b/src/test/ui/feature-gate-link_cfg.stderr @@ -1,4 +1,4 @@ -error: is feature gated (see issue #37406) +error[E0658]: is feature gated (see issue #37406) --> $DIR/feature-gate-link_cfg.rs:11:1 | 11 | #[link(name = "foo", cfg(foo))] diff --git a/src/test/ui/feature-gate-link_llvm_intrinsics.stderr b/src/test/ui/feature-gate-link_llvm_intrinsics.stderr index b2e2caaa51af3..136658f23fdd8 100644 --- a/src/test/ui/feature-gate-link_llvm_intrinsics.stderr +++ b/src/test/ui/feature-gate-link_llvm_intrinsics.stderr @@ -1,4 +1,4 @@ -error: linking to LLVM intrinsics is experimental (see issue #29602) +error[E0658]: linking to LLVM intrinsics is experimental (see issue #29602) --> $DIR/feature-gate-link_llvm_intrinsics.rs:13:5 | 13 | fn sqrt(x: f32) -> f32; diff --git a/src/test/ui/feature-gate-linkage.stderr b/src/test/ui/feature-gate-linkage.stderr index 62d857ddf2c06..54764b1920c4d 100644 --- a/src/test/ui/feature-gate-linkage.stderr +++ b/src/test/ui/feature-gate-linkage.stderr @@ -1,4 +1,4 @@ -error: the `linkage` attribute is experimental and not portable across platforms (see issue #29603) +error[E0658]: the `linkage` attribute is experimental and not portable across platforms (see issue #29603) --> $DIR/feature-gate-linkage.rs:12:5 | 12 | #[linkage = "extern_weak"] static foo: isize; diff --git a/src/test/ui/feature-gate-linker-flavor.stderr b/src/test/ui/feature-gate-linker-flavor.stderr index 383e75e3d1737..e58693d35c210 100644 --- a/src/test/ui/feature-gate-linker-flavor.stderr +++ b/src/test/ui/feature-gate-linker-flavor.stderr @@ -1,4 +1,4 @@ -error: the `#[used]` attribute is an experimental feature (see issue #40289) +error[E0658]: the `#[used]` attribute is an experimental feature (see issue #40289) --> $DIR/feature-gate-linker-flavor.rs:16:1 | 16 | #[used] diff --git a/src/test/ui/feature-gate-log_syntax.stderr b/src/test/ui/feature-gate-log_syntax.stderr index f1c0d305f6c31..363b1753f4ad9 100644 --- a/src/test/ui/feature-gate-log_syntax.stderr +++ b/src/test/ui/feature-gate-log_syntax.stderr @@ -1,4 +1,4 @@ -error: `log_syntax!` is not stable enough for use and is subject to change (see issue #29598) +error[E0658]: `log_syntax!` is not stable enough for use and is subject to change (see issue #29598) --> $DIR/feature-gate-log_syntax.rs:12:5 | 12 | log_syntax!() //~ ERROR `log_syntax!` is not stable enough diff --git a/src/test/ui/feature-gate-log_syntax2.stderr b/src/test/ui/feature-gate-log_syntax2.stderr index b1bb5557eed14..f47a5076e7953 100644 --- a/src/test/ui/feature-gate-log_syntax2.stderr +++ b/src/test/ui/feature-gate-log_syntax2.stderr @@ -1,4 +1,4 @@ -error: `log_syntax!` is not stable enough for use and is subject to change (see issue #29598) +error[E0658]: `log_syntax!` is not stable enough for use and is subject to change (see issue #29598) --> $DIR/feature-gate-log_syntax2.rs:14:20 | 14 | println!("{}", log_syntax!()); //~ ERROR `log_syntax!` is not stable diff --git a/src/test/ui/feature-gate-macro-lifetime-matcher.stderr b/src/test/ui/feature-gate-macro-lifetime-matcher.stderr index e78f7684cf2be..553a7d3d13158 100644 --- a/src/test/ui/feature-gate-macro-lifetime-matcher.stderr +++ b/src/test/ui/feature-gate-macro-lifetime-matcher.stderr @@ -1,4 +1,4 @@ -error: :lifetime fragment specifier is experimental and subject to change (see issue #46895) +error[E0658]: :lifetime fragment specifier is experimental and subject to change (see issue #46895) --> $DIR/feature-gate-macro-lifetime-matcher.rs:14:19 | 14 | macro_rules! m { ($lt:lifetime) => {} } diff --git a/src/test/ui/feature-gate-macro-vis-matcher.stderr b/src/test/ui/feature-gate-macro-vis-matcher.stderr index 09db5009165d1..ee1844c092259 100644 --- a/src/test/ui/feature-gate-macro-vis-matcher.stderr +++ b/src/test/ui/feature-gate-macro-vis-matcher.stderr @@ -1,4 +1,4 @@ -error: :vis fragment specifier is experimental and subject to change (see issue #41022) +error[E0658]: :vis fragment specifier is experimental and subject to change (see issue #41022) --> $DIR/feature-gate-macro-vis-matcher.rs:14:19 | 14 | macro_rules! m { ($v:vis) => {} } diff --git a/src/test/ui/feature-gate-main.stderr b/src/test/ui/feature-gate-main.stderr index 90cf12822c804..56e9c8b37e31e 100644 --- a/src/test/ui/feature-gate-main.stderr +++ b/src/test/ui/feature-gate-main.stderr @@ -1,4 +1,4 @@ -error: declaration of a nonstandard #[main] function may change over time, for now a top-level `fn main()` is required (see issue #29634) +error[E0658]: declaration of a nonstandard #[main] function may change over time, for now a top-level `fn main()` is required (see issue #29634) --> $DIR/feature-gate-main.rs:12:1 | 12 | fn foo() {} //~ ERROR: declaration of a nonstandard #[main] function may change over time diff --git a/src/test/ui/feature-gate-match_beginning_vert.stderr b/src/test/ui/feature-gate-match_beginning_vert.stderr index 88053adfafaa8..1d45dedb4971c 100644 --- a/src/test/ui/feature-gate-match_beginning_vert.stderr +++ b/src/test/ui/feature-gate-match_beginning_vert.stderr @@ -1,4 +1,4 @@ -error: Use of a '|' at the beginning of a match arm is experimental (see issue #44101) +error[E0658]: Use of a '|' at the beginning of a match arm is experimental (see issue #44101) --> $DIR/feature-gate-match_beginning_vert.rs:24:9 | 24 | | A => println!("A"), @@ -6,7 +6,7 @@ error: Use of a '|' at the beginning of a match arm is experimental (see issue # | = help: add #![feature(match_beginning_vert)] to the crate attributes to enable -error: Use of a '|' at the beginning of a match arm is experimental (see issue #44101) +error[E0658]: Use of a '|' at the beginning of a match arm is experimental (see issue #44101) --> $DIR/feature-gate-match_beginning_vert.rs:26:9 | 26 | | B | C => println!("BC!"), @@ -14,7 +14,7 @@ error: Use of a '|' at the beginning of a match arm is experimental (see issue # | = help: add #![feature(match_beginning_vert)] to the crate attributes to enable -error: Use of a '|' at the beginning of a match arm is experimental (see issue #44101) +error[E0658]: Use of a '|' at the beginning of a match arm is experimental (see issue #44101) --> $DIR/feature-gate-match_beginning_vert.rs:28:9 | 28 | | _ => {}, diff --git a/src/test/ui/feature-gate-match_default_bindings.stderr b/src/test/ui/feature-gate-match_default_bindings.stderr index d86e8248f088d..1bedfb7f8bee7 100644 --- a/src/test/ui/feature-gate-match_default_bindings.stderr +++ b/src/test/ui/feature-gate-match_default_bindings.stderr @@ -1,4 +1,4 @@ -error: non-reference pattern used to match a reference (see issue #42640) +error[E0658]: non-reference pattern used to match a reference (see issue #42640) --> $DIR/feature-gate-match_default_bindings.rs:13:9 | 13 | Some(n) => {}, diff --git a/src/test/ui/feature-gate-may-dangle.stderr b/src/test/ui/feature-gate-may-dangle.stderr index e51723d058e4b..a3a3f7bd1742d 100644 --- a/src/test/ui/feature-gate-may-dangle.stderr +++ b/src/test/ui/feature-gate-may-dangle.stderr @@ -1,4 +1,4 @@ -error: may_dangle has unstable semantics and may be removed in the future (see issue #34761) +error[E0658]: may_dangle has unstable semantics and may be removed in the future (see issue #34761) --> $DIR/feature-gate-may-dangle.rs:18:6 | 18 | impl<#[may_dangle] A> Drop for Pt { diff --git a/src/test/ui/feature-gate-naked_functions.stderr b/src/test/ui/feature-gate-naked_functions.stderr index 9655982574ca3..5f72234e5df5b 100644 --- a/src/test/ui/feature-gate-naked_functions.stderr +++ b/src/test/ui/feature-gate-naked_functions.stderr @@ -1,4 +1,4 @@ -error: the `#[naked]` attribute is an experimental feature (see issue #32408) +error[E0658]: the `#[naked]` attribute is an experimental feature (see issue #32408) --> $DIR/feature-gate-naked_functions.rs:11:1 | 11 | #[naked] @@ -6,7 +6,7 @@ error: the `#[naked]` attribute is an experimental feature (see issue #32408) | = help: add #![feature(naked_functions)] to the crate attributes to enable -error: the `#[naked]` attribute is an experimental feature (see issue #32408) +error[E0658]: the `#[naked]` attribute is an experimental feature (see issue #32408) --> $DIR/feature-gate-naked_functions.rs:15:1 | 15 | #[naked] diff --git a/src/test/ui/feature-gate-needs-allocator.stderr b/src/test/ui/feature-gate-needs-allocator.stderr index 5124c10cb472a..11b8c31e6df5a 100644 --- a/src/test/ui/feature-gate-needs-allocator.stderr +++ b/src/test/ui/feature-gate-needs-allocator.stderr @@ -1,4 +1,4 @@ -error: the `#[needs_allocator]` attribute is an experimental feature +error[E0658]: the `#[needs_allocator]` attribute is an experimental feature --> $DIR/feature-gate-needs-allocator.rs:11:1 | 11 | #![needs_allocator] //~ ERROR the `#[needs_allocator]` attribute is diff --git a/src/test/ui/feature-gate-never_type.stderr b/src/test/ui/feature-gate-never_type.stderr index c242e613ead75..2fd04f51e7e52 100644 --- a/src/test/ui/feature-gate-never_type.stderr +++ b/src/test/ui/feature-gate-never_type.stderr @@ -1,4 +1,4 @@ -error: The `!` type is experimental (see issue #35121) +error[E0658]: The `!` type is experimental (see issue #35121) --> $DIR/feature-gate-never_type.rs:17:17 | 17 | type Ma = (u32, !, i32); //~ ERROR type is experimental @@ -6,7 +6,7 @@ error: The `!` type is experimental (see issue #35121) | = help: add #![feature(never_type)] to the crate attributes to enable -error: The `!` type is experimental (see issue #35121) +error[E0658]: The `!` type is experimental (see issue #35121) --> $DIR/feature-gate-never_type.rs:18:20 | 18 | type Meeshka = Vec; //~ ERROR type is experimental @@ -14,7 +14,7 @@ error: The `!` type is experimental (see issue #35121) | = help: add #![feature(never_type)] to the crate attributes to enable -error: The `!` type is experimental (see issue #35121) +error[E0658]: The `!` type is experimental (see issue #35121) --> $DIR/feature-gate-never_type.rs:19:16 | 19 | type Mow = &fn(!) -> !; //~ ERROR type is experimental @@ -22,7 +22,7 @@ error: The `!` type is experimental (see issue #35121) | = help: add #![feature(never_type)] to the crate attributes to enable -error: The `!` type is experimental (see issue #35121) +error[E0658]: The `!` type is experimental (see issue #35121) --> $DIR/feature-gate-never_type.rs:20:19 | 20 | type Skwoz = &mut !; //~ ERROR type is experimental @@ -30,7 +30,7 @@ error: The `!` type is experimental (see issue #35121) | = help: add #![feature(never_type)] to the crate attributes to enable -error: The `!` type is experimental (see issue #35121) +error[E0658]: The `!` type is experimental (see issue #35121) --> $DIR/feature-gate-never_type.rs:23:16 | 23 | type Wub = !; //~ ERROR type is experimental diff --git a/src/test/ui/feature-gate-no-debug.stderr b/src/test/ui/feature-gate-no-debug.stderr index 83a8189c095b3..c7af8cf6aab7e 100644 --- a/src/test/ui/feature-gate-no-debug.stderr +++ b/src/test/ui/feature-gate-no-debug.stderr @@ -1,4 +1,4 @@ -error: the `#[no_debug]` attribute was an experimental feature that has been deprecated due to lack of demand (see issue #29721) +error[E0658]: the `#[no_debug]` attribute was an experimental feature that has been deprecated due to lack of demand (see issue #29721) --> $DIR/feature-gate-no-debug.rs:13:1 | 13 | #[no_debug] //~ ERROR the `#[no_debug]` attribute was diff --git a/src/test/ui/feature-gate-no_core.stderr b/src/test/ui/feature-gate-no_core.stderr index 02e0b17624968..7fc898520022e 100644 --- a/src/test/ui/feature-gate-no_core.stderr +++ b/src/test/ui/feature-gate-no_core.stderr @@ -1,4 +1,4 @@ -error: no_core is experimental (see issue #29639) +error[E0658]: no_core is experimental (see issue #29639) --> $DIR/feature-gate-no_core.rs:11:1 | 11 | #![no_core] //~ ERROR no_core is experimental diff --git a/src/test/ui/feature-gate-non_ascii_idents.stderr b/src/test/ui/feature-gate-non_ascii_idents.stderr index 90d0b8daee71c..deb707752b066 100644 --- a/src/test/ui/feature-gate-non_ascii_idents.stderr +++ b/src/test/ui/feature-gate-non_ascii_idents.stderr @@ -1,4 +1,4 @@ -error: non-ascii idents are not fully supported. (see issue #28979) +error[E0658]: non-ascii idents are not fully supported. (see issue #28979) --> $DIR/feature-gate-non_ascii_idents.rs:11:1 | 11 | extern crate core as bäz; //~ ERROR non-ascii idents @@ -6,7 +6,7 @@ error: non-ascii idents are not fully supported. (see issue #28979) | = help: add #![feature(non_ascii_idents)] to the crate attributes to enable -error: non-ascii idents are not fully supported. (see issue #28979) +error[E0658]: non-ascii idents are not fully supported. (see issue #28979) --> $DIR/feature-gate-non_ascii_idents.rs:13:5 | 13 | use föö::bar; //~ ERROR non-ascii idents @@ -14,7 +14,7 @@ error: non-ascii idents are not fully supported. (see issue #28979) | = help: add #![feature(non_ascii_idents)] to the crate attributes to enable -error: non-ascii idents are not fully supported. (see issue #28979) +error[E0658]: non-ascii idents are not fully supported. (see issue #28979) --> $DIR/feature-gate-non_ascii_idents.rs:15:1 | 15 | mod föö { //~ ERROR non-ascii idents @@ -22,7 +22,7 @@ error: non-ascii idents are not fully supported. (see issue #28979) | = help: add #![feature(non_ascii_idents)] to the crate attributes to enable -error: non-ascii idents are not fully supported. (see issue #28979) +error[E0658]: non-ascii idents are not fully supported. (see issue #28979) --> $DIR/feature-gate-non_ascii_idents.rs:19:1 | 19 | / fn bär( //~ ERROR non-ascii idents @@ -36,7 +36,7 @@ error: non-ascii idents are not fully supported. (see issue #28979) | = help: add #![feature(non_ascii_idents)] to the crate attributes to enable -error: non-ascii idents are not fully supported. (see issue #28979) +error[E0658]: non-ascii idents are not fully supported. (see issue #28979) --> $DIR/feature-gate-non_ascii_idents.rs:20:5 | 20 | bäz: isize //~ ERROR non-ascii idents @@ -44,7 +44,7 @@ error: non-ascii idents are not fully supported. (see issue #28979) | = help: add #![feature(non_ascii_idents)] to the crate attributes to enable -error: non-ascii idents are not fully supported. (see issue #28979) +error[E0658]: non-ascii idents are not fully supported. (see issue #28979) --> $DIR/feature-gate-non_ascii_idents.rs:22:9 | 22 | let _ö: isize; //~ ERROR non-ascii idents @@ -52,7 +52,7 @@ error: non-ascii idents are not fully supported. (see issue #28979) | = help: add #![feature(non_ascii_idents)] to the crate attributes to enable -error: non-ascii idents are not fully supported. (see issue #28979) +error[E0658]: non-ascii idents are not fully supported. (see issue #28979) --> $DIR/feature-gate-non_ascii_idents.rs:25:10 | 25 | (_ä, _) => {} //~ ERROR non-ascii idents @@ -60,7 +60,7 @@ error: non-ascii idents are not fully supported. (see issue #28979) | = help: add #![feature(non_ascii_idents)] to the crate attributes to enable -error: non-ascii idents are not fully supported. (see issue #28979) +error[E0658]: non-ascii idents are not fully supported. (see issue #28979) --> $DIR/feature-gate-non_ascii_idents.rs:29:1 | 29 | struct Föö { //~ ERROR non-ascii idents @@ -68,7 +68,7 @@ error: non-ascii idents are not fully supported. (see issue #28979) | = help: add #![feature(non_ascii_idents)] to the crate attributes to enable -error: non-ascii idents are not fully supported. (see issue #28979) +error[E0658]: non-ascii idents are not fully supported. (see issue #28979) --> $DIR/feature-gate-non_ascii_idents.rs:30:5 | 30 | föö: isize //~ ERROR non-ascii idents @@ -76,7 +76,7 @@ error: non-ascii idents are not fully supported. (see issue #28979) | = help: add #![feature(non_ascii_idents)] to the crate attributes to enable -error: non-ascii idents are not fully supported. (see issue #28979) +error[E0658]: non-ascii idents are not fully supported. (see issue #28979) --> $DIR/feature-gate-non_ascii_idents.rs:33:1 | 33 | enum Bär { //~ ERROR non-ascii idents @@ -84,7 +84,7 @@ error: non-ascii idents are not fully supported. (see issue #28979) | = help: add #![feature(non_ascii_idents)] to the crate attributes to enable -error: non-ascii idents are not fully supported. (see issue #28979) +error[E0658]: non-ascii idents are not fully supported. (see issue #28979) --> $DIR/feature-gate-non_ascii_idents.rs:34:5 | 34 | Bäz { //~ ERROR non-ascii idents @@ -92,7 +92,7 @@ error: non-ascii idents are not fully supported. (see issue #28979) | = help: add #![feature(non_ascii_idents)] to the crate attributes to enable -error: non-ascii idents are not fully supported. (see issue #28979) +error[E0658]: non-ascii idents are not fully supported. (see issue #28979) --> $DIR/feature-gate-non_ascii_idents.rs:35:9 | 35 | qüx: isize //~ ERROR non-ascii idents @@ -100,7 +100,7 @@ error: non-ascii idents are not fully supported. (see issue #28979) | = help: add #![feature(non_ascii_idents)] to the crate attributes to enable -error: non-ascii idents are not fully supported. (see issue #28979) +error[E0658]: non-ascii idents are not fully supported. (see issue #28979) --> $DIR/feature-gate-non_ascii_idents.rs:40:5 | 40 | fn qüx(); //~ ERROR non-ascii idents diff --git a/src/test/ui/feature-gate-non_exhaustive.stderr b/src/test/ui/feature-gate-non_exhaustive.stderr index 775e65b90faaf..320f40e31b814 100644 --- a/src/test/ui/feature-gate-non_exhaustive.stderr +++ b/src/test/ui/feature-gate-non_exhaustive.stderr @@ -1,4 +1,4 @@ -error: non exhaustive is an experimental feature (see issue #44109) +error[E0658]: non exhaustive is an experimental feature (see issue #44109) --> $DIR/feature-gate-non_exhaustive.rs:13:1 | 13 | #[non_exhaustive] //~ERROR non exhaustive is an experimental feature (see issue #44109) diff --git a/src/test/ui/feature-gate-omit-gdb-pretty-printer-section.stderr b/src/test/ui/feature-gate-omit-gdb-pretty-printer-section.stderr index e50e1b4c0b5b1..4ceb697d0df31 100644 --- a/src/test/ui/feature-gate-omit-gdb-pretty-printer-section.stderr +++ b/src/test/ui/feature-gate-omit-gdb-pretty-printer-section.stderr @@ -1,4 +1,4 @@ -error: the `#[omit_gdb_pretty_printer_section]` attribute is just used for the Rust test suite +error[E0658]: the `#[omit_gdb_pretty_printer_section]` attribute is just used for the Rust test suite --> $DIR/feature-gate-omit-gdb-pretty-printer-section.rs:11:1 | 11 | #[omit_gdb_pretty_printer_section] //~ ERROR the `#[omit_gdb_pretty_printer_section]` attribute is diff --git a/src/test/ui/feature-gate-on-unimplemented.stderr b/src/test/ui/feature-gate-on-unimplemented.stderr index 06944a14736cf..b1658c3be1647 100644 --- a/src/test/ui/feature-gate-on-unimplemented.stderr +++ b/src/test/ui/feature-gate-on-unimplemented.stderr @@ -1,4 +1,4 @@ -error: the `#[rustc_on_unimplemented]` attribute is an experimental feature (see issue #29628) +error[E0658]: the `#[rustc_on_unimplemented]` attribute is an experimental feature (see issue #29628) --> $DIR/feature-gate-on-unimplemented.rs:14:1 | 14 | #[rustc_on_unimplemented = "test error `{Self}` with `{Bar}`"] diff --git a/src/test/ui/feature-gate-optin-builtin-traits.stderr b/src/test/ui/feature-gate-optin-builtin-traits.stderr index d66da1224f8b9..fe443efe62c10 100644 --- a/src/test/ui/feature-gate-optin-builtin-traits.stderr +++ b/src/test/ui/feature-gate-optin-builtin-traits.stderr @@ -1,4 +1,4 @@ -error: auto traits are experimental and possibly buggy (see issue #13231) +error[E0658]: auto traits are experimental and possibly buggy (see issue #13231) --> $DIR/feature-gate-optin-builtin-traits.rs:20:1 | 20 | auto trait AutoDummyTrait {} @@ -6,7 +6,7 @@ error: auto traits are experimental and possibly buggy (see issue #13231) | = help: add #![feature(optin_builtin_traits)] to the crate attributes to enable -error: negative trait bounds are not yet fully implemented; use marker types for now (see issue #13231) +error[E0658]: negative trait bounds are not yet fully implemented; use marker types for now (see issue #13231) --> $DIR/feature-gate-optin-builtin-traits.rs:23:1 | 23 | impl !DummyTrait for DummyStruct {} @@ -16,3 +16,4 @@ error: negative trait bounds are not yet fully implemented; use marker types for error: aborting due to 2 previous errors + diff --git a/src/test/ui/feature-gate-placement-expr.stderr b/src/test/ui/feature-gate-placement-expr.stderr index fdb7b50671194..c588cabe23993 100644 --- a/src/test/ui/feature-gate-placement-expr.stderr +++ b/src/test/ui/feature-gate-placement-expr.stderr @@ -1,4 +1,4 @@ -error: placement-in expression syntax is experimental and subject to change. (see issue #27779) +error[E0658]: placement-in expression syntax is experimental and subject to change. (see issue #27779) --> $DIR/feature-gate-placement-expr.rs:24:13 | 24 | let x = HEAP <- 'c'; //~ ERROR placement-in expression syntax is experimental diff --git a/src/test/ui/feature-gate-plugin.stderr b/src/test/ui/feature-gate-plugin.stderr index b94d3299abcf7..b54b2d8999452 100644 --- a/src/test/ui/feature-gate-plugin.stderr +++ b/src/test/ui/feature-gate-plugin.stderr @@ -1,4 +1,4 @@ -error: compiler plugins are experimental and possibly buggy (see issue #29597) +error[E0658]: compiler plugins are experimental and possibly buggy (see issue #29597) --> $DIR/feature-gate-plugin.rs:13:1 | 13 | #![plugin(foo)] diff --git a/src/test/ui/feature-gate-plugin_registrar.stderr b/src/test/ui/feature-gate-plugin_registrar.stderr index 3710239142af6..fb5bd9d1afe8b 100644 --- a/src/test/ui/feature-gate-plugin_registrar.stderr +++ b/src/test/ui/feature-gate-plugin_registrar.stderr @@ -1,4 +1,4 @@ -error: compiler plugins are experimental and possibly buggy (see issue #29597) +error[E0658]: compiler plugins are experimental and possibly buggy (see issue #29597) --> $DIR/feature-gate-plugin_registrar.rs:16:1 | 16 | pub fn registrar() {} diff --git a/src/test/ui/feature-gate-prelude_import.stderr b/src/test/ui/feature-gate-prelude_import.stderr index df44dfff40b77..5487ae21f3b89 100644 --- a/src/test/ui/feature-gate-prelude_import.stderr +++ b/src/test/ui/feature-gate-prelude_import.stderr @@ -1,4 +1,4 @@ -error: `#[prelude_import]` is for use by rustc only +error[E0658]: `#[prelude_import]` is for use by rustc only --> $DIR/feature-gate-prelude_import.rs:11:1 | 11 | #[prelude_import] //~ ERROR `#[prelude_import]` is for use by rustc only diff --git a/src/test/ui/feature-gate-profiler-runtime.stderr b/src/test/ui/feature-gate-profiler-runtime.stderr index c3165438cdbc8..f2893cbb97d6a 100644 --- a/src/test/ui/feature-gate-profiler-runtime.stderr +++ b/src/test/ui/feature-gate-profiler-runtime.stderr @@ -1,4 +1,4 @@ -error: the `#[profiler_runtime]` attribute is used to identify the `profiler_builtins` crate which contains the profiler runtime and will never be stable +error[E0658]: the `#[profiler_runtime]` attribute is used to identify the `profiler_builtins` crate which contains the profiler runtime and will never be stable --> $DIR/feature-gate-profiler-runtime.rs:11:1 | 11 | #![profiler_runtime] //~ ERROR the `#[profiler_runtime]` attribute is diff --git a/src/test/ui/feature-gate-repr-simd.stderr b/src/test/ui/feature-gate-repr-simd.stderr index a2ff06dd59ffe..e430a04a3e84d 100644 --- a/src/test/ui/feature-gate-repr-simd.stderr +++ b/src/test/ui/feature-gate-repr-simd.stderr @@ -1,4 +1,4 @@ -error: SIMD types are experimental and possibly buggy (see issue #27731) +error[E0658]: SIMD types are experimental and possibly buggy (see issue #27731) --> $DIR/feature-gate-repr-simd.rs:11:1 | 11 | #[repr(simd)] //~ error: SIMD types are experimental diff --git a/src/test/ui/feature-gate-repr128.stderr b/src/test/ui/feature-gate-repr128.stderr index c59964887b58f..982ebb0101662 100644 --- a/src/test/ui/feature-gate-repr128.stderr +++ b/src/test/ui/feature-gate-repr128.stderr @@ -1,4 +1,4 @@ -error: repr with 128-bit type is unstable (see issue #35118) +error[E0658]: repr with 128-bit type is unstable (see issue #35118) --> $DIR/feature-gate-repr128.rs:12:1 | 12 | / enum A { //~ ERROR repr with 128-bit type is unstable diff --git a/src/test/ui/feature-gate-repr_align.stderr b/src/test/ui/feature-gate-repr_align.stderr index 16fdc135a5fa8..dd88067d58f9a 100644 --- a/src/test/ui/feature-gate-repr_align.stderr +++ b/src/test/ui/feature-gate-repr_align.stderr @@ -1,4 +1,4 @@ -error: the struct `#[repr(align(u16))]` attribute is experimental (see issue #33626) +error[E0658]: the struct `#[repr(align(u16))]` attribute is experimental (see issue #33626) --> $DIR/feature-gate-repr_align.rs:12:1 | 12 | #[repr(align(64))] //~ error: the struct `#[repr(align(u16))]` attribute is experimental diff --git a/src/test/ui/feature-gate-rustc-attrs.stderr b/src/test/ui/feature-gate-rustc-attrs.stderr index c818b57ef1219..f47588c3a7d63 100644 --- a/src/test/ui/feature-gate-rustc-attrs.stderr +++ b/src/test/ui/feature-gate-rustc-attrs.stderr @@ -1,4 +1,4 @@ -error: the `#[rustc_variance]` attribute is just used for rustc unit tests and will never be stable (see issue #29642) +error[E0658]: the `#[rustc_variance]` attribute is just used for rustc unit tests and will never be stable (see issue #29642) --> $DIR/feature-gate-rustc-attrs.rs:15:1 | 15 | #[rustc_variance] //~ ERROR the `#[rustc_variance]` attribute is just used for rustc unit tests and will never be stable @@ -6,7 +6,7 @@ error: the `#[rustc_variance]` attribute is just used for rustc unit tests and w | = help: add #![feature(rustc_attrs)] to the crate attributes to enable -error: the `#[rustc_error]` attribute is just used for rustc unit tests and will never be stable (see issue #29642) +error[E0658]: the `#[rustc_error]` attribute is just used for rustc unit tests and will never be stable (see issue #29642) --> $DIR/feature-gate-rustc-attrs.rs:16:1 | 16 | #[rustc_error] //~ ERROR the `#[rustc_error]` attribute is just used for rustc unit tests and will never be stable @@ -14,7 +14,7 @@ error: the `#[rustc_error]` attribute is just used for rustc unit tests and will | = help: add #![feature(rustc_attrs)] to the crate attributes to enable -error: unless otherwise specified, attributes with the prefix `rustc_` are reserved for internal compiler diagnostics (see issue #29642) +error[E0658]: unless otherwise specified, attributes with the prefix `rustc_` are reserved for internal compiler diagnostics (see issue #29642) --> $DIR/feature-gate-rustc-attrs.rs:17:1 | 17 | #[rustc_foo] diff --git a/src/test/ui/feature-gate-rustc_const_unstable.stderr b/src/test/ui/feature-gate-rustc_const_unstable.stderr index c32abb8b85748..922898b7d36f0 100644 --- a/src/test/ui/feature-gate-rustc_const_unstable.stderr +++ b/src/test/ui/feature-gate-rustc_const_unstable.stderr @@ -1,4 +1,4 @@ -error: the `#[rustc_const_unstable]` attribute is an internal feature +error[E0658]: the `#[rustc_const_unstable]` attribute is an internal feature --> $DIR/feature-gate-rustc_const_unstable.rs:18:1 | 18 | #[rustc_const_unstable(feature="fzzzzzt")] //~ERROR internal feature diff --git a/src/test/ui/feature-gate-sanitizer-runtime.stderr b/src/test/ui/feature-gate-sanitizer-runtime.stderr index b9a43f8098d2d..6d77161864ff8 100644 --- a/src/test/ui/feature-gate-sanitizer-runtime.stderr +++ b/src/test/ui/feature-gate-sanitizer-runtime.stderr @@ -1,4 +1,4 @@ -error: the `#[sanitizer_runtime]` attribute is used to identify crates that contain the runtime of a sanitizer and will never be stable +error[E0658]: the `#[sanitizer_runtime]` attribute is used to identify crates that contain the runtime of a sanitizer and will never be stable --> $DIR/feature-gate-sanitizer-runtime.rs:11:1 | 11 | #![sanitizer_runtime] //~ ERROR the `#[sanitizer_runtime]` attribute is diff --git a/src/test/ui/feature-gate-simd.stderr b/src/test/ui/feature-gate-simd.stderr index b3225d580bf05..447706ab858c4 100644 --- a/src/test/ui/feature-gate-simd.stderr +++ b/src/test/ui/feature-gate-simd.stderr @@ -1,4 +1,4 @@ -error: SIMD types are experimental and possibly buggy (see issue #27731) +error[E0658]: SIMD types are experimental and possibly buggy (see issue #27731) --> $DIR/feature-gate-simd.rs:14:1 | 14 | #[repr(simd)] //~ ERROR SIMD types are experimental diff --git a/src/test/ui/feature-gate-slice-patterns.stderr b/src/test/ui/feature-gate-slice-patterns.stderr index e5ba318b3365f..7a2e67c89821c 100644 --- a/src/test/ui/feature-gate-slice-patterns.stderr +++ b/src/test/ui/feature-gate-slice-patterns.stderr @@ -1,4 +1,4 @@ -error: slice pattern syntax is experimental (see issue #23121) +error[E0658]: slice pattern syntax is experimental (see issue #23121) --> $DIR/feature-gate-slice-patterns.rs:16:9 | 16 | [1, 2, xs..] => {} //~ ERROR slice pattern syntax is experimental diff --git a/src/test/ui/feature-gate-start.stderr b/src/test/ui/feature-gate-start.stderr index b36fae2aacfda..61cbe42d0fb44 100644 --- a/src/test/ui/feature-gate-start.stderr +++ b/src/test/ui/feature-gate-start.stderr @@ -1,4 +1,4 @@ -error: a #[start] function is an experimental feature whose signature may change over time (see issue #29633) +error[E0658]: a #[start] function is an experimental feature whose signature may change over time (see issue #29633) --> $DIR/feature-gate-start.rs:12:1 | 12 | fn foo() {} //~ ERROR: a #[start] function is an experimental feature diff --git a/src/test/ui/feature-gate-static-nobundle.stderr b/src/test/ui/feature-gate-static-nobundle.stderr index 052516fad7691..9ec4f6480b1f4 100644 --- a/src/test/ui/feature-gate-static-nobundle.stderr +++ b/src/test/ui/feature-gate-static-nobundle.stderr @@ -1,4 +1,4 @@ -error: kind="static-nobundle" is feature gated (see issue #37403) +error[E0658]: kind="static-nobundle" is feature gated (see issue #37403) --> $DIR/feature-gate-static-nobundle.rs:11:1 | 11 | #[link(name="foo", kind="static-nobundle")] diff --git a/src/test/ui/feature-gate-stmt_expr_attributes.stderr b/src/test/ui/feature-gate-stmt_expr_attributes.stderr index 80910594d1c06..4d2e2f671c51c 100644 --- a/src/test/ui/feature-gate-stmt_expr_attributes.stderr +++ b/src/test/ui/feature-gate-stmt_expr_attributes.stderr @@ -1,4 +1,4 @@ -error: attributes on non-item statements and expressions are experimental. (see issue #15701) +error[E0658]: attributes on non-item statements and expressions are experimental. (see issue #15701) --> $DIR/feature-gate-stmt_expr_attributes.rs:11:16 | 11 | const X: i32 = #[allow(dead_code)] 8; diff --git a/src/test/ui/feature-gate-target_feature.stderr b/src/test/ui/feature-gate-target_feature.stderr index 8c89eabf75388..b6ad1b65691ce 100644 --- a/src/test/ui/feature-gate-target_feature.stderr +++ b/src/test/ui/feature-gate-target_feature.stderr @@ -1,4 +1,4 @@ -error: the `#[target_feature]` attribute is an experimental feature +error[E0658]: the `#[target_feature]` attribute is an experimental feature --> $DIR/feature-gate-target_feature.rs:11:1 | 11 | #[target_feature = "+sse2"] diff --git a/src/test/ui/feature-gate-thread_local.stderr b/src/test/ui/feature-gate-thread_local.stderr index 2608018528ce7..0f932abe4ee31 100644 --- a/src/test/ui/feature-gate-thread_local.stderr +++ b/src/test/ui/feature-gate-thread_local.stderr @@ -1,4 +1,4 @@ -error: `#[thread_local]` is an experimental feature, and does not currently handle destructors. There is no corresponding `#[task_local]` mapping to the task model (see issue #29594) +error[E0658]: `#[thread_local]` is an experimental feature, and does not currently handle destructors. There is no corresponding `#[task_local]` mapping to the task model (see issue #29594) --> $DIR/feature-gate-thread_local.rs:18:1 | 18 | #[thread_local] //~ ERROR `#[thread_local]` is an experimental feature diff --git a/src/test/ui/feature-gate-trace_macros.stderr b/src/test/ui/feature-gate-trace_macros.stderr index aca74099b7d99..eae3baa7e4d23 100644 --- a/src/test/ui/feature-gate-trace_macros.stderr +++ b/src/test/ui/feature-gate-trace_macros.stderr @@ -1,4 +1,4 @@ -error: `trace_macros` is not stable enough for use and is subject to change (see issue #29598) +error[E0658]: `trace_macros` is not stable enough for use and is subject to change (see issue #29598) --> $DIR/feature-gate-trace_macros.rs:12:5 | 12 | trace_macros!(true); //~ ERROR: `trace_macros` is not stable diff --git a/src/test/ui/feature-gate-type_ascription.stderr b/src/test/ui/feature-gate-type_ascription.stderr index d2a3ee2cf8f9c..fa6ef84a7f557 100644 --- a/src/test/ui/feature-gate-type_ascription.stderr +++ b/src/test/ui/feature-gate-type_ascription.stderr @@ -1,4 +1,4 @@ -error: type ascription is experimental (see issue #23416) +error[E0658]: type ascription is experimental (see issue #23416) --> $DIR/feature-gate-type_ascription.rs:14:13 | 14 | let a = 10: u8; //~ ERROR type ascription is experimental diff --git a/src/test/ui/feature-gate-unboxed-closures-manual-impls.stderr b/src/test/ui/feature-gate-unboxed-closures-manual-impls.stderr index 280fc12f1a642..ae14054b6e394 100644 --- a/src/test/ui/feature-gate-unboxed-closures-manual-impls.stderr +++ b/src/test/ui/feature-gate-unboxed-closures-manual-impls.stderr @@ -1,4 +1,4 @@ -error: rust-call ABI is subject to change (see issue #29625) +error[E0658]: rust-call ABI is subject to change (see issue #29625) --> $DIR/feature-gate-unboxed-closures-manual-impls.rs:20:5 | 20 | extern "rust-call" fn call(self, args: ()) -> () {} @@ -6,7 +6,7 @@ error: rust-call ABI is subject to change (see issue #29625) | = help: add #![feature(unboxed_closures)] to the crate attributes to enable -error: rust-call ABI is subject to change (see issue #29625) +error[E0658]: rust-call ABI is subject to change (see issue #29625) --> $DIR/feature-gate-unboxed-closures-manual-impls.rs:25:5 | 25 | extern "rust-call" fn call_once(self, args: ()) -> () {} @@ -14,7 +14,7 @@ error: rust-call ABI is subject to change (see issue #29625) | = help: add #![feature(unboxed_closures)] to the crate attributes to enable -error: rust-call ABI is subject to change (see issue #29625) +error[E0658]: rust-call ABI is subject to change (see issue #29625) --> $DIR/feature-gate-unboxed-closures-manual-impls.rs:30:5 | 30 | extern "rust-call" fn call_mut(&self, args: ()) -> () {} @@ -22,7 +22,7 @@ error: rust-call ABI is subject to change (see issue #29625) | = help: add #![feature(unboxed_closures)] to the crate attributes to enable -error: rust-call ABI is subject to change (see issue #29625) +error[E0658]: rust-call ABI is subject to change (see issue #29625) --> $DIR/feature-gate-unboxed-closures-manual-impls.rs:35:5 | 35 | extern "rust-call" fn call_once(&self, args: ()) -> () {} diff --git a/src/test/ui/feature-gate-unboxed-closures-method-calls.stderr b/src/test/ui/feature-gate-unboxed-closures-method-calls.stderr index 1167bf0a6966a..a27b00aaac0fa 100644 --- a/src/test/ui/feature-gate-unboxed-closures-method-calls.stderr +++ b/src/test/ui/feature-gate-unboxed-closures-method-calls.stderr @@ -1,4 +1,4 @@ -error: use of unstable library feature 'fn_traits' (see issue #29625) +error[E0658]: use of unstable library feature 'fn_traits' (see issue #29625) --> $DIR/feature-gate-unboxed-closures-method-calls.rs:14:7 | 14 | f.call(()); //~ ERROR use of unstable library feature 'fn_traits' @@ -6,7 +6,7 @@ error: use of unstable library feature 'fn_traits' (see issue #29625) | = help: add #![feature(fn_traits)] to the crate attributes to enable -error: use of unstable library feature 'fn_traits' (see issue #29625) +error[E0658]: use of unstable library feature 'fn_traits' (see issue #29625) --> $DIR/feature-gate-unboxed-closures-method-calls.rs:15:7 | 15 | f.call_mut(()); //~ ERROR use of unstable library feature 'fn_traits' @@ -14,7 +14,7 @@ error: use of unstable library feature 'fn_traits' (see issue #29625) | = help: add #![feature(fn_traits)] to the crate attributes to enable -error: use of unstable library feature 'fn_traits' (see issue #29625) +error[E0658]: use of unstable library feature 'fn_traits' (see issue #29625) --> $DIR/feature-gate-unboxed-closures-method-calls.rs:16:7 | 16 | f.call_once(()); //~ ERROR use of unstable library feature 'fn_traits' diff --git a/src/test/ui/feature-gate-unboxed-closures-ufcs-calls.stderr b/src/test/ui/feature-gate-unboxed-closures-ufcs-calls.stderr index 7eb491cebfeb9..3d0dd15b07f6c 100644 --- a/src/test/ui/feature-gate-unboxed-closures-ufcs-calls.stderr +++ b/src/test/ui/feature-gate-unboxed-closures-ufcs-calls.stderr @@ -1,4 +1,4 @@ -error: use of unstable library feature 'fn_traits' (see issue #29625) +error[E0658]: use of unstable library feature 'fn_traits' (see issue #29625) --> $DIR/feature-gate-unboxed-closures-ufcs-calls.rs:14:5 | 14 | Fn::call(&f, ()); //~ ERROR use of unstable library feature 'fn_traits' @@ -6,7 +6,7 @@ error: use of unstable library feature 'fn_traits' (see issue #29625) | = help: add #![feature(fn_traits)] to the crate attributes to enable -error: use of unstable library feature 'fn_traits' (see issue #29625) +error[E0658]: use of unstable library feature 'fn_traits' (see issue #29625) --> $DIR/feature-gate-unboxed-closures-ufcs-calls.rs:15:5 | 15 | FnMut::call_mut(&mut f, ()); //~ ERROR use of unstable library feature 'fn_traits' @@ -14,7 +14,7 @@ error: use of unstable library feature 'fn_traits' (see issue #29625) | = help: add #![feature(fn_traits)] to the crate attributes to enable -error: use of unstable library feature 'fn_traits' (see issue #29625) +error[E0658]: use of unstable library feature 'fn_traits' (see issue #29625) --> $DIR/feature-gate-unboxed-closures-ufcs-calls.rs:16:5 | 16 | FnOnce::call_once(f, ()); //~ ERROR use of unstable library feature 'fn_traits' diff --git a/src/test/ui/feature-gate-unboxed-closures.stderr b/src/test/ui/feature-gate-unboxed-closures.stderr index b79165147e590..ca8a59249463d 100644 --- a/src/test/ui/feature-gate-unboxed-closures.stderr +++ b/src/test/ui/feature-gate-unboxed-closures.stderr @@ -1,4 +1,4 @@ -error: rust-call ABI is subject to change (see issue #29625) +error[E0658]: rust-call ABI is subject to change (see issue #29625) --> $DIR/feature-gate-unboxed-closures.rs:16:5 | 16 | / extern "rust-call" fn call_once(self, (a, b): (u32, u32)) -> u32 { diff --git a/src/test/ui/feature-gate-underscore-lifetimes.stderr b/src/test/ui/feature-gate-underscore-lifetimes.stderr index 875b958aa8804..07c5e1ad640fa 100644 --- a/src/test/ui/feature-gate-underscore-lifetimes.stderr +++ b/src/test/ui/feature-gate-underscore-lifetimes.stderr @@ -1,4 +1,4 @@ -error: underscore lifetimes are unstable (see issue #44524) +error[E0658]: underscore lifetimes are unstable (see issue #44524) --> $DIR/feature-gate-underscore-lifetimes.rs:13:23 | 13 | fn foo(x: &u8) -> Foo<'_> { //~ ERROR underscore lifetimes are unstable diff --git a/src/test/ui/feature-gate-universal.stderr b/src/test/ui/feature-gate-universal.stderr index 7f889f9622487..978ce5982bad1 100644 --- a/src/test/ui/feature-gate-universal.stderr +++ b/src/test/ui/feature-gate-universal.stderr @@ -1,4 +1,4 @@ -error: `impl Trait` in argument position is experimental (see issue #34511) +error[E0658]: `impl Trait` in argument position is experimental (see issue #34511) --> $DIR/feature-gate-universal.rs:13:11 | 13 | fn foo(x: impl std::fmt::Debug) { print!("{:?}", x); } diff --git a/src/test/ui/feature-gate-unsized_tuple_coercion.stderr b/src/test/ui/feature-gate-unsized_tuple_coercion.stderr index f166b10613a26..4714df9e96cd2 100644 --- a/src/test/ui/feature-gate-unsized_tuple_coercion.stderr +++ b/src/test/ui/feature-gate-unsized_tuple_coercion.stderr @@ -1,4 +1,4 @@ -error: Unsized tuple coercion is not stable enough for use and is subject to change (see issue #42877) +error[E0658]: Unsized tuple coercion is not stable enough for use and is subject to change (see issue #42877) --> $DIR/feature-gate-unsized_tuple_coercion.rs:12:24 | 12 | let _ : &(Send,) = &((),); diff --git a/src/test/ui/feature-gate-untagged_unions.stderr b/src/test/ui/feature-gate-untagged_unions.stderr index 26b698912bc95..14b66cb5c815a 100644 --- a/src/test/ui/feature-gate-untagged_unions.stderr +++ b/src/test/ui/feature-gate-untagged_unions.stderr @@ -1,4 +1,4 @@ -error: unions with non-`Copy` fields are unstable (see issue #32836) +error[E0658]: unions with non-`Copy` fields are unstable (see issue #32836) --> $DIR/feature-gate-untagged_unions.rs:19:1 | 19 | / union U3 { //~ ERROR unions with non-`Copy` fields are unstable @@ -8,7 +8,7 @@ error: unions with non-`Copy` fields are unstable (see issue #32836) | = help: add #![feature(untagged_unions)] to the crate attributes to enable -error: unions with non-`Copy` fields are unstable (see issue #32836) +error[E0658]: unions with non-`Copy` fields are unstable (see issue #32836) --> $DIR/feature-gate-untagged_unions.rs:23:1 | 23 | / union U4 { //~ ERROR unions with non-`Copy` fields are unstable @@ -18,7 +18,7 @@ error: unions with non-`Copy` fields are unstable (see issue #32836) | = help: add #![feature(untagged_unions)] to the crate attributes to enable -error: unions with `Drop` implementations are unstable (see issue #32836) +error[E0658]: unions with `Drop` implementations are unstable (see issue #32836) --> $DIR/feature-gate-untagged_unions.rs:27:1 | 27 | / union U5 { //~ ERROR unions with `Drop` implementations are unstable diff --git a/src/test/ui/feature-gate-unwind-attributes.stderr b/src/test/ui/feature-gate-unwind-attributes.stderr index 02d8bf914ebf8..d9b555e2634e8 100644 --- a/src/test/ui/feature-gate-unwind-attributes.stderr +++ b/src/test/ui/feature-gate-unwind-attributes.stderr @@ -1,4 +1,4 @@ -error: #[unwind] is experimental +error[E0658]: #[unwind] is experimental --> $DIR/feature-gate-unwind-attributes.rs:21:5 | 21 | #[unwind] //~ ERROR #[unwind] is experimental diff --git a/src/test/ui/feature-gate-use_nested_groups.stderr b/src/test/ui/feature-gate-use_nested_groups.stderr index 79f1d1a168f06..6ae691c384be8 100644 --- a/src/test/ui/feature-gate-use_nested_groups.stderr +++ b/src/test/ui/feature-gate-use_nested_groups.stderr @@ -1,4 +1,4 @@ -error: nested groups in `use` are experimental (see issue #44494) +error[E0658]: nested groups in `use` are experimental (see issue #44494) --> $DIR/feature-gate-use_nested_groups.rs:27:12 | 27 | use a::{B, d::{*, g::H}}; //~ ERROR glob imports in `use` groups are experimental @@ -6,7 +6,7 @@ error: nested groups in `use` are experimental (see issue #44494) | = help: add #![feature(use_nested_groups)] to the crate attributes to enable -error: glob imports in `use` groups are experimental (see issue #44494) +error[E0658]: glob imports in `use` groups are experimental (see issue #44494) --> $DIR/feature-gate-use_nested_groups.rs:27:16 | 27 | use a::{B, d::{*, g::H}}; //~ ERROR glob imports in `use` groups are experimental @@ -14,7 +14,7 @@ error: glob imports in `use` groups are experimental (see issue #44494) | = help: add #![feature(use_nested_groups)] to the crate attributes to enable -error: paths in `use` groups are experimental (see issue #44494) +error[E0658]: paths in `use` groups are experimental (see issue #44494) --> $DIR/feature-gate-use_nested_groups.rs:27:19 | 27 | use a::{B, d::{*, g::H}}; //~ ERROR glob imports in `use` groups are experimental diff --git a/src/test/ui/feature-gate-used.stderr b/src/test/ui/feature-gate-used.stderr index 228cf12a08b4d..6d5ab1fd2c582 100644 --- a/src/test/ui/feature-gate-used.stderr +++ b/src/test/ui/feature-gate-used.stderr @@ -1,4 +1,4 @@ -error: the `#[used]` attribute is an experimental feature (see issue #40289) +error[E0658]: the `#[used]` attribute is an experimental feature (see issue #40289) --> $DIR/feature-gate-used.rs:11:1 | 11 | #[used] diff --git a/src/test/ui/feature-gate-wasm_import_memory.stderr b/src/test/ui/feature-gate-wasm_import_memory.stderr index c0486d0d5f57f..10190ef93f0d9 100644 --- a/src/test/ui/feature-gate-wasm_import_memory.stderr +++ b/src/test/ui/feature-gate-wasm_import_memory.stderr @@ -1,4 +1,4 @@ -error: wasm_import_memory attribute is currently unstable +error[E0658]: wasm_import_memory attribute is currently unstable --> $DIR/feature-gate-wasm_import_memory.rs:11:1 | 11 | #![wasm_import_memory] //~ ERROR: currently unstable diff --git a/src/test/ui/non_modrs_mods/non_modrs_mods.stderr b/src/test/ui/non_modrs_mods/non_modrs_mods.stderr index 95a2539ed646d..f60d2e93e3692 100644 --- a/src/test/ui/non_modrs_mods/non_modrs_mods.stderr +++ b/src/test/ui/non_modrs_mods/non_modrs_mods.stderr @@ -1,4 +1,4 @@ -error: mod statements in non-mod.rs files are unstable (see issue #44660) +error[E0658]: mod statements in non-mod.rs files are unstable (see issue #44660) --> $DIR/modrs_mod/inner_foors_mod.rs:11:9 | 11 | pub mod innest; @@ -7,7 +7,7 @@ error: mod statements in non-mod.rs files are unstable (see issue #44660) = help: add #![feature(non_modrs_mods)] to the crate attributes to enable = help: on stable builds, rename this file to inner_foors_mod/mod.rs -error: mod statements in non-mod.rs files are unstable (see issue #44660) +error[E0658]: mod statements in non-mod.rs files are unstable (see issue #44660) --> $DIR/foors_mod.rs:13:9 | 13 | pub mod inner_modrs_mod; @@ -16,7 +16,7 @@ error: mod statements in non-mod.rs files are unstable (see issue #44660) = help: add #![feature(non_modrs_mods)] to the crate attributes to enable = help: on stable builds, rename this file to foors_mod/mod.rs -error: mod statements in non-mod.rs files are unstable (see issue #44660) +error[E0658]: mod statements in non-mod.rs files are unstable (see issue #44660) --> $DIR/foors_mod.rs:14:9 | 14 | pub mod inner_foors_mod; @@ -25,7 +25,7 @@ error: mod statements in non-mod.rs files are unstable (see issue #44660) = help: add #![feature(non_modrs_mods)] to the crate attributes to enable = help: on stable builds, rename this file to foors_mod/mod.rs -error: mod statements in non-mod.rs files are unstable (see issue #44660) +error[E0658]: mod statements in non-mod.rs files are unstable (see issue #44660) --> $DIR/foors_mod/inner_foors_mod.rs:11:9 | 11 | pub mod innest; diff --git a/src/test/ui/pat-slice-old-style.stderr b/src/test/ui/pat-slice-old-style.stderr index 5e7cd10235d4d..29c41c49cc415 100644 --- a/src/test/ui/pat-slice-old-style.stderr +++ b/src/test/ui/pat-slice-old-style.stderr @@ -1,4 +1,4 @@ -error: non-reference pattern used to match a reference (see issue #42640) +error[E0658]: non-reference pattern used to match a reference (see issue #42640) --> $DIR/pat-slice-old-style.rs:19:9 | 19 | [a, b..] => {}, diff --git a/src/test/ui/rfc-2005-default-binding-mode/suggestion.stderr b/src/test/ui/rfc-2005-default-binding-mode/suggestion.stderr index ebf9e498ffd9e..8aa17adbcb3ab 100644 --- a/src/test/ui/rfc-2005-default-binding-mode/suggestion.stderr +++ b/src/test/ui/rfc-2005-default-binding-mode/suggestion.stderr @@ -1,4 +1,4 @@ -error: non-reference pattern used to match a reference (see issue #42640) +error[E0658]: non-reference pattern used to match a reference (see issue #42640) --> $DIR/suggestion.rs:12:12 | 12 | if let Some(y) = &Some(22) { //~ ERROR non-reference pattern diff --git a/src/test/ui/span/gated-features-attr-spans.stderr b/src/test/ui/span/gated-features-attr-spans.stderr index d067470942e33..74a2c1d742b15 100644 --- a/src/test/ui/span/gated-features-attr-spans.stderr +++ b/src/test/ui/span/gated-features-attr-spans.stderr @@ -1,4 +1,4 @@ -error: the struct `#[repr(align(u16))]` attribute is experimental (see issue #33626) +error[E0658]: the struct `#[repr(align(u16))]` attribute is experimental (see issue #33626) --> $DIR/gated-features-attr-spans.rs:13:1 | 13 | #[repr(align(16))] //~ ERROR is experimental @@ -6,7 +6,7 @@ error: the struct `#[repr(align(u16))]` attribute is experimental (see issue #33 | = help: add #![feature(repr_align)] to the crate attributes to enable -error: SIMD types are experimental and possibly buggy (see issue #27731) +error[E0658]: SIMD types are experimental and possibly buggy (see issue #27731) --> $DIR/gated-features-attr-spans.rs:20:1 | 20 | #[repr(simd)] //~ ERROR are experimental diff --git a/src/test/ui/span/issue-36530.stderr b/src/test/ui/span/issue-36530.stderr index 50908b2ca3970..7f392104393ad 100644 --- a/src/test/ui/span/issue-36530.stderr +++ b/src/test/ui/span/issue-36530.stderr @@ -1,4 +1,4 @@ -error: The attribute `foo` is currently unknown to the compiler and may have meaning added to it in the future (see issue #29642) +error[E0658]: The attribute `foo` is currently unknown to the compiler and may have meaning added to it in the future (see issue #29642) --> $DIR/issue-36530.rs:11:1 | 11 | #[foo] //~ ERROR is currently unknown to the compiler @@ -6,7 +6,7 @@ error: The attribute `foo` is currently unknown to the compiler and may have mea | = help: add #![feature(custom_attribute)] to the crate attributes to enable -error: The attribute `foo` is currently unknown to the compiler and may have meaning added to it in the future (see issue #29642) +error[E0658]: The attribute `foo` is currently unknown to the compiler and may have meaning added to it in the future (see issue #29642) --> $DIR/issue-36530.rs:13:5 | 13 | #![foo] //~ ERROR is currently unknown to the compiler diff --git a/src/test/ui/specialization-feature-gate-default.stderr b/src/test/ui/specialization-feature-gate-default.stderr index e17d13083858e..96e0fe13dc96e 100644 --- a/src/test/ui/specialization-feature-gate-default.stderr +++ b/src/test/ui/specialization-feature-gate-default.stderr @@ -1,4 +1,4 @@ -error: specialization is unstable (see issue #31844) +error[E0658]: specialization is unstable (see issue #31844) --> $DIR/specialization-feature-gate-default.rs:20:5 | 20 | default fn foo(&self) {} //~ ERROR specialization is unstable diff --git a/src/test/ui/suggestions/dont-suggest-dereference-on-arg.stderr b/src/test/ui/suggestions/dont-suggest-dereference-on-arg.stderr index 799d9080b9d18..5413dcddcd7f3 100644 --- a/src/test/ui/suggestions/dont-suggest-dereference-on-arg.stderr +++ b/src/test/ui/suggestions/dont-suggest-dereference-on-arg.stderr @@ -1,4 +1,4 @@ -error: non-reference pattern used to match a reference (see issue #42640) +error[E0658]: non-reference pattern used to match a reference (see issue #42640) --> $DIR/dont-suggest-dereference-on-arg.rs:16:18 | 16 | .filter(|&(ref a, _)| foo(a))