diff --git a/src/Cargo.toml b/src/Cargo.toml index c03301852cd3b..422c6574b5beb 100644 --- a/src/Cargo.toml +++ b/src/Cargo.toml @@ -40,13 +40,10 @@ members = [ "tools/rls/test_data/workspace_symbol", ] -# Curiously, compiletest will segfault if compiled with opt-level=3 on 64-bit -# MSVC when running the compile-fail test suite when a should-fail test panics. -# But hey if this is removed and it gets past the bots, sounds good to me. [profile.release] -opt-level = 2 +opt-level = 3 [profile.bench] -opt-level = 2 +opt-level = 3 # These options are controlled from our rustc wrapper script, so turn them off # here and have them controlled elsewhere. diff --git a/src/bootstrap/bootstrap.py b/src/bootstrap/bootstrap.py index 603a97ddfd412..5966bb65df9c8 100644 --- a/src/bootstrap/bootstrap.py +++ b/src/bootstrap/bootstrap.py @@ -294,7 +294,7 @@ def default_build_triple(): raise ValueError('unknown byteorder: {}'.format(sys.byteorder)) # only the n64 ABI is supported, indicate it ostype += 'abi64' - elif cputype == 'sparcv9' or cputype == 'sparc64': + elif cputype == 'sparc' or cputype == 'sparcv9' or cputype == 'sparc64': pass else: err = "unknown cpu type: {}".format(cputype) diff --git a/src/bootstrap/native.rs b/src/bootstrap/native.rs index 7836ad214edc4..0cf153576560f 100644 --- a/src/bootstrap/native.rs +++ b/src/bootstrap/native.rs @@ -480,9 +480,11 @@ impl Step for Openssl { "mips64el-unknown-linux-gnuabi64" => "linux64-mips64", "mipsel-unknown-linux-gnu" => "linux-mips32", "powerpc-unknown-linux-gnu" => "linux-ppc", + "powerpc-unknown-linux-gnuspe" => "linux-ppc", "powerpc64-unknown-linux-gnu" => "linux-ppc64", "powerpc64le-unknown-linux-gnu" => "linux-ppc64le", "s390x-unknown-linux-gnu" => "linux64-s390x", + "sparc-unknown-linux-gnu" => "linux-sparcv9", "sparc64-unknown-linux-gnu" => "linux64-sparcv9", "sparc64-unknown-netbsd" => "BSD-sparc64", "x86_64-apple-darwin" => "darwin64-x86_64-cc", diff --git a/src/liballoc/binary_heap.rs b/src/liballoc/binary_heap.rs index 3041f85cd4c3a..a5694a90dbc9a 100644 --- a/src/liballoc/binary_heap.rs +++ b/src/liballoc/binary_heap.rs @@ -964,7 +964,7 @@ impl<'a, T> ExactSizeIterator for Iter<'a, T> { } } -#[unstable(feature = "fused", issue = "35602")] +#[stable(feature = "fused", since = "1.25.0")] impl<'a, T> FusedIterator for Iter<'a, T> {} /// An owning iterator over the elements of a `BinaryHeap`. @@ -1019,7 +1019,7 @@ impl ExactSizeIterator for IntoIter { } } -#[unstable(feature = "fused", issue = "35602")] +#[stable(feature = "fused", since = "1.25.0")] impl FusedIterator for IntoIter {} /// A draining iterator over the elements of a `BinaryHeap`. @@ -1065,7 +1065,7 @@ impl<'a, T: 'a> ExactSizeIterator for Drain<'a, T> { } } -#[unstable(feature = "fused", issue = "35602")] +#[stable(feature = "fused", since = "1.25.0")] impl<'a, T: 'a> FusedIterator for Drain<'a, T> {} #[stable(feature = "binary_heap_extras_15", since = "1.5.0")] diff --git a/src/liballoc/boxed.rs b/src/liballoc/boxed.rs index 75a59de337cef..6b000b6fa91ba 100644 --- a/src/liballoc/boxed.rs +++ b/src/liballoc/boxed.rs @@ -722,7 +722,7 @@ impl ExactSizeIterator for Box { } } -#[unstable(feature = "fused", issue = "35602")] +#[stable(feature = "fused", since = "1.25.0")] impl FusedIterator for Box {} diff --git a/src/liballoc/btree/map.rs b/src/liballoc/btree/map.rs index b320bed54320a..8d9de9c1c6454 100644 --- a/src/liballoc/btree/map.rs +++ b/src/liballoc/btree/map.rs @@ -1156,7 +1156,7 @@ impl<'a, K: 'a, V: 'a> Iterator for Iter<'a, K, V> { } } -#[unstable(feature = "fused", issue = "35602")] +#[stable(feature = "fused", since = "1.25.0")] impl<'a, K, V> FusedIterator for Iter<'a, K, V> {} #[stable(feature = "rust1", since = "1.0.0")] @@ -1235,7 +1235,7 @@ impl<'a, K: 'a, V: 'a> ExactSizeIterator for IterMut<'a, K, V> { } } -#[unstable(feature = "fused", issue = "35602")] +#[stable(feature = "fused", since = "1.25.0")] impl<'a, K, V> FusedIterator for IterMut<'a, K, V> {} #[stable(feature = "rust1", since = "1.0.0")] @@ -1365,7 +1365,7 @@ impl ExactSizeIterator for IntoIter { } } -#[unstable(feature = "fused", issue = "35602")] +#[stable(feature = "fused", since = "1.25.0")] impl FusedIterator for IntoIter {} #[stable(feature = "rust1", since = "1.0.0")] @@ -1395,7 +1395,7 @@ impl<'a, K, V> ExactSizeIterator for Keys<'a, K, V> { } } -#[unstable(feature = "fused", issue = "35602")] +#[stable(feature = "fused", since = "1.25.0")] impl<'a, K, V> FusedIterator for Keys<'a, K, V> {} #[stable(feature = "rust1", since = "1.0.0")] @@ -1432,7 +1432,7 @@ impl<'a, K, V> ExactSizeIterator for Values<'a, K, V> { } } -#[unstable(feature = "fused", issue = "35602")] +#[stable(feature = "fused", since = "1.25.0")] impl<'a, K, V> FusedIterator for Values<'a, K, V> {} #[stable(feature = "rust1", since = "1.0.0")] @@ -1482,7 +1482,7 @@ impl<'a, K, V> ExactSizeIterator for ValuesMut<'a, K, V> { } } -#[unstable(feature = "fused", issue = "35602")] +#[stable(feature = "fused", since = "1.25.0")] impl<'a, K, V> FusedIterator for ValuesMut<'a, K, V> {} @@ -1561,7 +1561,7 @@ impl<'a, K, V> Range<'a, K, V> { } } -#[unstable(feature = "fused", issue = "35602")] +#[stable(feature = "fused", since = "1.25.0")] impl<'a, K, V> FusedIterator for Range<'a, K, V> {} #[stable(feature = "btree_range", since = "1.17.0")] @@ -1630,7 +1630,7 @@ impl<'a, K, V> DoubleEndedIterator for RangeMut<'a, K, V> { } } -#[unstable(feature = "fused", issue = "35602")] +#[stable(feature = "fused", since = "1.25.0")] impl<'a, K, V> FusedIterator for RangeMut<'a, K, V> {} impl<'a, K, V> RangeMut<'a, K, V> { diff --git a/src/liballoc/btree/set.rs b/src/liballoc/btree/set.rs index 327eaaf465130..34cb7a08ed706 100644 --- a/src/liballoc/btree/set.rs +++ b/src/liballoc/btree/set.rs @@ -946,7 +946,7 @@ impl<'a, T> ExactSizeIterator for Iter<'a, T> { fn len(&self) -> usize { self.iter.len() } } -#[unstable(feature = "fused", issue = "35602")] +#[stable(feature = "fused", since = "1.25.0")] impl<'a, T> FusedIterator for Iter<'a, T> {} #[stable(feature = "rust1", since = "1.0.0")] @@ -971,7 +971,7 @@ impl ExactSizeIterator for IntoIter { fn len(&self) -> usize { self.iter.len() } } -#[unstable(feature = "fused", issue = "35602")] +#[stable(feature = "fused", since = "1.25.0")] impl FusedIterator for IntoIter {} #[stable(feature = "btree_range", since = "1.17.0")] @@ -997,7 +997,7 @@ impl<'a, T> DoubleEndedIterator for Range<'a, T> { } } -#[unstable(feature = "fused", issue = "35602")] +#[stable(feature = "fused", since = "1.25.0")] impl<'a, T> FusedIterator for Range<'a, T> {} /// Compare `x` and `y`, but return `short` if x is None and `long` if y is None @@ -1044,7 +1044,7 @@ impl<'a, T: Ord> Iterator for Difference<'a, T> { } } -#[unstable(feature = "fused", issue = "35602")] +#[stable(feature = "fused", since = "1.25.0")] impl<'a, T: Ord> FusedIterator for Difference<'a, T> {} #[stable(feature = "rust1", since = "1.0.0")] @@ -1078,7 +1078,7 @@ impl<'a, T: Ord> Iterator for SymmetricDifference<'a, T> { } } -#[unstable(feature = "fused", issue = "35602")] +#[stable(feature = "fused", since = "1.25.0")] impl<'a, T: Ord> FusedIterator for SymmetricDifference<'a, T> {} #[stable(feature = "rust1", since = "1.0.0")] @@ -1116,7 +1116,7 @@ impl<'a, T: Ord> Iterator for Intersection<'a, T> { } } -#[unstable(feature = "fused", issue = "35602")] +#[stable(feature = "fused", since = "1.25.0")] impl<'a, T: Ord> FusedIterator for Intersection<'a, T> {} #[stable(feature = "rust1", since = "1.0.0")] @@ -1150,5 +1150,5 @@ impl<'a, T: Ord> Iterator for Union<'a, T> { } } -#[unstable(feature = "fused", issue = "35602")] +#[stable(feature = "fused", since = "1.25.0")] impl<'a, T: Ord> FusedIterator for Union<'a, T> {} diff --git a/src/liballoc/lib.rs b/src/liballoc/lib.rs index 5139e54b5604a..2e264347ad801 100644 --- a/src/liballoc/lib.rs +++ b/src/liballoc/lib.rs @@ -97,7 +97,6 @@ #![feature(fmt_internals)] #![feature(from_ref)] #![feature(fundamental)] -#![feature(fused)] #![feature(generic_param_attrs)] #![feature(i128_type)] #![feature(inclusive_range)] @@ -126,7 +125,7 @@ #![feature(on_unimplemented)] #![feature(exact_chunks)] -#![cfg_attr(not(test), feature(fused, fn_traits, placement_new_protocol, swap_with_slice, i128))] +#![cfg_attr(not(test), feature(fn_traits, placement_new_protocol, swap_with_slice, i128))] #![cfg_attr(test, feature(test, box_heap))] // Allow testing this library diff --git a/src/liballoc/linked_list.rs b/src/liballoc/linked_list.rs index ec579e3fd68d6..87939fddfc81f 100644 --- a/src/liballoc/linked_list.rs +++ b/src/liballoc/linked_list.rs @@ -897,7 +897,7 @@ impl<'a, T> DoubleEndedIterator for Iter<'a, T> { #[stable(feature = "rust1", since = "1.0.0")] impl<'a, T> ExactSizeIterator for Iter<'a, T> {} -#[unstable(feature = "fused", issue = "35602")] +#[stable(feature = "fused", since = "1.25.0")] impl<'a, T> FusedIterator for Iter<'a, T> {} #[stable(feature = "rust1", since = "1.0.0")] @@ -946,7 +946,7 @@ impl<'a, T> DoubleEndedIterator for IterMut<'a, T> { #[stable(feature = "rust1", since = "1.0.0")] impl<'a, T> ExactSizeIterator for IterMut<'a, T> {} -#[unstable(feature = "fused", issue = "35602")] +#[stable(feature = "fused", since = "1.25.0")] impl<'a, T> FusedIterator for IterMut<'a, T> {} impl<'a, T> IterMut<'a, T> { @@ -1117,7 +1117,7 @@ impl DoubleEndedIterator for IntoIter { #[stable(feature = "rust1", since = "1.0.0")] impl ExactSizeIterator for IntoIter {} -#[unstable(feature = "fused", issue = "35602")] +#[stable(feature = "fused", since = "1.25.0")] impl FusedIterator for IntoIter {} #[stable(feature = "rust1", since = "1.0.0")] diff --git a/src/liballoc/str.rs b/src/liballoc/str.rs index a00e3d17dd00f..1a431bb269420 100644 --- a/src/liballoc/str.rs +++ b/src/liballoc/str.rs @@ -171,7 +171,7 @@ impl<'a> Iterator for EncodeUtf16<'a> { } } -#[unstable(feature = "fused", issue = "35602")] +#[stable(feature = "fused", since = "1.25.0")] impl<'a> FusedIterator for EncodeUtf16<'a> {} #[stable(feature = "rust1", since = "1.0.0")] diff --git a/src/liballoc/string.rs b/src/liballoc/string.rs index 409d2ab287e7c..1fcabd8a4278c 100644 --- a/src/liballoc/string.rs +++ b/src/liballoc/string.rs @@ -2254,5 +2254,5 @@ impl<'a> DoubleEndedIterator for Drain<'a> { } } -#[unstable(feature = "fused", issue = "35602")] +#[stable(feature = "fused", since = "1.25.0")] impl<'a> FusedIterator for Drain<'a> {} diff --git a/src/liballoc/vec.rs b/src/liballoc/vec.rs index 3c9b6b94b4405..03c9750fb3928 100644 --- a/src/liballoc/vec.rs +++ b/src/liballoc/vec.rs @@ -2389,7 +2389,7 @@ impl ExactSizeIterator for IntoIter { } } -#[unstable(feature = "fused", issue = "35602")] +#[stable(feature = "fused", since = "1.25.0")] impl FusedIterator for IntoIter {} #[unstable(feature = "trusted_len", issue = "37572")] @@ -2495,7 +2495,7 @@ impl<'a, T> ExactSizeIterator for Drain<'a, T> { } } -#[unstable(feature = "fused", issue = "35602")] +#[stable(feature = "fused", since = "1.25.0")] impl<'a, T> FusedIterator for Drain<'a, T> {} /// A place for insertion at the back of a `Vec`. diff --git a/src/liballoc/vec_deque.rs b/src/liballoc/vec_deque.rs index 8b686365e6929..3d7549abe6ff5 100644 --- a/src/liballoc/vec_deque.rs +++ b/src/liballoc/vec_deque.rs @@ -1991,7 +1991,7 @@ impl<'a, T> ExactSizeIterator for Iter<'a, T> { } } -#[unstable(feature = "fused", issue = "35602")] +#[stable(feature = "fused", since = "1.25.0")] impl<'a, T> FusedIterator for Iter<'a, T> {} @@ -2084,7 +2084,7 @@ impl<'a, T> ExactSizeIterator for IterMut<'a, T> { } } -#[unstable(feature = "fused", issue = "35602")] +#[stable(feature = "fused", since = "1.25.0")] impl<'a, T> FusedIterator for IterMut<'a, T> {} /// An owning iterator over the elements of a `VecDeque`. @@ -2140,7 +2140,7 @@ impl ExactSizeIterator for IntoIter { } } -#[unstable(feature = "fused", issue = "35602")] +#[stable(feature = "fused", since = "1.25.0")] impl FusedIterator for IntoIter {} /// A draining iterator over the elements of a `VecDeque`. @@ -2247,7 +2247,7 @@ impl<'a, T: 'a> DoubleEndedIterator for Drain<'a, T> { #[stable(feature = "drain", since = "1.6.0")] impl<'a, T: 'a> ExactSizeIterator for Drain<'a, T> {} -#[unstable(feature = "fused", issue = "35602")] +#[stable(feature = "fused", since = "1.25.0")] impl<'a, T: 'a> FusedIterator for Drain<'a, T> {} #[stable(feature = "rust1", since = "1.0.0")] diff --git a/src/libcore/char.rs b/src/libcore/char.rs index 7215bd2a47684..3ff31a7a92815 100644 --- a/src/libcore/char.rs +++ b/src/libcore/char.rs @@ -643,7 +643,7 @@ impl ExactSizeIterator for EscapeUnicode { } } -#[unstable(feature = "fused", issue = "35602")] +#[stable(feature = "fused", since = "1.25.0")] impl FusedIterator for EscapeUnicode {} #[stable(feature = "char_struct_display", since = "1.16.0")] @@ -756,7 +756,7 @@ impl ExactSizeIterator for EscapeDefault { } } -#[unstable(feature = "fused", issue = "35602")] +#[stable(feature = "fused", since = "1.25.0")] impl FusedIterator for EscapeDefault {} #[stable(feature = "char_struct_display", since = "1.16.0")] @@ -790,7 +790,7 @@ impl Iterator for EscapeDebug { #[stable(feature = "char_escape_debug", since = "1.20.0")] impl ExactSizeIterator for EscapeDebug { } -#[unstable(feature = "fused", issue = "35602")] +#[stable(feature = "fused", since = "1.25.0")] impl FusedIterator for EscapeDebug {} #[stable(feature = "char_escape_debug", since = "1.20.0")] @@ -904,5 +904,5 @@ impl> Iterator for DecodeUtf8 { } } -#[unstable(feature = "fused", issue = "35602")] +#[stable(feature = "fused", since = "1.25.0")] impl> FusedIterator for DecodeUtf8 {} diff --git a/src/libcore/iter/mod.rs b/src/libcore/iter/mod.rs index 1a2da83429af9..c95dc5b6bced9 100644 --- a/src/libcore/iter/mod.rs +++ b/src/libcore/iter/mod.rs @@ -344,7 +344,7 @@ pub use self::sources::{Once, once}; pub use self::traits::{FromIterator, IntoIterator, DoubleEndedIterator, Extend}; #[stable(feature = "rust1", since = "1.0.0")] pub use self::traits::{ExactSizeIterator, Sum, Product}; -#[unstable(feature = "fused", issue = "35602")] +#[stable(feature = "fused", since = "1.25.0")] pub use self::traits::FusedIterator; #[unstable(feature = "trusted_len", issue = "37572")] pub use self::traits::TrustedLen; @@ -506,7 +506,7 @@ impl ExactSizeIterator for Rev } } -#[unstable(feature = "fused", issue = "35602")] +#[stable(feature = "fused", since = "1.25.0")] impl FusedIterator for Rev where I: FusedIterator + DoubleEndedIterator {} @@ -589,7 +589,7 @@ impl<'a, I, T: 'a> ExactSizeIterator for Cloned } } -#[unstable(feature = "fused", issue = "35602")] +#[stable(feature = "fused", since = "1.25.0")] impl<'a, I, T: 'a> FusedIterator for Cloned where I: FusedIterator, T: Clone {} @@ -662,7 +662,7 @@ impl Iterator for Cycle where I: Clone + Iterator { } } -#[unstable(feature = "fused", issue = "35602")] +#[stable(feature = "fused", since = "1.25.0")] impl FusedIterator for Cycle where I: Clone + Iterator {} /// An iterator for stepping iterators by a custom amount. @@ -1002,7 +1002,7 @@ impl DoubleEndedIterator for Chain where } // Note: *both* must be fused to handle double-ended iterators. -#[unstable(feature = "fused", issue = "35602")] +#[stable(feature = "fused", since = "1.25.0")] impl FusedIterator for Chain where A: FusedIterator, B: FusedIterator, @@ -1226,7 +1226,7 @@ unsafe impl TrustedRandomAccess for Zip } } -#[unstable(feature = "fused", issue = "35602")] +#[stable(feature = "fused", since = "1.25.0")] impl FusedIterator for Zip where A: FusedIterator, B: FusedIterator, {} @@ -1368,7 +1368,7 @@ impl ExactSizeIterator for Map } } -#[unstable(feature = "fused", issue = "35602")] +#[stable(feature = "fused", since = "1.25.0")] impl FusedIterator for Map where F: FnMut(I::Item) -> B {} @@ -1517,7 +1517,7 @@ impl DoubleEndedIterator for Filter } } -#[unstable(feature = "fused", issue = "35602")] +#[stable(feature = "fused", since = "1.25.0")] impl FusedIterator for Filter where P: FnMut(&I::Item) -> bool {} @@ -1627,7 +1627,7 @@ impl DoubleEndedIterator for FilterMap } } -#[unstable(feature = "fused", issue = "35602")] +#[stable(feature = "fused", since = "1.25.0")] impl FusedIterator for FilterMap where F: FnMut(I::Item) -> Option {} @@ -1782,7 +1782,7 @@ unsafe impl TrustedRandomAccess for Enumerate } } -#[unstable(feature = "fused", issue = "35602")] +#[stable(feature = "fused", since = "1.25.0")] impl FusedIterator for Enumerate where I: FusedIterator {} #[unstable(feature = "trusted_len", issue = "37572")] @@ -1902,7 +1902,7 @@ impl Iterator for Peekable { #[stable(feature = "rust1", since = "1.0.0")] impl ExactSizeIterator for Peekable {} -#[unstable(feature = "fused", issue = "35602")] +#[stable(feature = "fused", since = "1.25.0")] impl FusedIterator for Peekable {} impl Peekable { @@ -2036,7 +2036,7 @@ impl Iterator for SkipWhile } } -#[unstable(feature = "fused", issue = "35602")] +#[stable(feature = "fused", since = "1.25.0")] impl FusedIterator for SkipWhile where I: FusedIterator, P: FnMut(&I::Item) -> bool {} @@ -2115,7 +2115,7 @@ impl Iterator for TakeWhile } } -#[unstable(feature = "fused", issue = "35602")] +#[stable(feature = "fused", since = "1.25.0")] impl FusedIterator for TakeWhile where I: FusedIterator, P: FnMut(&I::Item) -> bool {} @@ -2254,7 +2254,7 @@ impl DoubleEndedIterator for Skip where I: DoubleEndedIterator + ExactSize } } -#[unstable(feature = "fused", issue = "35602")] +#[stable(feature = "fused", since = "1.25.0")] impl FusedIterator for Skip where I: FusedIterator {} /// An iterator that only iterates over the first `n` iterations of `iter`. @@ -2335,7 +2335,7 @@ impl Iterator for Take where I: Iterator{ #[stable(feature = "rust1", since = "1.0.0")] impl ExactSizeIterator for Take where I: ExactSizeIterator {} -#[unstable(feature = "fused", issue = "35602")] +#[stable(feature = "fused", since = "1.25.0")] impl FusedIterator for Take where I: FusedIterator {} #[unstable(feature = "trusted_len", issue = "37572")] @@ -2564,7 +2564,7 @@ impl DoubleEndedIterator for FlatMap wher } } -#[unstable(feature = "fused", issue = "35602")] +#[stable(feature = "fused", since = "1.25.0")] impl FusedIterator for FlatMap where I: FusedIterator, U: IntoIterator, F: FnMut(I::Item) -> U {} @@ -2584,7 +2584,7 @@ pub struct Fuse { done: bool } -#[unstable(feature = "fused", issue = "35602")] +#[stable(feature = "fused", since = "1.25.0")] impl FusedIterator for Fuse where I: Iterator {} #[stable(feature = "rust1", since = "1.0.0")] @@ -2715,7 +2715,7 @@ unsafe impl TrustedRandomAccess for Fuse } } -#[unstable(feature = "fused", issue = "35602")] +#[stable(feature = "fused", since = "1.25.0")] impl Iterator for Fuse where I: FusedIterator { #[inline] fn next(&mut self) -> Option<::Item> { @@ -2757,7 +2757,7 @@ impl Iterator for Fuse where I: FusedIterator { } } -#[unstable(feature = "fused", reason = "recently added", issue = "35602")] +#[stable(feature = "fused", since = "1.25.0")] impl DoubleEndedIterator for Fuse where I: DoubleEndedIterator + FusedIterator { @@ -2901,6 +2901,6 @@ impl ExactSizeIterator for Inspect } } -#[unstable(feature = "fused", issue = "35602")] +#[stable(feature = "fused", since = "1.25.0")] impl FusedIterator for Inspect where F: FnMut(&I::Item) {} diff --git a/src/libcore/iter/range.rs b/src/libcore/iter/range.rs index 65b38c94dda3f..7f3b227e8b733 100644 --- a/src/libcore/iter/range.rs +++ b/src/libcore/iter/range.rs @@ -295,7 +295,7 @@ impl DoubleEndedIterator for ops::Range { } } -#[unstable(feature = "fused", issue = "35602")] +#[stable(feature = "fused", since = "1.25.0")] impl FusedIterator for ops::Range {} #[stable(feature = "rust1", since = "1.0.0")] @@ -322,7 +322,7 @@ impl Iterator for ops::RangeFrom { } } -#[unstable(feature = "fused", issue = "35602")] +#[stable(feature = "fused", since = "1.25.0")] impl FusedIterator for ops::RangeFrom {} #[unstable(feature = "trusted_len", issue = "37572")] @@ -463,5 +463,5 @@ impl DoubleEndedIterator for ops::RangeInclusive { } } -#[unstable(feature = "fused", issue = "35602")] +#[stable(feature = "fused", since = "1.25.0")] impl FusedIterator for ops::RangeInclusive {} diff --git a/src/libcore/iter/sources.rs b/src/libcore/iter/sources.rs index dfd42f3e73301..a9e803b302840 100644 --- a/src/libcore/iter/sources.rs +++ b/src/libcore/iter/sources.rs @@ -41,7 +41,7 @@ impl DoubleEndedIterator for Repeat { fn next_back(&mut self) -> Option { Some(self.element.clone()) } } -#[unstable(feature = "fused", issue = "35602")] +#[stable(feature = "fused", since = "1.25.0")] impl FusedIterator for Repeat {} #[unstable(feature = "trusted_len", issue = "37572")] @@ -135,7 +135,7 @@ impl A> DoubleEndedIterator for RepeatWith { fn next_back(&mut self) -> Option { self.next() } } -#[unstable(feature = "fused", issue = "35602")] +#[stable(feature = "fused", since = "1.25.0")] impl A> FusedIterator for RepeatWith {} #[unstable(feature = "trusted_len", issue = "37572")] @@ -259,7 +259,7 @@ impl ExactSizeIterator for Empty { #[unstable(feature = "trusted_len", issue = "37572")] unsafe impl TrustedLen for Empty {} -#[unstable(feature = "fused", issue = "35602")] +#[stable(feature = "fused", since = "1.25.0")] impl FusedIterator for Empty {} // not #[derive] because that adds a Clone bound on T, @@ -340,7 +340,7 @@ impl ExactSizeIterator for Once { #[unstable(feature = "trusted_len", issue = "37572")] unsafe impl TrustedLen for Once {} -#[unstable(feature = "fused", issue = "35602")] +#[stable(feature = "fused", since = "1.25.0")] impl FusedIterator for Once {} /// Creates an iterator that yields an element exactly once. diff --git a/src/libcore/iter/traits.rs b/src/libcore/iter/traits.rs index 860742d9eab60..a86f4e74706e2 100644 --- a/src/libcore/iter/traits.rs +++ b/src/libcore/iter/traits.rs @@ -959,10 +959,10 @@ impl Product> for Result /// [`None`]: ../../std/option/enum.Option.html#variant.None /// [`Iterator::fuse`]: ../../std/iter/trait.Iterator.html#method.fuse /// [`Fuse`]: ../../std/iter/struct.Fuse.html -#[unstable(feature = "fused", issue = "35602")] +#[stable(feature = "fused", since = "1.25.0")] pub trait FusedIterator: Iterator {} -#[unstable(feature = "fused", issue = "35602")] +#[stable(feature = "fused", since = "1.25.0")] impl<'a, I: FusedIterator + ?Sized> FusedIterator for &'a mut I {} /// An iterator that reports an accurate length using size_hint. diff --git a/src/libcore/option.rs b/src/libcore/option.rs index b8fe28d0f0d71..99c1d7d9b3619 100644 --- a/src/libcore/option.rs +++ b/src/libcore/option.rs @@ -1051,7 +1051,7 @@ impl<'a, A> DoubleEndedIterator for Iter<'a, A> { #[stable(feature = "rust1", since = "1.0.0")] impl<'a, A> ExactSizeIterator for Iter<'a, A> {} -#[unstable(feature = "fused", issue = "35602")] +#[stable(feature = "fused", since = "1.25.0")] impl<'a, A> FusedIterator for Iter<'a, A> {} #[unstable(feature = "trusted_len", issue = "37572")] @@ -1096,7 +1096,7 @@ impl<'a, A> DoubleEndedIterator for IterMut<'a, A> { #[stable(feature = "rust1", since = "1.0.0")] impl<'a, A> ExactSizeIterator for IterMut<'a, A> {} -#[unstable(feature = "fused", issue = "35602")] +#[stable(feature = "fused", since = "1.25.0")] impl<'a, A> FusedIterator for IterMut<'a, A> {} #[unstable(feature = "trusted_len", issue = "37572")] unsafe impl<'a, A> TrustedLen for IterMut<'a, A> {} @@ -1133,7 +1133,7 @@ impl DoubleEndedIterator for IntoIter { #[stable(feature = "rust1", since = "1.0.0")] impl ExactSizeIterator for IntoIter {} -#[unstable(feature = "fused", issue = "35602")] +#[stable(feature = "fused", since = "1.25.0")] impl FusedIterator for IntoIter {} #[unstable(feature = "trusted_len", issue = "37572")] diff --git a/src/libcore/result.rs b/src/libcore/result.rs index 3801db94e15d5..5131fc837ef29 100644 --- a/src/libcore/result.rs +++ b/src/libcore/result.rs @@ -1038,7 +1038,7 @@ impl<'a, T> DoubleEndedIterator for Iter<'a, T> { #[stable(feature = "rust1", since = "1.0.0")] impl<'a, T> ExactSizeIterator for Iter<'a, T> {} -#[unstable(feature = "fused", issue = "35602")] +#[stable(feature = "fused", since = "1.25.0")] impl<'a, T> FusedIterator for Iter<'a, T> {} #[unstable(feature = "trusted_len", issue = "37572")] @@ -1082,7 +1082,7 @@ impl<'a, T> DoubleEndedIterator for IterMut<'a, T> { #[stable(feature = "rust1", since = "1.0.0")] impl<'a, T> ExactSizeIterator for IterMut<'a, T> {} -#[unstable(feature = "fused", issue = "35602")] +#[stable(feature = "fused", since = "1.25.0")] impl<'a, T> FusedIterator for IterMut<'a, T> {} #[unstable(feature = "trusted_len", issue = "37572")] @@ -1125,7 +1125,7 @@ impl DoubleEndedIterator for IntoIter { #[stable(feature = "rust1", since = "1.0.0")] impl ExactSizeIterator for IntoIter {} -#[unstable(feature = "fused", issue = "35602")] +#[stable(feature = "fused", since = "1.25.0")] impl FusedIterator for IntoIter {} #[unstable(feature = "trusted_len", issue = "37572")] diff --git a/src/libcore/slice/mod.rs b/src/libcore/slice/mod.rs index ac390313a6797..d89238fa3f171 100644 --- a/src/libcore/slice/mod.rs +++ b/src/libcore/slice/mod.rs @@ -1461,7 +1461,7 @@ impl<'a, T> ExactSizeIterator for Iter<'a, T> { } } -#[unstable(feature = "fused", issue = "35602")] +#[stable(feature = "fused", since = "1.25.0")] impl<'a, T> FusedIterator for Iter<'a, T> {} #[unstable(feature = "trusted_len", issue = "37572")] @@ -1589,7 +1589,7 @@ impl<'a, T> ExactSizeIterator for IterMut<'a, T> { } } -#[unstable(feature = "fused", issue = "35602")] +#[stable(feature = "fused", since = "1.25.0")] impl<'a, T> FusedIterator for IterMut<'a, T> {} #[unstable(feature = "trusted_len", issue = "37572")] @@ -1737,7 +1737,7 @@ impl<'a, T, P> SplitIter for Split<'a, T, P> where P: FnMut(&T) -> bool { } } -#[unstable(feature = "fused", issue = "35602")] +#[stable(feature = "fused", since = "1.25.0")] impl<'a, T, P> FusedIterator for Split<'a, T, P> where P: FnMut(&T) -> bool {} /// An iterator over the subslices of the vector which are separated @@ -1835,7 +1835,7 @@ impl<'a, T, P> DoubleEndedIterator for SplitMut<'a, T, P> where } } -#[unstable(feature = "fused", issue = "35602")] +#[stable(feature = "fused", since = "1.25.0")] impl<'a, T, P> FusedIterator for SplitMut<'a, T, P> where P: FnMut(&T) -> bool {} /// An iterator over subslices separated by elements that match a predicate @@ -1892,7 +1892,7 @@ impl<'a, T, P> SplitIter for RSplit<'a, T, P> where P: FnMut(&T) -> bool { } } -//#[unstable(feature = "fused", issue = "35602")] +//#[stable(feature = "fused", since = "1.25.0")] #[unstable(feature = "slice_rsplit", issue = "41020")] impl<'a, T, P> FusedIterator for RSplit<'a, T, P> where P: FnMut(&T) -> bool {} @@ -1951,7 +1951,7 @@ impl<'a, T, P> DoubleEndedIterator for RSplitMut<'a, T, P> where } } -//#[unstable(feature = "fused", issue = "35602")] +//#[stable(feature = "fused", since = "1.25.0")] #[unstable(feature = "slice_rsplit", issue = "41020")] impl<'a, T, P> FusedIterator for RSplitMut<'a, T, P> where P: FnMut(&T) -> bool {} @@ -2088,7 +2088,7 @@ macro_rules! forward_iterator { } } - #[unstable(feature = "fused", issue = "35602")] + #[stable(feature = "fused", since = "1.25.0")] impl<'a, $elem, P> FusedIterator for $name<'a, $elem, P> where P: FnMut(&T) -> bool {} } @@ -2194,7 +2194,7 @@ impl<'a, T> DoubleEndedIterator for Windows<'a, T> { #[stable(feature = "rust1", since = "1.0.0")] impl<'a, T> ExactSizeIterator for Windows<'a, T> {} -#[unstable(feature = "fused", issue = "35602")] +#[stable(feature = "fused", since = "1.25.0")] impl<'a, T> FusedIterator for Windows<'a, T> {} #[doc(hidden)] @@ -2313,7 +2313,7 @@ impl<'a, T> DoubleEndedIterator for Chunks<'a, T> { #[stable(feature = "rust1", since = "1.0.0")] impl<'a, T> ExactSizeIterator for Chunks<'a, T> {} -#[unstable(feature = "fused", issue = "35602")] +#[stable(feature = "fused", since = "1.25.0")] impl<'a, T> FusedIterator for Chunks<'a, T> {} #[doc(hidden)] @@ -2429,7 +2429,7 @@ impl<'a, T> DoubleEndedIterator for ChunksMut<'a, T> { #[stable(feature = "rust1", since = "1.0.0")] impl<'a, T> ExactSizeIterator for ChunksMut<'a, T> {} -#[unstable(feature = "fused", issue = "35602")] +#[stable(feature = "fused", since = "1.25.0")] impl<'a, T> FusedIterator for ChunksMut<'a, T> {} #[doc(hidden)] @@ -2539,7 +2539,7 @@ impl<'a, T> ExactSizeIterator for ExactChunks<'a, T> { } } -#[unstable(feature = "fused", issue = "35602")] +#[stable(feature = "fused", since = "1.25.0")] impl<'a, T> FusedIterator for ExactChunks<'a, T> {} #[doc(hidden)] @@ -2636,7 +2636,7 @@ impl<'a, T> ExactSizeIterator for ExactChunksMut<'a, T> { } } -#[unstable(feature = "fused", issue = "35602")] +#[stable(feature = "fused", since = "1.25.0")] impl<'a, T> FusedIterator for ExactChunksMut<'a, T> {} #[doc(hidden)] diff --git a/src/libcore/str/mod.rs b/src/libcore/str/mod.rs index 765b369e4b25d..7e919b653f21e 100644 --- a/src/libcore/str/mod.rs +++ b/src/libcore/str/mod.rs @@ -609,7 +609,7 @@ impl<'a> DoubleEndedIterator for Chars<'a> { } } -#[unstable(feature = "fused", issue = "35602")] +#[stable(feature = "fused", since = "1.25.0")] impl<'a> FusedIterator for Chars<'a> {} impl<'a> Chars<'a> { @@ -702,7 +702,7 @@ impl<'a> DoubleEndedIterator for CharIndices<'a> { } } -#[unstable(feature = "fused", issue = "35602")] +#[stable(feature = "fused", since = "1.25.0")] impl<'a> FusedIterator for CharIndices<'a> {} impl<'a> CharIndices<'a> { @@ -817,7 +817,7 @@ impl<'a> ExactSizeIterator for Bytes<'a> { } } -#[unstable(feature = "fused", issue = "35602")] +#[stable(feature = "fused", since = "1.25.0")] impl<'a> FusedIterator for Bytes<'a> {} #[unstable(feature = "trusted_len", issue = "37572")] @@ -977,10 +977,10 @@ macro_rules! generate_pattern_iterators { } } - #[unstable(feature = "fused", issue = "35602")] + #[stable(feature = "fused", since = "1.25.0")] impl<'a, P: Pattern<'a>> FusedIterator for $forward_iterator<'a, P> {} - #[unstable(feature = "fused", issue = "35602")] + #[stable(feature = "fused", since = "1.25.0")] impl<'a, P: Pattern<'a>> FusedIterator for $reverse_iterator<'a, P> where P::Searcher: ReverseSearcher<'a> {} @@ -1337,7 +1337,7 @@ impl<'a> DoubleEndedIterator for Lines<'a> { } } -#[unstable(feature = "fused", issue = "35602")] +#[stable(feature = "fused", since = "1.25.0")] impl<'a> FusedIterator for Lines<'a> {} /// Created with the method [`lines_any`]. @@ -1403,7 +1403,7 @@ impl<'a> DoubleEndedIterator for LinesAny<'a> { } } -#[unstable(feature = "fused", issue = "35602")] +#[stable(feature = "fused", since = "1.25.0")] #[allow(deprecated)] impl<'a> FusedIterator for LinesAny<'a> {} diff --git a/src/librustc/session/config.rs b/src/librustc/session/config.rs index cfbf233297cf8..919badfa4aa5e 100644 --- a/src/librustc/session/config.rs +++ b/src/librustc/session/config.rs @@ -1322,6 +1322,8 @@ options! {DebuggingOptions, DebuggingSetter, basic_debugging_options, epoch). Crates compiled with different epochs can be linked together."), run_dsymutil: Option = (None, parse_opt_bool, [TRACKED], "run `dsymutil` and delete intermediate object files"), + ui_testing: bool = (false, parse_bool, [UNTRACKED], + "format compiler diagnostics in a way that's better suitable for UI testing"), } pub fn default_lib_output() -> CrateType { diff --git a/src/librustc/session/mod.rs b/src/librustc/session/mod.rs index 9d7a9acc3d533..ed89bf0d806a9 100644 --- a/src/librustc/session/mod.rs +++ b/src/librustc/session/mod.rs @@ -919,11 +919,13 @@ pub fn build_session_with_codemap(sopts: config::Options, } (config::ErrorOutputType::Json(pretty), None) => { Box::new(JsonEmitter::stderr(Some(registry), codemap.clone(), - pretty, sopts.debugging_opts.approximate_suggestions)) + pretty, sopts.debugging_opts.approximate_suggestions) + .ui_testing(sopts.debugging_opts.ui_testing)) } (config::ErrorOutputType::Json(pretty), Some(dst)) => { Box::new(JsonEmitter::new(dst, Some(registry), codemap.clone(), - pretty, sopts.debugging_opts.approximate_suggestions)) + pretty, sopts.debugging_opts.approximate_suggestions) + .ui_testing(sopts.debugging_opts.ui_testing)) } (config::ErrorOutputType::Short(color_config), None) => { Box::new(EmitterWriter::stderr(color_config, Some(codemap.clone()), true, false)) diff --git a/src/librustc_back/target/mod.rs b/src/librustc_back/target/mod.rs index 2872c59157d6b..2f3d72f2c4b6a 100644 --- a/src/librustc_back/target/mod.rs +++ b/src/librustc_back/target/mod.rs @@ -143,9 +143,11 @@ supported_targets! { ("mips64el-unknown-linux-gnuabi64", mips64el_unknown_linux_gnuabi64), ("mipsel-unknown-linux-gnu", mipsel_unknown_linux_gnu), ("powerpc-unknown-linux-gnu", powerpc_unknown_linux_gnu), + ("powerpc-unknown-linux-gnuspe", powerpc_unknown_linux_gnuspe), ("powerpc64-unknown-linux-gnu", powerpc64_unknown_linux_gnu), ("powerpc64le-unknown-linux-gnu", powerpc64le_unknown_linux_gnu), ("s390x-unknown-linux-gnu", s390x_unknown_linux_gnu), + ("sparc-unknown-linux-gnu", sparc_unknown_linux_gnu), ("sparc64-unknown-linux-gnu", sparc64_unknown_linux_gnu), ("arm-unknown-linux-gnueabi", arm_unknown_linux_gnueabi), ("arm-unknown-linux-gnueabihf", arm_unknown_linux_gnueabihf), diff --git a/src/librustc_back/target/powerpc_unknown_linux_gnuspe.rs b/src/librustc_back/target/powerpc_unknown_linux_gnuspe.rs new file mode 100644 index 0000000000000..ffcc321749b5a --- /dev/null +++ b/src/librustc_back/target/powerpc_unknown_linux_gnuspe.rs @@ -0,0 +1,35 @@ +// 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. + +use LinkerFlavor; +use target::{Target, TargetResult}; + +pub fn target() -> TargetResult { + let mut base = super::linux_base::opts(); + base.pre_link_args.get_mut(&LinkerFlavor::Gcc).unwrap().push("-mspe".to_string()); + base.max_atomic_width = Some(32); + + // see #36994 + base.exe_allocation_crate = None; + + Ok(Target { + llvm_target: "powerpc-unknown-linux-gnuspe".to_string(), + target_endian: "big".to_string(), + target_pointer_width: "32".to_string(), + target_c_int_width: "32".to_string(), + data_layout: "E-m:e-p:32:32-i64:64-n32".to_string(), + arch: "powerpc".to_string(), + target_os: "linux".to_string(), + target_env: "gnu".to_string(), + target_vendor: "unknown".to_string(), + linker_flavor: LinkerFlavor::Gcc, + options: base, + }) +} diff --git a/src/librustc_back/target/sparc_unknown_linux_gnu.rs b/src/librustc_back/target/sparc_unknown_linux_gnu.rs new file mode 100644 index 0000000000000..a03e6937b2ca7 --- /dev/null +++ b/src/librustc_back/target/sparc_unknown_linux_gnu.rs @@ -0,0 +1,34 @@ +// 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. + +use LinkerFlavor; +use target::{Target, TargetResult}; + +pub fn target() -> TargetResult { + let mut base = super::linux_base::opts(); + base.cpu = "v9".to_string(); + base.max_atomic_width = Some(64); + base.pre_link_args.get_mut(&LinkerFlavor::Gcc).unwrap().push("-mv8plus".to_string()); + base.exe_allocation_crate = None; + + Ok(Target { + llvm_target: "sparc-unknown-linux-gnu".to_string(), + target_endian: "big".to_string(), + target_pointer_width: "32".to_string(), + target_c_int_width: "32".to_string(), + data_layout: "E-m:e-p:32:32-i64:64-f128:64-n32-S64".to_string(), + arch: "sparc".to_string(), + target_os: "linux".to_string(), + target_env: "gnu".to_string(), + target_vendor: "unknown".to_string(), + linker_flavor: LinkerFlavor::Gcc, + options: base, + }) +} diff --git a/src/librustc_errors/emitter.rs b/src/librustc_errors/emitter.rs index a49284eb55a46..a5e1fd63f976e 100644 --- a/src/librustc_errors/emitter.rs +++ b/src/librustc_errors/emitter.rs @@ -25,6 +25,8 @@ use std::collections::HashMap; use std::cmp::min; use unicode_width; +const ANONYMIZED_LINE_NUM: &str = "LL"; + /// Emitter trait for emitting errors. pub trait Emitter { /// Emit a structured diagnostic. @@ -107,6 +109,7 @@ pub struct EmitterWriter { cm: Option>, short_message: bool, teach: bool, + ui_testing: bool, } struct FileWithAnnotatedLines { @@ -128,6 +131,7 @@ impl EmitterWriter { cm: code_map, short_message, teach, + ui_testing: false, } } else { EmitterWriter { @@ -135,6 +139,7 @@ impl EmitterWriter { cm: code_map, short_message, teach, + ui_testing: false, } } } @@ -149,6 +154,19 @@ impl EmitterWriter { cm: code_map, short_message, teach, + ui_testing: false, + } + } + + pub fn ui_testing(self, ui_testing: bool) -> Self { + Self { ui_testing, ..self } + } + + fn maybe_anonymized(&self, line_num: usize) -> String { + if self.ui_testing { + ANONYMIZED_LINE_NUM.to_string() + } else { + line_num.to_string() } } @@ -305,7 +323,7 @@ impl EmitterWriter { buffer.puts(line_offset, code_offset, &source_string, Style::Quotation); buffer.puts(line_offset, 0, - &(line.line_index.to_string()), + &self.maybe_anonymized(line.line_index), Style::LineNumber); draw_col_separator(buffer, line_offset, width_offset - 2); @@ -1126,8 +1144,8 @@ impl EmitterWriter { buffer.puts(last_buffer_line_num, 0, - &(annotated_file.lines[line_idx + 1].line_index - 1) - .to_string(), + &self.maybe_anonymized(annotated_file.lines[line_idx + 1] + .line_index - 1), Style::LineNumber); draw_col_separator(&mut buffer, last_buffer_line_num, @@ -1201,7 +1219,7 @@ impl EmitterWriter { // Print the span column to avoid confusion buffer.puts(row_num, 0, - &((line_start + line_pos).to_string()), + &self.maybe_anonymized(line_start + line_pos), Style::LineNumber); // print the suggestion draw_col_separator(&mut buffer, row_num, max_line_num_len + 1); @@ -1253,8 +1271,11 @@ impl EmitterWriter { span: &MultiSpan, children: &Vec, suggestions: &[CodeSuggestion]) { - let max_line_num = self.get_max_line_num(span, children); - let max_line_num_len = max_line_num.to_string().len(); + let max_line_num_len = if self.ui_testing { + ANONYMIZED_LINE_NUM.len() + } else { + self.get_max_line_num(span, children).to_string().len() + }; match self.emit_message_default(span, message, diff --git a/src/librustc_trans/abi.rs b/src/librustc_trans/abi.rs index 12698964d2e65..ee0f2415bd808 100644 --- a/src/librustc_trans/abi.rs +++ b/src/librustc_trans/abi.rs @@ -40,7 +40,7 @@ use rustc::ty::layout::{self, Align, Size, TyLayout}; use rustc::ty::layout::{HasDataLayout, LayoutOf}; use libc::c_uint; -use std::{cmp, iter}; +use std::cmp; pub use syntax::abi::Abi; pub use rustc::ty::layout::{FAT_PTR_ADDR, FAT_PTR_EXTRA}; @@ -279,30 +279,6 @@ impl Uniform { pub fn align(&self, cx: &CodegenCx) -> Align { self.unit.align(cx) } - - pub fn llvm_type(&self, cx: &CodegenCx) -> Type { - let llunit = self.unit.llvm_type(cx); - - if self.total <= self.unit.size { - return llunit; - } - - let count = self.total.bytes() / self.unit.size.bytes(); - let rem_bytes = self.total.bytes() % self.unit.size.bytes(); - - if rem_bytes == 0 { - return Type::array(&llunit, count); - } - - // Only integers can be really split further. - assert_eq!(self.unit.kind, RegKind::Integer); - - let args: Vec<_> = (0..count).map(|_| llunit) - .chain(iter::once(Type::ix(cx, rem_bytes * 8))) - .collect(); - - Type::struct_(cx, &args, false) - } } pub trait LayoutExt<'tcx> { @@ -405,55 +381,81 @@ impl<'tcx> LayoutExt<'tcx> for TyLayout<'tcx> { } #[derive(Clone, Copy, PartialEq, Eq, Debug)] -pub enum CastTarget { - Uniform(Uniform), - Pair(Reg, Reg) +pub struct CastTarget { + pub prefix: [Option; 8], + pub prefix_chunk: Size, + pub rest: Uniform, } impl From for CastTarget { fn from(unit: Reg) -> CastTarget { - CastTarget::Uniform(Uniform::from(unit)) + CastTarget::from(Uniform::from(unit)) } } impl From for CastTarget { fn from(uniform: Uniform) -> CastTarget { - CastTarget::Uniform(uniform) + CastTarget { + prefix: [None; 8], + prefix_chunk: Size::from_bytes(0), + rest: uniform + } } } impl CastTarget { - pub fn size(&self, cx: &CodegenCx) -> Size { - match *self { - CastTarget::Uniform(u) => u.total, - CastTarget::Pair(a, b) => { - (a.size.abi_align(a.align(cx)) + b.size) - .abi_align(self.align(cx)) - } + pub fn pair(a: Reg, b: Reg) -> CastTarget { + CastTarget { + prefix: [Some(a.kind), None, None, None, None, None, None, None], + prefix_chunk: a.size, + rest: Uniform::from(b) } } + pub fn size(&self, cx: &CodegenCx) -> Size { + (self.prefix_chunk * self.prefix.iter().filter(|x| x.is_some()).count() as u64) + .abi_align(self.rest.align(cx)) + self.rest.total + } + pub fn align(&self, cx: &CodegenCx) -> Align { - match *self { - CastTarget::Uniform(u) => u.align(cx), - CastTarget::Pair(a, b) => { - cx.data_layout().aggregate_align - .max(a.align(cx)) - .max(b.align(cx)) - } - } + self.prefix.iter() + .filter_map(|x| x.map(|kind| Reg { kind: kind, size: self.prefix_chunk }.align(cx))) + .fold(cx.data_layout().aggregate_align.max(self.rest.align(cx)), + |acc, align| acc.max(align)) } pub fn llvm_type(&self, cx: &CodegenCx) -> Type { - match *self { - CastTarget::Uniform(u) => u.llvm_type(cx), - CastTarget::Pair(a, b) => { - Type::struct_(cx, &[ - a.llvm_type(cx), - b.llvm_type(cx) - ], false) + let rest_ll_unit = self.rest.unit.llvm_type(cx); + let rest_count = self.rest.total.bytes() / self.rest.unit.size.bytes(); + let rem_bytes = self.rest.total.bytes() % self.rest.unit.size.bytes(); + + if self.prefix.iter().all(|x| x.is_none()) { + // Simplify to a single unit when there is no prefix and size <= unit size + if self.rest.total <= self.rest.unit.size { + return rest_ll_unit; + } + + // Simplify to array when all chunks are the same size and type + if rem_bytes == 0 { + return Type::array(&rest_ll_unit, rest_count); } } + + // Create list of fields in the main structure + let mut args: Vec<_> = + self.prefix.iter().flat_map(|option_kind| option_kind.map( + |kind| Reg { kind: kind, size: self.prefix_chunk }.llvm_type(cx))) + .chain((0..rest_count).map(|_| rest_ll_unit)) + .collect(); + + // Append final integer + if rem_bytes != 0 { + // Only integers can be really split further. + assert_eq!(self.rest.unit.kind, RegKind::Integer); + args.push(Type::ix(cx, rem_bytes * 8)); + } + + Type::struct_(cx, &args, false) } } diff --git a/src/librustc_trans/cabi_mips64.rs b/src/librustc_trans/cabi_mips64.rs index e44063faab810..94bf53cee1edb 100644 --- a/src/librustc_trans/cabi_mips64.rs +++ b/src/librustc_trans/cabi_mips64.rs @@ -8,50 +8,160 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -use abi::{ArgType, FnType, LayoutExt, Reg, Uniform}; +use abi::{ArgAttribute, ArgType, CastTarget, FnType, LayoutExt, PassMode, Reg, RegKind, Uniform}; use context::CodegenCx; +use rustc::ty::layout::{self, Size}; -use rustc::ty::layout::Size; +fn extend_integer_width_mips(arg: &mut ArgType, bits: u64) { + // Always sign extend u32 values on 64-bit mips + if let layout::Abi::Scalar(ref scalar) = arg.layout.abi { + if let layout::Int(i, signed) = scalar.value { + if !signed && i.size().bits() == 32 { + if let PassMode::Direct(ref mut attrs) = arg.mode { + attrs.set(ArgAttribute::SExt); + return; + } + } + } + } + + arg.extend_integer_width_to(bits); +} + +fn bits_to_int_reg(bits: u64) -> Reg { + if bits <= 8 { + Reg::i8() + } else if bits <= 16 { + Reg::i16() + } else if bits <= 32 { + Reg::i32() + } else { + Reg::i64() + } +} -fn classify_ret_ty<'a, 'tcx>(cx: &CodegenCx<'a, 'tcx>, - ret: &mut ArgType<'tcx>, - offset: &mut Size) { +fn float_reg<'a, 'tcx>(cx: &CodegenCx<'a, 'tcx>, ret: &ArgType<'tcx>, i: usize) -> Option { + match ret.layout.field(cx, i).abi { + layout::Abi::Scalar(ref scalar) => match scalar.value { + layout::F32 => Some(Reg::f32()), + layout::F64 => Some(Reg::f64()), + _ => None + }, + _ => None + } +} + +fn classify_ret_ty<'a, 'tcx>(cx: &CodegenCx<'a, 'tcx>, ret: &mut ArgType<'tcx>) { if !ret.layout.is_aggregate() { - ret.extend_integer_width_to(64); + extend_integer_width_mips(ret, 64); + return; + } + + let size = ret.layout.size; + let bits = size.bits(); + if bits <= 128 { + // Unlike other architectures which return aggregates in registers, MIPS n64 limits the + // use of float registers to structures (not unions) containing exactly one or two + // float fields. + + if let layout::FieldPlacement::Arbitrary { .. } = ret.layout.fields { + if ret.layout.fields.count() == 1 { + if let Some(reg) = float_reg(cx, ret, 0) { + ret.cast_to(reg); + return; + } + } else if ret.layout.fields.count() == 2 { + if let Some(reg0) = float_reg(cx, ret, 0) { + if let Some(reg1) = float_reg(cx, ret, 1) { + ret.cast_to(CastTarget::pair(reg0, reg1)); + return; + } + } + } + } + + // Cast to a uniform int structure + ret.cast_to(Uniform { + unit: bits_to_int_reg(bits), + total: size + }); } else { ret.make_indirect(); - *offset += cx.tcx.data_layout.pointer_size; } } -fn classify_arg_ty(cx: &CodegenCx, arg: &mut ArgType, offset: &mut Size) { +fn classify_arg_ty<'a, 'tcx>(cx: &CodegenCx<'a, 'tcx>, arg: &mut ArgType<'tcx>) { + if !arg.layout.is_aggregate() { + extend_integer_width_mips(arg, 64); + return; + } + let dl = &cx.tcx.data_layout; let size = arg.layout.size; - let align = arg.layout.align.max(dl.i32_align).min(dl.i64_align); + let mut prefix = [None; 8]; + let mut prefix_index = 0; - if arg.layout.is_aggregate() { - arg.cast_to(Uniform { - unit: Reg::i64(), - total: size - }); - if !offset.is_abi_aligned(align) { - arg.pad_with(Reg::i64()); + match arg.layout.fields { + layout::FieldPlacement::Array { .. } => { + // Arrays are passed indirectly + arg.make_indirect(); + return; } - } else { - arg.extend_integer_width_to(64); - } + layout::FieldPlacement::Union(_) => { + // Unions and are always treated as a series of 64-bit integer chunks + }, + layout::FieldPlacement::Arbitrary { .. } => { + // Structures are split up into a series of 64-bit integer chunks, but any aligned + // doubles not part of another aggregate are passed as floats. + let mut last_offset = Size::from_bytes(0); + + for i in 0..arg.layout.fields.count() { + let field = arg.layout.field(cx, i); + let offset = arg.layout.fields.offset(i); + + // We only care about aligned doubles + if let layout::Abi::Scalar(ref scalar) = field.abi { + if let layout::F64 = scalar.value { + if offset.is_abi_aligned(dl.f64_align) { + // Insert enough integers to cover [last_offset, offset) + assert!(last_offset.is_abi_aligned(dl.f64_align)); + for _ in 0..((offset - last_offset).bits() / 64) + .min((prefix.len() - prefix_index) as u64) { + + prefix[prefix_index] = Some(RegKind::Integer); + prefix_index += 1; + } + + if prefix_index == prefix.len() { + break; + } + + prefix[prefix_index] = Some(RegKind::Float); + prefix_index += 1; + last_offset = offset + Reg::f64().size; + } + } + } + } + } + }; - *offset = offset.abi_align(align) + size.abi_align(align); + // Extract first 8 chunks as the prefix + let rest_size = size - Size::from_bytes(8) * prefix_index as u64; + arg.cast_to(CastTarget { + prefix: prefix, + prefix_chunk: Size::from_bytes(8), + rest: Uniform { unit: Reg::i64(), total: rest_size } + }); } pub fn compute_abi_info<'a, 'tcx>(cx: &CodegenCx<'a, 'tcx>, fty: &mut FnType<'tcx>) { - let mut offset = Size::from_bytes(0); if !fty.ret.is_ignore() { - classify_ret_ty(cx, &mut fty.ret, &mut offset); + classify_ret_ty(cx, &mut fty.ret); } for arg in &mut fty.args { if arg.is_ignore() { continue; } - classify_arg_ty(cx, arg, &mut offset); + classify_arg_ty(cx, arg); } } diff --git a/src/librustc_trans/cabi_x86_64.rs b/src/librustc_trans/cabi_x86_64.rs index b8144a3ca7a3e..7eadaa7f493a3 100644 --- a/src/librustc_trans/cabi_x86_64.rs +++ b/src/librustc_trans/cabi_x86_64.rs @@ -171,7 +171,7 @@ fn cast_target(cls: &[Option], size: Size) -> CastTarget { let mut target = CastTarget::from(lo); if size > offset { if let Some(hi) = reg_component(cls, &mut i, size - offset) { - target = CastTarget::Pair(lo, hi); + target = CastTarget::pair(lo, hi); } } assert_eq!(reg_component(cls, &mut i, Size::from_bytes(0)), None); diff --git a/src/librustc_trans/llvm_util.rs b/src/librustc_trans/llvm_util.rs index b25562252e72e..6271dcdfb2433 100644 --- a/src/librustc_trans/llvm_util.rs +++ b/src/librustc_trans/llvm_util.rs @@ -75,26 +75,25 @@ unsafe fn configure_llvm(sess: &Session) { llvm_args.as_ptr()); } -// WARNING: the features must be known to LLVM or the feature -// detection code will walk past the end of the feature array, -// leading to crashes. +// WARNING: the features after applying `to_llvm_feature` must be known +// to LLVM or the feature detection code will walk past the end of the feature +// array, leading to crashes. const ARM_WHITELIST: &'static [&'static str] = &["neon", "v7", "vfp2", "vfp3", "vfp4"]; const AARCH64_WHITELIST: &'static [&'static str] = &["neon", "v7"]; -const X86_WHITELIST: &'static [&'static str] = &["avx", "avx2", "bmi", "bmi2", "sse", - "sse2", "sse3", "sse4.1", "sse4.2", - "ssse3", "tbm", "lzcnt", "popcnt", - "sse4a", "rdrnd", "rdseed", "fma", - "xsave", "xsaveopt", "xsavec", - "xsaves", "aes", "pclmulqdq", - "avx512bw", "avx512cd", - "avx512dq", "avx512er", - "avx512f", "avx512ifma", - "avx512pf", "avx512vbmi", - "avx512vl", "avx512vpopcntdq", - "mmx", "fxsr"]; +const X86_WHITELIST: &'static [&'static str] = &["aes", "avx", "avx2", "avx512bw", + "avx512cd", "avx512dq", "avx512er", + "avx512f", "avx512ifma", "avx512pf", + "avx512vbmi", "avx512vl", "avx512vpopcntdq", + "bmi", "bmi2", "fma", "fxsr", + "lzcnt", "mmx", "pclmulqdq", + "popcnt", "rdrand", "rdseed", + "sse", "sse2", "sse3", "sse4.1", + "sse4.2", "sse4a", "ssse3", + "tbm", "xsave", "xsavec", + "xsaveopt", "xsaves"]; const HEXAGON_WHITELIST: &'static [&'static str] = &["hvx", "hvx-double"]; @@ -108,6 +107,7 @@ const MIPS_WHITELIST: &'static [&'static str] = &["msa"]; pub fn to_llvm_feature(s: &str) -> &str { match s { "pclmulqdq" => "pclmul", + "rdrand" => "rdrnd", s => s, } } diff --git a/src/librustdoc/html/static/main.js b/src/librustdoc/html/static/main.js index 5c674cabde5d8..aa09e93e61ac1 100644 --- a/src/librustdoc/html/static/main.js +++ b/src/librustdoc/html/static/main.js @@ -297,9 +297,9 @@ document.onkeydown = handleShortcut; document.onclick = function(ev) { if (hasClass(ev.target, 'collapse-toggle')) { - collapseDocs(ev.target); + collapseDocs(ev.target, "toggle"); } else if (hasClass(ev.target.parentNode, 'collapse-toggle')) { - collapseDocs(ev.target.parentNode); + collapseDocs(ev.target.parentNode, "toggle"); } else if (ev.target.tagName === 'SPAN' && hasClass(ev.target.parentNode, 'line-numbers')) { var prev_id = 0; @@ -1636,19 +1636,8 @@ e.innerHTML = labelForToggleButton(false); }); toggle.title = "collapse all docs"; - onEach(document.getElementsByClassName("docblock"), function(e) { - e.style.display = 'block'; - }); - onEach(document.getElementsByClassName("toggle-label"), function(e) { - e.style.display = 'none'; - }); - onEach(document.getElementsByClassName("toggle-wrapper"), function(e) { - removeClass(e, "collapsed"); - }); onEach(document.getElementsByClassName("collapse-toggle"), function(e) { - onEveryMatchingChild(e, "inner", function(i_e) { - i_e.innerHTML = labelForToggleButton(false); - }); + collapseDocs(e, "show"); }); } else { addClass(toggle, "will-expand"); @@ -1656,56 +1645,134 @@ e.innerHTML = labelForToggleButton(true); }); toggle.title = "expand all docs"; - onEach(document.getElementsByClassName("docblock"), function(e) { - e.style.display = 'none'; - }); - onEach(document.getElementsByClassName("toggle-label"), function(e) { - e.style.display = 'inline-block'; - }); - onEach(document.getElementsByClassName("toggle-wrapper"), function(e) { - addClass(e, "collapsed"); - }); + onEach(document.getElementsByClassName("collapse-toggle"), function(e) { - onEveryMatchingChild(e, "inner", function(i_e) { - i_e.innerHTML = labelForToggleButton(true); - }); + collapseDocs(e, "hide"); }); } } - function collapseDocs(toggle) { + function collapseDocs(toggle, mode) { if (!toggle || !toggle.parentNode) { return; } - var relatedDoc = toggle.parentNode.nextElementSibling; - if (hasClass(relatedDoc, "stability")) { - relatedDoc = relatedDoc.nextElementSibling; - } - if (hasClass(relatedDoc, "docblock")) { - if (!isHidden(relatedDoc)) { - relatedDoc.style.display = 'none'; - onEach(toggle.childNodes, function(e) { - if (hasClass(e, 'toggle-label')) { + + function adjustToggle(arg) { + return function(e) { + if (hasClass(e, 'toggle-label')) { + if (arg) { e.style.display = 'inline-block'; + } else { + e.style.display = 'none'; } - if (hasClass(e, 'inner')) { - e.innerHTML = labelForToggleButton(true); + } + if (hasClass(e, 'inner')) { + e.innerHTML = labelForToggleButton(arg); + } + }; + }; + + if (!hasClass(toggle.parentNode, "impl")) { + var relatedDoc = toggle.parentNode.nextElementSibling; + if (hasClass(relatedDoc, "stability")) { + relatedDoc = relatedDoc.nextElementSibling; + } + if (hasClass(relatedDoc, "docblock")) { + var action = mode; + if (action === "toggle") { + if (hasClass(relatedDoc, "hidden-by-usual-hider")) { + action = "show"; + } else { + action = "hide"; } - }); - addClass(toggle.parentNode, 'collapsed'); - } else { - relatedDoc.style.display = 'block'; - removeClass(toggle.parentNode, 'collapsed'); - onEach(toggle.childNodes, function(e) { - if (hasClass(e, 'toggle-label')) { - e.style.display = 'none'; + } + if (action === "hide") { + addClass(relatedDoc, "hidden-by-usual-hider"); + onEach(toggle.childNodes, adjustToggle(true)); + addClass(toggle.parentNode, 'collapsed'); + } else if (action === "show") { + removeClass(relatedDoc, "hidden-by-usual-hider"); + removeClass(toggle.parentNode, 'collapsed'); + onEach(toggle.childNodes, adjustToggle(false)); + } + } + } else { + // we are collapsing the impl block + function implHider(addOrRemove) { + return function(n) { + if (hasClass(n, "method")) { + if (addOrRemove) { + addClass(n, "hidden-by-impl-hider"); + } else { + removeClass(n, "hidden-by-impl-hider"); + } + var ns = n.nextElementSibling; + while (true) { + if (ns && ( + hasClass(ns, "docblock") || + hasClass(ns, "stability") || + false + )) { + if (addOrRemove) { + addClass(ns, "hidden-by-impl-hider"); + } else { + removeClass(ns, "hidden-by-impl-hider"); + } + ns = ns.nextElementSibling; + continue; + } + break; + } } - if (hasClass(e, 'inner')) { - e.innerHTML = labelForToggleButton(false); + } + } + + var relatedDoc = toggle.parentNode; + + while (!hasClass(relatedDoc, "impl-items")) { + relatedDoc = relatedDoc.nextElementSibling; + } + + if (!relatedDoc) { + return; + } + + // Hide all functions, but not associated types/consts + + var action = mode; + if (action === "toggle") { + if (hasClass(relatedDoc, "fns-now-collapsed")) { + action = "show"; + } else { + action = "hide"; + } + } + + if (action === "show") { + removeClass(relatedDoc, "fns-now-collapsed"); + onEach(toggle.childNodes, adjustToggle(false)); + onEach(relatedDoc.childNodes, implHider(false)); + } else if (action === "hide") { + addClass(relatedDoc, "fns-now-collapsed"); + onEach(toggle.childNodes, adjustToggle(true)); + onEach(relatedDoc.childNodes, implHider(true)); + } + } + } + + function autoCollapseAllImpls() { + // Automatically minimize all non-inherent impls + onEach(document.getElementsByClassName('impl'), function(n) { + // inherent impl ids are like 'impl' or impl-' + var inherent = (n.id.match(/^impl(?:-\d+)?$/) !== null); + if (!inherent) { + onEach(n.childNodes, function(m) { + if (hasClass(m, "collapse-toggle")) { + collapseDocs(m, "hide"); } }); } - } + }); } var x = document.getElementById('toggle-all-docs'); @@ -1732,8 +1799,12 @@ hasClass(next.nextElementSibling, 'docblock'))) { insertAfter(toggle.cloneNode(true), e.childNodes[e.childNodes.length - 1]); } + if (hasClass(e, 'impl')) { + insertAfter(toggle.cloneNode(true), e.childNodes[e.childNodes.length - 1]); + } } onEach(document.getElementsByClassName('method'), func); + onEach(document.getElementsByClassName('impl'), func); onEach(document.getElementsByClassName('impl-items'), function(e) { onEach(e.getElementsByClassName('associatedconstant'), func); }); @@ -1781,6 +1852,8 @@ } }) + autoCollapseAllImpls(); + function createToggleWrapper() { var span = document.createElement('span'); span.className = 'toggle-label'; @@ -1821,7 +1894,7 @@ onEach(document.getElementById('main').getElementsByTagName('pre'), function(e) { onEach(e.getElementsByClassName('attributes'), function(i_e) { i_e.parentNode.insertBefore(createToggleWrapper(), i_e); - collapseDocs(i_e.previousSibling.childNodes[0]); + collapseDocs(i_e.previousSibling.childNodes[0], "toggle"); }); }); diff --git a/src/librustdoc/html/static/rustdoc.css b/src/librustdoc/html/static/rustdoc.css index cd4f2cfa678e6..d91e0679ed02d 100644 --- a/src/librustdoc/html/static/rustdoc.css +++ b/src/librustdoc/html/static/rustdoc.css @@ -110,6 +110,7 @@ h3.impl, h3.method, h4.method, h3.type, h4.type, h4.associatedconstant { } h3.impl, h3.method, h3.type { margin-top: 15px; + padding-left: 15px; } h1, h2, h3, h4, @@ -522,10 +523,10 @@ a { .anchor { display: none; position: absolute; - left: -25px; + left: -7px; } .anchor.field { - left: -20px; + left: -5px; } .anchor:before { content: '\2002\00a7\2002'; @@ -926,6 +927,10 @@ span.since { .content .impl-items .method, .content .impl-items > .type, .impl-items > .associatedconstant { display: flex; } + + .anchor { + display: none !important; + } } @media print { @@ -1083,6 +1088,14 @@ h4 > .important-traits { z-index: -1; border-bottom: 1px solid; } + + .collapse-toggle { + left: -20px; + } + + .impl > .collapse-toggle { + left: -10px; + } } @@ -1228,3 +1241,9 @@ kbd { z-index: 1; } } + +.hidden-by-impl-hider, +.hidden-by-usual-hider { + /* important because of conflicting rule for small screens */ + display: none !important; +} diff --git a/src/libstd/ascii.rs b/src/libstd/ascii.rs index 82e1a3447dc5d..77c945a817a94 100644 --- a/src/libstd/ascii.rs +++ b/src/libstd/ascii.rs @@ -590,7 +590,7 @@ impl DoubleEndedIterator for EscapeDefault { } #[stable(feature = "rust1", since = "1.0.0")] impl ExactSizeIterator for EscapeDefault {} -#[unstable(feature = "fused", issue = "35602")] +#[stable(feature = "fused", since = "1.25.0")] impl FusedIterator for EscapeDefault {} #[stable(feature = "std_debug", since = "1.16.0")] diff --git a/src/libstd/collections/hash/map.rs b/src/libstd/collections/hash/map.rs index a82ff915093c6..ae5bba67d26ed 100644 --- a/src/libstd/collections/hash/map.rs +++ b/src/libstd/collections/hash/map.rs @@ -1750,7 +1750,7 @@ impl<'a, K, V> ExactSizeIterator for Iter<'a, K, V> { } } -#[unstable(feature = "fused", issue = "35602")] +#[stable(feature = "fused", since = "1.25.0")] impl<'a, K, V> FusedIterator for Iter<'a, K, V> {} #[stable(feature = "rust1", since = "1.0.0")] @@ -1773,7 +1773,7 @@ impl<'a, K, V> ExactSizeIterator for IterMut<'a, K, V> { self.inner.len() } } -#[unstable(feature = "fused", issue = "35602")] +#[stable(feature = "fused", since = "1.25.0")] impl<'a, K, V> FusedIterator for IterMut<'a, K, V> {} #[stable(feature = "std_debug", since = "1.16.0")] @@ -1808,7 +1808,7 @@ impl ExactSizeIterator for IntoIter { self.inner.len() } } -#[unstable(feature = "fused", issue = "35602")] +#[stable(feature = "fused", since = "1.25.0")] impl FusedIterator for IntoIter {} #[stable(feature = "std_debug", since = "1.16.0")] @@ -1840,7 +1840,7 @@ impl<'a, K, V> ExactSizeIterator for Keys<'a, K, V> { self.inner.len() } } -#[unstable(feature = "fused", issue = "35602")] +#[stable(feature = "fused", since = "1.25.0")] impl<'a, K, V> FusedIterator for Keys<'a, K, V> {} #[stable(feature = "rust1", since = "1.0.0")] @@ -1863,7 +1863,7 @@ impl<'a, K, V> ExactSizeIterator for Values<'a, K, V> { self.inner.len() } } -#[unstable(feature = "fused", issue = "35602")] +#[stable(feature = "fused", since = "1.25.0")] impl<'a, K, V> FusedIterator for Values<'a, K, V> {} #[stable(feature = "map_values_mut", since = "1.10.0")] @@ -1886,7 +1886,7 @@ impl<'a, K, V> ExactSizeIterator for ValuesMut<'a, K, V> { self.inner.len() } } -#[unstable(feature = "fused", issue = "35602")] +#[stable(feature = "fused", since = "1.25.0")] impl<'a, K, V> FusedIterator for ValuesMut<'a, K, V> {} #[stable(feature = "std_debug", since = "1.16.0")] @@ -1921,7 +1921,7 @@ impl<'a, K, V> ExactSizeIterator for Drain<'a, K, V> { self.inner.len() } } -#[unstable(feature = "fused", issue = "35602")] +#[stable(feature = "fused", since = "1.25.0")] impl<'a, K, V> FusedIterator for Drain<'a, K, V> {} #[stable(feature = "std_debug", since = "1.16.0")] diff --git a/src/libstd/collections/hash/set.rs b/src/libstd/collections/hash/set.rs index e9427fb40a016..7a46603b2db50 100644 --- a/src/libstd/collections/hash/set.rs +++ b/src/libstd/collections/hash/set.rs @@ -1097,7 +1097,7 @@ impl<'a, K> ExactSizeIterator for Iter<'a, K> { self.iter.len() } } -#[unstable(feature = "fused", issue = "35602")] +#[stable(feature = "fused", since = "1.25.0")] impl<'a, K> FusedIterator for Iter<'a, K> {} #[stable(feature = "std_debug", since = "1.16.0")] @@ -1124,7 +1124,7 @@ impl ExactSizeIterator for IntoIter { self.iter.len() } } -#[unstable(feature = "fused", issue = "35602")] +#[stable(feature = "fused", since = "1.25.0")] impl FusedIterator for IntoIter {} #[stable(feature = "std_debug", since = "1.16.0")] @@ -1155,7 +1155,7 @@ impl<'a, K> ExactSizeIterator for Drain<'a, K> { self.iter.len() } } -#[unstable(feature = "fused", issue = "35602")] +#[stable(feature = "fused", since = "1.25.0")] impl<'a, K> FusedIterator for Drain<'a, K> {} #[stable(feature = "std_debug", since = "1.16.0")] @@ -1208,7 +1208,7 @@ impl<'a, T, S> fmt::Debug for Intersection<'a, T, S> } } -#[unstable(feature = "fused", issue = "35602")] +#[stable(feature = "fused", since = "1.25.0")] impl<'a, T, S> FusedIterator for Intersection<'a, T, S> where T: Eq + Hash, S: BuildHasher @@ -1244,7 +1244,7 @@ impl<'a, T, S> Iterator for Difference<'a, T, S> } } -#[unstable(feature = "fused", issue = "35602")] +#[stable(feature = "fused", since = "1.25.0")] impl<'a, T, S> FusedIterator for Difference<'a, T, S> where T: Eq + Hash, S: BuildHasher @@ -1283,7 +1283,7 @@ impl<'a, T, S> Iterator for SymmetricDifference<'a, T, S> } } -#[unstable(feature = "fused", issue = "35602")] +#[stable(feature = "fused", since = "1.25.0")] impl<'a, T, S> FusedIterator for SymmetricDifference<'a, T, S> where T: Eq + Hash, S: BuildHasher @@ -1307,7 +1307,7 @@ impl<'a, T, S> Clone for Union<'a, T, S> { } } -#[unstable(feature = "fused", issue = "35602")] +#[stable(feature = "fused", since = "1.25.0")] impl<'a, T, S> FusedIterator for Union<'a, T, S> where T: Eq + Hash, S: BuildHasher diff --git a/src/libstd/lib.rs b/src/libstd/lib.rs index d7d856fe3ad06..82c4443a45e6d 100644 --- a/src/libstd/lib.rs +++ b/src/libstd/lib.rs @@ -266,7 +266,6 @@ #![feature(float_from_str_radix)] #![feature(fn_traits)] #![feature(fnbox)] -#![feature(fused)] #![feature(generic_param_attrs)] #![feature(hashmap_hasher)] #![feature(heap_api)] diff --git a/src/libstd/net/tcp.rs b/src/libstd/net/tcp.rs index 263a2c13249b4..7931d14ed1166 100644 --- a/src/libstd/net/tcp.rs +++ b/src/libstd/net/tcp.rs @@ -1545,6 +1545,26 @@ mod tests { drop(listener); } + // Ensure the `set_read_timeout` and `set_write_timeout` calls return errors + // when passed zero Durations + #[test] + fn test_timeout_zero_duration() { + let addr = next_test_ip4(); + + let listener = t!(TcpListener::bind(&addr)); + let stream = t!(TcpStream::connect(&addr)); + + let result = stream.set_write_timeout(Some(Duration::new(0, 0))); + let err = result.unwrap_err(); + assert_eq!(err.kind(), ErrorKind::InvalidInput); + + let result = stream.set_read_timeout(Some(Duration::new(0, 0))); + let err = result.unwrap_err(); + assert_eq!(err.kind(), ErrorKind::InvalidInput); + + drop(listener); + } + #[test] fn nodelay() { let addr = next_test_ip4(); diff --git a/src/libstd/net/udp.rs b/src/libstd/net/udp.rs index 5e19519b88fd5..b49cc78ac4073 100644 --- a/src/libstd/net/udp.rs +++ b/src/libstd/net/udp.rs @@ -1024,6 +1024,23 @@ mod tests { assert!(start.elapsed() > Duration::from_millis(400)); } + // Ensure the `set_read_timeout` and `set_write_timeout` calls return errors + // when passed zero Durations + #[test] + fn test_timeout_zero_duration() { + let addr = next_test_ip4(); + + let socket = t!(UdpSocket::bind(&addr)); + + let result = socket.set_write_timeout(Some(Duration::new(0, 0))); + let err = result.unwrap_err(); + assert_eq!(err.kind(), ErrorKind::InvalidInput); + + let result = socket.set_read_timeout(Some(Duration::new(0, 0))); + let err = result.unwrap_err(); + assert_eq!(err.kind(), ErrorKind::InvalidInput); + } + #[test] fn connect_send_recv() { let addr = next_test_ip4(); diff --git a/src/libstd/path.rs b/src/libstd/path.rs index 4bbad30a5a315..9c5204824ffe5 100644 --- a/src/libstd/path.rs +++ b/src/libstd/path.rs @@ -905,7 +905,7 @@ impl<'a> DoubleEndedIterator for Iter<'a> { } } -#[unstable(feature = "fused", issue = "35602")] +#[stable(feature = "fused", since = "1.25.0")] impl<'a> FusedIterator for Iter<'a> {} #[stable(feature = "rust1", since = "1.0.0")] @@ -1008,7 +1008,7 @@ impl<'a> DoubleEndedIterator for Components<'a> { } } -#[unstable(feature = "fused", issue = "35602")] +#[stable(feature = "fused", since = "1.25.0")] impl<'a> FusedIterator for Components<'a> {} #[stable(feature = "rust1", since = "1.0.0")] diff --git a/src/libstd/sync/condvar.rs b/src/libstd/sync/condvar.rs index 54bb65136508b..3014283da5b27 100644 --- a/src/libstd/sync/condvar.rs +++ b/src/libstd/sync/condvar.rs @@ -14,7 +14,7 @@ use sync::{mutex, MutexGuard, PoisonError}; use sys_common::condvar as sys; use sys_common::mutex as sys_mutex; use sys_common::poison::{self, LockResult}; -use time::Duration; +use time::{Duration, Instant}; /// A type indicating whether a timed wait on a condition variable returned /// due to a time out or not. @@ -221,6 +221,64 @@ impl Condvar { } } + /// Blocks the current thread until this condition variable receives a + /// notification and the required condition is met. Spurious wakeups are + /// ignored and this function will only return once the condition has been + /// met. + /// + /// This function will atomically unlock the mutex specified (represented by + /// `guard`) and block the current thread. This means that any calls + /// to [`notify_one`] or [`notify_all`] which happen logically after the + /// mutex is unlocked are candidates to wake this thread up. When this + /// function call returns, the lock specified will have been re-acquired. + /// + /// # Errors + /// + /// This function will return an error if the mutex being waited on is + /// poisoned when this thread re-acquires the lock. For more information, + /// see information about [poisoning] on the [`Mutex`] type. + /// + /// [`notify_one`]: #method.notify_one + /// [`notify_all`]: #method.notify_all + /// [poisoning]: ../sync/struct.Mutex.html#poisoning + /// [`Mutex`]: ../sync/struct.Mutex.html + /// + /// # Examples + /// + /// ``` + /// #![feature(wait_until)] + /// + /// use std::sync::{Arc, Mutex, Condvar}; + /// use std::thread; + /// + /// let pair = Arc::new((Mutex::new(false), Condvar::new())); + /// let pair2 = pair.clone(); + /// + /// thread::spawn(move|| { + /// let &(ref lock, ref cvar) = &*pair2; + /// let mut started = lock.lock().unwrap(); + /// *started = true; + /// // We notify the condvar that the value has changed. + /// cvar.notify_one(); + /// }); + /// + /// // Wait for the thread to start up. + /// let &(ref lock, ref cvar) = &*pair; + /// // As long as the value inside the `Mutex` is false, we wait. + /// let _guard = cvar.wait_until(lock.lock().unwrap(), |started| { *started }).unwrap(); + /// ``` + #[unstable(feature = "wait_until", issue = "47960")] + pub fn wait_until<'a, T, F>(&self, mut guard: MutexGuard<'a, T>, + mut condition: F) + -> LockResult> + where F: FnMut(&mut T) -> bool { + while !condition(&mut *guard) { + guard = self.wait(guard)?; + } + Ok(guard) + } + + /// Waits on this condition variable for a notification, timing out after a /// specified duration. /// @@ -295,7 +353,15 @@ impl Condvar { /// /// Note that the best effort is made to ensure that the time waited is /// measured with a monotonic clock, and not affected by the changes made to - /// the system time. + /// the system time. This function is susceptible to spurious wakeups. + /// Condition variables normally have a boolean predicate associated with + /// them, and the predicate must always be checked each time this function + /// returns to protect against spurious wakeups. Additionally, it is + /// typically desirable for the time-out to not exceed some duration in + /// spite of spurious wakes, thus the sleep-duration is decremented by the + /// amount slept. Alternatively, use the `wait_timeout_until` method + /// to wait until a condition is met with a total time-out regardless + /// of spurious wakes. /// /// The returned [`WaitTimeoutResult`] value indicates if the timeout is /// known to have elapsed. @@ -304,6 +370,7 @@ impl Condvar { /// returns, regardless of whether the timeout elapsed or not. /// /// [`wait`]: #method.wait + /// [`wait_timeout_until`]: #method.wait_timeout_until /// [`WaitTimeoutResult`]: struct.WaitTimeoutResult.html /// /// # Examples @@ -355,6 +422,80 @@ impl Condvar { } } + /// Waits on this condition variable for a notification, timing out after a + /// specified duration. Spurious wakes will not cause this function to + /// return. + /// + /// The semantics of this function are equivalent to [`wait_until`] except + /// that the thread will be blocked for roughly no longer than `dur`. This + /// method should not be used for precise timing due to anomalies such as + /// preemption or platform differences that may not cause the maximum + /// amount of time waited to be precisely `dur`. + /// + /// Note that the best effort is made to ensure that the time waited is + /// measured with a monotonic clock, and not affected by the changes made to + /// the system time. + /// + /// The returned [`WaitTimeoutResult`] value indicates if the timeout is + /// known to have elapsed without the condition being met. + /// + /// Like [`wait_until`], the lock specified will be re-acquired when this + /// function returns, regardless of whether the timeout elapsed or not. + /// + /// [`wait_until`]: #method.wait_until + /// [`wait_timeout`]: #method.wait_timeout + /// [`WaitTimeoutResult`]: struct.WaitTimeoutResult.html + /// + /// # Examples + /// + /// ``` + /// #![feature(wait_timeout_until)] + /// + /// use std::sync::{Arc, Mutex, Condvar}; + /// use std::thread; + /// use std::time::Duration; + /// + /// let pair = Arc::new((Mutex::new(false), Condvar::new())); + /// let pair2 = pair.clone(); + /// + /// thread::spawn(move|| { + /// let &(ref lock, ref cvar) = &*pair2; + /// let mut started = lock.lock().unwrap(); + /// *started = true; + /// // We notify the condvar that the value has changed. + /// cvar.notify_one(); + /// }); + /// + /// // wait for the thread to start up + /// let &(ref lock, ref cvar) = &*pair; + /// let result = cvar.wait_timeout_until( + /// lock.lock().unwrap(), + /// Duration::from_millis(100), + /// |&mut started| started, + /// ).unwrap(); + /// if result.1.timed_out() { + /// // timed-out without the condition ever evaluating to true. + /// } + /// // access the locked mutex via result.0 + /// ``` + #[unstable(feature = "wait_timeout_until", issue = "47960")] + pub fn wait_timeout_until<'a, T, F>(&self, mut guard: MutexGuard<'a, T>, + dur: Duration, mut condition: F) + -> LockResult<(MutexGuard<'a, T>, WaitTimeoutResult)> + where F: FnMut(&mut T) -> bool { + let start = Instant::now(); + loop { + if condition(&mut *guard) { + return Ok((guard, WaitTimeoutResult(false))); + } + let timeout = match dur.checked_sub(start.elapsed()) { + Some(timeout) => timeout, + None => return Ok((guard, WaitTimeoutResult(true))), + }; + guard = self.wait_timeout(guard, timeout)?.0; + } + } + /// Wakes up one blocked thread on this condvar. /// /// If there is a blocked thread on this condition variable, then it will @@ -480,6 +621,7 @@ impl Drop for Condvar { #[cfg(test)] mod tests { + /// #![feature(wait_until)] use sync::mpsc::channel; use sync::{Condvar, Mutex, Arc}; use sync::atomic::{AtomicBool, Ordering}; @@ -548,6 +690,29 @@ mod tests { } } + #[test] + #[cfg_attr(target_os = "emscripten", ignore)] + fn wait_until() { + let pair = Arc::new((Mutex::new(false), Condvar::new())); + let pair2 = pair.clone(); + + // Inside of our lock, spawn a new thread, and then wait for it to start. + thread::spawn(move|| { + let &(ref lock, ref cvar) = &*pair2; + let mut started = lock.lock().unwrap(); + *started = true; + // We notify the condvar that the value has changed. + cvar.notify_one(); + }); + + // Wait for the thread to start up. + let &(ref lock, ref cvar) = &*pair; + let guard = cvar.wait_until(lock.lock().unwrap(), |started| { + *started + }); + assert!(*guard.unwrap()); + } + #[test] #[cfg_attr(target_os = "emscripten", ignore)] fn wait_timeout_wait() { @@ -567,6 +732,53 @@ mod tests { } } + #[test] + #[cfg_attr(target_os = "emscripten", ignore)] + fn wait_timeout_until_wait() { + let m = Arc::new(Mutex::new(())); + let c = Arc::new(Condvar::new()); + + let g = m.lock().unwrap(); + let (_g, wait) = c.wait_timeout_until(g, Duration::from_millis(1), |_| { false }).unwrap(); + // no spurious wakeups. ensure it timed-out + assert!(wait.timed_out()); + } + + #[test] + #[cfg_attr(target_os = "emscripten", ignore)] + fn wait_timeout_until_instant_satisfy() { + let m = Arc::new(Mutex::new(())); + let c = Arc::new(Condvar::new()); + + let g = m.lock().unwrap(); + let (_g, wait) = c.wait_timeout_until(g, Duration::from_millis(0), |_| { true }).unwrap(); + // ensure it didn't time-out even if we were not given any time. + assert!(!wait.timed_out()); + } + + #[test] + #[cfg_attr(target_os = "emscripten", ignore)] + fn wait_timeout_until_wake() { + let pair = Arc::new((Mutex::new(false), Condvar::new())); + let pair_copy = pair.clone(); + + let &(ref m, ref c) = &*pair; + let g = m.lock().unwrap(); + let _t = thread::spawn(move || { + let &(ref lock, ref cvar) = &*pair_copy; + let mut started = lock.lock().unwrap(); + thread::sleep(Duration::from_millis(1)); + *started = true; + cvar.notify_one(); + }); + let (g2, wait) = c.wait_timeout_until(g, Duration::from_millis(u64::MAX), |&mut notified| { + notified + }).unwrap(); + // ensure it didn't time-out even if we were not given any time. + assert!(!wait.timed_out()); + assert!(*g2); + } + #[test] #[cfg_attr(target_os = "emscripten", ignore)] fn wait_timeout_wake() { diff --git a/src/libstd/sys/redox/net/tcp.rs b/src/libstd/sys/redox/net/tcp.rs index 319965ab3965e..ffdcebf9c2f43 100644 --- a/src/libstd/sys/redox/net/tcp.rs +++ b/src/libstd/sys/redox/net/tcp.rs @@ -130,6 +130,10 @@ impl TcpStream { pub fn set_read_timeout(&self, duration_option: Option) -> Result<()> { let file = self.0.dup(b"read_timeout")?; if let Some(duration) = duration_option { + if dur.as_secs() == 0 && dur.subsec_nanos() == 0 { + return Err(io::Error::new(io::ErrorKind::InvalidInput, + "cannot set a 0 duration timeout")); + } file.write(&TimeSpec { tv_sec: duration.as_secs() as i64, tv_nsec: duration.subsec_nanos() as i32 @@ -143,6 +147,10 @@ impl TcpStream { pub fn set_write_timeout(&self, duration_option: Option) -> Result<()> { let file = self.0.dup(b"write_timeout")?; if let Some(duration) = duration_option { + if dur.as_secs() == 0 && dur.subsec_nanos() == 0 { + return Err(io::Error::new(io::ErrorKind::InvalidInput, + "cannot set a 0 duration timeout")); + } file.write(&TimeSpec { tv_sec: duration.as_secs() as i64, tv_nsec: duration.subsec_nanos() as i32 diff --git a/src/libstd/sys/redox/net/udp.rs b/src/libstd/sys/redox/net/udp.rs index 7e7666e7ef364..65a8286a0e8f9 100644 --- a/src/libstd/sys/redox/net/udp.rs +++ b/src/libstd/sys/redox/net/udp.rs @@ -179,6 +179,10 @@ impl UdpSocket { pub fn set_read_timeout(&self, duration_option: Option) -> Result<()> { let file = self.0.dup(b"read_timeout")?; if let Some(duration) = duration_option { + if dur.as_secs() == 0 && dur.subsec_nanos() == 0 { + return Err(io::Error::new(io::ErrorKind::InvalidInput, + "cannot set a 0 duration timeout")); + } file.write(&TimeSpec { tv_sec: duration.as_secs() as i64, tv_nsec: duration.subsec_nanos() as i32 @@ -192,6 +196,10 @@ impl UdpSocket { pub fn set_write_timeout(&self, duration_option: Option) -> Result<()> { let file = self.0.dup(b"write_timeout")?; if let Some(duration) = duration_option { + if dur.as_secs() == 0 && dur.subsec_nanos() == 0 { + return Err(io::Error::new(io::ErrorKind::InvalidInput, + "cannot set a 0 duration timeout")); + } file.write(&TimeSpec { tv_sec: duration.as_secs() as i64, tv_nsec: duration.subsec_nanos() as i32 diff --git a/src/libstd/sys/unix/ext/net.rs b/src/libstd/sys/unix/ext/net.rs index 31bdc5ea1f565..ab4aef1a58234 100644 --- a/src/libstd/sys/unix/ext/net.rs +++ b/src/libstd/sys/unix/ext/net.rs @@ -1410,7 +1410,7 @@ impl IntoRawFd for UnixDatagram { #[cfg(all(test, not(target_os = "emscripten")))] mod test { use thread; - use io; + use io::{self, ErrorKind}; use io::prelude::*; use time::Duration; use sys_common::io::test::tmpdir; @@ -1613,6 +1613,27 @@ mod test { assert!(kind == io::ErrorKind::WouldBlock || kind == io::ErrorKind::TimedOut); } + // Ensure the `set_read_timeout` and `set_write_timeout` calls return errors + // when passed zero Durations + #[test] + fn test_unix_stream_timeout_zero_duration() { + let dir = tmpdir(); + let socket_path = dir.path().join("sock"); + + let listener = or_panic!(UnixListener::bind(&socket_path)); + let stream = or_panic!(UnixStream::connect(&socket_path)); + + let result = stream.set_write_timeout(Some(Duration::new(0, 0))); + let err = result.unwrap_err(); + assert_eq!(err.kind(), ErrorKind::InvalidInput); + + let result = stream.set_read_timeout(Some(Duration::new(0, 0))); + let err = result.unwrap_err(); + assert_eq!(err.kind(), ErrorKind::InvalidInput); + + drop(listener); + } + #[test] fn test_unix_datagram() { let dir = tmpdir(); @@ -1712,6 +1733,24 @@ mod test { thread.join().unwrap(); } + // Ensure the `set_read_timeout` and `set_write_timeout` calls return errors + // when passed zero Durations + #[test] + fn test_unix_datagram_timeout_zero_duration() { + let dir = tmpdir(); + let path = dir.path().join("sock"); + + let datagram = or_panic!(UnixDatagram::bind(&path)); + + let result = datagram.set_write_timeout(Some(Duration::new(0, 0))); + let err = result.unwrap_err(); + assert_eq!(err.kind(), ErrorKind::InvalidInput); + + let result = datagram.set_read_timeout(Some(Duration::new(0, 0))); + let err = result.unwrap_err(); + assert_eq!(err.kind(), ErrorKind::InvalidInput); + } + #[test] fn abstract_namespace_not_allowed() { assert!(UnixStream::connect("\0asdf").is_err()); diff --git a/src/libstd_unicode/char.rs b/src/libstd_unicode/char.rs index b4be4a9691183..62c8d9332b991 100644 --- a/src/libstd_unicode/char.rs +++ b/src/libstd_unicode/char.rs @@ -70,7 +70,7 @@ impl Iterator for ToLowercase { } } -#[unstable(feature = "fused", issue = "35602")] +#[stable(feature = "fused", since = "1.25.0")] impl FusedIterator for ToLowercase {} /// Returns an iterator that yields the uppercase equivalent of a `char`. @@ -92,7 +92,7 @@ impl Iterator for ToUppercase { } } -#[unstable(feature = "fused", issue = "35602")] +#[stable(feature = "fused", since = "1.25.0")] impl FusedIterator for ToUppercase {} #[derive(Debug)] diff --git a/src/libstd_unicode/lib.rs b/src/libstd_unicode/lib.rs index dcae7d0af4095..f155b62e3cc72 100644 --- a/src/libstd_unicode/lib.rs +++ b/src/libstd_unicode/lib.rs @@ -36,7 +36,6 @@ #![feature(str_internals)] #![feature(decode_utf8)] #![feature(fn_traits)] -#![feature(fused)] #![feature(lang_items)] #![feature(non_exhaustive)] #![feature(staged_api)] diff --git a/src/libstd_unicode/u_str.rs b/src/libstd_unicode/u_str.rs index 5d1611acb7ee6..ed2f205b580ba 100644 --- a/src/libstd_unicode/u_str.rs +++ b/src/libstd_unicode/u_str.rs @@ -127,7 +127,7 @@ impl Iterator for Utf16Encoder } } -#[unstable(feature = "fused", issue = "35602")] +#[stable(feature = "fused", since = "1.25.0")] impl FusedIterator for Utf16Encoder where I: FusedIterator {} @@ -186,5 +186,5 @@ impl<'a> DoubleEndedIterator for SplitWhitespace<'a> { } } -#[unstable(feature = "fused", issue = "35602")] +#[stable(feature = "fused", since = "1.25.0")] impl<'a> FusedIterator for SplitWhitespace<'a> {} diff --git a/src/libsyntax/json.rs b/src/libsyntax/json.rs index 98d5fa8f797fa..57f07ff33f5ca 100644 --- a/src/libsyntax/json.rs +++ b/src/libsyntax/json.rs @@ -40,6 +40,7 @@ pub struct JsonEmitter { pretty: bool, /// Whether "approximate suggestions" are enabled in the config approximate_suggestions: bool, + ui_testing: bool, } impl JsonEmitter { @@ -53,6 +54,7 @@ impl JsonEmitter { cm: code_map, pretty, approximate_suggestions, + ui_testing: false, } } @@ -73,8 +75,13 @@ impl JsonEmitter { cm: code_map, pretty, approximate_suggestions, + ui_testing: false, } } + + pub fn ui_testing(self, ui_testing: bool) -> Self { + Self { ui_testing, ..self } + } } impl Emitter for JsonEmitter { @@ -199,7 +206,8 @@ impl Diagnostic { } let buf = BufWriter::default(); let output = buf.clone(); - EmitterWriter::new(Box::new(buf), Some(je.cm.clone()), false, false).emit(db); + EmitterWriter::new(Box::new(buf), Some(je.cm.clone()), false, false) + .ui_testing(je.ui_testing).emit(db); let output = Arc::try_unwrap(output.0).unwrap().into_inner().unwrap(); let output = String::from_utf8(output).unwrap(); diff --git a/src/test/run-make/atomic-lock-free/Makefile b/src/test/run-make/atomic-lock-free/Makefile index 4849b0307423d..da498015cea99 100644 --- a/src/test/run-make/atomic-lock-free/Makefile +++ b/src/test/run-make/atomic-lock-free/Makefile @@ -32,6 +32,8 @@ endif ifeq ($(filter powerpc,$(LLVM_COMPONENTS)),powerpc) $(RUSTC) --target=powerpc-unknown-linux-gnu atomic_lock_free.rs nm "$(TMPDIR)/libatomic_lock_free.rlib" | $(CGREP) -v __atomic_fetch_add + $(RUSTC) --target=powerpc-unknown-linux-gnuspe atomic_lock_free.rs + nm "$(TMPDIR)/libatomic_lock_free.rlib" | $(CGREP) -v __atomic_fetch_add $(RUSTC) --target=powerpc64-unknown-linux-gnu atomic_lock_free.rs nm "$(TMPDIR)/libatomic_lock_free.rlib" | $(CGREP) -v __atomic_fetch_add $(RUSTC) --target=powerpc64le-unknown-linux-gnu atomic_lock_free.rs diff --git a/src/test/run-pass/issue-36053.rs b/src/test/run-pass/issue-36053.rs index 2411996cf054b..ece58eedc56ee 100644 --- a/src/test/run-pass/issue-36053.rs +++ b/src/test/run-pass/issue-36053.rs @@ -14,7 +14,6 @@ // `FusedIterator` in std but I was not able to isolate that into an // external crate. -#![feature(fused)] use std::iter::FusedIterator; struct Thing<'a>(&'a str); diff --git a/src/test/ui-fulldeps/custom-derive/issue-36935.stderr b/src/test/ui-fulldeps/custom-derive/issue-36935.stderr index 55848c6553cca..b082999a8978d 100644 --- a/src/test/ui-fulldeps/custom-derive/issue-36935.stderr +++ b/src/test/ui-fulldeps/custom-derive/issue-36935.stderr @@ -1,7 +1,7 @@ error: proc-macro derive panicked --> $DIR/issue-36935.rs:18:15 | -18 | #[derive(Foo, Bar)] //~ ERROR proc-macro derive panicked +LL | #[derive(Foo, Bar)] //~ ERROR proc-macro derive panicked | ^^^ | = help: message: lolnope diff --git a/src/test/ui-fulldeps/deprecated-derive.stderr b/src/test/ui-fulldeps/deprecated-derive.stderr index 3ab7567f8dfb0..df4bd7f752c1e 100644 --- a/src/test/ui-fulldeps/deprecated-derive.stderr +++ b/src/test/ui-fulldeps/deprecated-derive.stderr @@ -1,6 +1,6 @@ warning: derive(Encodable) is deprecated in favor of derive(RustcEncodable) --> $DIR/deprecated-derive.rs:18:10 | -18 | #[derive(Encodable)] +LL | #[derive(Encodable)] | ^^^^^^^^^ diff --git a/src/test/ui-fulldeps/lint-group-plugin.stderr b/src/test/ui-fulldeps/lint-group-plugin.stderr index 1d68e78de5ed1..80a309f27e165 100644 --- a/src/test/ui-fulldeps/lint-group-plugin.stderr +++ b/src/test/ui-fulldeps/lint-group-plugin.stderr @@ -1,7 +1,7 @@ warning: item is named 'lintme' --> $DIR/lint-group-plugin.rs:18:1 | -18 | fn lintme() { } //~ WARNING item is named 'lintme' +LL | fn lintme() { } //~ WARNING item is named 'lintme' | ^^^^^^^^^^^^^^^ | = note: #[warn(test_lint)] on by default @@ -9,7 +9,7 @@ warning: item is named 'lintme' warning: item is named 'pleaselintme' --> $DIR/lint-group-plugin.rs:19:1 | -19 | fn pleaselintme() { } //~ WARNING item is named 'pleaselintme' +LL | fn pleaselintme() { } //~ WARNING item is named 'pleaselintme' | ^^^^^^^^^^^^^^^^^^^^^ | = note: #[warn(please_lint)] on by default diff --git a/src/test/ui-fulldeps/lint-plugin-cmdline-allow.stderr b/src/test/ui-fulldeps/lint-plugin-cmdline-allow.stderr index 0cc3a5b6bf31d..cda6ea8bb903b 100644 --- a/src/test/ui-fulldeps/lint-plugin-cmdline-allow.stderr +++ b/src/test/ui-fulldeps/lint-plugin-cmdline-allow.stderr @@ -1,13 +1,13 @@ warning: function is never used: `lintme` --> $DIR/lint-plugin-cmdline-allow.rs:20:1 | -20 | fn lintme() { } +LL | fn lintme() { } | ^^^^^^^^^^^ | note: lint level defined here --> $DIR/lint-plugin-cmdline-allow.rs:17:9 | -17 | #![warn(unused)] +LL | #![warn(unused)] | ^^^^^^ = note: #[warn(dead_code)] implied by #[warn(unused)] diff --git a/src/test/ui-fulldeps/lint-plugin-cmdline-load.stderr b/src/test/ui-fulldeps/lint-plugin-cmdline-load.stderr index 42ececc93bd79..33c690a2d9f3e 100644 --- a/src/test/ui-fulldeps/lint-plugin-cmdline-load.stderr +++ b/src/test/ui-fulldeps/lint-plugin-cmdline-load.stderr @@ -1,7 +1,7 @@ warning: item is named 'lintme' --> $DIR/lint-plugin-cmdline-load.rs:18:1 | -18 | fn lintme() { } //~ WARNING item is named 'lintme' +LL | fn lintme() { } //~ WARNING item is named 'lintme' | ^^^^^^^^^^^^^^^ | = note: #[warn(test_lint)] on by default diff --git a/src/test/ui-fulldeps/lint-plugin-forbid-attrs.stderr b/src/test/ui-fulldeps/lint-plugin-forbid-attrs.stderr index 459be9db578af..99f661d6fe3ac 100644 --- a/src/test/ui-fulldeps/lint-plugin-forbid-attrs.stderr +++ b/src/test/ui-fulldeps/lint-plugin-forbid-attrs.stderr @@ -1,22 +1,22 @@ error: item is named 'lintme' --> $DIR/lint-plugin-forbid-attrs.rs:18:1 | -18 | fn lintme() { } //~ ERROR item is named 'lintme' +LL | fn lintme() { } //~ ERROR item is named 'lintme' | ^^^^^^^^^^^^^^^ | note: lint level defined here --> $DIR/lint-plugin-forbid-attrs.rs:16:11 | -16 | #![forbid(test_lint)] +LL | #![forbid(test_lint)] | ^^^^^^^^^ error[E0453]: allow(test_lint) overruled by outer forbid(test_lint) --> $DIR/lint-plugin-forbid-attrs.rs:20:9 | -16 | #![forbid(test_lint)] +LL | #![forbid(test_lint)] | --------- `forbid` level set here ... -20 | #[allow(test_lint)] +LL | #[allow(test_lint)] | ^^^^^^^^^ overruled by previous forbid error: aborting due to 2 previous errors diff --git a/src/test/ui-fulldeps/lint-plugin.stderr b/src/test/ui-fulldeps/lint-plugin.stderr index 1fe821d31159c..4a3140925c867 100644 --- a/src/test/ui-fulldeps/lint-plugin.stderr +++ b/src/test/ui-fulldeps/lint-plugin.stderr @@ -1,7 +1,7 @@ warning: item is named 'lintme' --> $DIR/lint-plugin.rs:18:1 | -18 | fn lintme() { } //~ WARNING item is named 'lintme' +LL | fn lintme() { } //~ WARNING item is named 'lintme' | ^^^^^^^^^^^^^^^ | = note: #[warn(test_lint)] on by default diff --git a/src/test/ui-fulldeps/proc-macro/parent-source-spans.stderr b/src/test/ui-fulldeps/proc-macro/parent-source-spans.stderr index 7194b05b18e6c..0442c4f6ce71f 100644 --- a/src/test/ui-fulldeps/proc-macro/parent-source-spans.stderr +++ b/src/test/ui-fulldeps/proc-macro/parent-source-spans.stderr @@ -1,127 +1,127 @@ error: first final: "hello" --> $DIR/parent-source-spans.rs:27:12 | -27 | three!($a, $b); +LL | three!($a, $b); | ^^ ... -44 | one!("hello", "world"); +LL | one!("hello", "world"); | ----------------------- in this macro invocation error: second final: "world" --> $DIR/parent-source-spans.rs:27:16 | -27 | three!($a, $b); +LL | three!($a, $b); | ^^ ... -44 | one!("hello", "world"); +LL | one!("hello", "world"); | ----------------------- in this macro invocation error: first parent: "hello" --> $DIR/parent-source-spans.rs:21:5 | -21 | two!($a, $b); +LL | two!($a, $b); | ^^^^^^^^^^^^^ ... -44 | one!("hello", "world"); +LL | one!("hello", "world"); | ----------------------- in this macro invocation error: second parent: "world" --> $DIR/parent-source-spans.rs:21:5 | -21 | two!($a, $b); +LL | two!($a, $b); | ^^^^^^^^^^^^^ ... -44 | one!("hello", "world"); +LL | one!("hello", "world"); | ----------------------- in this macro invocation error: first grandparent: "hello" --> $DIR/parent-source-spans.rs:44:5 | -44 | one!("hello", "world"); +LL | one!("hello", "world"); | ^^^^^^^^^^^^^^^^^^^^^^^ error: second grandparent: "world" --> $DIR/parent-source-spans.rs:44:5 | -44 | one!("hello", "world"); +LL | one!("hello", "world"); | ^^^^^^^^^^^^^^^^^^^^^^^ error: first source: "hello" --> $DIR/parent-source-spans.rs:44:5 | -44 | one!("hello", "world"); +LL | one!("hello", "world"); | ^^^^^^^^^^^^^^^^^^^^^^^ error: second source: "world" --> $DIR/parent-source-spans.rs:44:5 | -44 | one!("hello", "world"); +LL | one!("hello", "world"); | ^^^^^^^^^^^^^^^^^^^^^^^ error: first final: "yay" --> $DIR/parent-source-spans.rs:27:12 | -27 | three!($a, $b); +LL | three!($a, $b); | ^^ ... -50 | two!("yay", "rust"); +LL | two!("yay", "rust"); | -------------------- in this macro invocation error: second final: "rust" --> $DIR/parent-source-spans.rs:27:16 | -27 | three!($a, $b); +LL | three!($a, $b); | ^^ ... -50 | two!("yay", "rust"); +LL | two!("yay", "rust"); | -------------------- in this macro invocation error: first parent: "yay" --> $DIR/parent-source-spans.rs:50:5 | -50 | two!("yay", "rust"); +LL | two!("yay", "rust"); | ^^^^^^^^^^^^^^^^^^^^ error: second parent: "rust" --> $DIR/parent-source-spans.rs:50:5 | -50 | two!("yay", "rust"); +LL | two!("yay", "rust"); | ^^^^^^^^^^^^^^^^^^^^ error: first source: "yay" --> $DIR/parent-source-spans.rs:50:5 | -50 | two!("yay", "rust"); +LL | two!("yay", "rust"); | ^^^^^^^^^^^^^^^^^^^^ error: second source: "rust" --> $DIR/parent-source-spans.rs:50:5 | -50 | two!("yay", "rust"); +LL | two!("yay", "rust"); | ^^^^^^^^^^^^^^^^^^^^ error: first final: "hip" --> $DIR/parent-source-spans.rs:56:12 | -56 | three!("hip", "hop"); +LL | three!("hip", "hop"); | ^^^^^ error: second final: "hop" --> $DIR/parent-source-spans.rs:56:19 | -56 | three!("hip", "hop"); +LL | three!("hip", "hop"); | ^^^^^ error: first source: "hip" --> $DIR/parent-source-spans.rs:56:12 | -56 | three!("hip", "hop"); +LL | three!("hip", "hop"); | ^^^^^ error: second source: "hop" --> $DIR/parent-source-spans.rs:56:19 | -56 | three!("hip", "hop"); +LL | three!("hip", "hop"); | ^^^^^ error: aborting due to 18 previous errors diff --git a/src/test/ui-fulldeps/proc-macro/signature.stderr b/src/test/ui-fulldeps/proc-macro/signature.stderr index 2beb0aac8626e..ef9b6552c45f7 100644 --- a/src/test/ui-fulldeps/proc-macro/signature.stderr +++ b/src/test/ui-fulldeps/proc-macro/signature.stderr @@ -1,10 +1,10 @@ error[E0308]: mismatched types --> $DIR/signature.rs:17:1 | -17 | / pub unsafe extern fn foo(a: i32, b: u32) -> u32 { -18 | | //~^ ERROR: mismatched types -19 | | loop {} -20 | | } +LL | / pub unsafe extern fn foo(a: i32, b: u32) -> u32 { +LL | | //~^ ERROR: mismatched types +LL | | loop {} +LL | | } | |_^ expected normal fn, found unsafe fn | = note: expected type `fn(proc_macro::TokenStream) -> proc_macro::TokenStream` diff --git a/src/test/ui-fulldeps/proc-macro/three-equals.stderr b/src/test/ui-fulldeps/proc-macro/three-equals.stderr index 0ffaf16107872..1a0337f93f9ac 100644 --- a/src/test/ui-fulldeps/proc-macro/three-equals.stderr +++ b/src/test/ui-fulldeps/proc-macro/three-equals.stderr @@ -1,7 +1,7 @@ error: found 2 equal signs, need exactly 3 --> $DIR/three-equals.rs:25:5 | -25 | three_equals!(==); //~ ERROR found 2 equal signs, need exactly 3 +LL | three_equals!(==); //~ ERROR found 2 equal signs, need exactly 3 | ^^^^^^^^^^^^^^^^^^ | = help: input must be: `===` @@ -9,38 +9,38 @@ error: found 2 equal signs, need exactly 3 error: expected EOF, found `=`. --> $DIR/three-equals.rs:28:21 | -28 | three_equals!(=====); //~ ERROR expected EOF +LL | three_equals!(=====); //~ ERROR expected EOF | ^^ | note: last good input was here --> $DIR/three-equals.rs:28:21 | -28 | three_equals!(=====); //~ ERROR expected EOF +LL | three_equals!(=====); //~ ERROR expected EOF | ^^ = help: input must be: `===` error: expected `=`, found `abc`. --> $DIR/three-equals.rs:31:19 | -31 | three_equals!(abc); //~ ERROR expected `=` +LL | three_equals!(abc); //~ ERROR expected `=` | ^^^ error: expected `=`, found `!`. --> $DIR/three-equals.rs:34:19 | -34 | three_equals!(!!); //~ ERROR expected `=` +LL | three_equals!(!!); //~ ERROR expected `=` | ^ error: expected EOF, found `a`. --> $DIR/three-equals.rs:37:22 | -37 | three_equals!(===a); //~ ERROR expected EOF +LL | three_equals!(===a); //~ ERROR expected EOF | ^ | note: last good input was here --> $DIR/three-equals.rs:37:21 | -37 | three_equals!(===a); //~ ERROR expected EOF +LL | three_equals!(===a); //~ ERROR expected EOF | ^ = help: input must be: `===` diff --git a/src/test/ui-fulldeps/resolve-error.stderr b/src/test/ui-fulldeps/resolve-error.stderr index 9121ce1720c98..e19ec9e6f803c 100644 --- a/src/test/ui-fulldeps/resolve-error.stderr +++ b/src/test/ui-fulldeps/resolve-error.stderr @@ -1,61 +1,61 @@ error: cannot find derive macro `FooWithLongNan` in this scope --> $DIR/resolve-error.rs:37:10 | -37 | #[derive(FooWithLongNan)] +LL | #[derive(FooWithLongNan)] | ^^^^^^^^^^^^^^ help: try: `FooWithLongName` error: cannot find attribute macro `attr_proc_macra` in this scope --> $DIR/resolve-error.rs:41:3 | -41 | #[attr_proc_macra] +LL | #[attr_proc_macra] | ^^^^^^^^^^^^^^^ help: try: `attr_proc_macro` error: cannot find attribute macro `FooWithLongNan` in this scope --> $DIR/resolve-error.rs:45:3 | -45 | #[FooWithLongNan] +LL | #[FooWithLongNan] | ^^^^^^^^^^^^^^ error: cannot find derive macro `Dlone` in this scope --> $DIR/resolve-error.rs:49:10 | -49 | #[derive(Dlone)] +LL | #[derive(Dlone)] | ^^^^^ help: try: `Clone` error: cannot find derive macro `Dlona` in this scope --> $DIR/resolve-error.rs:53:10 | -53 | #[derive(Dlona)] +LL | #[derive(Dlona)] | ^^^^^ help: try: `Clona` error: cannot find derive macro `attr_proc_macra` in this scope --> $DIR/resolve-error.rs:57:10 | -57 | #[derive(attr_proc_macra)] +LL | #[derive(attr_proc_macra)] | ^^^^^^^^^^^^^^^ error: cannot find macro `FooWithLongNama!` in this scope --> $DIR/resolve-error.rs:62:5 | -62 | FooWithLongNama!(); +LL | FooWithLongNama!(); | ^^^^^^^^^^^^^^^ help: you could try the macro: `FooWithLongNam` error: cannot find macro `attr_proc_macra!` in this scope --> $DIR/resolve-error.rs:65:5 | -65 | attr_proc_macra!(); +LL | attr_proc_macra!(); | ^^^^^^^^^^^^^^^ help: you could try the macro: `attr_proc_mac` error: cannot find macro `Dlona!` in this scope --> $DIR/resolve-error.rs:68:5 | -68 | Dlona!(); +LL | Dlona!(); | ^^^^^ error: cannot find macro `bang_proc_macrp!` in this scope --> $DIR/resolve-error.rs:71:5 | -71 | bang_proc_macrp!(); +LL | bang_proc_macrp!(); | ^^^^^^^^^^^^^^^ help: you could try the macro: `bang_proc_macro` error: aborting due to 10 previous errors diff --git a/src/test/ui/anonymous-higher-ranked-lifetime.stderr b/src/test/ui/anonymous-higher-ranked-lifetime.stderr index 4bd3b684b7ba3..4a2696ce52a5f 100644 --- a/src/test/ui/anonymous-higher-ranked-lifetime.stderr +++ b/src/test/ui/anonymous-higher-ranked-lifetime.stderr @@ -1,7 +1,7 @@ error[E0631]: type mismatch in closure arguments --> $DIR/anonymous-higher-ranked-lifetime.rs:12:5 | -12 | f1(|_: (), _: ()| {}); //~ ERROR type mismatch +LL | f1(|_: (), _: ()| {}); //~ ERROR type mismatch | ^^ -------------- found signature of `fn((), ()) -> _` | | | expected signature of `for<'r, 's> fn(&'r (), &'s ()) -> _` @@ -9,13 +9,13 @@ error[E0631]: type mismatch in closure arguments note: required by `f1` --> $DIR/anonymous-higher-ranked-lifetime.rs:26:1 | -26 | fn f1(_: F) where F: Fn(&(), &()) {} +LL | fn f1(_: F) where F: Fn(&(), &()) {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error[E0631]: type mismatch in closure arguments --> $DIR/anonymous-higher-ranked-lifetime.rs:13:5 | -13 | f2(|_: (), _: ()| {}); //~ ERROR type mismatch +LL | f2(|_: (), _: ()| {}); //~ ERROR type mismatch | ^^ -------------- found signature of `fn((), ()) -> _` | | | expected signature of `for<'a, 'r> fn(&'a (), &'r ()) -> _` @@ -23,13 +23,13 @@ error[E0631]: type mismatch in closure arguments note: required by `f2` --> $DIR/anonymous-higher-ranked-lifetime.rs:27:1 | -27 | fn f2(_: F) where F: for<'a> Fn(&'a (), &()) {} +LL | fn f2(_: F) where F: for<'a> Fn(&'a (), &()) {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error[E0631]: type mismatch in closure arguments --> $DIR/anonymous-higher-ranked-lifetime.rs:14:5 | -14 | f3(|_: (), _: ()| {}); //~ ERROR type mismatch +LL | f3(|_: (), _: ()| {}); //~ ERROR type mismatch | ^^ -------------- found signature of `fn((), ()) -> _` | | | expected signature of `for<'r> fn(&(), &'r ()) -> _` @@ -37,13 +37,13 @@ error[E0631]: type mismatch in closure arguments note: required by `f3` --> $DIR/anonymous-higher-ranked-lifetime.rs:28:1 | -28 | fn f3<'a, F>(_: F) where F: Fn(&'a (), &()) {} +LL | fn f3<'a, F>(_: F) where F: Fn(&'a (), &()) {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error[E0631]: type mismatch in closure arguments --> $DIR/anonymous-higher-ranked-lifetime.rs:15:5 | -15 | f4(|_: (), _: ()| {}); //~ ERROR type mismatch +LL | f4(|_: (), _: ()| {}); //~ ERROR type mismatch | ^^ -------------- found signature of `fn((), ()) -> _` | | | expected signature of `for<'s, 'r> fn(&'s (), &'r ()) -> _` @@ -51,13 +51,13 @@ error[E0631]: type mismatch in closure arguments note: required by `f4` --> $DIR/anonymous-higher-ranked-lifetime.rs:29:1 | -29 | fn f4(_: F) where F: for<'r> Fn(&(), &'r ()) {} +LL | fn f4(_: F) where F: for<'r> Fn(&(), &'r ()) {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error[E0631]: type mismatch in closure arguments --> $DIR/anonymous-higher-ranked-lifetime.rs:16:5 | -16 | f5(|_: (), _: ()| {}); //~ ERROR type mismatch +LL | f5(|_: (), _: ()| {}); //~ ERROR type mismatch | ^^ -------------- found signature of `fn((), ()) -> _` | | | expected signature of `for<'r> fn(&'r (), &'r ()) -> _` @@ -65,13 +65,13 @@ error[E0631]: type mismatch in closure arguments note: required by `f5` --> $DIR/anonymous-higher-ranked-lifetime.rs:30:1 | -30 | fn f5(_: F) where F: for<'r> Fn(&'r (), &'r ()) {} +LL | fn f5(_: F) where F: for<'r> Fn(&'r (), &'r ()) {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error[E0631]: type mismatch in closure arguments --> $DIR/anonymous-higher-ranked-lifetime.rs:17:5 | -17 | g1(|_: (), _: ()| {}); //~ ERROR type mismatch +LL | g1(|_: (), _: ()| {}); //~ ERROR type mismatch | ^^ -------------- found signature of `fn((), ()) -> _` | | | expected signature of `for<'r> fn(&'r (), std::boxed::Box std::ops::Fn(&'s ()) + 'static>) -> _` @@ -79,13 +79,13 @@ error[E0631]: type mismatch in closure arguments note: required by `g1` --> $DIR/anonymous-higher-ranked-lifetime.rs:33:1 | -33 | fn g1(_: F) where F: Fn(&(), Box) {} +LL | fn g1(_: F) where F: Fn(&(), Box) {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error[E0631]: type mismatch in closure arguments --> $DIR/anonymous-higher-ranked-lifetime.rs:18:5 | -18 | g2(|_: (), _: ()| {}); //~ ERROR type mismatch +LL | g2(|_: (), _: ()| {}); //~ ERROR type mismatch | ^^ -------------- found signature of `fn((), ()) -> _` | | | expected signature of `for<'r> fn(&'r (), for<'s> fn(&'s ())) -> _` @@ -93,13 +93,13 @@ error[E0631]: type mismatch in closure arguments note: required by `g2` --> $DIR/anonymous-higher-ranked-lifetime.rs:34:1 | -34 | fn g2(_: F) where F: Fn(&(), fn(&())) {} +LL | fn g2(_: F) where F: Fn(&(), fn(&())) {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error[E0631]: type mismatch in closure arguments --> $DIR/anonymous-higher-ranked-lifetime.rs:19:5 | -19 | g3(|_: (), _: ()| {}); //~ ERROR type mismatch +LL | g3(|_: (), _: ()| {}); //~ ERROR type mismatch | ^^ -------------- found signature of `fn((), ()) -> _` | | | expected signature of `for<'s> fn(&'s (), std::boxed::Box std::ops::Fn(&'r ()) + 'static>) -> _` @@ -107,13 +107,13 @@ error[E0631]: type mismatch in closure arguments note: required by `g3` --> $DIR/anonymous-higher-ranked-lifetime.rs:35:1 | -35 | fn g3(_: F) where F: for<'s> Fn(&'s (), Box) {} +LL | fn g3(_: F) where F: for<'s> Fn(&'s (), Box) {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error[E0631]: type mismatch in closure arguments --> $DIR/anonymous-higher-ranked-lifetime.rs:20:5 | -20 | g4(|_: (), _: ()| {}); //~ ERROR type mismatch +LL | g4(|_: (), _: ()| {}); //~ ERROR type mismatch | ^^ -------------- found signature of `fn((), ()) -> _` | | | expected signature of `for<'s> fn(&'s (), for<'r> fn(&'r ())) -> _` @@ -121,13 +121,13 @@ error[E0631]: type mismatch in closure arguments note: required by `g4` --> $DIR/anonymous-higher-ranked-lifetime.rs:36:1 | -36 | fn g4(_: F) where F: Fn(&(), for<'r> fn(&'r ())) {} +LL | fn g4(_: F) where F: Fn(&(), for<'r> fn(&'r ())) {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error[E0631]: type mismatch in closure arguments --> $DIR/anonymous-higher-ranked-lifetime.rs:21:5 | -21 | h1(|_: (), _: (), _: (), _: ()| {}); //~ ERROR type mismatch +LL | h1(|_: (), _: (), _: (), _: ()| {}); //~ ERROR type mismatch | ^^ ---------------------------- found signature of `fn((), (), (), ()) -> _` | | | expected signature of `for<'r, 's> fn(&'r (), std::boxed::Box std::ops::Fn(&'t0 ()) + 'static>, &'s (), for<'t0, 't1> fn(&'t0 (), &'t1 ())) -> _` @@ -135,13 +135,13 @@ error[E0631]: type mismatch in closure arguments note: required by `h1` --> $DIR/anonymous-higher-ranked-lifetime.rs:39:1 | -39 | fn h1(_: F) where F: Fn(&(), Box, &(), fn(&(), &())) {} +LL | fn h1(_: F) where F: Fn(&(), Box, &(), fn(&(), &())) {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error[E0631]: type mismatch in closure arguments --> $DIR/anonymous-higher-ranked-lifetime.rs:22:5 | -22 | h2(|_: (), _: (), _: (), _: ()| {}); //~ ERROR type mismatch +LL | h2(|_: (), _: (), _: (), _: ()| {}); //~ ERROR type mismatch | ^^ ---------------------------- found signature of `fn((), (), (), ()) -> _` | | | expected signature of `for<'r, 't0> fn(&'r (), std::boxed::Box std::ops::Fn(&'s ()) + 'static>, &'t0 (), for<'s, 't1> fn(&'s (), &'t1 ())) -> _` @@ -149,7 +149,7 @@ error[E0631]: type mismatch in closure arguments note: required by `h2` --> $DIR/anonymous-higher-ranked-lifetime.rs:40:1 | -40 | fn h2(_: F) where F: for<'t0> Fn(&(), Box, &'t0 (), fn(&(), &())) {} +LL | fn h2(_: F) where F: for<'t0> Fn(&(), Box, &'t0 (), fn(&(), &())) {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: aborting due to 11 previous errors diff --git a/src/test/ui/arbitrary-self-types-not-object-safe.stderr b/src/test/ui/arbitrary-self-types-not-object-safe.stderr index f258488ee2fb1..ff46b88ed5074 100644 --- a/src/test/ui/arbitrary-self-types-not-object-safe.stderr +++ b/src/test/ui/arbitrary-self-types-not-object-safe.stderr @@ -1,7 +1,7 @@ error[E0038]: the trait `Foo` cannot be made into an object --> $DIR/arbitrary-self-types-not-object-safe.rs:40:33 | -40 | let x = Box::new(5usize) as Box; +LL | let x = Box::new(5usize) as Box; | ^^^^^^^^ the trait `Foo` cannot be made into an object | = note: method `foo` has a non-standard `self` type @@ -9,7 +9,7 @@ error[E0038]: the trait `Foo` cannot be made into an object error[E0038]: the trait `Foo` cannot be made into an object --> $DIR/arbitrary-self-types-not-object-safe.rs:40:13 | -40 | let x = Box::new(5usize) as Box; +LL | let x = Box::new(5usize) as Box; | ^^^^^^^^^^^^^^^^ the trait `Foo` cannot be made into an object | = note: method `foo` has a non-standard `self` type diff --git a/src/test/ui/asm-out-assign-imm.stderr b/src/test/ui/asm-out-assign-imm.stderr index cf5486fec5f93..5ad93bd9023d6 100644 --- a/src/test/ui/asm-out-assign-imm.stderr +++ b/src/test/ui/asm-out-assign-imm.stderr @@ -1,10 +1,10 @@ error[E0384]: cannot assign twice to immutable variable `x` --> $DIR/asm-out-assign-imm.rs:29:9 | -26 | x = 1; +LL | x = 1; | ----- first assignment to `x` ... -29 | asm!("mov $1, $0" : "=r"(x) : "r"(5)); +LL | asm!("mov $1, $0" : "=r"(x) : "r"(5)); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ cannot assign twice to immutable variable error: aborting due to previous error diff --git a/src/test/ui/associated-const-impl-wrong-lifetime.stderr b/src/test/ui/associated-const-impl-wrong-lifetime.stderr index ab0e1003a9e10..bf1d46310f167 100644 --- a/src/test/ui/associated-const-impl-wrong-lifetime.stderr +++ b/src/test/ui/associated-const-impl-wrong-lifetime.stderr @@ -1,7 +1,7 @@ error[E0308]: mismatched types --> $DIR/associated-const-impl-wrong-lifetime.rs:18:5 | -18 | const NAME: &'a str = "unit"; +LL | const NAME: &'a str = "unit"; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ lifetime mismatch | = note: expected type `&'static str` @@ -9,7 +9,7 @@ error[E0308]: mismatched types note: the lifetime 'a as defined on the impl at 17:1... --> $DIR/associated-const-impl-wrong-lifetime.rs:17:1 | -17 | impl<'a> Foo for &'a () { +LL | impl<'a> Foo for &'a () { | ^^^^^^^^^^^^^^^^^^^^^^^ = note: ...does not necessarily outlive the static lifetime diff --git a/src/test/ui/associated-const-impl-wrong-type.stderr b/src/test/ui/associated-const-impl-wrong-type.stderr index a2afe905cb505..57f49d0b92ee9 100644 --- a/src/test/ui/associated-const-impl-wrong-type.stderr +++ b/src/test/ui/associated-const-impl-wrong-type.stderr @@ -1,10 +1,10 @@ error[E0326]: implemented const `BAR` has an incompatible type for trait --> $DIR/associated-const-impl-wrong-type.rs:19:16 | -13 | const BAR: u32; +LL | const BAR: u32; | --- type in trait ... -19 | const BAR: i32 = -1; +LL | const BAR: i32 = -1; | ^^^ expected u32, found i32 error: aborting due to previous error diff --git a/src/test/ui/associated-type-projection-from-multiple-supertraits.stderr b/src/test/ui/associated-type-projection-from-multiple-supertraits.stderr index 6215c1dc089d2..9f12d413a08aa 100644 --- a/src/test/ui/associated-type-projection-from-multiple-supertraits.stderr +++ b/src/test/ui/associated-type-projection-from-multiple-supertraits.stderr @@ -1,43 +1,43 @@ error[E0221]: ambiguous associated type `Color` in bounds of `C` --> $DIR/associated-type-projection-from-multiple-supertraits.rs:29:32 | -15 | type Color; +LL | type Color; | ----------- ambiguous `Color` from `Vehicle` ... -21 | type Color; +LL | type Color; | ----------- ambiguous `Color` from `Box` ... -29 | fn dent(c: C, color: C::Color) { +LL | fn dent(c: C, color: C::Color) { | ^^^^^^^^ ambiguous associated type `Color` error[E0221]: ambiguous associated type `Color` in bounds of `BoxCar` --> $DIR/associated-type-projection-from-multiple-supertraits.rs:33:33 | -15 | type Color; +LL | type Color; | ----------- ambiguous `Color` from `Vehicle` ... -21 | type Color; +LL | type Color; | ----------- ambiguous `Color` from `Box` ... -33 | fn dent_object(c: BoxCar) { +LL | fn dent_object(c: BoxCar) { | ^^^^^^^^^^^ ambiguous associated type `Color` error[E0191]: the value of the associated type `Color` (from the trait `Vehicle`) must be specified --> $DIR/associated-type-projection-from-multiple-supertraits.rs:33:26 | -33 | fn dent_object(c: BoxCar) { +LL | fn dent_object(c: BoxCar) { | ^^^^^^^^^^^^^^^^^^^ missing associated type `Color` value error[E0221]: ambiguous associated type `Color` in bounds of `C` --> $DIR/associated-type-projection-from-multiple-supertraits.rs:38:29 | -15 | type Color; +LL | type Color; | ----------- ambiguous `Color` from `Vehicle` ... -21 | type Color; +LL | type Color; | ----------- ambiguous `Color` from `Box` ... -38 | fn paint(c: C, d: C::Color) { +LL | fn paint(c: C, d: C::Color) { | ^^^^^^^^ ambiguous associated type `Color` error: aborting due to 4 previous errors diff --git a/src/test/ui/associated-types-ICE-when-projecting-out-of-err.stderr b/src/test/ui/associated-types-ICE-when-projecting-out-of-err.stderr index 1a49cc7a283bb..32da43fe3c489 100644 --- a/src/test/ui/associated-types-ICE-when-projecting-out-of-err.stderr +++ b/src/test/ui/associated-types-ICE-when-projecting-out-of-err.stderr @@ -1,7 +1,7 @@ error[E0277]: the trait bound `(): Add` is not satisfied --> $DIR/associated-types-ICE-when-projecting-out-of-err.rs:33:11 | -33 | r = r + a; +LL | r = r + a; | ^ the trait `Add` is not implemented for `()` error: aborting due to previous error diff --git a/src/test/ui/associated-types-in-ambiguous-context.stderr b/src/test/ui/associated-types-in-ambiguous-context.stderr index b0196234bda04..c854d45813509 100644 --- a/src/test/ui/associated-types-in-ambiguous-context.stderr +++ b/src/test/ui/associated-types-in-ambiguous-context.stderr @@ -1,7 +1,7 @@ error[E0223]: ambiguous associated type --> $DIR/associated-types-in-ambiguous-context.rs:16:36 | -16 | fn get(x: T, y: U) -> Get::Value {} +LL | fn get(x: T, y: U) -> Get::Value {} | ^^^^^^^^^^ ambiguous associated type | = note: specify the type using the syntax `::Value` @@ -9,7 +9,7 @@ error[E0223]: ambiguous associated type error[E0223]: ambiguous associated type --> $DIR/associated-types-in-ambiguous-context.rs:25:10 | -25 | type X = std::ops::Deref::Target; +LL | type X = std::ops::Deref::Target; | ^^^^^^^^^^^^^^^^^^^^^^^ ambiguous associated type | = note: specify the type using the syntax `::Target` @@ -17,7 +17,7 @@ error[E0223]: ambiguous associated type error[E0223]: ambiguous associated type --> $DIR/associated-types-in-ambiguous-context.rs:21:23 | -21 | fn grab(&self) -> Grab::Value; +LL | fn grab(&self) -> Grab::Value; | ^^^^^^^^^^^ ambiguous associated type | = note: specify the type using the syntax `::Value` diff --git a/src/test/ui/attr-usage-repr.stderr b/src/test/ui/attr-usage-repr.stderr index b9c012630e9f3..82bdc09f69f03 100644 --- a/src/test/ui/attr-usage-repr.stderr +++ b/src/test/ui/attr-usage-repr.stderr @@ -1,41 +1,41 @@ error[E0517]: attribute should be applied to struct, enum or union --> $DIR/attr-usage-repr.rs:14:8 | -14 | #[repr(C)] //~ ERROR: attribute should be applied to struct, enum or union +LL | #[repr(C)] //~ ERROR: attribute should be applied to struct, enum or union | ^ -15 | fn f() {} +LL | fn f() {} | --------- not a struct, enum or union error[E0517]: attribute should be applied to enum --> $DIR/attr-usage-repr.rs:26:8 | -26 | #[repr(i8)] //~ ERROR: attribute should be applied to enum +LL | #[repr(i8)] //~ ERROR: attribute should be applied to enum | ^^ -27 | struct SInt(f64, f64); +LL | struct SInt(f64, f64); | ---------------------- not an enum error[E0517]: attribute should be applied to struct or union --> $DIR/attr-usage-repr.rs:32:8 | -32 | #[repr(align(8))] //~ ERROR: attribute should be applied to struct +LL | #[repr(align(8))] //~ ERROR: attribute should be applied to struct | ^^^^^^^^ -33 | enum EAlign { A, B } +LL | enum EAlign { A, B } | -------------------- not a struct or union error[E0517]: attribute should be applied to struct or union --> $DIR/attr-usage-repr.rs:35:8 | -35 | #[repr(packed)] //~ ERROR: attribute should be applied to struct +LL | #[repr(packed)] //~ ERROR: attribute should be applied to struct | ^^^^^^ -36 | enum EPacked { A, B } +LL | enum EPacked { A, B } | --------------------- not a struct or union error[E0517]: attribute should be applied to struct --> $DIR/attr-usage-repr.rs:38:8 | -38 | #[repr(simd)] //~ ERROR: attribute should be applied to struct +LL | #[repr(simd)] //~ ERROR: attribute should be applied to struct | ^^^^ -39 | enum ESimd { A, B } +LL | enum ESimd { A, B } | ------------------- not a struct error: aborting due to 5 previous errors diff --git a/src/test/ui/augmented-assignments.stderr b/src/test/ui/augmented-assignments.stderr index 0367270d16676..59b59a38c2945 100644 --- a/src/test/ui/augmented-assignments.stderr +++ b/src/test/ui/augmented-assignments.stderr @@ -1,19 +1,19 @@ error[E0596]: cannot borrow immutable local variable `y` as mutable --> $DIR/augmented-assignments.rs:30:5 | -28 | let y = Int(2); +LL | let y = Int(2); | - consider changing this to `mut y` -29 | //~^ consider changing this to `mut y` -30 | y //~ error: cannot borrow immutable local variable `y` as mutable +LL | //~^ consider changing this to `mut y` +LL | y //~ error: cannot borrow immutable local variable `y` as mutable | ^ cannot borrow mutably error[E0382]: use of moved value: `x` --> $DIR/augmented-assignments.rs:23:5 | -23 | x //~ error: use of moved value: `x` +LL | x //~ error: use of moved value: `x` | ^ value used here after move ... -26 | x; //~ value moved here +LL | x; //~ value moved here | - value moved here | = note: move occurs because `x` has type `Int`, which does not implement the `Copy` trait diff --git a/src/test/ui/binary-op-on-double-ref.stderr b/src/test/ui/binary-op-on-double-ref.stderr index 4a2490bac91ab..68f57ec71a297 100644 --- a/src/test/ui/binary-op-on-double-ref.stderr +++ b/src/test/ui/binary-op-on-double-ref.stderr @@ -1,7 +1,7 @@ error[E0369]: binary operation `%` cannot be applied to type `&&{integer}` --> $DIR/binary-op-on-double-ref.rs:14:9 | -14 | x % 2 == 0 +LL | x % 2 == 0 | ^^^^^ | = note: this is a reference to a type that `%` can be applied to; you need to dereference this variable once for this operation to work diff --git a/src/test/ui/blind-item-item-shadow.stderr b/src/test/ui/blind-item-item-shadow.stderr index d3588be266975..941fb2fb82d61 100644 --- a/src/test/ui/blind-item-item-shadow.stderr +++ b/src/test/ui/blind-item-item-shadow.stderr @@ -1,16 +1,16 @@ error[E0255]: the name `foo` is defined multiple times --> $DIR/blind-item-item-shadow.rs:13:5 | -11 | mod foo { pub mod foo { } } +LL | mod foo { pub mod foo { } } | ------- previous definition of the module `foo` here -12 | -13 | use foo::foo; +LL | +LL | use foo::foo; | ^^^^^^^^ `foo` reimported here | = note: `foo` must be defined only once in the type namespace of this module help: You can use `as` to change the binding name of the import | -13 | use foo::foo as other_foo; +LL | use foo::foo as other_foo; | ^^^^^^^^^^^^^^^^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/block-result/block-must-not-have-result-do.stderr b/src/test/ui/block-result/block-must-not-have-result-do.stderr index d4024f41c26fa..99131db0a3828 100644 --- a/src/test/ui/block-result/block-must-not-have-result-do.stderr +++ b/src/test/ui/block-result/block-must-not-have-result-do.stderr @@ -1,7 +1,7 @@ error[E0308]: mismatched types --> $DIR/block-must-not-have-result-do.rs:13:9 | -13 | true //~ ERROR mismatched types +LL | true //~ ERROR mismatched types | ^^^^ expected (), found bool | = note: expected type `()` diff --git a/src/test/ui/block-result/block-must-not-have-result-res.stderr b/src/test/ui/block-result/block-must-not-have-result-res.stderr index 20c7dc416f3bb..85e8fb83e1ed1 100644 --- a/src/test/ui/block-result/block-must-not-have-result-res.stderr +++ b/src/test/ui/block-result/block-must-not-have-result-res.stderr @@ -1,9 +1,9 @@ error[E0308]: mismatched types --> $DIR/block-must-not-have-result-res.rs:15:9 | -14 | fn drop(&mut self) { +LL | fn drop(&mut self) { | - expected `()` because of default return type -15 | true //~ ERROR mismatched types +LL | true //~ ERROR mismatched types | ^^^^ expected (), found bool | = note: expected type `()` diff --git a/src/test/ui/block-result/block-must-not-have-result-while.stderr b/src/test/ui/block-result/block-must-not-have-result-while.stderr index 888a64c1bb1aa..9c69d2a83baba 100644 --- a/src/test/ui/block-result/block-must-not-have-result-while.stderr +++ b/src/test/ui/block-result/block-must-not-have-result-while.stderr @@ -1,7 +1,7 @@ error[E0308]: mismatched types --> $DIR/block-must-not-have-result-while.rs:13:9 | -13 | true //~ ERROR mismatched types +LL | true //~ ERROR mismatched types | ^^^^ expected (), found bool | = note: expected type `()` diff --git a/src/test/ui/block-result/consider-removing-last-semi.stderr b/src/test/ui/block-result/consider-removing-last-semi.stderr index 453f3879f4ba2..3ded9bad786b1 100644 --- a/src/test/ui/block-result/consider-removing-last-semi.stderr +++ b/src/test/ui/block-result/consider-removing-last-semi.stderr @@ -1,12 +1,12 @@ error[E0308]: mismatched types --> $DIR/consider-removing-last-semi.rs:11:18 | -11 | fn f() -> String { //~ ERROR mismatched types +LL | fn f() -> String { //~ ERROR mismatched types | __________________^ -12 | | 0u8; -13 | | "bla".to_string(); +LL | | 0u8; +LL | | "bla".to_string(); | | - help: consider removing this semicolon -14 | | } +LL | | } | |_^ expected struct `std::string::String`, found () | = note: expected type `std::string::String` @@ -15,12 +15,12 @@ error[E0308]: mismatched types error[E0308]: mismatched types --> $DIR/consider-removing-last-semi.rs:16:18 | -16 | fn g() -> String { //~ ERROR mismatched types +LL | fn g() -> String { //~ ERROR mismatched types | __________________^ -17 | | "this won't work".to_string(); -18 | | "removeme".to_string(); +LL | | "this won't work".to_string(); +LL | | "removeme".to_string(); | | - help: consider removing this semicolon -19 | | } +LL | | } | |_^ expected struct `std::string::String`, found () | = note: expected type `std::string::String` diff --git a/src/test/ui/block-result/issue-11714.stderr b/src/test/ui/block-result/issue-11714.stderr index 946d18048944f..4e952b6b5b8c2 100644 --- a/src/test/ui/block-result/issue-11714.stderr +++ b/src/test/ui/block-result/issue-11714.stderr @@ -1,13 +1,13 @@ error[E0308]: mismatched types --> $DIR/issue-11714.rs:11:18 | -11 | fn blah() -> i32 { //~ ERROR mismatched types +LL | fn blah() -> i32 { //~ ERROR mismatched types | __________________^ -12 | | 1 -13 | | -14 | | ; +LL | | 1 +LL | | +LL | | ; | | - help: consider removing this semicolon -15 | | } +LL | | } | |_^ expected i32, found () | = note: expected type `i32` diff --git a/src/test/ui/block-result/issue-13428.stderr b/src/test/ui/block-result/issue-13428.stderr index 22bbb2aadf61c..a2f33fd36d4fa 100644 --- a/src/test/ui/block-result/issue-13428.stderr +++ b/src/test/ui/block-result/issue-13428.stderr @@ -1,15 +1,15 @@ error[E0308]: mismatched types --> $DIR/issue-13428.rs:13:20 | -13 | fn foo() -> String { //~ ERROR mismatched types +LL | fn foo() -> String { //~ ERROR mismatched types | ____________________^ -14 | | format!("Hello {}", -15 | | "world") -16 | | // Put the trailing semicolon on its own line to test that the -17 | | // note message gets the offending semicolon exactly -18 | | ; +LL | | format!("Hello {}", +LL | | "world") +LL | | // Put the trailing semicolon on its own line to test that the +LL | | // note message gets the offending semicolon exactly +LL | | ; | | - help: consider removing this semicolon -19 | | } +LL | | } | |_^ expected struct `std::string::String`, found () | = note: expected type `std::string::String` @@ -18,12 +18,12 @@ error[E0308]: mismatched types error[E0308]: mismatched types --> $DIR/issue-13428.rs:21:20 | -21 | fn bar() -> String { //~ ERROR mismatched types +LL | fn bar() -> String { //~ ERROR mismatched types | ____________________^ -22 | | "foobar".to_string() -23 | | ; +LL | | "foobar".to_string() +LL | | ; | | - help: consider removing this semicolon -24 | | } +LL | | } | |_^ expected struct `std::string::String`, found () | = note: expected type `std::string::String` diff --git a/src/test/ui/block-result/issue-13624.stderr b/src/test/ui/block-result/issue-13624.stderr index cd8c28cd2cfa8..692ec3752b914 100644 --- a/src/test/ui/block-result/issue-13624.stderr +++ b/src/test/ui/block-result/issue-13624.stderr @@ -1,9 +1,9 @@ error[E0308]: mismatched types --> $DIR/issue-13624.rs:17:5 | -16 | pub fn get_enum_struct_variant() -> () { +LL | pub fn get_enum_struct_variant() -> () { | -- expected `()` because of return type -17 | Enum::EnumStructVariant { x: 1, y: 2, z: 3 } +LL | Enum::EnumStructVariant { x: 1, y: 2, z: 3 } | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected (), found enum `a::Enum` | = note: expected type `()` @@ -12,7 +12,7 @@ error[E0308]: mismatched types error[E0308]: mismatched types --> $DIR/issue-13624.rs:32:9 | -32 | a::Enum::EnumStructVariant { x, y, z } => { +LL | a::Enum::EnumStructVariant { x, y, z } => { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected (), found enum `a::Enum` | = note: expected type `()` diff --git a/src/test/ui/block-result/issue-20862.stderr b/src/test/ui/block-result/issue-20862.stderr index 3b4f514de7dca..778d26dfcd279 100644 --- a/src/test/ui/block-result/issue-20862.stderr +++ b/src/test/ui/block-result/issue-20862.stderr @@ -1,9 +1,9 @@ error[E0308]: mismatched types --> $DIR/issue-20862.rs:12:5 | -11 | fn foo(x: i32) { +LL | fn foo(x: i32) { | - possibly return type missing here? -12 | |y| x + y +LL | |y| x + y | ^^^^^^^^^ expected (), found closure | = note: expected type `()` @@ -12,7 +12,7 @@ error[E0308]: mismatched types error[E0618]: expected function, found `()` --> $DIR/issue-20862.rs:17:13 | -17 | let x = foo(5)(2); +LL | let x = foo(5)(2); | ^^^^^^^^^ not a function error: aborting due to 2 previous errors diff --git a/src/test/ui/block-result/issue-22645.stderr b/src/test/ui/block-result/issue-22645.stderr index c6113ae0c9f60..e97589386d0c6 100644 --- a/src/test/ui/block-result/issue-22645.stderr +++ b/src/test/ui/block-result/issue-22645.stderr @@ -1,7 +1,7 @@ error[E0277]: the trait bound `{integer}: Scalar` is not satisfied --> $DIR/issue-22645.rs:25:5 | -25 | b + 3 //~ ERROR E0277 +LL | b + 3 //~ ERROR E0277 | ^ the trait `Scalar` is not implemented for `{integer}` | = help: the following implementations were found: @@ -11,10 +11,10 @@ error[E0277]: the trait bound `{integer}: Scalar` is not satisfied error[E0308]: mismatched types --> $DIR/issue-22645.rs:25:3 | -23 | fn main() { +LL | fn main() { | - expected `()` because of default return type -24 | let b = Bob + 3.5; -25 | b + 3 //~ ERROR E0277 +LL | let b = Bob + 3.5; +LL | b + 3 //~ ERROR E0277 | ^^^^^ expected (), found struct `Bob` | = note: expected type `()` diff --git a/src/test/ui/block-result/issue-3563.stderr b/src/test/ui/block-result/issue-3563.stderr index c3d5f21b0a51e..2d0652a87dd83 100644 --- a/src/test/ui/block-result/issue-3563.stderr +++ b/src/test/ui/block-result/issue-3563.stderr @@ -1,7 +1,7 @@ error[E0599]: no method named `b` found for type `&Self` in the current scope --> $DIR/issue-3563.rs:13:17 | -13 | || self.b() +LL | || self.b() | ^ | = help: did you mean `a`? diff --git a/src/test/ui/block-result/issue-5500.stderr b/src/test/ui/block-result/issue-5500.stderr index 29dbd5a8cf599..acf1d1835fa70 100644 --- a/src/test/ui/block-result/issue-5500.stderr +++ b/src/test/ui/block-result/issue-5500.stderr @@ -1,9 +1,9 @@ error[E0308]: mismatched types --> $DIR/issue-5500.rs:12:5 | -11 | fn main() { +LL | fn main() { | - expected `()` because of default return type -12 | &panic!() +LL | &panic!() | ^^^^^^^^^ expected (), found reference | = note: expected type `()` diff --git a/src/test/ui/block-result/unexpected-return-on-unit.stderr b/src/test/ui/block-result/unexpected-return-on-unit.stderr index 3881bb4625801..44903914a7acf 100644 --- a/src/test/ui/block-result/unexpected-return-on-unit.stderr +++ b/src/test/ui/block-result/unexpected-return-on-unit.stderr @@ -1,18 +1,18 @@ error[E0308]: mismatched types --> $DIR/unexpected-return-on-unit.rs:19:5 | -19 | foo() //~ ERROR mismatched types +LL | foo() //~ ERROR mismatched types | ^^^^^ expected (), found usize | = note: expected type `()` found type `usize` help: try adding a semicolon | -19 | foo(); //~ ERROR mismatched types +LL | foo(); //~ ERROR mismatched types | ^ help: try adding a return type | -18 | fn bar() -> usize { +LL | fn bar() -> usize { | ^^^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/bogus-tag.stderr b/src/test/ui/bogus-tag.stderr index 49dedcd074279..9196509c38dab 100644 --- a/src/test/ui/bogus-tag.stderr +++ b/src/test/ui/bogus-tag.stderr @@ -1,10 +1,10 @@ error[E0599]: no variant named `hsl` found for type `color` in the current scope --> $DIR/bogus-tag.rs:18:7 | -12 | enum color { rgb(isize, isize, isize), rgba(isize, isize, isize, isize), } +LL | enum color { rgb(isize, isize, isize), rgba(isize, isize, isize, isize), } | ---------- variant `hsl` not found here ... -18 | color::hsl(h, s, l) => { println!("hsl"); } +LL | color::hsl(h, s, l) => { println!("hsl"); } | ^^^^^^^^^^^^^^^^^^^ variant not found in `color` error: aborting due to previous error diff --git a/src/test/ui/borrowck/borrowck-box-insensitivity.stderr b/src/test/ui/borrowck/borrowck-box-insensitivity.stderr index 88e8490843d31..b242b4b0746c9 100644 --- a/src/test/ui/borrowck/borrowck-box-insensitivity.stderr +++ b/src/test/ui/borrowck/borrowck-box-insensitivity.stderr @@ -1,10 +1,10 @@ error[E0382]: use of moved value: `a` --> $DIR/borrowck-box-insensitivity.rs:37:9 | -35 | let _x = a.x; +LL | let _x = a.x; | -- value moved here -36 | //~^ value moved here -37 | let _y = a.y; //~ ERROR use of moved +LL | //~^ value moved here +LL | let _y = a.y; //~ ERROR use of moved | ^^ value used here after move | = note: move occurs because `a.x` has type `std::boxed::Box`, which does not implement the `Copy` trait @@ -12,10 +12,10 @@ error[E0382]: use of moved value: `a` error[E0382]: use of moved value: `a` --> $DIR/borrowck-box-insensitivity.rs:46:9 | -44 | let _x = a.x; +LL | let _x = a.x; | -- value moved here -45 | //~^ value moved here -46 | let _y = a.y; //~ ERROR use of moved +LL | //~^ value moved here +LL | let _y = a.y; //~ ERROR use of moved | ^^ value used here after move | = note: move occurs because `a.x` has type `std::boxed::Box`, which does not implement the `Copy` trait @@ -23,10 +23,10 @@ error[E0382]: use of moved value: `a` error[E0382]: use of moved value: `a` --> $DIR/borrowck-box-insensitivity.rs:55:15 | -53 | let _x = a.x; +LL | let _x = a.x; | -- value moved here -54 | //~^ value moved here -55 | let _y = &a.y; //~ ERROR use of moved +LL | //~^ value moved here +LL | let _y = &a.y; //~ ERROR use of moved | ^^^ value used here after move | = note: move occurs because `a.x` has type `std::boxed::Box`, which does not implement the `Copy` trait @@ -34,130 +34,130 @@ error[E0382]: use of moved value: `a` error[E0505]: cannot move out of `a.y` because it is borrowed --> $DIR/borrowck-box-insensitivity.rs:63:9 | -62 | let _x = &a.x; +LL | let _x = &a.x; | --- borrow of `a.x` occurs here -63 | let _y = a.y; +LL | let _y = a.y; | ^^ move out of `a.y` occurs here error[E0503]: cannot use `a.y` because it was mutably borrowed --> $DIR/borrowck-box-insensitivity.rs:71:9 | -70 | let _x = &mut a.x; +LL | let _x = &mut a.x; | --- borrow of `a.x` occurs here -71 | let _y = a.y; //~ ERROR cannot use +LL | let _y = a.y; //~ ERROR cannot use | ^^ use of borrowed `a.x` error[E0505]: cannot move out of `a.y` because it is borrowed --> $DIR/borrowck-box-insensitivity.rs:77:9 | -76 | let _x = &mut a.x; +LL | let _x = &mut a.x; | --- borrow of `a.x` occurs here -77 | let _y = a.y; +LL | let _y = a.y; | ^^ move out of `a.y` occurs here error[E0502]: cannot borrow `a` (via `a.y`) as immutable because `a` is also borrowed as mutable (via `a.x`) --> $DIR/borrowck-box-insensitivity.rs:85:15 | -84 | let _x = &mut a.x; +LL | let _x = &mut a.x; | --- mutable borrow occurs here (via `a.x`) -85 | let _y = &a.y; //~ ERROR cannot borrow +LL | let _y = &a.y; //~ ERROR cannot borrow | ^^^ immutable borrow occurs here (via `a.y`) -86 | //~^ immutable borrow occurs here (via `a.y`) -87 | } +LL | //~^ immutable borrow occurs here (via `a.y`) +LL | } | - mutable borrow ends here error[E0502]: cannot borrow `a` (via `a.y`) as mutable because `a` is also borrowed as immutable (via `a.x`) --> $DIR/borrowck-box-insensitivity.rs:92:19 | -91 | let _x = &a.x; +LL | let _x = &a.x; | --- immutable borrow occurs here (via `a.x`) -92 | let _y = &mut a.y; //~ ERROR cannot borrow +LL | let _y = &mut a.y; //~ ERROR cannot borrow | ^^^ mutable borrow occurs here (via `a.y`) -93 | //~^ mutable borrow occurs here (via `a.y`) -94 | } +LL | //~^ mutable borrow occurs here (via `a.y`) +LL | } | - immutable borrow ends here error[E0382]: use of collaterally moved value: `a.y` - --> $DIR/borrowck-box-insensitivity.rs:100:9 - | -98 | let _x = a.x.x; - | -- value moved here -99 | //~^ value moved here -100 | let _y = a.y; //~ ERROR use of collaterally moved - | ^^ value used here after move - | - = note: move occurs because `a.x.x` has type `std::boxed::Box`, which does not implement the `Copy` trait + --> $DIR/borrowck-box-insensitivity.rs:100:9 + | +LL | let _x = a.x.x; + | -- value moved here +LL | //~^ value moved here +LL | let _y = a.y; //~ ERROR use of collaterally moved + | ^^ value used here after move + | + = note: move occurs because `a.x.x` has type `std::boxed::Box`, which does not implement the `Copy` trait error[E0382]: use of collaterally moved value: `a.y` - --> $DIR/borrowck-box-insensitivity.rs:108:9 - | -106 | let _x = a.x.x; - | -- value moved here -107 | //~^ value moved here -108 | let _y = a.y; //~ ERROR use of collaterally moved - | ^^ value used here after move - | - = note: move occurs because `a.x.x` has type `std::boxed::Box`, which does not implement the `Copy` trait + --> $DIR/borrowck-box-insensitivity.rs:108:9 + | +LL | let _x = a.x.x; + | -- value moved here +LL | //~^ value moved here +LL | let _y = a.y; //~ ERROR use of collaterally moved + | ^^ value used here after move + | + = note: move occurs because `a.x.x` has type `std::boxed::Box`, which does not implement the `Copy` trait error[E0382]: use of collaterally moved value: `a.y` - --> $DIR/borrowck-box-insensitivity.rs:116:15 - | -114 | let _x = a.x.x; - | -- value moved here -115 | //~^ value moved here -116 | let _y = &a.y; //~ ERROR use of collaterally moved - | ^^^ value used here after move - | - = note: move occurs because `a.x.x` has type `std::boxed::Box`, which does not implement the `Copy` trait + --> $DIR/borrowck-box-insensitivity.rs:116:15 + | +LL | let _x = a.x.x; + | -- value moved here +LL | //~^ value moved here +LL | let _y = &a.y; //~ ERROR use of collaterally moved + | ^^^ value used here after move + | + = note: move occurs because `a.x.x` has type `std::boxed::Box`, which does not implement the `Copy` trait error[E0505]: cannot move out of `a.y` because it is borrowed - --> $DIR/borrowck-box-insensitivity.rs:124:9 - | -122 | let _x = &a.x.x; - | ----- borrow of `a.x.x` occurs here -123 | //~^ borrow of `a.x.x` occurs here -124 | let _y = a.y; - | ^^ move out of `a.y` occurs here + --> $DIR/borrowck-box-insensitivity.rs:124:9 + | +LL | let _x = &a.x.x; + | ----- borrow of `a.x.x` occurs here +LL | //~^ borrow of `a.x.x` occurs here +LL | let _y = a.y; + | ^^ move out of `a.y` occurs here error[E0503]: cannot use `a.y` because it was mutably borrowed - --> $DIR/borrowck-box-insensitivity.rs:132:9 - | -131 | let _x = &mut a.x.x; - | ----- borrow of `a.x.x` occurs here -132 | let _y = a.y; //~ ERROR cannot use - | ^^ use of borrowed `a.x.x` + --> $DIR/borrowck-box-insensitivity.rs:132:9 + | +LL | let _x = &mut a.x.x; + | ----- borrow of `a.x.x` occurs here +LL | let _y = a.y; //~ ERROR cannot use + | ^^ use of borrowed `a.x.x` error[E0505]: cannot move out of `a.y` because it is borrowed - --> $DIR/borrowck-box-insensitivity.rs:138:9 - | -137 | let _x = &mut a.x.x; - | ----- borrow of `a.x.x` occurs here -138 | let _y = a.y; - | ^^ move out of `a.y` occurs here + --> $DIR/borrowck-box-insensitivity.rs:138:9 + | +LL | let _x = &mut a.x.x; + | ----- borrow of `a.x.x` occurs here +LL | let _y = a.y; + | ^^ move out of `a.y` occurs here error[E0502]: cannot borrow `a.y` as immutable because `a.x.x` is also borrowed as mutable - --> $DIR/borrowck-box-insensitivity.rs:147:15 - | -145 | let _x = &mut a.x.x; - | ----- mutable borrow occurs here -146 | //~^ mutable borrow occurs here -147 | let _y = &a.y; //~ ERROR cannot borrow - | ^^^ immutable borrow occurs here -148 | //~^ immutable borrow occurs here -149 | } - | - mutable borrow ends here + --> $DIR/borrowck-box-insensitivity.rs:147:15 + | +LL | let _x = &mut a.x.x; + | ----- mutable borrow occurs here +LL | //~^ mutable borrow occurs here +LL | let _y = &a.y; //~ ERROR cannot borrow + | ^^^ immutable borrow occurs here +LL | //~^ immutable borrow occurs here +LL | } + | - mutable borrow ends here error[E0502]: cannot borrow `a.y` as mutable because `a.x.x` is also borrowed as immutable - --> $DIR/borrowck-box-insensitivity.rs:155:19 - | -153 | let _x = &a.x.x; - | ----- immutable borrow occurs here -154 | //~^ immutable borrow occurs here -155 | let _y = &mut a.y; //~ ERROR cannot borrow - | ^^^ mutable borrow occurs here -156 | //~^ mutable borrow occurs here -157 | } - | - immutable borrow ends here + --> $DIR/borrowck-box-insensitivity.rs:155:19 + | +LL | let _x = &a.x.x; + | ----- immutable borrow occurs here +LL | //~^ immutable borrow occurs here +LL | let _y = &mut a.y; //~ ERROR cannot borrow + | ^^^ mutable borrow occurs here +LL | //~^ mutable borrow occurs here +LL | } + | - immutable borrow ends here error: aborting due to 16 previous errors diff --git a/src/test/ui/borrowck/borrowck-closures-two-mut.stderr b/src/test/ui/borrowck/borrowck-closures-two-mut.stderr index 0ec744f4a0781..ce8647a0e5036 100644 --- a/src/test/ui/borrowck/borrowck-closures-two-mut.stderr +++ b/src/test/ui/borrowck/borrowck-closures-two-mut.stderr @@ -1,151 +1,151 @@ error[E0499]: cannot borrow `x` as mutable more than once at a time (Ast) --> $DIR/borrowck-closures-two-mut.rs:24:24 | -23 | let c1 = to_fn_mut(|| x = 4); +LL | let c1 = to_fn_mut(|| x = 4); | -- - previous borrow occurs due to use of `x` in closure | | | first mutable borrow occurs here -24 | let c2 = to_fn_mut(|| x = 5); //~ ERROR cannot borrow `x` as mutable more than once +LL | let c2 = to_fn_mut(|| x = 5); //~ ERROR cannot borrow `x` as mutable more than once | ^^ - borrow occurs due to use of `x` in closure | | | second mutable borrow occurs here -25 | //~| ERROR cannot borrow `x` as mutable more than once -26 | } +LL | //~| ERROR cannot borrow `x` as mutable more than once +LL | } | - first borrow ends here error[E0499]: cannot borrow `x` as mutable more than once at a time (Ast) --> $DIR/borrowck-closures-two-mut.rs:35:24 | -34 | let c1 = to_fn_mut(|| set(&mut x)); +LL | let c1 = to_fn_mut(|| set(&mut x)); | -- - previous borrow occurs due to use of `x` in closure | | | first mutable borrow occurs here -35 | let c2 = to_fn_mut(|| set(&mut x)); //~ ERROR cannot borrow `x` as mutable more than once +LL | let c2 = to_fn_mut(|| set(&mut x)); //~ ERROR cannot borrow `x` as mutable more than once | ^^ - borrow occurs due to use of `x` in closure | | | second mutable borrow occurs here -36 | //~| ERROR cannot borrow `x` as mutable more than once -37 | } +LL | //~| ERROR cannot borrow `x` as mutable more than once +LL | } | - first borrow ends here error[E0499]: cannot borrow `x` as mutable more than once at a time (Ast) --> $DIR/borrowck-closures-two-mut.rs:42:24 | -41 | let c1 = to_fn_mut(|| x = 5); +LL | let c1 = to_fn_mut(|| x = 5); | -- - previous borrow occurs due to use of `x` in closure | | | first mutable borrow occurs here -42 | let c2 = to_fn_mut(|| set(&mut x)); //~ ERROR cannot borrow `x` as mutable more than once +LL | let c2 = to_fn_mut(|| set(&mut x)); //~ ERROR cannot borrow `x` as mutable more than once | ^^ - borrow occurs due to use of `x` in closure | | | second mutable borrow occurs here -43 | //~| ERROR cannot borrow `x` as mutable more than once -44 | } +LL | //~| ERROR cannot borrow `x` as mutable more than once +LL | } | - first borrow ends here error[E0499]: cannot borrow `x` as mutable more than once at a time (Ast) --> $DIR/borrowck-closures-two-mut.rs:49:24 | -48 | let c1 = to_fn_mut(|| x = 5); +LL | let c1 = to_fn_mut(|| x = 5); | -- - previous borrow occurs due to use of `x` in closure | | | first mutable borrow occurs here -49 | let c2 = to_fn_mut(|| { let _y = to_fn_mut(|| set(&mut x)); }); // (nested closure) +LL | let c2 = to_fn_mut(|| { let _y = to_fn_mut(|| set(&mut x)); }); // (nested closure) | ^^ - borrow occurs due to use of `x` in closure | | | second mutable borrow occurs here ... -52 | } +LL | } | - first borrow ends here error[E0499]: cannot borrow `x` as mutable more than once at a time (Ast) --> $DIR/borrowck-closures-two-mut.rs:61:24 | -60 | let c1 = to_fn_mut(|| set(&mut *x.f)); +LL | let c1 = to_fn_mut(|| set(&mut *x.f)); | -- - previous borrow occurs due to use of `x` in closure | | | first mutable borrow occurs here -61 | let c2 = to_fn_mut(|| set(&mut *x.f)); +LL | let c2 = to_fn_mut(|| set(&mut *x.f)); | ^^ - borrow occurs due to use of `x` in closure | | | second mutable borrow occurs here ... -64 | } +LL | } | - first borrow ends here error[E0499]: cannot borrow `x` as mutable more than once at a time (Mir) --> $DIR/borrowck-closures-two-mut.rs:24:24 | -23 | let c1 = to_fn_mut(|| x = 4); +LL | let c1 = to_fn_mut(|| x = 4); | -- - previous borrow occurs due to use of `x` in closure | | | first mutable borrow occurs here -24 | let c2 = to_fn_mut(|| x = 5); //~ ERROR cannot borrow `x` as mutable more than once +LL | let c2 = to_fn_mut(|| x = 5); //~ ERROR cannot borrow `x` as mutable more than once | ^^ - borrow occurs due to use of `x` in closure | | | second mutable borrow occurs here -25 | //~| ERROR cannot borrow `x` as mutable more than once -26 | } +LL | //~| ERROR cannot borrow `x` as mutable more than once +LL | } | - first borrow ends here error[E0499]: cannot borrow `x` as mutable more than once at a time (Mir) --> $DIR/borrowck-closures-two-mut.rs:35:24 | -34 | let c1 = to_fn_mut(|| set(&mut x)); +LL | let c1 = to_fn_mut(|| set(&mut x)); | -- - previous borrow occurs due to use of `x` in closure | | | first mutable borrow occurs here -35 | let c2 = to_fn_mut(|| set(&mut x)); //~ ERROR cannot borrow `x` as mutable more than once +LL | let c2 = to_fn_mut(|| set(&mut x)); //~ ERROR cannot borrow `x` as mutable more than once | ^^ - borrow occurs due to use of `x` in closure | | | second mutable borrow occurs here -36 | //~| ERROR cannot borrow `x` as mutable more than once -37 | } +LL | //~| ERROR cannot borrow `x` as mutable more than once +LL | } | - first borrow ends here error[E0499]: cannot borrow `x` as mutable more than once at a time (Mir) --> $DIR/borrowck-closures-two-mut.rs:42:24 | -41 | let c1 = to_fn_mut(|| x = 5); +LL | let c1 = to_fn_mut(|| x = 5); | -- - previous borrow occurs due to use of `x` in closure | | | first mutable borrow occurs here -42 | let c2 = to_fn_mut(|| set(&mut x)); //~ ERROR cannot borrow `x` as mutable more than once +LL | let c2 = to_fn_mut(|| set(&mut x)); //~ ERROR cannot borrow `x` as mutable more than once | ^^ - borrow occurs due to use of `x` in closure | | | second mutable borrow occurs here -43 | //~| ERROR cannot borrow `x` as mutable more than once -44 | } +LL | //~| ERROR cannot borrow `x` as mutable more than once +LL | } | - first borrow ends here error[E0499]: cannot borrow `x` as mutable more than once at a time (Mir) --> $DIR/borrowck-closures-two-mut.rs:49:24 | -48 | let c1 = to_fn_mut(|| x = 5); +LL | let c1 = to_fn_mut(|| x = 5); | -- - previous borrow occurs due to use of `x` in closure | | | first mutable borrow occurs here -49 | let c2 = to_fn_mut(|| { let _y = to_fn_mut(|| set(&mut x)); }); // (nested closure) +LL | let c2 = to_fn_mut(|| { let _y = to_fn_mut(|| set(&mut x)); }); // (nested closure) | ^^ - borrow occurs due to use of `x` in closure | | | second mutable borrow occurs here ... -52 | } +LL | } | - first borrow ends here error[E0499]: cannot borrow `x` as mutable more than once at a time (Mir) --> $DIR/borrowck-closures-two-mut.rs:61:24 | -60 | let c1 = to_fn_mut(|| set(&mut *x.f)); +LL | let c1 = to_fn_mut(|| set(&mut *x.f)); | -- - previous borrow occurs due to use of `x` in closure | | | first mutable borrow occurs here -61 | let c2 = to_fn_mut(|| set(&mut *x.f)); +LL | let c2 = to_fn_mut(|| set(&mut *x.f)); | ^^ - borrow occurs due to use of `x` in closure | | | second mutable borrow occurs here ... -64 | } +LL | } | - first borrow ends here error: aborting due to 10 previous errors diff --git a/src/test/ui/borrowck/borrowck-escaping-closure-error-1.stderr b/src/test/ui/borrowck/borrowck-escaping-closure-error-1.stderr index cc0bd15c489ea..f079e5ded203a 100644 --- a/src/test/ui/borrowck/borrowck-escaping-closure-error-1.stderr +++ b/src/test/ui/borrowck/borrowck-escaping-closure-error-1.stderr @@ -1,13 +1,13 @@ error[E0373]: closure may outlive the current function, but it borrows `books`, which is owned by the current function --> $DIR/borrowck-escaping-closure-error-1.rs:23:11 | -23 | spawn(|| books.push(4)); +LL | spawn(|| books.push(4)); | ^^ ----- `books` is borrowed here | | | may outlive borrowed value `books` help: to force the closure to take ownership of `books` (and any other referenced variables), use the `move` keyword | -23 | spawn(move || books.push(4)); +LL | spawn(move || books.push(4)); | ^^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/borrowck/borrowck-escaping-closure-error-2.stderr b/src/test/ui/borrowck/borrowck-escaping-closure-error-2.stderr index f8963c175c8ab..f368d7b629e6d 100644 --- a/src/test/ui/borrowck/borrowck-escaping-closure-error-2.stderr +++ b/src/test/ui/borrowck/borrowck-escaping-closure-error-2.stderr @@ -1,13 +1,13 @@ error[E0373]: closure may outlive the current function, but it borrows `books`, which is owned by the current function --> $DIR/borrowck-escaping-closure-error-2.rs:21:14 | -21 | Box::new(|| books.push(4)) +LL | Box::new(|| books.push(4)) | ^^ ----- `books` is borrowed here | | | may outlive borrowed value `books` help: to force the closure to take ownership of `books` (and any other referenced variables), use the `move` keyword | -21 | Box::new(move || books.push(4)) +LL | Box::new(move || books.push(4)) | ^^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/borrowck/borrowck-in-static.stderr b/src/test/ui/borrowck/borrowck-in-static.stderr index 6e47c46cdec94..c47e06edaff55 100644 --- a/src/test/ui/borrowck/borrowck-in-static.stderr +++ b/src/test/ui/borrowck/borrowck-in-static.stderr @@ -1,9 +1,9 @@ error[E0507]: cannot move out of captured outer variable in an `Fn` closure --> $DIR/borrowck-in-static.rs:15:17 | -14 | let x = Box::new(0); +LL | let x = Box::new(0); | - captured outer variable -15 | Box::new(|| x) //~ ERROR cannot move out of captured outer variable +LL | Box::new(|| x) //~ ERROR cannot move out of captured outer variable | ^ cannot move out of captured outer variable in an `Fn` closure error: aborting due to previous error diff --git a/src/test/ui/borrowck/borrowck-move-error-with-note.stderr b/src/test/ui/borrowck/borrowck-move-error-with-note.stderr index c16c80345d513..6c76c1d17a1a7 100644 --- a/src/test/ui/borrowck/borrowck-move-error-with-note.stderr +++ b/src/test/ui/borrowck/borrowck-move-error-with-note.stderr @@ -1,35 +1,35 @@ error[E0507]: cannot move out of borrowed content --> $DIR/borrowck-move-error-with-note.rs:21:11 | -21 | match *f { //~ ERROR cannot move out of +LL | match *f { //~ ERROR cannot move out of | ^^ cannot move out of borrowed content -22 | //~| cannot move out -23 | Foo::Foo1(num1, +LL | //~| cannot move out +LL | Foo::Foo1(num1, | ---- hint: to prevent move, use `ref num1` or `ref mut num1` -24 | num2) => (), +LL | num2) => (), | ---- ...and here (use `ref num2` or `ref mut num2`) -25 | Foo::Foo2(num) => (), +LL | Foo::Foo2(num) => (), | --- ...and here (use `ref num` or `ref mut num`) error[E0509]: cannot move out of type `S`, which implements the `Drop` trait --> $DIR/borrowck-move-error-with-note.rs:40:9 | -40 | / S { //~ ERROR cannot move out of type `S`, which implements the `Drop` trait -41 | | //~| cannot move out of here -42 | | f: _s, +LL | / S { //~ ERROR cannot move out of type `S`, which implements the `Drop` trait +LL | | //~| cannot move out of here +LL | | f: _s, | | -- hint: to prevent move, use `ref _s` or `ref mut _s` -43 | | g: _t +LL | | g: _t | | -- ...and here (use `ref _t` or `ref mut _t`) -44 | | } => {} +LL | | } => {} | |_________^ cannot move out of here error[E0507]: cannot move out of borrowed content --> $DIR/borrowck-move-error-with-note.rs:57:11 | -57 | match a.a { //~ ERROR cannot move out of +LL | match a.a { //~ ERROR cannot move out of | ^ cannot move out of borrowed content -58 | //~| cannot move out -59 | n => { +LL | //~| cannot move out +LL | n => { | - hint: to prevent move, use `ref n` or `ref mut n` error: aborting due to 3 previous errors diff --git a/src/test/ui/borrowck/borrowck-move-out-of-vec-tail.stderr b/src/test/ui/borrowck/borrowck-move-out-of-vec-tail.stderr index f99bbb20ccdf1..42f14f206c22a 100644 --- a/src/test/ui/borrowck/borrowck-move-out-of-vec-tail.stderr +++ b/src/test/ui/borrowck/borrowck-move-out-of-vec-tail.stderr @@ -1,14 +1,14 @@ error[E0508]: cannot move out of type `[Foo]`, a non-copy slice --> $DIR/borrowck-move-out-of-vec-tail.rs:30:18 | -30 | &[Foo { string: a }, +LL | &[Foo { string: a }, | ^ - hint: to prevent move, use `ref a` or `ref mut a` | __________________| | | -31 | | //~^ ERROR cannot move out of type `[Foo]` -32 | | //~| cannot move out -33 | | //~| to prevent move -34 | | Foo { string: b }] => { +LL | | //~^ ERROR cannot move out of type `[Foo]` +LL | | //~| cannot move out +LL | | //~| to prevent move +LL | | Foo { string: b }] => { | |_________________________________-__^ cannot move out of here | | | ...and here (use `ref b` or `ref mut b`) diff --git a/src/test/ui/borrowck/borrowck-reinit.stderr b/src/test/ui/borrowck/borrowck-reinit.stderr index f36ed05051521..605eff5a1ecae 100644 --- a/src/test/ui/borrowck/borrowck-reinit.stderr +++ b/src/test/ui/borrowck/borrowck-reinit.stderr @@ -1,9 +1,9 @@ error[E0382]: use of moved value: `x` (Ast) --> $DIR/borrowck-reinit.rs:18:16 | -17 | drop(x); +LL | drop(x); | - value moved here -18 | let _ = (1,x); //~ ERROR use of moved value: `x` (Ast) +LL | let _ = (1,x); //~ ERROR use of moved value: `x` (Ast) | ^ value used here after move | = note: move occurs because `x` has type `std::boxed::Box`, which does not implement the `Copy` trait @@ -11,9 +11,9 @@ error[E0382]: use of moved value: `x` (Ast) error[E0382]: use of moved value: `x` (Mir) --> $DIR/borrowck-reinit.rs:18:16 | -17 | drop(x); +LL | drop(x); | - value moved here -18 | let _ = (1,x); //~ ERROR use of moved value: `x` (Ast) +LL | let _ = (1,x); //~ ERROR use of moved value: `x` (Ast) | ^ value used here after move | = note: move occurs because `x` has type `std::boxed::Box`, which does not implement the `Copy` trait diff --git a/src/test/ui/borrowck/borrowck-report-with-custom-diagnostic.stderr b/src/test/ui/borrowck/borrowck-report-with-custom-diagnostic.stderr index fb6917141fc97..f02b5d8768137 100644 --- a/src/test/ui/borrowck/borrowck-report-with-custom-diagnostic.stderr +++ b/src/test/ui/borrowck/borrowck-report-with-custom-diagnostic.stderr @@ -1,37 +1,37 @@ error[E0502]: cannot borrow `x` as immutable because it is also borrowed as mutable --> $DIR/borrowck-report-with-custom-diagnostic.rs:17:14 | -15 | let y = &mut x; +LL | let y = &mut x; | - mutable borrow occurs here -16 | //~^ mutable borrow occurs here -17 | let z = &x; //~ ERROR cannot borrow +LL | //~^ mutable borrow occurs here +LL | let z = &x; //~ ERROR cannot borrow | ^ immutable borrow occurs here -18 | //~^ immutable borrow occurs here -19 | } +LL | //~^ immutable borrow occurs here +LL | } | - mutable borrow ends here error[E0502]: cannot borrow `x` as mutable because it is also borrowed as immutable --> $DIR/borrowck-report-with-custom-diagnostic.rs:28:26 | -26 | let y = &x; +LL | let y = &x; | - immutable borrow occurs here -27 | //~^ immutable borrow occurs here -28 | let z = &mut x; //~ ERROR cannot borrow +LL | //~^ immutable borrow occurs here +LL | let z = &mut x; //~ ERROR cannot borrow | ^ mutable borrow occurs here -29 | //~^ mutable borrow occurs here -30 | } +LL | //~^ mutable borrow occurs here +LL | } | - immutable borrow ends here error[E0499]: cannot borrow `x` as mutable more than once at a time --> $DIR/borrowck-report-with-custom-diagnostic.rs:41:22 | -39 | let y = &mut x; +LL | let y = &mut x; | - first mutable borrow occurs here -40 | //~^ first mutable borrow occurs here -41 | let z = &mut x; //~ ERROR cannot borrow +LL | //~^ first mutable borrow occurs here +LL | let z = &mut x; //~ ERROR cannot borrow | ^ second mutable borrow occurs here -42 | //~^ second mutable borrow occurs here -43 | }; +LL | //~^ second mutable borrow occurs here +LL | }; | - first borrow ends here error: aborting due to 3 previous errors diff --git a/src/test/ui/borrowck/borrowck-vec-pattern-nesting.stderr b/src/test/ui/borrowck/borrowck-vec-pattern-nesting.stderr index 899ffb446b96b..aa505ca34d632 100644 --- a/src/test/ui/borrowck/borrowck-vec-pattern-nesting.stderr +++ b/src/test/ui/borrowck/borrowck-vec-pattern-nesting.stderr @@ -1,38 +1,38 @@ error[E0506]: cannot assign to `vec[..]` because it is borrowed --> $DIR/borrowck-vec-pattern-nesting.rs:21:13 | -19 | [box ref _a, _, _] => { +LL | [box ref _a, _, _] => { | ------ borrow of `vec[..]` occurs here -20 | //~^ borrow of `vec[..]` occurs here -21 | vec[0] = box 4; //~ ERROR cannot assign +LL | //~^ borrow of `vec[..]` occurs here +LL | vec[0] = box 4; //~ ERROR cannot assign | ^^^^^^^^^^^^^^ assignment to borrowed `vec[..]` occurs here error[E0506]: cannot assign to `vec[..]` because it is borrowed --> $DIR/borrowck-vec-pattern-nesting.rs:33:13 | -31 | &mut [ref _b..] => { +LL | &mut [ref _b..] => { | ------ borrow of `vec[..]` occurs here -32 | //~^ borrow of `vec[..]` occurs here -33 | vec[0] = box 4; //~ ERROR cannot assign +LL | //~^ borrow of `vec[..]` occurs here +LL | vec[0] = box 4; //~ ERROR cannot assign | ^^^^^^^^^^^^^^ assignment to borrowed `vec[..]` occurs here error[E0508]: cannot move out of type `[std::boxed::Box]`, a non-copy slice --> $DIR/borrowck-vec-pattern-nesting.rs:43:14 | -43 | &mut [_a, //~ ERROR cannot move out +LL | &mut [_a, //~ ERROR cannot move out | ^-- hint: to prevent move, use `ref _a` or `ref mut _a` | ______________| | | -44 | | //~| cannot move out -45 | | //~| to prevent move -46 | | .. -47 | | ] => { +LL | | //~| cannot move out +LL | | //~| to prevent move +LL | | .. +LL | | ] => { | |_________^ cannot move out of here error[E0508]: cannot move out of type `[std::boxed::Box]`, a non-copy slice --> $DIR/borrowck-vec-pattern-nesting.rs:56:13 | -56 | let a = vec[0]; //~ ERROR cannot move out +LL | let a = vec[0]; //~ ERROR cannot move out | ^^^^^^ | | | cannot move out of here @@ -41,10 +41,10 @@ error[E0508]: cannot move out of type `[std::boxed::Box]`, a non-copy sli error[E0508]: cannot move out of type `[std::boxed::Box]`, a non-copy slice --> $DIR/borrowck-vec-pattern-nesting.rs:64:14 | -64 | &mut [ //~ ERROR cannot move out +LL | &mut [ //~ ERROR cannot move out | ______________^ -65 | | //~^ cannot move out -66 | | _b] => {} +LL | | //~^ cannot move out +LL | | _b] => {} | |__________--^ cannot move out of here | | | hint: to prevent move, use `ref _b` or `ref mut _b` @@ -52,7 +52,7 @@ error[E0508]: cannot move out of type `[std::boxed::Box]`, a non-copy sli error[E0508]: cannot move out of type `[std::boxed::Box]`, a non-copy slice --> $DIR/borrowck-vec-pattern-nesting.rs:69:13 | -69 | let a = vec[0]; //~ ERROR cannot move out +LL | let a = vec[0]; //~ ERROR cannot move out | ^^^^^^ | | | cannot move out of here @@ -61,7 +61,7 @@ error[E0508]: cannot move out of type `[std::boxed::Box]`, a non-copy sli error[E0508]: cannot move out of type `[std::boxed::Box]`, a non-copy slice --> $DIR/borrowck-vec-pattern-nesting.rs:77:14 | -77 | &mut [_a, _b, _c] => {} //~ ERROR cannot move out +LL | &mut [_a, _b, _c] => {} //~ ERROR cannot move out | ^--^^--^^--^ | || | | | || | ...and here (use `ref _c` or `ref mut _c`) @@ -72,7 +72,7 @@ error[E0508]: cannot move out of type `[std::boxed::Box]`, a non-copy sli error[E0508]: cannot move out of type `[std::boxed::Box]`, a non-copy slice --> $DIR/borrowck-vec-pattern-nesting.rs:81:13 | -81 | let a = vec[0]; //~ ERROR cannot move out +LL | let a = vec[0]; //~ ERROR cannot move out | ^^^^^^ | | | cannot move out of here diff --git a/src/test/ui/borrowck/immutable-arg.stderr b/src/test/ui/borrowck/immutable-arg.stderr index 40e1878f73214..7cf184f956caa 100644 --- a/src/test/ui/borrowck/immutable-arg.stderr +++ b/src/test/ui/borrowck/immutable-arg.stderr @@ -1,17 +1,17 @@ error[E0384]: cannot assign twice to immutable variable `_x` (Ast) --> $DIR/immutable-arg.rs:14:5 | -13 | fn foo(_x: u32) { +LL | fn foo(_x: u32) { | -- first assignment to `_x` -14 | _x = 4; +LL | _x = 4; | ^^^^^^ cannot assign twice to immutable variable error[E0384]: cannot assign to immutable argument `_x` (Mir) --> $DIR/immutable-arg.rs:14:5 | -13 | fn foo(_x: u32) { +LL | fn foo(_x: u32) { | -- argument not declared as `mut` -14 | _x = 4; +LL | _x = 4; | ^^^^^^ cannot assign to immutable argument error: aborting due to 2 previous errors diff --git a/src/test/ui/borrowck/issue-41962.stderr b/src/test/ui/borrowck/issue-41962.stderr index 13305fd965626..9f0ae1119e060 100644 --- a/src/test/ui/borrowck/issue-41962.stderr +++ b/src/test/ui/borrowck/issue-41962.stderr @@ -1,7 +1,7 @@ error[E0382]: use of partially moved value: `maybe` (Ast) --> $DIR/issue-41962.rs:17:30 | -17 | if let Some(thing) = maybe { +LL | if let Some(thing) = maybe { | ----- ^^^^^ value used here after move | | | value moved here @@ -11,7 +11,7 @@ error[E0382]: use of partially moved value: `maybe` (Ast) error[E0382]: use of moved value: `(maybe as std::prelude::v1::Some).0` (Ast) --> $DIR/issue-41962.rs:17:21 | -17 | if let Some(thing) = maybe { +LL | if let Some(thing) = maybe { | ^^^^^ value moved here in previous iteration of loop | = note: move occurs because the value has type `std::vec::Vec`, which does not implement the `Copy` trait @@ -19,16 +19,16 @@ error[E0382]: use of moved value: `(maybe as std::prelude::v1::Some).0` (Ast) error[E0382]: use of moved value: `maybe` (Mir) --> $DIR/issue-41962.rs:17:9 | -17 | if let Some(thing) = maybe { +LL | if let Some(thing) = maybe { | ^ ----- value moved here | _________| | | -18 | | //~^ ERROR use of partially moved value: `maybe` (Ast) [E0382] -19 | | //~| ERROR use of moved value: `(maybe as std::prelude::v1::Some).0` (Ast) [E0382] -20 | | //~| ERROR use of moved value: `maybe` (Mir) [E0382] -21 | | //~| ERROR use of moved value: `maybe` (Mir) [E0382] -22 | | //~| ERROR use of moved value: `maybe.0` (Mir) [E0382] -23 | | } +LL | | //~^ ERROR use of partially moved value: `maybe` (Ast) [E0382] +LL | | //~| ERROR use of moved value: `(maybe as std::prelude::v1::Some).0` (Ast) [E0382] +LL | | //~| ERROR use of moved value: `maybe` (Mir) [E0382] +LL | | //~| ERROR use of moved value: `maybe` (Mir) [E0382] +LL | | //~| ERROR use of moved value: `maybe.0` (Mir) [E0382] +LL | | } | |_________^ value used here after move | = note: move occurs because `maybe` has type `std::option::Option>`, which does not implement the `Copy` trait @@ -36,7 +36,7 @@ error[E0382]: use of moved value: `maybe` (Mir) error[E0382]: use of moved value: `maybe` (Mir) --> $DIR/issue-41962.rs:17:16 | -17 | if let Some(thing) = maybe { +LL | if let Some(thing) = maybe { | ^^^^^-----^ | | | | | value moved here @@ -47,7 +47,7 @@ error[E0382]: use of moved value: `maybe` (Mir) error[E0382]: use of moved value: `maybe.0` (Mir) --> $DIR/issue-41962.rs:17:21 | -17 | if let Some(thing) = maybe { +LL | if let Some(thing) = maybe { | ^^^^^ value moved here in previous iteration of loop | = note: move occurs because `maybe.0` has type `std::vec::Vec`, which does not implement the `Copy` trait diff --git a/src/test/ui/borrowck/issue-45983.stderr b/src/test/ui/borrowck/issue-45983.stderr index 496f15c289c17..7625b9e76186a 100644 --- a/src/test/ui/borrowck/issue-45983.stderr +++ b/src/test/ui/borrowck/issue-45983.stderr @@ -1,9 +1,9 @@ error: borrowed data cannot be stored outside of its closure --> $DIR/issue-45983.rs:17:27 | -16 | let x = None; +LL | let x = None; | - borrowed data cannot be stored into here... -17 | give_any(|y| x = Some(y)); +LL | give_any(|y| x = Some(y)); | --- ^ cannot be stored outside of its closure | | | ...because it cannot outlive this closure diff --git a/src/test/ui/borrowck/issue-7573.stderr b/src/test/ui/borrowck/issue-7573.stderr index 99b48d9276c06..41a804adfe369 100644 --- a/src/test/ui/borrowck/issue-7573.stderr +++ b/src/test/ui/borrowck/issue-7573.stderr @@ -1,15 +1,15 @@ error: borrowed data cannot be stored outside of its closure --> $DIR/issue-7573.rs:32:27 | -27 | let mut lines_to_use: Vec<&CrateId> = Vec::new(); +LL | let mut lines_to_use: Vec<&CrateId> = Vec::new(); | - cannot infer an appropriate lifetime... -28 | //~^ NOTE cannot infer an appropriate lifetime -29 | let push_id = |installed_id: &CrateId| { +LL | //~^ NOTE cannot infer an appropriate lifetime +LL | let push_id = |installed_id: &CrateId| { | ------- ------------------------ borrowed data cannot outlive this closure | | | ...so that variable is valid at time of its declaration ... -32 | lines_to_use.push(installed_id); +LL | lines_to_use.push(installed_id); | ^^^^^^^^^^^^ cannot be stored outside of its closure error: aborting due to previous error diff --git a/src/test/ui/borrowck/mut-borrow-in-loop.stderr b/src/test/ui/borrowck/mut-borrow-in-loop.stderr index 2b614561d8268..73bbef85de771 100644 --- a/src/test/ui/borrowck/mut-borrow-in-loop.stderr +++ b/src/test/ui/borrowck/mut-borrow-in-loop.stderr @@ -1,28 +1,28 @@ error[E0499]: cannot borrow `*arg` as mutable more than once at a time --> $DIR/mut-borrow-in-loop.rs:20:25 | -20 | (self.func)(arg) //~ ERROR cannot borrow +LL | (self.func)(arg) //~ ERROR cannot borrow | ^^^ mutable borrow starts here in previous iteration of loop -21 | } -22 | } +LL | } +LL | } | - mutable borrow ends here error[E0499]: cannot borrow `*arg` as mutable more than once at a time --> $DIR/mut-borrow-in-loop.rs:26:25 | -26 | (self.func)(arg) //~ ERROR cannot borrow +LL | (self.func)(arg) //~ ERROR cannot borrow | ^^^ mutable borrow starts here in previous iteration of loop -27 | } -28 | } +LL | } +LL | } | - mutable borrow ends here error[E0499]: cannot borrow `*arg` as mutable more than once at a time --> $DIR/mut-borrow-in-loop.rs:33:25 | -33 | (self.func)(arg) //~ ERROR cannot borrow +LL | (self.func)(arg) //~ ERROR cannot borrow | ^^^ mutable borrow starts here in previous iteration of loop -34 | } -35 | } +LL | } +LL | } | - mutable borrow ends here error: aborting due to 3 previous errors diff --git a/src/test/ui/borrowck/mut-borrow-outside-loop.stderr b/src/test/ui/borrowck/mut-borrow-outside-loop.stderr index 716edd21982e9..953d63766ac71 100644 --- a/src/test/ui/borrowck/mut-borrow-outside-loop.stderr +++ b/src/test/ui/borrowck/mut-borrow-outside-loop.stderr @@ -1,22 +1,22 @@ error[E0499]: cannot borrow `void` as mutable more than once at a time --> $DIR/mut-borrow-outside-loop.rs:17:23 | -16 | let first = &mut void; +LL | let first = &mut void; | ---- first mutable borrow occurs here -17 | let second = &mut void; //~ ERROR cannot borrow +LL | let second = &mut void; //~ ERROR cannot borrow | ^^^^ second mutable borrow occurs here ... -25 | } +LL | } | - first borrow ends here error[E0499]: cannot borrow `inner_void` as mutable more than once at a time --> $DIR/mut-borrow-outside-loop.rs:23:33 | -22 | let inner_first = &mut inner_void; +LL | let inner_first = &mut inner_void; | ---------- first mutable borrow occurs here -23 | let inner_second = &mut inner_void; //~ ERROR cannot borrow +LL | let inner_second = &mut inner_void; //~ ERROR cannot borrow | ^^^^^^^^^^ second mutable borrow occurs here -24 | } +LL | } | - first borrow ends here error: aborting due to 2 previous errors diff --git a/src/test/ui/borrowck/regions-bound-missing-bound-in-impl.stderr b/src/test/ui/borrowck/regions-bound-missing-bound-in-impl.stderr index e8323247af997..2c45919f52364 100644 --- a/src/test/ui/borrowck/regions-bound-missing-bound-in-impl.stderr +++ b/src/test/ui/borrowck/regions-bound-missing-bound-in-impl.stderr @@ -1,25 +1,25 @@ error[E0195]: lifetime parameters or bounds on method `no_bound` do not match the trait declaration --> $DIR/regions-bound-missing-bound-in-impl.rs:28:5 | -20 | fn no_bound<'b>(self, b: Inv<'b>); +LL | fn no_bound<'b>(self, b: Inv<'b>); | ---------------------------------- lifetimes in impl do not match this method in trait ... -28 | fn no_bound<'b:'a>(self, b: Inv<'b>) { +LL | fn no_bound<'b:'a>(self, b: Inv<'b>) { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ lifetimes do not match method in trait error[E0195]: lifetime parameters or bounds on method `has_bound` do not match the trait declaration --> $DIR/regions-bound-missing-bound-in-impl.rs:32:5 | -21 | fn has_bound<'b:'a>(self, b: Inv<'b>); +LL | fn has_bound<'b:'a>(self, b: Inv<'b>); | -------------------------------------- lifetimes in impl do not match this method in trait ... -32 | fn has_bound<'b>(self, b: Inv<'b>) { +LL | fn has_bound<'b>(self, b: Inv<'b>) { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ lifetimes do not match method in trait error[E0308]: method not compatible with trait --> $DIR/regions-bound-missing-bound-in-impl.rs:36:5 | -36 | fn wrong_bound1<'b,'c,'d:'a+'c>(self, b: Inv<'b>, c: Inv<'c>, d: Inv<'d>) { +LL | fn wrong_bound1<'b,'c,'d:'a+'c>(self, b: Inv<'b>, c: Inv<'c>, d: Inv<'d>) { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ lifetime mismatch | = note: expected type `fn(&'a isize, Inv<'c>, Inv<'c>, Inv<'d>)` @@ -27,21 +27,21 @@ error[E0308]: method not compatible with trait note: the lifetime 'c as defined on the method body at 36:5... --> $DIR/regions-bound-missing-bound-in-impl.rs:36:5 | -36 | fn wrong_bound1<'b,'c,'d:'a+'c>(self, b: Inv<'b>, c: Inv<'c>, d: Inv<'d>) { +LL | fn wrong_bound1<'b,'c,'d:'a+'c>(self, b: Inv<'b>, c: Inv<'c>, d: Inv<'d>) { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ note: ...does not necessarily outlive the lifetime 'c as defined on the method body at 36:5 --> $DIR/regions-bound-missing-bound-in-impl.rs:36:5 | -36 | fn wrong_bound1<'b,'c,'d:'a+'c>(self, b: Inv<'b>, c: Inv<'c>, d: Inv<'d>) { +LL | fn wrong_bound1<'b,'c,'d:'a+'c>(self, b: Inv<'b>, c: Inv<'c>, d: Inv<'d>) { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error[E0276]: impl has stricter requirements than trait --> $DIR/regions-bound-missing-bound-in-impl.rs:53:5 | -24 | fn another_bound<'x: 'a>(self, x: Inv<'x>, y: Inv<'t>); +LL | fn another_bound<'x: 'a>(self, x: Inv<'x>, y: Inv<'t>); | ------------------------------------------------------- definition of `another_bound` from trait ... -53 | fn another_bound<'x: 't>(self, x: Inv<'x>, y: Inv<'t>) { +LL | fn another_bound<'x: 't>(self, x: Inv<'x>, y: Inv<'t>) { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ impl has extra requirement `'x: 't` error: aborting due to 4 previous errors diff --git a/src/test/ui/borrowck/regions-escape-bound-fn-2.stderr b/src/test/ui/borrowck/regions-escape-bound-fn-2.stderr index 3d88f4fd52e2e..05654a9356484 100644 --- a/src/test/ui/borrowck/regions-escape-bound-fn-2.stderr +++ b/src/test/ui/borrowck/regions-escape-bound-fn-2.stderr @@ -1,9 +1,9 @@ error: borrowed data cannot be stored outside of its closure --> $DIR/regions-escape-bound-fn-2.rs:18:27 | -17 | let mut x = None; +LL | let mut x = None; | ----- borrowed data cannot be stored into here... -18 | with_int(|y| x = Some(y)); +LL | with_int(|y| x = Some(y)); | --- ^ cannot be stored outside of its closure | | | ...because it cannot outlive this closure diff --git a/src/test/ui/borrowck/regions-escape-bound-fn.stderr b/src/test/ui/borrowck/regions-escape-bound-fn.stderr index a2ad7c3f768c6..5f05ee90d072c 100644 --- a/src/test/ui/borrowck/regions-escape-bound-fn.stderr +++ b/src/test/ui/borrowck/regions-escape-bound-fn.stderr @@ -1,9 +1,9 @@ error: borrowed data cannot be stored outside of its closure --> $DIR/regions-escape-bound-fn.rs:18:27 | -17 | let mut x: Option<&isize> = None; +LL | let mut x: Option<&isize> = None; | ----- borrowed data cannot be stored into here... -18 | with_int(|y| x = Some(y)); +LL | with_int(|y| x = Some(y)); | --- ^ cannot be stored outside of its closure | | | ...because it cannot outlive this closure diff --git a/src/test/ui/borrowck/regions-escape-unboxed-closure.stderr b/src/test/ui/borrowck/regions-escape-unboxed-closure.stderr index 4b01e42fa67d0..c90dd2417d0e0 100644 --- a/src/test/ui/borrowck/regions-escape-unboxed-closure.stderr +++ b/src/test/ui/borrowck/regions-escape-unboxed-closure.stderr @@ -1,9 +1,9 @@ error: borrowed data cannot be stored outside of its closure --> $DIR/regions-escape-unboxed-closure.rs:16:32 | -15 | let mut x: Option<&isize> = None; +LL | let mut x: Option<&isize> = None; | ----- borrowed data cannot be stored into here... -16 | with_int(&mut |y| x = Some(y)); +LL | with_int(&mut |y| x = Some(y)); | --- ^ cannot be stored outside of its closure | | | ...because it cannot outlive this closure diff --git a/src/test/ui/borrowck/unboxed-closures-move-upvar-from-non-once-ref-closure.stderr b/src/test/ui/borrowck/unboxed-closures-move-upvar-from-non-once-ref-closure.stderr index 6aa0846f53e26..a09e0eb1436d7 100644 --- a/src/test/ui/borrowck/unboxed-closures-move-upvar-from-non-once-ref-closure.stderr +++ b/src/test/ui/borrowck/unboxed-closures-move-upvar-from-non-once-ref-closure.stderr @@ -1,10 +1,10 @@ error[E0507]: cannot move out of captured outer variable in an `Fn` closure --> $DIR/unboxed-closures-move-upvar-from-non-once-ref-closure.rs:21:9 | -19 | let y = vec![format!("World")]; +LL | let y = vec![format!("World")]; | - captured outer variable -20 | call(|| { -21 | y.into_iter(); +LL | call(|| { +LL | y.into_iter(); | ^ cannot move out of captured outer variable in an `Fn` closure error: aborting due to previous error diff --git a/src/test/ui/cast-as-bool.stderr b/src/test/ui/cast-as-bool.stderr index 346ebf07fc3f5..d5473eb3ac173 100644 --- a/src/test/ui/cast-as-bool.stderr +++ b/src/test/ui/cast-as-bool.stderr @@ -1,7 +1,7 @@ error[E0054]: cannot cast as `bool` --> $DIR/cast-as-bool.rs:12:13 | -12 | let u = 5 as bool; +LL | let u = 5 as bool; | ^^^^^^^^^ unsupported cast | = help: compare with zero instead diff --git a/src/test/ui/cast-errors-issue-43825.stderr b/src/test/ui/cast-errors-issue-43825.stderr index db0a33e927fa1..70d0541b6d0e8 100644 --- a/src/test/ui/cast-errors-issue-43825.stderr +++ b/src/test/ui/cast-errors-issue-43825.stderr @@ -1,7 +1,7 @@ error[E0425]: cannot find value `error` in this scope --> $DIR/cast-errors-issue-43825.rs:12:17 | -12 | let error = error; //~ ERROR cannot find value `error` +LL | let error = error; //~ ERROR cannot find value `error` | ^^^^^ not found in this scope error: aborting due to previous error diff --git a/src/test/ui/cast-rfc0401-2.stderr b/src/test/ui/cast-rfc0401-2.stderr index 1febe6a618fde..eb60f606ad466 100644 --- a/src/test/ui/cast-rfc0401-2.stderr +++ b/src/test/ui/cast-rfc0401-2.stderr @@ -1,7 +1,7 @@ error[E0054]: cannot cast as `bool` --> $DIR/cast-rfc0401-2.rs:16:13 | -16 | let _ = 3 as bool; +LL | let _ = 3 as bool; | ^^^^^^^^^ unsupported cast | = help: compare with zero instead diff --git a/src/test/ui/cast-to-unsized-trait-object-suggestion.stderr b/src/test/ui/cast-to-unsized-trait-object-suggestion.stderr index 55d41848b17a9..ea542a90bff19 100644 --- a/src/test/ui/cast-to-unsized-trait-object-suggestion.stderr +++ b/src/test/ui/cast-to-unsized-trait-object-suggestion.stderr @@ -1,7 +1,7 @@ error[E0620]: cast to unsized type: `&{integer}` as `std::marker::Send` --> $DIR/cast-to-unsized-trait-object-suggestion.rs:12:5 | -12 | &1 as Send; //~ ERROR cast to unsized +LL | &1 as Send; //~ ERROR cast to unsized | ^^^^^^---- | | | help: try casting to a reference instead: `&Send` @@ -9,7 +9,7 @@ error[E0620]: cast to unsized type: `&{integer}` as `std::marker::Send` error[E0620]: cast to unsized type: `std::boxed::Box<{integer}>` as `std::marker::Send` --> $DIR/cast-to-unsized-trait-object-suggestion.rs:13:5 | -13 | Box::new(1) as Send; //~ ERROR cast to unsized +LL | Box::new(1) as Send; //~ ERROR cast to unsized | ^^^^^^^^^^^^^^^---- | | | help: try casting to a `Box` instead: `Box` diff --git a/src/test/ui/cast_char.stderr b/src/test/ui/cast_char.stderr index e42a38dace9d2..481715fd9ce39 100644 --- a/src/test/ui/cast_char.stderr +++ b/src/test/ui/cast_char.stderr @@ -1,19 +1,19 @@ error: only u8 can be casted into char --> $DIR/cast_char.rs:14:23 | -14 | const XYZ: char = 0x1F888 as char; +LL | const XYZ: char = 0x1F888 as char; | ^^^^^^^^^^^^^^^ help: use a char literal instead: `'/u{1F888}'` | note: lint level defined here --> $DIR/cast_char.rs:11:9 | -11 | #![deny(overflowing_literals)] +LL | #![deny(overflowing_literals)] | ^^^^^^^^^^^^^^^^^^^^ error: only u8 can be casted into char --> $DIR/cast_char.rs:16:22 | -16 | const XY: char = 129160 as char; +LL | const XY: char = 129160 as char; | ^^^^^^^^^^^^^^ help: use a char literal instead: `'/u{1F888}'` error: aborting due to 2 previous errors diff --git a/src/test/ui/casts-differing-anon.stderr b/src/test/ui/casts-differing-anon.stderr index 8db6854dba9b6..b266e86a585c6 100644 --- a/src/test/ui/casts-differing-anon.stderr +++ b/src/test/ui/casts-differing-anon.stderr @@ -1,7 +1,7 @@ error[E0606]: casting `*mut impl std::fmt::Debug+?Sized` as `*mut impl std::fmt::Debug+?Sized` is invalid --> $DIR/casts-differing-anon.rs:33:13 | -33 | b_raw = f_raw as *mut _; //~ ERROR is invalid +LL | b_raw = f_raw as *mut _; //~ ERROR is invalid | ^^^^^^^^^^^^^^^ | = note: vtable kinds may not match diff --git a/src/test/ui/casts-issue-46365.stderr b/src/test/ui/casts-issue-46365.stderr index ce3c8593a97ce..b9b9bf0d9f229 100644 --- a/src/test/ui/casts-issue-46365.stderr +++ b/src/test/ui/casts-issue-46365.stderr @@ -1,7 +1,7 @@ error[E0412]: cannot find type `Ipsum` in this scope --> $DIR/casts-issue-46365.rs:12:12 | -12 | ipsum: Ipsum //~ ERROR cannot find type `Ipsum` +LL | ipsum: Ipsum //~ ERROR cannot find type `Ipsum` | ^^^^^ not found in this scope error: aborting due to previous error diff --git a/src/test/ui/changing-crates.stderr b/src/test/ui/changing-crates.stderr index 50287fa3fde9f..1bb59c51ca049 100644 --- a/src/test/ui/changing-crates.stderr +++ b/src/test/ui/changing-crates.stderr @@ -1,7 +1,7 @@ error[E0460]: found possibly newer version of crate `a` which `b` depends on --> $DIR/changing-crates.rs:20:1 | -20 | extern crate b; //~ ERROR: found possibly newer version of crate `a` which `b` depends on +LL | extern crate b; //~ ERROR: found possibly newer version of crate `a` which `b` depends on | ^^^^^^^^^^^^^^^ | = note: perhaps that crate needs to be recompiled? diff --git a/src/test/ui/check_match/issue-35609.stderr b/src/test/ui/check_match/issue-35609.stderr index 1fc1d05636e91..28b6ccf5109cc 100644 --- a/src/test/ui/check_match/issue-35609.stderr +++ b/src/test/ui/check_match/issue-35609.stderr @@ -1,49 +1,49 @@ error[E0004]: non-exhaustive patterns: `(B, _)`, `(C, _)`, `(D, _)` and 2 more not covered --> $DIR/issue-35609.rs:20:11 | -20 | match (A, ()) { //~ ERROR non-exhaustive +LL | match (A, ()) { //~ ERROR non-exhaustive | ^^^^^^^ patterns `(B, _)`, `(C, _)`, `(D, _)` and 2 more not covered error[E0004]: non-exhaustive patterns: `(_, B)`, `(_, C)`, `(_, D)` and 2 more not covered --> $DIR/issue-35609.rs:24:11 | -24 | match (A, A) { //~ ERROR non-exhaustive +LL | match (A, A) { //~ ERROR non-exhaustive | ^^^^^^ patterns `(_, B)`, `(_, C)`, `(_, D)` and 2 more not covered error[E0004]: non-exhaustive patterns: `((B, _), _)`, `((C, _), _)`, `((D, _), _)` and 2 more not covered --> $DIR/issue-35609.rs:28:11 | -28 | match ((A, ()), ()) { //~ ERROR non-exhaustive +LL | match ((A, ()), ()) { //~ ERROR non-exhaustive | ^^^^^^^^^^^^^ patterns `((B, _), _)`, `((C, _), _)`, `((D, _), _)` and 2 more not covered error[E0004]: non-exhaustive patterns: `((B, _), _)`, `((C, _), _)`, `((D, _), _)` and 2 more not covered --> $DIR/issue-35609.rs:32:11 | -32 | match ((A, ()), A) { //~ ERROR non-exhaustive +LL | match ((A, ()), A) { //~ ERROR non-exhaustive | ^^^^^^^^^^^^ patterns `((B, _), _)`, `((C, _), _)`, `((D, _), _)` and 2 more not covered error[E0004]: non-exhaustive patterns: `((B, _), _)`, `((C, _), _)`, `((D, _), _)` and 2 more not covered --> $DIR/issue-35609.rs:36:11 | -36 | match ((A, ()), ()) { //~ ERROR non-exhaustive +LL | match ((A, ()), ()) { //~ ERROR non-exhaustive | ^^^^^^^^^^^^^ patterns `((B, _), _)`, `((C, _), _)`, `((D, _), _)` and 2 more not covered error[E0004]: non-exhaustive patterns: `S(B, _)`, `S(C, _)`, `S(D, _)` and 2 more not covered --> $DIR/issue-35609.rs:41:11 | -41 | match S(A, ()) { //~ ERROR non-exhaustive +LL | match S(A, ()) { //~ ERROR non-exhaustive | ^^^^^^^^ patterns `S(B, _)`, `S(C, _)`, `S(D, _)` and 2 more not covered error[E0004]: non-exhaustive patterns: `Sd { x: B, .. }`, `Sd { x: C, .. }`, `Sd { x: D, .. }` and 2 more not covered --> $DIR/issue-35609.rs:45:11 | -45 | match (Sd { x: A, y: () }) { //~ ERROR non-exhaustive +LL | match (Sd { x: A, y: () }) { //~ ERROR non-exhaustive | ^^^^^^^^^^^^^^^^^^^^ patterns `Sd { x: B, .. }`, `Sd { x: C, .. }`, `Sd { x: D, .. }` and 2 more not covered error[E0004]: non-exhaustive patterns: `Some(B)`, `Some(C)`, `Some(D)` and 2 more not covered --> $DIR/issue-35609.rs:49:11 | -49 | match Some(A) { //~ ERROR non-exhaustive +LL | match Some(A) { //~ ERROR non-exhaustive | ^^^^^^^ patterns `Some(B)`, `Some(C)`, `Some(D)` and 2 more not covered error: aborting due to 8 previous errors diff --git a/src/test/ui/check_match/issue-43253.stderr b/src/test/ui/check_match/issue-43253.stderr index 91bd6b39c8c1d..111f4e44ee9c1 100644 --- a/src/test/ui/check_match/issue-43253.stderr +++ b/src/test/ui/check_match/issue-43253.stderr @@ -1,24 +1,24 @@ warning: unreachable pattern --> $DIR/issue-43253.rs:39:9 | -39 | 9 => {}, +LL | 9 => {}, | ^ | note: lint level defined here --> $DIR/issue-43253.rs:14:9 | -14 | #![warn(unreachable_patterns)] +LL | #![warn(unreachable_patterns)] | ^^^^^^^^^^^^^^^^^^^^ warning: unreachable pattern --> $DIR/issue-43253.rs:45:9 | -45 | 8...9 => {}, +LL | 8...9 => {}, | ^^^^^ warning: unreachable pattern --> $DIR/issue-43253.rs:51:9 | -51 | 9...9 => {}, +LL | 9...9 => {}, | ^^^^^ diff --git a/src/test/ui/closure-expected-type/expect-region-supply-region.stderr b/src/test/ui/closure-expected-type/expect-region-supply-region.stderr index 5c612522d9a31..2942b5858ad05 100644 --- a/src/test/ui/closure-expected-type/expect-region-supply-region.stderr +++ b/src/test/ui/closure-expected-type/expect-region-supply-region.stderr @@ -1,27 +1,27 @@ error: borrowed data cannot be stored outside of its closure --> $DIR/expect-region-supply-region.rs:28:18 | -26 | let mut f: Option<&u32> = None; +LL | let mut f: Option<&u32> = None; | ----- borrowed data cannot be stored into here... -27 | closure_expecting_bound(|x| { +LL | closure_expecting_bound(|x| { | --- ...because it cannot outlive this closure -28 | f = Some(x); //~ ERROR borrowed data cannot be stored outside of its closure +LL | f = Some(x); //~ ERROR borrowed data cannot be stored outside of its closure | ^ cannot be stored outside of its closure error: borrowed data cannot be stored outside of its closure --> $DIR/expect-region-supply-region.rs:38:18 | -36 | let mut f: Option<&u32> = None; +LL | let mut f: Option<&u32> = None; | ----- borrowed data cannot be stored into here... -37 | closure_expecting_bound(|x: &u32| { +LL | closure_expecting_bound(|x: &u32| { | --------- ...because it cannot outlive this closure -38 | f = Some(x); //~ ERROR borrowed data cannot be stored outside of its closure +LL | f = Some(x); //~ ERROR borrowed data cannot be stored outside of its closure | ^ cannot be stored outside of its closure error[E0308]: mismatched types --> $DIR/expect-region-supply-region.rs:47:33 | -47 | closure_expecting_bound(|x: &'x u32| { +LL | closure_expecting_bound(|x: &'x u32| { | ^^^^^^^ lifetime mismatch | = note: expected type `&u32` @@ -29,25 +29,25 @@ error[E0308]: mismatched types note: the anonymous lifetime #2 defined on the body at 47:29... --> $DIR/expect-region-supply-region.rs:47:29 | -47 | closure_expecting_bound(|x: &'x u32| { +LL | closure_expecting_bound(|x: &'x u32| { | _____________________________^ -48 | | //~^ ERROR mismatched types -49 | | //~| ERROR mismatched types -50 | | +LL | | //~^ ERROR mismatched types +LL | | //~| ERROR mismatched types +LL | | ... | -53 | | //~^ ERROR borrowed data cannot be stored outside of its closure -54 | | }); +LL | | //~^ ERROR borrowed data cannot be stored outside of its closure +LL | | }); | |_____^ note: ...does not necessarily outlive the lifetime 'x as defined on the function body at 42:1 --> $DIR/expect-region-supply-region.rs:42:1 | -42 | fn expect_bound_supply_named<'x>() { +LL | fn expect_bound_supply_named<'x>() { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error[E0308]: mismatched types --> $DIR/expect-region-supply-region.rs:47:33 | -47 | closure_expecting_bound(|x: &'x u32| { +LL | closure_expecting_bound(|x: &'x u32| { | ^^^^^^^ lifetime mismatch | = note: expected type `&u32` @@ -55,31 +55,31 @@ error[E0308]: mismatched types note: the lifetime 'x as defined on the function body at 42:1... --> $DIR/expect-region-supply-region.rs:42:1 | -42 | fn expect_bound_supply_named<'x>() { +LL | fn expect_bound_supply_named<'x>() { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ note: ...does not necessarily outlive the anonymous lifetime #2 defined on the body at 47:29 --> $DIR/expect-region-supply-region.rs:47:29 | -47 | closure_expecting_bound(|x: &'x u32| { +LL | closure_expecting_bound(|x: &'x u32| { | _____________________________^ -48 | | //~^ ERROR mismatched types -49 | | //~| ERROR mismatched types -50 | | +LL | | //~^ ERROR mismatched types +LL | | //~| ERROR mismatched types +LL | | ... | -53 | | //~^ ERROR borrowed data cannot be stored outside of its closure -54 | | }); +LL | | //~^ ERROR borrowed data cannot be stored outside of its closure +LL | | }); | |_____^ error: borrowed data cannot be stored outside of its closure --> $DIR/expect-region-supply-region.rs:52:18 | -43 | let mut f: Option<&u32> = None; +LL | let mut f: Option<&u32> = None; | ----- borrowed data cannot be stored into here... ... -47 | closure_expecting_bound(|x: &'x u32| { +LL | closure_expecting_bound(|x: &'x u32| { | ------------ ...because it cannot outlive this closure ... -52 | f = Some(x); +LL | f = Some(x); | ^ cannot be stored outside of its closure error: aborting due to 5 previous errors diff --git a/src/test/ui/closure_context/issue-26046-fn-mut.stderr b/src/test/ui/closure_context/issue-26046-fn-mut.stderr index 77ce1176b5cd0..4329c84608fe7 100644 --- a/src/test/ui/closure_context/issue-26046-fn-mut.stderr +++ b/src/test/ui/closure_context/issue-26046-fn-mut.stderr @@ -1,12 +1,12 @@ error[E0525]: expected a closure that implements the `Fn` trait, but this closure only implements `FnMut` --> $DIR/issue-26046-fn-mut.rs:14:19 | -14 | let closure = || { //~ ERROR expected a closure that +LL | let closure = || { //~ ERROR expected a closure that | ^^ this closure implements `FnMut`, not `Fn` -15 | num += 1; +LL | num += 1; | --- closure is `FnMut` because it mutates the variable `num` here ... -18 | Box::new(closure) +LL | Box::new(closure) | ----------------- the requirement to implement `Fn` derives from here error: aborting due to previous error diff --git a/src/test/ui/closure_context/issue-26046-fn-once.stderr b/src/test/ui/closure_context/issue-26046-fn-once.stderr index 4eed4461ebafe..c9eabf5acaabd 100644 --- a/src/test/ui/closure_context/issue-26046-fn-once.stderr +++ b/src/test/ui/closure_context/issue-26046-fn-once.stderr @@ -1,12 +1,12 @@ error[E0525]: expected a closure that implements the `Fn` trait, but this closure only implements `FnOnce` --> $DIR/issue-26046-fn-once.rs:14:19 | -14 | let closure = move || { //~ ERROR expected a closure +LL | let closure = move || { //~ ERROR expected a closure | ^^^^^^^ this closure implements `FnOnce`, not `Fn` -15 | vec +LL | vec | --- closure is `FnOnce` because it moves the variable `vec` out of its environment ... -18 | Box::new(closure) +LL | Box::new(closure) | ----------------- the requirement to implement `Fn` derives from here error: aborting due to previous error diff --git a/src/test/ui/closure_context/issue-42065.stderr b/src/test/ui/closure_context/issue-42065.stderr index c195940ade6fa..311b219a6ae46 100644 --- a/src/test/ui/closure_context/issue-42065.stderr +++ b/src/test/ui/closure_context/issue-42065.stderr @@ -1,15 +1,15 @@ error[E0382]: use of moved value: `debug_dump_dict` --> $DIR/issue-42065.rs:21:5 | -20 | debug_dump_dict(); +LL | debug_dump_dict(); | --------------- value moved here -21 | debug_dump_dict(); +LL | debug_dump_dict(); | ^^^^^^^^^^^^^^^ value used here after move | note: closure cannot be invoked more than once because it moves the variable `dict` out of its environment --> $DIR/issue-42065.rs:16:29 | -16 | for (key, value) in dict { +LL | for (key, value) in dict { | ^^^^ error: aborting due to previous error diff --git a/src/test/ui/codemap_tests/bad-format-args.stderr b/src/test/ui/codemap_tests/bad-format-args.stderr index 9d6ef54cb979f..5414557ddc289 100644 --- a/src/test/ui/codemap_tests/bad-format-args.stderr +++ b/src/test/ui/codemap_tests/bad-format-args.stderr @@ -1,7 +1,7 @@ error: requires at least a format string argument --> $DIR/bad-format-args.rs:12:5 | -12 | format!(); +LL | format!(); | ^^^^^^^^^^ | = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info) @@ -9,7 +9,7 @@ error: requires at least a format string argument error: expected token: `,` --> $DIR/bad-format-args.rs:13:5 | -13 | format!("" 1); +LL | format!("" 1); | ^^^^^^^^^^^^^^ | = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info) @@ -17,7 +17,7 @@ error: expected token: `,` error: expected token: `,` --> $DIR/bad-format-args.rs:14:5 | -14 | format!("", 1 1); +LL | format!("", 1 1); | ^^^^^^^^^^^^^^^^^ | = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info) diff --git a/src/test/ui/codemap_tests/coherence-overlapping-inherent-impl-trait.stderr b/src/test/ui/codemap_tests/coherence-overlapping-inherent-impl-trait.stderr index a7d52301476c9..67357406c9038 100644 --- a/src/test/ui/codemap_tests/coherence-overlapping-inherent-impl-trait.stderr +++ b/src/test/ui/codemap_tests/coherence-overlapping-inherent-impl-trait.stderr @@ -1,9 +1,9 @@ error[E0592]: duplicate definitions with name `f` --> $DIR/coherence-overlapping-inherent-impl-trait.rs:14:10 | -14 | impl C { fn f() {} } //~ ERROR duplicate +LL | impl C { fn f() {} } //~ ERROR duplicate | ^^^^^^^^^ duplicate definitions for `f` -15 | impl C { fn f() {} } +LL | impl C { fn f() {} } | --------- other definition for `f` error: aborting due to previous error diff --git a/src/test/ui/codemap_tests/empty_span.stderr b/src/test/ui/codemap_tests/empty_span.stderr index 3474803b00dd1..a8e01e9d86d28 100644 --- a/src/test/ui/codemap_tests/empty_span.stderr +++ b/src/test/ui/codemap_tests/empty_span.stderr @@ -1,7 +1,7 @@ error[E0321]: cross-crate traits with a default impl, like `std::marker::Send`, can only be implemented for a struct/enum type, not `&'static main::Foo` --> $DIR/empty_span.rs:17:5 | -17 | unsafe impl Send for &'static Foo { } //~ ERROR cross-crate traits with a default impl +LL | unsafe impl Send for &'static Foo { } //~ ERROR cross-crate traits with a default impl | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/codemap_tests/huge_multispan_highlight.stderr b/src/test/ui/codemap_tests/huge_multispan_highlight.stderr index bc333bde93c6b..a62d4c6f032af 100644 --- a/src/test/ui/codemap_tests/huge_multispan_highlight.stderr +++ b/src/test/ui/codemap_tests/huge_multispan_highlight.stderr @@ -1,11 +1,11 @@ error[E0596]: cannot borrow immutable local variable `x` as mutable - --> $DIR/huge_multispan_highlight.rs:100:18 - | -12 | let x = "foo"; - | - consider changing this to `mut x` + --> $DIR/huge_multispan_highlight.rs:100:18 + | +LL | let x = "foo"; + | - consider changing this to `mut x` ... -100 | let y = &mut x; //~ ERROR cannot borrow - | ^ cannot borrow mutably +LL | let y = &mut x; //~ ERROR cannot borrow + | ^ cannot borrow mutably error: aborting due to previous error diff --git a/src/test/ui/codemap_tests/issue-11715.stderr b/src/test/ui/codemap_tests/issue-11715.stderr index bd8ffba00d44b..dbcce77f339e8 100644 --- a/src/test/ui/codemap_tests/issue-11715.stderr +++ b/src/test/ui/codemap_tests/issue-11715.stderr @@ -1,12 +1,12 @@ error[E0499]: cannot borrow `x` as mutable more than once at a time - --> $DIR/issue-11715.rs:100:18 - | -99 | let y = &mut x; - | - first mutable borrow occurs here -100 | let z = &mut x; //~ ERROR cannot borrow - | ^ second mutable borrow occurs here -101 | } - | - first borrow ends here + --> $DIR/issue-11715.rs:100:18 + | +LL | let y = &mut x; + | - first mutable borrow occurs here +LL | let z = &mut x; //~ ERROR cannot borrow + | ^ second mutable borrow occurs here +LL | } + | - first borrow ends here error: aborting due to previous error diff --git a/src/test/ui/codemap_tests/issue-28308.stderr b/src/test/ui/codemap_tests/issue-28308.stderr index c5afa5ec1a4f8..0b285bf260bec 100644 --- a/src/test/ui/codemap_tests/issue-28308.stderr +++ b/src/test/ui/codemap_tests/issue-28308.stderr @@ -1,7 +1,7 @@ error[E0600]: cannot apply unary operator `!` to type `&'static str` --> $DIR/issue-28308.rs:12:5 | -12 | assert!("foo"); +LL | assert!("foo"); | ^^^^^^^^^^^^^^^ | = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info) diff --git a/src/test/ui/codemap_tests/one_line.stderr b/src/test/ui/codemap_tests/one_line.stderr index cfe3d527136a3..56bd18d1a36ae 100644 --- a/src/test/ui/codemap_tests/one_line.stderr +++ b/src/test/ui/codemap_tests/one_line.stderr @@ -1,7 +1,7 @@ error[E0499]: cannot borrow `v` as mutable more than once at a time --> $DIR/one_line.rs:13:12 | -13 | v.push(v.pop().unwrap()); //~ ERROR cannot borrow +LL | v.push(v.pop().unwrap()); //~ ERROR cannot borrow | - ^ - first borrow ends here | | | | | second mutable borrow occurs here diff --git a/src/test/ui/codemap_tests/overlapping_inherent_impls.stderr b/src/test/ui/codemap_tests/overlapping_inherent_impls.stderr index 0ccdd20765176..417dde64c13b6 100644 --- a/src/test/ui/codemap_tests/overlapping_inherent_impls.stderr +++ b/src/test/ui/codemap_tests/overlapping_inherent_impls.stderr @@ -1,28 +1,28 @@ error[E0592]: duplicate definitions with name `id` --> $DIR/overlapping_inherent_impls.rs:19:5 | -19 | fn id() {} //~ ERROR duplicate definitions +LL | fn id() {} //~ ERROR duplicate definitions | ^^^^^^^^^^ duplicate definitions for `id` ... -23 | fn id() {} +LL | fn id() {} | ---------- other definition for `id` error[E0592]: duplicate definitions with name `bar` --> $DIR/overlapping_inherent_impls.rs:29:5 | -29 | fn bar(&self) {} //~ ERROR duplicate definitions +LL | fn bar(&self) {} //~ ERROR duplicate definitions | ^^^^^^^^^^^^^^^^ duplicate definitions for `bar` ... -33 | fn bar(&self) {} +LL | fn bar(&self) {} | ---------------- other definition for `bar` error[E0592]: duplicate definitions with name `baz` --> $DIR/overlapping_inherent_impls.rs:39:5 | -39 | fn baz(&self) {} //~ ERROR duplicate definitions +LL | fn baz(&self) {} //~ ERROR duplicate definitions | ^^^^^^^^^^^^^^^^ duplicate definitions for `baz` ... -43 | fn baz(&self) {} +LL | fn baz(&self) {} | ---------------- other definition for `baz` | = note: upstream crates may add new impl of trait `std::marker::Copy` for type `std::vec::Vec<_>` in future versions diff --git a/src/test/ui/codemap_tests/overlapping_spans.stderr b/src/test/ui/codemap_tests/overlapping_spans.stderr index dc801b20dfb9d..290ea71a25bef 100644 --- a/src/test/ui/codemap_tests/overlapping_spans.stderr +++ b/src/test/ui/codemap_tests/overlapping_spans.stderr @@ -1,7 +1,7 @@ error[E0509]: cannot move out of type `S`, which implements the `Drop` trait --> $DIR/overlapping_spans.rs:21:9 | -21 | S {f:_s} => {} //~ ERROR cannot move out +LL | S {f:_s} => {} //~ ERROR cannot move out | ^^^^^--^ | | | | | hint: to prevent move, use `ref _s` or `ref mut _s` diff --git a/src/test/ui/codemap_tests/tab.stderr b/src/test/ui/codemap_tests/tab.stderr index c887821c6d11a..4b9814e263fc1 100644 --- a/src/test/ui/codemap_tests/tab.stderr +++ b/src/test/ui/codemap_tests/tab.stderr @@ -1,15 +1,15 @@ error[E0425]: cannot find value `bar` in this scope --> $DIR/tab.rs:14:2 | -14 | bar; //~ ERROR cannot find value `bar` +LL | bar; //~ ERROR cannot find value `bar` | ^^^ not found in this scope error[E0308]: mismatched types --> $DIR/tab.rs:18:2 | -17 | fn foo() { +LL | fn foo() { | - help: try adding a return type: `-> &'static str` -18 | "bar boo" //~ ERROR mismatched types +LL | "bar boo" //~ ERROR mismatched types | ^^^^^^^^^^^^^^^^^^^^ expected (), found reference | = note: expected type `()` diff --git a/src/test/ui/codemap_tests/tab_2.stderr b/src/test/ui/codemap_tests/tab_2.stderr index 34c49d9756222..d8ad5955caeaa 100644 --- a/src/test/ui/codemap_tests/tab_2.stderr +++ b/src/test/ui/codemap_tests/tab_2.stderr @@ -1,9 +1,9 @@ error: unterminated double quote string --> $DIR/tab_2.rs:14:7 | -14 | """; //~ ERROR unterminated double quote +LL | """; //~ ERROR unterminated double quote | ___________________^ -15 | | } +LL | | } | |__^ error: aborting due to previous error diff --git a/src/test/ui/codemap_tests/tab_3.stderr b/src/test/ui/codemap_tests/tab_3.stderr index 322020626639b..f47590c56ef38 100644 --- a/src/test/ui/codemap_tests/tab_3.stderr +++ b/src/test/ui/codemap_tests/tab_3.stderr @@ -1,10 +1,10 @@ error[E0382]: use of moved value: `some_vec` --> $DIR/tab_3.rs:17:20 | -15 | some_vec.into_iter(); +LL | some_vec.into_iter(); | -------- value moved here -16 | { -17 | println!("{:?}", some_vec); //~ ERROR use of moved +LL | { +LL | println!("{:?}", some_vec); //~ ERROR use of moved | ^^^^^^^^ value used here after move | = note: move occurs because `some_vec` has type `std::vec::Vec<&str>`, which does not implement the `Copy` trait diff --git a/src/test/ui/codemap_tests/two_files.stderr b/src/test/ui/codemap_tests/two_files.stderr index c0cfeef194da6..614531c982128 100644 --- a/src/test/ui/codemap_tests/two_files.stderr +++ b/src/test/ui/codemap_tests/two_files.stderr @@ -1,7 +1,7 @@ error[E0404]: expected trait, found type alias `Bar` --> $DIR/two_files.rs:15:6 | -15 | impl Bar for Baz { } //~ ERROR expected trait, found type alias +LL | impl Bar for Baz { } //~ ERROR expected trait, found type alias | ^^^ type aliases cannot be used for traits error: cannot continue compilation due to previous error diff --git a/src/test/ui/codemap_tests/unicode.stderr b/src/test/ui/codemap_tests/unicode.stderr index 4f3c79410df9c..b9b03c9b9ec62 100644 --- a/src/test/ui/codemap_tests/unicode.stderr +++ b/src/test/ui/codemap_tests/unicode.stderr @@ -1,7 +1,7 @@ error: invalid ABI: expected one of [cdecl, stdcall, fastcall, vectorcall, thiscall, aapcs, win64, sysv64, ptx-kernel, msp430-interrupt, x86-interrupt, Rust, C, system, rust-intrinsic, rust-call, platform-intrinsic, unadjusted], found `路濫狼á́́` --> $DIR/unicode.rs:11:8 | -11 | extern "路濫狼á́́" fn foo() {} //~ ERROR invalid ABI +LL | extern "路濫狼á́́" fn foo() {} //~ ERROR invalid ABI | ^^^^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/codemap_tests/unicode_2.stderr b/src/test/ui/codemap_tests/unicode_2.stderr index 9ffd08ca06f83..dfeeed2dc5945 100644 --- a/src/test/ui/codemap_tests/unicode_2.stderr +++ b/src/test/ui/codemap_tests/unicode_2.stderr @@ -1,7 +1,7 @@ error: invalid width `7` for integer literal --> $DIR/unicode_2.rs:14:25 | -14 | let _ = ("a̐éö̲", 0u7); //~ ERROR invalid width +LL | let _ = ("a̐éö̲", 0u7); //~ ERROR invalid width | ^^^ | = help: valid widths are 8, 16, 32, 64 and 128 @@ -9,7 +9,7 @@ error: invalid width `7` for integer literal error: invalid width `42` for integer literal --> $DIR/unicode_2.rs:15:20 | -15 | let _ = ("아あ", 1i42); //~ ERROR invalid width +LL | let _ = ("아あ", 1i42); //~ ERROR invalid width | ^^^^ | = help: valid widths are 8, 16, 32, 64 and 128 @@ -17,7 +17,7 @@ error: invalid width `42` for integer literal error[E0425]: cannot find value `a̐é` in this scope --> $DIR/unicode_2.rs:16:13 | -16 | let _ = a̐é; //~ ERROR cannot find +LL | let _ = a̐é; //~ ERROR cannot find | ^^ not found in this scope error: aborting due to 3 previous errors diff --git a/src/test/ui/codemap_tests/unicode_3.stderr b/src/test/ui/codemap_tests/unicode_3.stderr index 3547accd2ed33..1a44d39aa27a2 100644 --- a/src/test/ui/codemap_tests/unicode_3.stderr +++ b/src/test/ui/codemap_tests/unicode_3.stderr @@ -1,7 +1,7 @@ warning: denote infinite loops with `loop { ... }` --> $DIR/unicode_3.rs:14:45 | -14 | let s = "ZͨA͑ͦ͒͋ͤ͑̚L̄͑͋Ĝͨͥ̿͒̽̈́Oͥ͛ͭ!̏"; while true { break; } +LL | let s = "ZͨA͑ͦ͒͋ͤ͑̚L̄͑͋Ĝͨͥ̿͒̽̈́Oͥ͛ͭ!̏"; while true { break; } | ^^^^^^^^^^ help: use `loop` | = note: #[warn(while_true)] on by default diff --git a/src/test/ui/coercion-missing-tail-expected-type.stderr b/src/test/ui/coercion-missing-tail-expected-type.stderr index 93f57216ca063..102e27b8d5908 100644 --- a/src/test/ui/coercion-missing-tail-expected-type.stderr +++ b/src/test/ui/coercion-missing-tail-expected-type.stderr @@ -1,11 +1,11 @@ error[E0308]: mismatched types --> $DIR/coercion-missing-tail-expected-type.rs:13:28 | -13 | fn plus_one(x: i32) -> i32 { //~ ERROR mismatched types +LL | fn plus_one(x: i32) -> i32 { //~ ERROR mismatched types | ____________________________^ -14 | | x + 1; +LL | | x + 1; | | - help: consider removing this semicolon -15 | | } +LL | | } | |_^ expected i32, found () | = note: expected type `i32` @@ -14,11 +14,11 @@ error[E0308]: mismatched types error[E0308]: mismatched types --> $DIR/coercion-missing-tail-expected-type.rs:17:29 | -17 | fn foo() -> Result { //~ ERROR mismatched types +LL | fn foo() -> Result { //~ ERROR mismatched types | _____________________________^ -18 | | Ok(1); +LL | | Ok(1); | | - help: consider removing this semicolon -19 | | } +LL | | } | |_^ expected enum `std::result::Result`, found () | = note: expected type `std::result::Result` diff --git a/src/test/ui/coherence-error-suppression.stderr b/src/test/ui/coherence-error-suppression.stderr index 57b746f19e856..705652a2fd61f 100644 --- a/src/test/ui/coherence-error-suppression.stderr +++ b/src/test/ui/coherence-error-suppression.stderr @@ -1,7 +1,7 @@ error[E0412]: cannot find type `DoesNotExist` in this scope --> $DIR/coherence-error-suppression.rs:19:14 | -19 | impl Foo for DoesNotExist {} //~ ERROR cannot find type `DoesNotExist` in this scope +LL | impl Foo for DoesNotExist {} //~ ERROR cannot find type `DoesNotExist` in this scope | ^^^^^^^^^^^^ not found in this scope error: aborting due to previous error diff --git a/src/test/ui/coherence-impls-copy.stderr b/src/test/ui/coherence-impls-copy.stderr index e5e91df771fdc..94afb4706258c 100644 --- a/src/test/ui/coherence-impls-copy.stderr +++ b/src/test/ui/coherence-impls-copy.stderr @@ -1,37 +1,37 @@ error[E0206]: the trait `Copy` may not be implemented for this type --> $DIR/coherence-impls-copy.rs:29:15 | -29 | impl Copy for &'static mut MyType {} +LL | impl Copy for &'static mut MyType {} | ^^^^^^^^^^^^^^^^^^^ type is not a structure or enumeration error[E0206]: the trait `Copy` may not be implemented for this type --> $DIR/coherence-impls-copy.rs:33:15 | -33 | impl Copy for (MyType, MyType) {} +LL | impl Copy for (MyType, MyType) {} | ^^^^^^^^^^^^^^^^ type is not a structure or enumeration error[E0206]: the trait `Copy` may not be implemented for this type --> $DIR/coherence-impls-copy.rs:37:15 | -37 | impl Copy for &'static NotSync {} +LL | impl Copy for &'static NotSync {} | ^^^^^^^^^^^^^^^^ type is not a structure or enumeration error[E0206]: the trait `Copy` may not be implemented for this type --> $DIR/coherence-impls-copy.rs:40:15 | -40 | impl Copy for [MyType] {} +LL | impl Copy for [MyType] {} | ^^^^^^^^ type is not a structure or enumeration error[E0206]: the trait `Copy` may not be implemented for this type --> $DIR/coherence-impls-copy.rs:44:15 | -44 | impl Copy for &'static [NotSync] {} +LL | impl Copy for &'static [NotSync] {} | ^^^^^^^^^^^^^^^^^^ type is not a structure or enumeration error[E0117]: only traits defined in the current crate can be implemented for arbitrary types --> $DIR/coherence-impls-copy.rs:33:1 | -33 | impl Copy for (MyType, MyType) {} +LL | impl Copy for (MyType, MyType) {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ impl doesn't use types inside crate | = note: the impl does not reference any types defined in this crate @@ -40,7 +40,7 @@ error[E0117]: only traits defined in the current crate can be implemented for ar error[E0117]: only traits defined in the current crate can be implemented for arbitrary types --> $DIR/coherence-impls-copy.rs:40:1 | -40 | impl Copy for [MyType] {} +LL | impl Copy for [MyType] {} | ^^^^^^^^^^^^^^^^^^^^^^^^^ impl doesn't use types inside crate | = note: the impl does not reference any types defined in this crate @@ -49,7 +49,7 @@ error[E0117]: only traits defined in the current crate can be implemented for ar error[E0117]: only traits defined in the current crate can be implemented for arbitrary types --> $DIR/coherence-impls-copy.rs:44:1 | -44 | impl Copy for &'static [NotSync] {} +LL | impl Copy for &'static [NotSync] {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ impl doesn't use types inside crate | = note: the impl does not reference any types defined in this crate diff --git a/src/test/ui/coherence-overlap-downstream-inherent.stderr b/src/test/ui/coherence-overlap-downstream-inherent.stderr index aca6800deb5cc..7d25dfc7b4890 100644 --- a/src/test/ui/coherence-overlap-downstream-inherent.stderr +++ b/src/test/ui/coherence-overlap-downstream-inherent.stderr @@ -1,19 +1,19 @@ error[E0592]: duplicate definitions with name `dummy` --> $DIR/coherence-overlap-downstream-inherent.rs:17:26 | -17 | impl Sweet { fn dummy(&self) { } } +LL | impl Sweet { fn dummy(&self) { } } | ^^^^^^^^^^^^^^^^^^^ duplicate definitions for `dummy` -18 | //~^ ERROR E0592 -19 | impl Sweet { fn dummy(&self) { } } +LL | //~^ ERROR E0592 +LL | impl Sweet { fn dummy(&self) { } } | ------------------- other definition for `dummy` error[E0592]: duplicate definitions with name `f` --> $DIR/coherence-overlap-downstream-inherent.rs:23:38 | -23 | impl A where T: Bar { fn f(&self) {} } +LL | impl A where T: Bar { fn f(&self) {} } | ^^^^^^^^^^^^^^ duplicate definitions for `f` -24 | //~^ ERROR E0592 -25 | impl A { fn f(&self) {} } +LL | //~^ ERROR E0592 +LL | impl A { fn f(&self) {} } | -------------- other definition for `f` | = note: downstream crates may implement trait `Bar<_>` for type `i32` diff --git a/src/test/ui/coherence-overlap-downstream.stderr b/src/test/ui/coherence-overlap-downstream.stderr index c94ffd60d261f..441ab11be6af1 100644 --- a/src/test/ui/coherence-overlap-downstream.stderr +++ b/src/test/ui/coherence-overlap-downstream.stderr @@ -1,17 +1,17 @@ error[E0119]: conflicting implementations of trait `Sweet`: --> $DIR/coherence-overlap-downstream.rs:18:1 | -17 | impl Sweet for T { } +LL | impl Sweet for T { } | ------------------------- first implementation here -18 | impl Sweet for T { } +LL | impl Sweet for T { } | ^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation error[E0119]: conflicting implementations of trait `Foo<_>` for type `i32`: --> $DIR/coherence-overlap-downstream.rs:24:1 | -23 | impl Foo for T where T: Bar {} +LL | impl Foo for T where T: Bar {} | --------------------------------------- first implementation here -24 | impl Foo for i32 {} +LL | impl Foo for i32 {} | ^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `i32` | = note: downstream crates may implement trait `Bar<_>` for type `i32` diff --git a/src/test/ui/coherence-overlap-issue-23516-inherent.stderr b/src/test/ui/coherence-overlap-issue-23516-inherent.stderr index 24d9b26fe9d62..f0710acab1fb7 100644 --- a/src/test/ui/coherence-overlap-issue-23516-inherent.stderr +++ b/src/test/ui/coherence-overlap-issue-23516-inherent.stderr @@ -1,10 +1,10 @@ error[E0592]: duplicate definitions with name `dummy` --> $DIR/coherence-overlap-issue-23516-inherent.rs:19:25 | -19 | impl Cake { fn dummy(&self) { } } +LL | impl Cake { fn dummy(&self) { } } | ^^^^^^^^^^^^^^^^^^^ duplicate definitions for `dummy` -20 | //~^ ERROR E0592 -21 | impl Cake> { fn dummy(&self) { } } +LL | //~^ ERROR E0592 +LL | impl Cake> { fn dummy(&self) { } } | ------------------- other definition for `dummy` | = note: downstream crates may implement trait `Sugar` for type `std::boxed::Box<_>` diff --git a/src/test/ui/coherence-overlap-issue-23516.stderr b/src/test/ui/coherence-overlap-issue-23516.stderr index c27e1ad76200c..ab81c08c88663 100644 --- a/src/test/ui/coherence-overlap-issue-23516.stderr +++ b/src/test/ui/coherence-overlap-issue-23516.stderr @@ -1,9 +1,9 @@ error[E0119]: conflicting implementations of trait `Sweet` for type `std::boxed::Box<_>`: --> $DIR/coherence-overlap-issue-23516.rs:18:1 | -17 | impl Sweet for T { } +LL | impl Sweet for T { } | ------------------------- first implementation here -18 | impl Sweet for Box { } +LL | impl Sweet for Box { } | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `std::boxed::Box<_>` | = note: downstream crates may implement trait `Sugar` for type `std::boxed::Box<_>` diff --git a/src/test/ui/coherence-overlap-upstream-inherent.stderr b/src/test/ui/coherence-overlap-upstream-inherent.stderr index db32bcb81c6ee..5c79b5f67be5f 100644 --- a/src/test/ui/coherence-overlap-upstream-inherent.stderr +++ b/src/test/ui/coherence-overlap-upstream-inherent.stderr @@ -1,10 +1,10 @@ error[E0592]: duplicate definitions with name `dummy` --> $DIR/coherence-overlap-upstream-inherent.rs:21:32 | -21 | impl A where T: Remote { fn dummy(&self) { } } +LL | impl A where T: Remote { fn dummy(&self) { } } | ^^^^^^^^^^^^^^^^^^^ duplicate definitions for `dummy` -22 | //~^ ERROR E0592 -23 | impl A { fn dummy(&self) { } } +LL | //~^ ERROR E0592 +LL | impl A { fn dummy(&self) { } } | ------------------- other definition for `dummy` | = note: upstream crates may add new impl of trait `coherence_lib::Remote` for type `i16` in future versions diff --git a/src/test/ui/coherence-overlap-upstream.stderr b/src/test/ui/coherence-overlap-upstream.stderr index 9b5b67fe9c7dd..4640680824f0a 100644 --- a/src/test/ui/coherence-overlap-upstream.stderr +++ b/src/test/ui/coherence-overlap-upstream.stderr @@ -1,9 +1,9 @@ error[E0119]: conflicting implementations of trait `Foo` for type `i16`: --> $DIR/coherence-overlap-upstream.rs:22:1 | -21 | impl Foo for T where T: Remote {} +LL | impl Foo for T where T: Remote {} | --------------------------------- first implementation here -22 | impl Foo for i16 {} +LL | impl Foo for i16 {} | ^^^^^^^^^^^^^^^^ conflicting implementation for `i16` | = note: upstream crates may add new impl of trait `coherence_lib::Remote` for type `i16` in future versions diff --git a/src/test/ui/compare-method/proj-outlives-region.stderr b/src/test/ui/compare-method/proj-outlives-region.stderr index e6e93d14b3cf0..cc3a59e31bda5 100644 --- a/src/test/ui/compare-method/proj-outlives-region.stderr +++ b/src/test/ui/compare-method/proj-outlives-region.stderr @@ -1,10 +1,10 @@ error[E0276]: impl has stricter requirements than trait --> $DIR/proj-outlives-region.rs:19:5 | -14 | fn foo() where T: 'a; +LL | fn foo() where T: 'a; | --------------------- definition of `foo` from trait ... -19 | fn foo() where U: 'a { } //~ ERROR E0276 +LL | fn foo() where U: 'a { } //~ ERROR E0276 | ^^^^^^^^^^^^^^^^^^^^ impl has extra requirement `U: 'a` error: aborting due to previous error diff --git a/src/test/ui/compare-method/region-extra-2.stderr b/src/test/ui/compare-method/region-extra-2.stderr index 2b8a268fdcc36..472db8ab5f8e3 100644 --- a/src/test/ui/compare-method/region-extra-2.stderr +++ b/src/test/ui/compare-method/region-extra-2.stderr @@ -1,10 +1,10 @@ error[E0276]: impl has stricter requirements than trait --> $DIR/region-extra-2.rs:19:5 | -15 | fn renew<'b: 'a>(self) -> &'b mut [T]; +LL | fn renew<'b: 'a>(self) -> &'b mut [T]; | -------------------------------------- definition of `renew` from trait ... -19 | fn renew<'b: 'a>(self) -> &'b mut [T] where 'a: 'b { +LL | fn renew<'b: 'a>(self) -> &'b mut [T] where 'a: 'b { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ impl has extra requirement `'a: 'b` error: aborting due to previous error diff --git a/src/test/ui/compare-method/region-extra.stderr b/src/test/ui/compare-method/region-extra.stderr index d89b3a921b9e4..57c6fee2458e3 100644 --- a/src/test/ui/compare-method/region-extra.stderr +++ b/src/test/ui/compare-method/region-extra.stderr @@ -1,10 +1,10 @@ error[E0276]: impl has stricter requirements than trait --> $DIR/region-extra.rs:19:5 | -15 | fn foo(); +LL | fn foo(); | --------- definition of `foo` from trait ... -19 | fn foo() where 'a: 'b { } //~ ERROR impl has stricter +LL | fn foo() where 'a: 'b { } //~ ERROR impl has stricter | ^^^^^^^^^^^^^^^^^^^^^ impl has extra requirement `'a: 'b` error: aborting due to previous error diff --git a/src/test/ui/compare-method/region-unrelated.stderr b/src/test/ui/compare-method/region-unrelated.stderr index 156143cd54c47..f17a268da41fa 100644 --- a/src/test/ui/compare-method/region-unrelated.stderr +++ b/src/test/ui/compare-method/region-unrelated.stderr @@ -1,10 +1,10 @@ error[E0276]: impl has stricter requirements than trait --> $DIR/region-unrelated.rs:19:5 | -14 | fn foo() where T: 'a; +LL | fn foo() where T: 'a; | --------------------- definition of `foo` from trait ... -19 | fn foo() where V: 'a { } +LL | fn foo() where V: 'a { } | ^^^^^^^^^^^^^^^^^^^^ impl has extra requirement `V: 'a` error: aborting due to previous error diff --git a/src/test/ui/compare-method/reordered-type-param.stderr b/src/test/ui/compare-method/reordered-type-param.stderr index 4620248e2efea..8677473e947c4 100644 --- a/src/test/ui/compare-method/reordered-type-param.stderr +++ b/src/test/ui/compare-method/reordered-type-param.stderr @@ -1,10 +1,10 @@ error[E0053]: method `b` has an incompatible type for trait --> $DIR/reordered-type-param.rs:26:30 | -17 | fn b(&self, x: C) -> C; +LL | fn b(&self, x: C) -> C; | - type in trait ... -26 | fn b(&self, _x: G) -> G { panic!() } //~ ERROR method `b` has an incompatible type +LL | fn b(&self, _x: G) -> G { panic!() } //~ ERROR method `b` has an incompatible type | ^ expected type parameter, found a different type parameter | = note: expected type `fn(&E, F) -> F` diff --git a/src/test/ui/compare-method/trait-bound-on-type-parameter.stderr b/src/test/ui/compare-method/trait-bound-on-type-parameter.stderr index e3a1eb9ee66c4..4d10c21cfd539 100644 --- a/src/test/ui/compare-method/trait-bound-on-type-parameter.stderr +++ b/src/test/ui/compare-method/trait-bound-on-type-parameter.stderr @@ -1,10 +1,10 @@ error[E0276]: impl has stricter requirements than trait --> $DIR/trait-bound-on-type-parameter.rs:25:5 | -17 | fn b(&self, x: C) -> C; +LL | fn b(&self, x: C) -> C; | ---------------------------- definition of `b` from trait ... -25 | fn b(&self, _x: F) -> F { panic!() } //~ ERROR E0276 +LL | fn b(&self, _x: F) -> F { panic!() } //~ ERROR E0276 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ impl has extra requirement `F: std::marker::Sync` error: aborting due to previous error diff --git a/src/test/ui/compare-method/traits-misc-mismatch-1.stderr b/src/test/ui/compare-method/traits-misc-mismatch-1.stderr index ba5284eb65309..1d43a9c3470f3 100644 --- a/src/test/ui/compare-method/traits-misc-mismatch-1.stderr +++ b/src/test/ui/compare-method/traits-misc-mismatch-1.stderr @@ -1,64 +1,64 @@ error[E0276]: impl has stricter requirements than trait --> $DIR/traits-misc-mismatch-1.rs:36:5 | -23 | fn test_error1_fn(&self); +LL | fn test_error1_fn(&self); | -------------------------------- definition of `test_error1_fn` from trait ... -36 | fn test_error1_fn(&self) {} +LL | fn test_error1_fn(&self) {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ impl has extra requirement `T: std::cmp::Ord` error[E0276]: impl has stricter requirements than trait --> $DIR/traits-misc-mismatch-1.rs:40:5 | -24 | fn test_error2_fn(&self); +LL | fn test_error2_fn(&self); | -------------------------------------- definition of `test_error2_fn` from trait ... -40 | fn test_error2_fn(&self) {} +LL | fn test_error2_fn(&self) {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ impl has extra requirement `T: B` error[E0276]: impl has stricter requirements than trait --> $DIR/traits-misc-mismatch-1.rs:44:5 | -25 | fn test_error3_fn(&self); +LL | fn test_error3_fn(&self); | -------------------------------------- definition of `test_error3_fn` from trait ... -44 | fn test_error3_fn(&self) {} +LL | fn test_error3_fn(&self) {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ impl has extra requirement `T: B` error[E0276]: impl has stricter requirements than trait --> $DIR/traits-misc-mismatch-1.rs:54:5 | -28 | fn test_error5_fn(&self); +LL | fn test_error5_fn(&self); | ------------------------------- definition of `test_error5_fn` from trait ... -54 | fn test_error5_fn(&self) {} +LL | fn test_error5_fn(&self) {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ impl has extra requirement `T: B` error[E0276]: impl has stricter requirements than trait --> $DIR/traits-misc-mismatch-1.rs:60:5 | -30 | fn test_error7_fn(&self); +LL | fn test_error7_fn(&self); | ------------------------------- definition of `test_error7_fn` from trait ... -60 | fn test_error7_fn(&self) {} +LL | fn test_error7_fn(&self) {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ impl has extra requirement `T: std::cmp::Eq` error[E0276]: impl has stricter requirements than trait --> $DIR/traits-misc-mismatch-1.rs:63:5 | -31 | fn test_error8_fn(&self); +LL | fn test_error8_fn(&self); | ------------------------------- definition of `test_error8_fn` from trait ... -63 | fn test_error8_fn(&self) {} +LL | fn test_error8_fn(&self) {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ impl has extra requirement `T: C` error[E0276]: impl has stricter requirements than trait --> $DIR/traits-misc-mismatch-1.rs:76:5 | -72 | fn method>(&self); +LL | fn method>(&self); | ---------------------------------- definition of `method` from trait ... -76 | fn method>(&self) {} +LL | fn method>(&self) {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ impl has extra requirement `G: Getter` error: aborting due to 7 previous errors diff --git a/src/test/ui/compare-method/traits-misc-mismatch-2.stderr b/src/test/ui/compare-method/traits-misc-mismatch-2.stderr index 983d87d5b88d8..77aaac77a0af9 100644 --- a/src/test/ui/compare-method/traits-misc-mismatch-2.stderr +++ b/src/test/ui/compare-method/traits-misc-mismatch-2.stderr @@ -1,10 +1,10 @@ error[E0276]: impl has stricter requirements than trait --> $DIR/traits-misc-mismatch-2.rs:23:5 | -19 | fn zip>(self, other: U) -> ZipIterator; +LL | fn zip>(self, other: U) -> ZipIterator; | ------------------------------------------------------------------ definition of `zip` from trait ... -23 | fn zip>(self, other: U) -> ZipIterator { +LL | fn zip>(self, other: U) -> ZipIterator { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ impl has extra requirement `U: Iterator` error: aborting due to previous error diff --git a/src/test/ui/const-deref-ptr.stderr b/src/test/ui/const-deref-ptr.stderr index 60f9a3a37ba99..c00bf4a6709b4 100644 --- a/src/test/ui/const-deref-ptr.stderr +++ b/src/test/ui/const-deref-ptr.stderr @@ -1,7 +1,7 @@ error[E0396]: raw pointers cannot be dereferenced in statics --> $DIR/const-deref-ptr.rs:14:29 | -14 | static C: u64 = unsafe {*(0xdeadbeef as *const u64)}; //~ ERROR E0396 +LL | static C: u64 = unsafe {*(0xdeadbeef as *const u64)}; //~ ERROR E0396 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ dereference of raw pointer in constant error: aborting due to previous error diff --git a/src/test/ui/const-eval-overflow-2.stderr b/src/test/ui/const-eval-overflow-2.stderr index a9d29d0107192..5c7f7fb384953 100644 --- a/src/test/ui/const-eval-overflow-2.stderr +++ b/src/test/ui/const-eval-overflow-2.stderr @@ -1,13 +1,13 @@ error[E0080]: constant evaluation error --> $DIR/const-eval-overflow-2.rs:21:25 | -21 | const NEG_NEG_128: i8 = -NEG_128; +LL | const NEG_NEG_128: i8 = -NEG_128; | ^^^^^^^^ attempt to negate with overflow | note: for pattern here --> $DIR/const-eval-overflow-2.rs:27:9 | -27 | NEG_NEG_128 => println!("A"), +LL | NEG_NEG_128 => println!("A"), | ^^^^^^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/const-eval-overflow-4.stderr b/src/test/ui/const-eval-overflow-4.stderr index 98c6ae1b9bcac..850fc59e56c24 100644 --- a/src/test/ui/const-eval-overflow-4.stderr +++ b/src/test/ui/const-eval-overflow-4.stderr @@ -1,7 +1,7 @@ warning: constant evaluation error: attempt to add with overflow --> $DIR/const-eval-overflow-4.rs:23:13 | -23 | : [u32; (i8::MAX as i8 + 1i8) as usize] +LL | : [u32; (i8::MAX as i8 + 1i8) as usize] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = note: #[warn(const_err)] on by default @@ -9,7 +9,7 @@ warning: constant evaluation error: attempt to add with overflow error[E0080]: constant evaluation error --> $DIR/const-eval-overflow-4.rs:23:13 | -23 | : [u32; (i8::MAX as i8 + 1i8) as usize] +LL | : [u32; (i8::MAX as i8 + 1i8) as usize] | ^^^^^^^^^^^^^^^^^^^^^ attempt to add with overflow error: aborting due to previous error diff --git a/src/test/ui/const-eval-span.stderr b/src/test/ui/const-eval-span.stderr index e64af57a18649..1b45e48db6d16 100644 --- a/src/test/ui/const-eval-span.stderr +++ b/src/test/ui/const-eval-span.stderr @@ -1,7 +1,7 @@ error[E0308]: mismatched types --> $DIR/const-eval-span.rs:19:9 | -19 | V = CONSTANT, +LL | V = CONSTANT, | ^^^^^^^^ expected isize, found struct `S` | = note: expected type `isize` diff --git a/src/test/ui/const-eval/issue-43197.stderr b/src/test/ui/const-eval/issue-43197.stderr index 82baab620ffab..03bc4516ca8da 100644 --- a/src/test/ui/const-eval/issue-43197.stderr +++ b/src/test/ui/const-eval/issue-43197.stderr @@ -1,7 +1,7 @@ warning: constant evaluation error: attempt to subtract with overflow --> $DIR/issue-43197.rs:18:20 | -18 | const X: u32 = 0-1; //~ ERROR constant evaluation error +LL | const X: u32 = 0-1; //~ ERROR constant evaluation error | ^^^ | = note: #[warn(const_err)] on by default @@ -9,19 +9,19 @@ warning: constant evaluation error: attempt to subtract with overflow warning: constant evaluation error: attempt to subtract with overflow --> $DIR/issue-43197.rs:20:20 | -20 | const Y: u32 = foo(0-1); //~ ERROR constant evaluation error +LL | const Y: u32 = foo(0-1); //~ ERROR constant evaluation error | ^^^^^^^^ error[E0080]: constant evaluation error --> $DIR/issue-43197.rs:18:20 | -18 | const X: u32 = 0-1; //~ ERROR constant evaluation error +LL | const X: u32 = 0-1; //~ ERROR constant evaluation error | ^^^ attempt to subtract with overflow error[E0080]: constant evaluation error --> $DIR/issue-43197.rs:20:24 | -20 | const Y: u32 = foo(0-1); //~ ERROR constant evaluation error +LL | const Y: u32 = foo(0-1); //~ ERROR constant evaluation error | ^^^ attempt to subtract with overflow error: aborting due to 2 previous errors diff --git a/src/test/ui/const-expr-addr-operator.stderr b/src/test/ui/const-expr-addr-operator.stderr index f6587c703bd7f..2bce63035f41d 100644 --- a/src/test/ui/const-expr-addr-operator.stderr +++ b/src/test/ui/const-expr-addr-operator.stderr @@ -1,13 +1,13 @@ error[E0080]: constant evaluation error --> $DIR/const-expr-addr-operator.rs:15:29 | -15 | const X: &'static u32 = &22; //~ ERROR constant evaluation error +LL | const X: &'static u32 = &22; //~ ERROR constant evaluation error | ^^^ unimplemented constant expression: address operator | note: for pattern here --> $DIR/const-expr-addr-operator.rs:17:9 | -17 | X => 0, +LL | X => 0, | ^ error: aborting due to previous error diff --git a/src/test/ui/const-fn-error.stderr b/src/test/ui/const-fn-error.stderr index 4f4f8b5ad0093..b21ea907e8e24 100644 --- a/src/test/ui/const-fn-error.stderr +++ b/src/test/ui/const-fn-error.stderr @@ -1,7 +1,7 @@ warning: constant evaluation error: non-constant path in constant expression --> $DIR/const-fn-error.rs:27:19 | -27 | let a : [i32; f(X)]; +LL | let a : [i32; f(X)]; | ^^^^ | = note: #[warn(const_err)] on by default @@ -9,31 +9,31 @@ warning: constant evaluation error: non-constant path in constant expression error[E0016]: blocks in constant functions are limited to items and tail expressions --> $DIR/const-fn-error.rs:16:19 | -16 | let mut sum = 0; //~ ERROR blocks in constant functions are limited +LL | let mut sum = 0; //~ ERROR blocks in constant functions are limited | ^ error[E0015]: calls in constant functions are limited to constant functions, struct and enum constructors --> $DIR/const-fn-error.rs:17:14 | -17 | for i in 0..x { //~ ERROR calls in constant functions +LL | for i in 0..x { //~ ERROR calls in constant functions | ^^^^ error[E0019]: constant function contains unimplemented expression type --> $DIR/const-fn-error.rs:17:14 | -17 | for i in 0..x { //~ ERROR calls in constant functions +LL | for i in 0..x { //~ ERROR calls in constant functions | ^^^^ error[E0080]: constant evaluation error --> $DIR/const-fn-error.rs:21:5 | -21 | sum //~ ERROR E0080 +LL | sum //~ ERROR E0080 | ^^^ non-constant path in constant expression | note: for constant expression here --> $DIR/const-fn-error.rs:27:13 | -27 | let a : [i32; f(X)]; +LL | let a : [i32; f(X)]; | ^^^^^^^^^^^ error: aborting due to 4 previous errors diff --git a/src/test/ui/const-fn-mismatch.stderr b/src/test/ui/const-fn-mismatch.stderr index 4f6a98fb8eb05..e6b6bf4912bb7 100644 --- a/src/test/ui/const-fn-mismatch.stderr +++ b/src/test/ui/const-fn-mismatch.stderr @@ -1,7 +1,7 @@ error[E0379]: trait fns cannot be declared const --> $DIR/const-fn-mismatch.rs:23:5 | -23 | const fn f() -> u32 { 22 } +LL | const fn f() -> u32 { 22 } | ^^^^^ trait fns cannot be const error: aborting due to previous error diff --git a/src/test/ui/const-fn-not-in-trait.stderr b/src/test/ui/const-fn-not-in-trait.stderr index d23bf3b411b28..21fc28e922fd9 100644 --- a/src/test/ui/const-fn-not-in-trait.stderr +++ b/src/test/ui/const-fn-not-in-trait.stderr @@ -1,13 +1,13 @@ error[E0379]: trait fns cannot be declared const --> $DIR/const-fn-not-in-trait.rs:17:5 | -17 | const fn f() -> u32; +LL | const fn f() -> u32; | ^^^^^ trait fns cannot be const error[E0379]: trait fns cannot be declared const --> $DIR/const-fn-not-in-trait.rs:19:5 | -19 | const fn g() -> u32 { 0 } +LL | const fn g() -> u32 { 0 } | ^^^^^ trait fns cannot be const error: aborting due to 2 previous errors diff --git a/src/test/ui/const-len-underflow-separate-spans.stderr b/src/test/ui/const-len-underflow-separate-spans.stderr index 6e6c2130e1ccd..e71eac63896bc 100644 --- a/src/test/ui/const-len-underflow-separate-spans.stderr +++ b/src/test/ui/const-len-underflow-separate-spans.stderr @@ -1,7 +1,7 @@ warning: constant evaluation error: attempt to subtract with overflow --> $DIR/const-len-underflow-separate-spans.rs:17:20 | -17 | const LEN: usize = ONE - TWO; +LL | const LEN: usize = ONE - TWO; | ^^^^^^^^^ | = note: #[warn(const_err)] on by default @@ -9,13 +9,13 @@ warning: constant evaluation error: attempt to subtract with overflow error[E0080]: constant evaluation error --> $DIR/const-len-underflow-separate-spans.rs:17:20 | -17 | const LEN: usize = ONE - TWO; +LL | const LEN: usize = ONE - TWO; | ^^^^^^^^^ attempt to subtract with overflow | note: for constant expression here --> $DIR/const-len-underflow-separate-spans.rs:22:12 | -22 | let a: [i8; LEN] = unimplemented!(); +LL | let a: [i8; LEN] = unimplemented!(); | ^^^^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/const-pattern-irrefutable.stderr b/src/test/ui/const-pattern-irrefutable.stderr index af48b7736381a..95b3d8be98716 100644 --- a/src/test/ui/const-pattern-irrefutable.stderr +++ b/src/test/ui/const-pattern-irrefutable.stderr @@ -1,19 +1,19 @@ error[E0005]: refutable pattern in local binding: `_` not covered --> $DIR/const-pattern-irrefutable.rs:22:9 | -22 | let a = 4; //~ ERROR refutable pattern in local binding: `_` not covered +LL | let a = 4; //~ ERROR refutable pattern in local binding: `_` not covered | ^ interpreted as a constant pattern, not new variable error[E0005]: refutable pattern in local binding: `_` not covered --> $DIR/const-pattern-irrefutable.rs:23:9 | -23 | let c = 4; //~ ERROR refutable pattern in local binding: `_` not covered +LL | let c = 4; //~ ERROR refutable pattern in local binding: `_` not covered | ^ interpreted as a constant pattern, not new variable error[E0005]: refutable pattern in local binding: `_` not covered --> $DIR/const-pattern-irrefutable.rs:24:9 | -24 | let d = 4; //~ ERROR refutable pattern in local binding: `_` not covered +LL | let d = 4; //~ ERROR refutable pattern in local binding: `_` not covered | ^ interpreted as a constant pattern, not new variable error: aborting due to 3 previous errors diff --git a/src/test/ui/const-pattern-not-const-evaluable.stderr b/src/test/ui/const-pattern-not-const-evaluable.stderr index 5441937e4dd60..c9f6d2026daa1 100644 --- a/src/test/ui/const-pattern-not-const-evaluable.stderr +++ b/src/test/ui/const-pattern-not-const-evaluable.stderr @@ -1,13 +1,13 @@ error[E0080]: constant evaluation error --> $DIR/const-pattern-not-const-evaluable.rs:22:31 | -22 | const BOO: Pair = Pair(Marmor, BlackForest); +LL | const BOO: Pair = Pair(Marmor, BlackForest); | ^^^^ unimplemented constant expression: tuple struct constructors | note: for pattern here --> $DIR/const-pattern-not-const-evaluable.rs:37:9 | -37 | FOO => println!("hi"), +LL | FOO => println!("hi"), | ^^^ error: aborting due to previous error diff --git a/src/test/ui/const-unsized.stderr b/src/test/ui/const-unsized.stderr index ba948643a37b0..a33196c156ade 100644 --- a/src/test/ui/const-unsized.stderr +++ b/src/test/ui/const-unsized.stderr @@ -1,7 +1,7 @@ error[E0277]: the trait bound `std::fmt::Debug + std::marker::Sync + 'static: std::marker::Sized` is not satisfied --> $DIR/const-unsized.rs:13:29 | -13 | const CONST_0: Debug+Sync = *(&0 as &(Debug+Sync)); +LL | const CONST_0: Debug+Sync = *(&0 as &(Debug+Sync)); | ^^^^^^^^^^^^^^^^^^^^^^ `std::fmt::Debug + std::marker::Sync + 'static` does not have a constant size known at compile-time | = help: the trait `std::marker::Sized` is not implemented for `std::fmt::Debug + std::marker::Sync + 'static` @@ -10,7 +10,7 @@ error[E0277]: the trait bound `std::fmt::Debug + std::marker::Sync + 'static: st error[E0277]: the trait bound `str: std::marker::Sized` is not satisfied --> $DIR/const-unsized.rs:16:24 | -16 | const CONST_FOO: str = *"foo"; +LL | const CONST_FOO: str = *"foo"; | ^^^^^^ `str` does not have a constant size known at compile-time | = help: the trait `std::marker::Sized` is not implemented for `str` @@ -19,7 +19,7 @@ error[E0277]: the trait bound `str: std::marker::Sized` is not satisfied error[E0277]: the trait bound `std::fmt::Debug + std::marker::Sync + 'static: std::marker::Sized` is not satisfied --> $DIR/const-unsized.rs:19:31 | -19 | static STATIC_1: Debug+Sync = *(&1 as &(Debug+Sync)); +LL | static STATIC_1: Debug+Sync = *(&1 as &(Debug+Sync)); | ^^^^^^^^^^^^^^^^^^^^^^ `std::fmt::Debug + std::marker::Sync + 'static` does not have a constant size known at compile-time | = help: the trait `std::marker::Sized` is not implemented for `std::fmt::Debug + std::marker::Sync + 'static` @@ -28,7 +28,7 @@ error[E0277]: the trait bound `std::fmt::Debug + std::marker::Sync + 'static: st error[E0277]: the trait bound `str: std::marker::Sized` is not satisfied --> $DIR/const-unsized.rs:22:26 | -22 | static STATIC_BAR: str = *"bar"; +LL | static STATIC_BAR: str = *"bar"; | ^^^^^^ `str` does not have a constant size known at compile-time | = help: the trait `std::marker::Sized` is not implemented for `str` diff --git a/src/test/ui/cross-crate-macro-backtrace/main.stderr b/src/test/ui/cross-crate-macro-backtrace/main.stderr index fc2343bdb1d4f..ab447d0724181 100644 --- a/src/test/ui/cross-crate-macro-backtrace/main.stderr +++ b/src/test/ui/cross-crate-macro-backtrace/main.stderr @@ -1,7 +1,7 @@ error: 1 positional argument in format string, but no arguments were given --> $DIR/main.rs:18:5 | -18 | myprintln!("{}"); +LL | myprintln!("{}"); | ^^^^^^^^^^^^^^^^^ | = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info) diff --git a/src/test/ui/cross-file-errors/main.stderr b/src/test/ui/cross-file-errors/main.stderr index a1cdae10edfcd..9eeea28be8fec 100644 --- a/src/test/ui/cross-file-errors/main.stderr +++ b/src/test/ui/cross-file-errors/main.stderr @@ -1,11 +1,11 @@ error: expected expression, found `_` --> $DIR/underscore.rs:18:9 | -18 | _ +LL | _ | ^ | ::: $DIR/main.rs:15:5 | -15 | underscore!(); +LL | underscore!(); | -------------- in this macro invocation diff --git a/src/test/ui/cycle-trait-supertrait-indirect.stderr b/src/test/ui/cycle-trait-supertrait-indirect.stderr index a01565546462d..92139e4935441 100644 --- a/src/test/ui/cycle-trait-supertrait-indirect.stderr +++ b/src/test/ui/cycle-trait-supertrait-indirect.stderr @@ -1,18 +1,18 @@ error[E0391]: cyclic dependency detected --> $DIR/cycle-trait-supertrait-indirect.rs:20:1 | -20 | trait C: B { } +LL | trait C: B { } | ^^^^^^^^^^ cyclic reference | note: the cycle begins when computing the supertraits of `B`... --> $DIR/cycle-trait-supertrait-indirect.rs:14:1 | -14 | trait A: B { +LL | trait A: B { | ^^^^^^^^^^ note: ...which then requires computing the supertraits of `C`... --> $DIR/cycle-trait-supertrait-indirect.rs:17:1 | -17 | trait B: C { +LL | trait B: C { | ^^^^^^^^^^ = note: ...which then again requires computing the supertraits of `B`, completing the cycle. diff --git a/src/test/ui/deprecated-macro_escape-inner.stderr b/src/test/ui/deprecated-macro_escape-inner.stderr index c91db6c3365a4..56c083837979d 100644 --- a/src/test/ui/deprecated-macro_escape-inner.stderr +++ b/src/test/ui/deprecated-macro_escape-inner.stderr @@ -1,7 +1,7 @@ warning: macro_escape is a deprecated synonym for macro_use --> $DIR/deprecated-macro_escape-inner.rs:14:5 | -14 | #![macro_escape] //~ WARNING macro_escape is a deprecated synonym for macro_use +LL | #![macro_escape] //~ WARNING macro_escape is a deprecated synonym for macro_use | ^^^^^^^^^^^^^^^^ | = help: consider an outer attribute, #[macro_use] mod ... diff --git a/src/test/ui/deprecated-macro_escape.stderr b/src/test/ui/deprecated-macro_escape.stderr index aa77129528165..09ff32857403a 100644 --- a/src/test/ui/deprecated-macro_escape.stderr +++ b/src/test/ui/deprecated-macro_escape.stderr @@ -1,6 +1,6 @@ warning: macro_escape is a deprecated synonym for macro_use --> $DIR/deprecated-macro_escape.rs:13:1 | -13 | #[macro_escape] //~ WARNING macro_escape is a deprecated synonym for macro_use +LL | #[macro_escape] //~ WARNING macro_escape is a deprecated synonym for macro_use | ^^^^^^^^^^^^^^^ diff --git a/src/test/ui/deref-suggestion.stderr b/src/test/ui/deref-suggestion.stderr index 4c2896e220735..b3b6fc14911fc 100644 --- a/src/test/ui/deref-suggestion.stderr +++ b/src/test/ui/deref-suggestion.stderr @@ -1,7 +1,7 @@ error[E0308]: mismatched types --> $DIR/deref-suggestion.rs:18:9 | -18 | foo(s); //~ ERROR mismatched types +LL | foo(s); //~ ERROR mismatched types | ^ | | | expected struct `std::string::String`, found reference @@ -13,7 +13,7 @@ error[E0308]: mismatched types error[E0308]: mismatched types --> $DIR/deref-suggestion.rs:23:10 | -23 | foo3(u); //~ ERROR mismatched types +LL | foo3(u); //~ ERROR mismatched types | ^ | | | expected u32, found &u32 @@ -25,7 +25,7 @@ error[E0308]: mismatched types error[E0308]: mismatched types --> $DIR/deref-suggestion.rs:30:9 | -30 | foo(&"aaa".to_owned()); //~ ERROR mismatched types +LL | foo(&"aaa".to_owned()); //~ ERROR mismatched types | ^^^^^^^^^^^^^^^^^ | | | expected struct `std::string::String`, found reference @@ -37,7 +37,7 @@ error[E0308]: mismatched types error[E0308]: mismatched types --> $DIR/deref-suggestion.rs:31:9 | -31 | foo(&mut "aaa".to_owned()); //~ ERROR mismatched types +LL | foo(&mut "aaa".to_owned()); //~ ERROR mismatched types | ^^^^^^^^^^^^^^^^^^^^^ | | | expected struct `std::string::String`, found mutable reference @@ -49,10 +49,10 @@ error[E0308]: mismatched types error[E0308]: mismatched types --> $DIR/deref-suggestion.rs:12:20 | -12 | ($x:expr) => { &$x } //~ ERROR mismatched types +LL | ($x:expr) => { &$x } //~ ERROR mismatched types | ^^^ expected u32, found &{integer} ... -32 | foo3(borrow!(0)); +LL | foo3(borrow!(0)); | ---------- in this macro invocation | = note: expected type `u32` diff --git a/src/test/ui/derived-errors/issue-31997-1.stderr b/src/test/ui/derived-errors/issue-31997-1.stderr index 732cf9bacbcd1..040af9aa79746 100644 --- a/src/test/ui/derived-errors/issue-31997-1.stderr +++ b/src/test/ui/derived-errors/issue-31997-1.stderr @@ -1,7 +1,7 @@ error[E0433]: failed to resolve. Use of undeclared type or module `HashMap` --> $DIR/issue-31997-1.rs:30:19 | -30 | let mut map = HashMap::new(); +LL | let mut map = HashMap::new(); | ^^^^^^^ Use of undeclared type or module `HashMap` error: aborting due to previous error diff --git a/src/test/ui/deriving-meta-empty-trait-list.stderr b/src/test/ui/deriving-meta-empty-trait-list.stderr index 58f871413f106..f5532f7c56119 100644 --- a/src/test/ui/deriving-meta-empty-trait-list.stderr +++ b/src/test/ui/deriving-meta-empty-trait-list.stderr @@ -1,12 +1,12 @@ warning: empty trait list in `derive` --> $DIR/deriving-meta-empty-trait-list.rs:15:1 | -15 | #[derive] //~ WARNING empty trait list in `derive` +LL | #[derive] //~ WARNING empty trait list in `derive` | ^^^^^^^^^ warning: empty trait list in `derive` --> $DIR/deriving-meta-empty-trait-list.rs:18:1 | -18 | #[derive()] //~ WARNING empty trait list in `derive` +LL | #[derive()] //~ WARNING empty trait list in `derive` | ^^^^^^^^^^^ diff --git a/src/test/ui/deriving-with-repr-packed.stderr b/src/test/ui/deriving-with-repr-packed.stderr index 48208faa6b5e2..64aefbcd5df63 100644 --- a/src/test/ui/deriving-with-repr-packed.stderr +++ b/src/test/ui/deriving-with-repr-packed.stderr @@ -1,13 +1,13 @@ error: #[derive] can't be used on a #[repr(packed)] struct with type parameters (error E0133) --> $DIR/deriving-with-repr-packed.rs:18:16 | -18 | #[derive(Copy, Clone, PartialEq, Eq)] +LL | #[derive(Copy, Clone, PartialEq, Eq)] | ^^^^^ | note: lint level defined here --> $DIR/deriving-with-repr-packed.rs:11:9 | -11 | #![deny(safe_packed_borrows)] +LL | #![deny(safe_packed_borrows)] | ^^^^^^^^^^^^^^^^^^^ = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! = note: for more information, see issue #46043 @@ -15,7 +15,7 @@ note: lint level defined here error: #[derive] can't be used on a #[repr(packed)] struct with type parameters (error E0133) --> $DIR/deriving-with-repr-packed.rs:18:23 | -18 | #[derive(Copy, Clone, PartialEq, Eq)] +LL | #[derive(Copy, Clone, PartialEq, Eq)] | ^^^^^^^^^ | = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! @@ -24,7 +24,7 @@ error: #[derive] can't be used on a #[repr(packed)] struct with type parameters error: #[derive] can't be used on a non-Copy #[repr(packed)] struct (error E0133) --> $DIR/deriving-with-repr-packed.rs:26:10 | -26 | #[derive(PartialEq, Eq)] +LL | #[derive(PartialEq, Eq)] | ^^^^^^^^^ | = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! @@ -33,7 +33,7 @@ error: #[derive] can't be used on a non-Copy #[repr(packed)] struct (error E0133 error: #[derive] can't be used on a non-Copy #[repr(packed)] struct (error E0133) --> $DIR/deriving-with-repr-packed.rs:35:10 | -35 | #[derive(PartialEq)] +LL | #[derive(PartialEq)] | ^^^^^^^^^ | = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! diff --git a/src/test/ui/did_you_mean/E0178.stderr b/src/test/ui/did_you_mean/E0178.stderr index 4fe8849feef11..71809954685a8 100644 --- a/src/test/ui/did_you_mean/E0178.stderr +++ b/src/test/ui/did_you_mean/E0178.stderr @@ -1,25 +1,25 @@ error[E0178]: expected a path on the left-hand side of `+`, not `&'a Foo` --> $DIR/E0178.rs:14:8 | -14 | w: &'a Foo + Copy, //~ ERROR expected a path +LL | w: &'a Foo + Copy, //~ ERROR expected a path | ^^^^^^^^^^^^^^ help: try adding parentheses: `&'a (Foo + Copy)` error[E0178]: expected a path on the left-hand side of `+`, not `&'a Foo` --> $DIR/E0178.rs:15:8 | -15 | x: &'a Foo + 'a, //~ ERROR expected a path +LL | x: &'a Foo + 'a, //~ ERROR expected a path | ^^^^^^^^^^^^ help: try adding parentheses: `&'a (Foo + 'a)` error[E0178]: expected a path on the left-hand side of `+`, not `&'a mut Foo` --> $DIR/E0178.rs:16:8 | -16 | y: &'a mut Foo + 'a, //~ ERROR expected a path +LL | y: &'a mut Foo + 'a, //~ ERROR expected a path | ^^^^^^^^^^^^^^^^ help: try adding parentheses: `&'a mut (Foo + 'a)` error[E0178]: expected a path on the left-hand side of `+`, not `fn() -> Foo` --> $DIR/E0178.rs:17:8 | -17 | z: fn() -> Foo + 'a, //~ ERROR expected a path +LL | z: fn() -> Foo + 'a, //~ ERROR expected a path | ^^^^^^^^^^^^^^^^ perhaps you forgot parentheses? error: aborting due to 4 previous errors diff --git a/src/test/ui/did_you_mean/bad-assoc-expr.stderr b/src/test/ui/did_you_mean/bad-assoc-expr.stderr index 1affdc5fda208..c4f7e47c61b26 100644 --- a/src/test/ui/did_you_mean/bad-assoc-expr.stderr +++ b/src/test/ui/did_you_mean/bad-assoc-expr.stderr @@ -1,37 +1,37 @@ error: missing angle brackets in associated item path --> $DIR/bad-assoc-expr.rs:13:5 | -13 | [i32; 4]::clone(&a); +LL | [i32; 4]::clone(&a); | ^^^^^^^^^^^^^^^ help: try: `<[i32; 4]>::clone` error: missing angle brackets in associated item path --> $DIR/bad-assoc-expr.rs:16:5 | -16 | [i32]::as_ref(&a); +LL | [i32]::as_ref(&a); | ^^^^^^^^^^^^^ help: try: `<[i32]>::as_ref` error: missing angle brackets in associated item path --> $DIR/bad-assoc-expr.rs:19:5 | -19 | (u8)::clone(&0); +LL | (u8)::clone(&0); | ^^^^^^^^^^^ help: try: `<(u8)>::clone` error: missing angle brackets in associated item path --> $DIR/bad-assoc-expr.rs:22:5 | -22 | (u8, u8)::clone(&(0, 0)); +LL | (u8, u8)::clone(&(0, 0)); | ^^^^^^^^^^^^^^^ help: try: `<(u8, u8)>::clone` error: missing angle brackets in associated item path --> $DIR/bad-assoc-expr.rs:25:6 | -25 | &(u8)::clone(&0); +LL | &(u8)::clone(&0); | ^^^^^^^^^^^ help: try: `<(u8)>::clone` error: missing angle brackets in associated item path --> $DIR/bad-assoc-expr.rs:28:10 | -28 | 10 + (u8)::clone(&0); +LL | 10 + (u8)::clone(&0); | ^^^^^^^^^^^ help: try: `<(u8)>::clone` error: aborting due to 6 previous errors diff --git a/src/test/ui/did_you_mean/bad-assoc-pat.stderr b/src/test/ui/did_you_mean/bad-assoc-pat.stderr index 1ca4576d88f60..68b34ddeb655f 100644 --- a/src/test/ui/did_you_mean/bad-assoc-pat.stderr +++ b/src/test/ui/did_you_mean/bad-assoc-pat.stderr @@ -1,49 +1,49 @@ error: missing angle brackets in associated item path --> $DIR/bad-assoc-pat.rs:13:9 | -13 | [u8]::AssocItem => {} +LL | [u8]::AssocItem => {} | ^^^^^^^^^^^^^^^ help: try: `<[u8]>::AssocItem` error: missing angle brackets in associated item path --> $DIR/bad-assoc-pat.rs:16:9 | -16 | (u8, u8)::AssocItem => {} +LL | (u8, u8)::AssocItem => {} | ^^^^^^^^^^^^^^^^^^^ help: try: `<(u8, u8)>::AssocItem` error: missing angle brackets in associated item path --> $DIR/bad-assoc-pat.rs:19:9 | -19 | _::AssocItem => {} +LL | _::AssocItem => {} | ^^^^^^^^^^^^ help: try: `<_>::AssocItem` error: missing angle brackets in associated item path --> $DIR/bad-assoc-pat.rs:24:10 | -24 | &(u8,)::AssocItem => {} +LL | &(u8,)::AssocItem => {} | ^^^^^^^^^^^^^^^^ help: try: `<(u8,)>::AssocItem` error[E0599]: no associated item named `AssocItem` found for type `[u8]` in the current scope --> $DIR/bad-assoc-pat.rs:13:9 | -13 | [u8]::AssocItem => {} +LL | [u8]::AssocItem => {} | ^^^^^^^^^^^^^^^ associated item not found in `[u8]` error[E0599]: no associated item named `AssocItem` found for type `(u8, u8)` in the current scope --> $DIR/bad-assoc-pat.rs:16:9 | -16 | (u8, u8)::AssocItem => {} +LL | (u8, u8)::AssocItem => {} | ^^^^^^^^^^^^^^^^^^^ associated item not found in `(u8, u8)` error[E0599]: no associated item named `AssocItem` found for type `_` in the current scope --> $DIR/bad-assoc-pat.rs:19:9 | -19 | _::AssocItem => {} +LL | _::AssocItem => {} | ^^^^^^^^^^^^ associated item not found in `_` error[E0599]: no associated item named `AssocItem` found for type `(u8,)` in the current scope --> $DIR/bad-assoc-pat.rs:24:10 | -24 | &(u8,)::AssocItem => {} +LL | &(u8,)::AssocItem => {} | ^^^^^^^^^^^^^^^^ associated item not found in `(u8,)` error: aborting due to 8 previous errors diff --git a/src/test/ui/did_you_mean/bad-assoc-ty.stderr b/src/test/ui/did_you_mean/bad-assoc-ty.stderr index c44dc5a046880..abbd2e69cf43f 100644 --- a/src/test/ui/did_you_mean/bad-assoc-ty.stderr +++ b/src/test/ui/did_you_mean/bad-assoc-ty.stderr @@ -1,49 +1,49 @@ error: missing angle brackets in associated item path --> $DIR/bad-assoc-ty.rs:11:10 | -11 | type A = [u8; 4]::AssocTy; +LL | type A = [u8; 4]::AssocTy; | ^^^^^^^^^^^^^^^^ help: try: `<[u8; 4]>::AssocTy` error: missing angle brackets in associated item path --> $DIR/bad-assoc-ty.rs:15:10 | -15 | type B = [u8]::AssocTy; +LL | type B = [u8]::AssocTy; | ^^^^^^^^^^^^^ help: try: `<[u8]>::AssocTy` error: missing angle brackets in associated item path --> $DIR/bad-assoc-ty.rs:19:10 | -19 | type C = (u8)::AssocTy; +LL | type C = (u8)::AssocTy; | ^^^^^^^^^^^^^ help: try: `<(u8)>::AssocTy` error: missing angle brackets in associated item path --> $DIR/bad-assoc-ty.rs:23:10 | -23 | type D = (u8, u8)::AssocTy; +LL | type D = (u8, u8)::AssocTy; | ^^^^^^^^^^^^^^^^^ help: try: `<(u8, u8)>::AssocTy` error: missing angle brackets in associated item path --> $DIR/bad-assoc-ty.rs:27:10 | -27 | type E = _::AssocTy; +LL | type E = _::AssocTy; | ^^^^^^^^^^ help: try: `<_>::AssocTy` error: missing angle brackets in associated item path --> $DIR/bad-assoc-ty.rs:31:19 | -31 | type F = &'static (u8)::AssocTy; +LL | type F = &'static (u8)::AssocTy; | ^^^^^^^^^^^^^ help: try: `<(u8)>::AssocTy` error: missing angle brackets in associated item path --> $DIR/bad-assoc-ty.rs:37:10 | -37 | type G = 'static + (Send)::AssocTy; +LL | type G = 'static + (Send)::AssocTy; | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `<'static + Send>::AssocTy` error[E0223]: ambiguous associated type --> $DIR/bad-assoc-ty.rs:11:10 | -11 | type A = [u8; 4]::AssocTy; +LL | type A = [u8; 4]::AssocTy; | ^^^^^^^^^^^^^^^^ ambiguous associated type | = note: specify the type using the syntax `<[u8; ] as Trait>::AssocTy` @@ -51,7 +51,7 @@ error[E0223]: ambiguous associated type error[E0223]: ambiguous associated type --> $DIR/bad-assoc-ty.rs:15:10 | -15 | type B = [u8]::AssocTy; +LL | type B = [u8]::AssocTy; | ^^^^^^^^^^^^^ ambiguous associated type | = note: specify the type using the syntax `<[u8] as Trait>::AssocTy` @@ -59,7 +59,7 @@ error[E0223]: ambiguous associated type error[E0223]: ambiguous associated type --> $DIR/bad-assoc-ty.rs:19:10 | -19 | type C = (u8)::AssocTy; +LL | type C = (u8)::AssocTy; | ^^^^^^^^^^^^^ ambiguous associated type | = note: specify the type using the syntax `::AssocTy` @@ -67,7 +67,7 @@ error[E0223]: ambiguous associated type error[E0223]: ambiguous associated type --> $DIR/bad-assoc-ty.rs:23:10 | -23 | type D = (u8, u8)::AssocTy; +LL | type D = (u8, u8)::AssocTy; | ^^^^^^^^^^^^^^^^^ ambiguous associated type | = note: specify the type using the syntax `<(u8, u8) as Trait>::AssocTy` @@ -75,13 +75,13 @@ error[E0223]: ambiguous associated type error[E0121]: the type placeholder `_` is not allowed within types on item signatures --> $DIR/bad-assoc-ty.rs:27:10 | -27 | type E = _::AssocTy; +LL | type E = _::AssocTy; | ^ not allowed in type signatures error[E0223]: ambiguous associated type --> $DIR/bad-assoc-ty.rs:31:19 | -31 | type F = &'static (u8)::AssocTy; +LL | type F = &'static (u8)::AssocTy; | ^^^^^^^^^^^^^ ambiguous associated type | = note: specify the type using the syntax `::AssocTy` @@ -89,7 +89,7 @@ error[E0223]: ambiguous associated type error[E0223]: ambiguous associated type --> $DIR/bad-assoc-ty.rs:37:10 | -37 | type G = 'static + (Send)::AssocTy; +LL | type G = 'static + (Send)::AssocTy; | ^^^^^^^^^^^^^^^^^^^^^^^^^ ambiguous associated type | = note: specify the type using the syntax `::AssocTy` @@ -97,7 +97,7 @@ error[E0223]: ambiguous associated type error[E0223]: ambiguous associated type --> $DIR/bad-assoc-ty.rs:43:10 | -43 | type H = Fn(u8) -> (u8)::Output; +LL | type H = Fn(u8) -> (u8)::Output; | ^^^^^^^^^^^^^^^^^^^^^^ ambiguous associated type | = note: specify the type using the syntax ` u8 + 'static as Trait>::Output` diff --git a/src/test/ui/did_you_mean/issue-21659-show-relevant-trait-impls-1.stderr b/src/test/ui/did_you_mean/issue-21659-show-relevant-trait-impls-1.stderr index 9010de081da46..f7e1701f7191f 100644 --- a/src/test/ui/did_you_mean/issue-21659-show-relevant-trait-impls-1.stderr +++ b/src/test/ui/did_you_mean/issue-21659-show-relevant-trait-impls-1.stderr @@ -1,7 +1,7 @@ error[E0277]: the trait bound `Bar: Foo` is not satisfied --> $DIR/issue-21659-show-relevant-trait-impls-1.rs:34:8 | -34 | f1.foo(1usize); +LL | f1.foo(1usize); | ^^^ the trait `Foo` is not implemented for `Bar` | = help: the following implementations were found: diff --git a/src/test/ui/did_you_mean/issue-21659-show-relevant-trait-impls-2.stderr b/src/test/ui/did_you_mean/issue-21659-show-relevant-trait-impls-2.stderr index e9591a64784d5..3d78fb90cc33e 100644 --- a/src/test/ui/did_you_mean/issue-21659-show-relevant-trait-impls-2.stderr +++ b/src/test/ui/did_you_mean/issue-21659-show-relevant-trait-impls-2.stderr @@ -1,7 +1,7 @@ error[E0277]: the trait bound `Bar: Foo` is not satisfied --> $DIR/issue-21659-show-relevant-trait-impls-2.rs:38:8 | -38 | f1.foo(1usize); +LL | f1.foo(1usize); | ^^^ the trait `Foo` is not implemented for `Bar` | = help: the following implementations were found: diff --git a/src/test/ui/did_you_mean/issue-31424.stderr b/src/test/ui/did_you_mean/issue-31424.stderr index cd96d28ac98cb..3df238e229f85 100644 --- a/src/test/ui/did_you_mean/issue-31424.stderr +++ b/src/test/ui/did_you_mean/issue-31424.stderr @@ -1,7 +1,7 @@ error[E0596]: cannot borrow immutable argument `self` as mutable --> $DIR/issue-31424.rs:17:15 | -17 | (&mut self).bar(); //~ ERROR cannot borrow +LL | (&mut self).bar(); //~ ERROR cannot borrow | ^^^^ | | | cannot reborrow mutably @@ -10,9 +10,9 @@ error[E0596]: cannot borrow immutable argument `self` as mutable error[E0596]: cannot borrow immutable argument `self` as mutable --> $DIR/issue-31424.rs:23:15 | -22 | fn bar(self: &mut Self) { +LL | fn bar(self: &mut Self) { | --------------- consider changing this to `mut self: &mut Self` -23 | (&mut self).bar(); //~ ERROR cannot borrow +LL | (&mut self).bar(); //~ ERROR cannot borrow | ^^^^ cannot borrow mutably error: aborting due to 2 previous errors diff --git a/src/test/ui/did_you_mean/issue-34126.stderr b/src/test/ui/did_you_mean/issue-34126.stderr index a4921046c7833..bafb87abcf1ca 100644 --- a/src/test/ui/did_you_mean/issue-34126.stderr +++ b/src/test/ui/did_you_mean/issue-34126.stderr @@ -1,7 +1,7 @@ error[E0596]: cannot borrow immutable argument `self` as mutable --> $DIR/issue-34126.rs:16:23 | -16 | self.run(&mut self); //~ ERROR cannot borrow +LL | self.run(&mut self); //~ ERROR cannot borrow | ^^^^ | | | cannot reborrow mutably diff --git a/src/test/ui/did_you_mean/issue-34337.stderr b/src/test/ui/did_you_mean/issue-34337.stderr index a53d3d7277aa3..049268e2764a8 100644 --- a/src/test/ui/did_you_mean/issue-34337.stderr +++ b/src/test/ui/did_you_mean/issue-34337.stderr @@ -1,7 +1,7 @@ error[E0596]: cannot borrow immutable local variable `key` as mutable --> $DIR/issue-34337.rs:16:14 | -16 | get(&mut key); //~ ERROR cannot borrow +LL | get(&mut key); //~ ERROR cannot borrow | ^^^ | | | cannot reborrow mutably diff --git a/src/test/ui/did_you_mean/issue-35937.stderr b/src/test/ui/did_you_mean/issue-35937.stderr index cfaff9731704f..8d88e374cdd60 100644 --- a/src/test/ui/did_you_mean/issue-35937.stderr +++ b/src/test/ui/did_you_mean/issue-35937.stderr @@ -1,25 +1,25 @@ error[E0596]: cannot borrow field `f.v` of immutable binding as mutable --> $DIR/issue-35937.rs:17:5 | -16 | let f = Foo { v: Vec::new() }; +LL | let f = Foo { v: Vec::new() }; | - consider changing this to `mut f` -17 | f.v.push("cat".to_string()); //~ ERROR cannot borrow +LL | f.v.push("cat".to_string()); //~ ERROR cannot borrow | ^^^ cannot mutably borrow field of immutable binding error[E0594]: cannot assign to field `s.x` of immutable binding --> $DIR/issue-35937.rs:26:5 | -25 | let s = S { x: 42 }; +LL | let s = S { x: 42 }; | - consider changing this to `mut s` -26 | s.x += 1; //~ ERROR cannot assign +LL | s.x += 1; //~ ERROR cannot assign | ^^^^^^^^ cannot mutably borrow field of immutable binding error[E0594]: cannot assign to field `s.x` of immutable binding --> $DIR/issue-35937.rs:30:5 | -29 | fn bar(s: S) { +LL | fn bar(s: S) { | - consider changing this to `mut s` -30 | s.x += 1; //~ ERROR cannot assign +LL | s.x += 1; //~ ERROR cannot assign | ^^^^^^^^ cannot mutably borrow field of immutable binding error: aborting due to 3 previous errors diff --git a/src/test/ui/did_you_mean/issue-36798.stderr b/src/test/ui/did_you_mean/issue-36798.stderr index 73319d567bd76..2765f114fe7af 100644 --- a/src/test/ui/did_you_mean/issue-36798.stderr +++ b/src/test/ui/did_you_mean/issue-36798.stderr @@ -1,7 +1,7 @@ error[E0609]: no field `baz` on type `Foo` --> $DIR/issue-36798.rs:17:7 | -17 | f.baz; //~ ERROR no field +LL | f.baz; //~ ERROR no field | ^^^ did you mean `bar`? error: aborting due to previous error diff --git a/src/test/ui/did_you_mean/issue-36798_unknown_field.stderr b/src/test/ui/did_you_mean/issue-36798_unknown_field.stderr index f17672b234fc6..217c270676c15 100644 --- a/src/test/ui/did_you_mean/issue-36798_unknown_field.stderr +++ b/src/test/ui/did_you_mean/issue-36798_unknown_field.stderr @@ -1,7 +1,7 @@ error[E0609]: no field `zz` on type `Foo` --> $DIR/issue-36798_unknown_field.rs:17:7 | -17 | f.zz; //~ ERROR no field +LL | f.zz; //~ ERROR no field | ^^ unknown field | = note: available fields are: `bar` diff --git a/src/test/ui/did_you_mean/issue-37139.stderr b/src/test/ui/did_you_mean/issue-37139.stderr index 65de724616d10..d61eaffc8b3d6 100644 --- a/src/test/ui/did_you_mean/issue-37139.stderr +++ b/src/test/ui/did_you_mean/issue-37139.stderr @@ -1,7 +1,7 @@ error[E0596]: cannot borrow immutable local variable `x` as mutable --> $DIR/issue-37139.rs:22:23 | -22 | test(&mut x); //~ ERROR cannot borrow immutable +LL | test(&mut x); //~ ERROR cannot borrow immutable | ^ | | | cannot reborrow mutably diff --git a/src/test/ui/did_you_mean/issue-38054-do-not-show-unresolved-names.stderr b/src/test/ui/did_you_mean/issue-38054-do-not-show-unresolved-names.stderr index c58958c7f5e3f..a28696320faee 100644 --- a/src/test/ui/did_you_mean/issue-38054-do-not-show-unresolved-names.stderr +++ b/src/test/ui/did_you_mean/issue-38054-do-not-show-unresolved-names.stderr @@ -1,13 +1,13 @@ error[E0432]: unresolved import `Foo` --> $DIR/issue-38054-do-not-show-unresolved-names.rs:11:5 | -11 | use Foo; //~ ERROR unresolved +LL | use Foo; //~ ERROR unresolved | ^^^ no `Foo` in the root error[E0432]: unresolved import `Foo1` --> $DIR/issue-38054-do-not-show-unresolved-names.rs:13:5 | -13 | use Foo1; //~ ERROR unresolved +LL | use Foo1; //~ ERROR unresolved | ^^^^ no `Foo1` in the root error: aborting due to 2 previous errors diff --git a/src/test/ui/did_you_mean/issue-38147-1.stderr b/src/test/ui/did_you_mean/issue-38147-1.stderr index 6a262b3102638..d58a59f8f97f5 100644 --- a/src/test/ui/did_you_mean/issue-38147-1.stderr +++ b/src/test/ui/did_you_mean/issue-38147-1.stderr @@ -1,9 +1,9 @@ error[E0389]: cannot borrow data mutably in a `&` reference --> $DIR/issue-38147-1.rs:27:9 | -26 | fn f(&self) { +LL | fn f(&self) { | ----- use `&mut self` here to make mutable -27 | self.s.push('x'); //~ ERROR cannot borrow data mutably +LL | self.s.push('x'); //~ ERROR cannot borrow data mutably | ^^^^^^ assignment into an immutable reference error: aborting due to previous error diff --git a/src/test/ui/did_you_mean/issue-38147-2.stderr b/src/test/ui/did_you_mean/issue-38147-2.stderr index 569bfa11803c9..876df2b1878f3 100644 --- a/src/test/ui/did_you_mean/issue-38147-2.stderr +++ b/src/test/ui/did_you_mean/issue-38147-2.stderr @@ -1,10 +1,10 @@ error[E0596]: cannot borrow borrowed content `*self.s` of immutable binding as mutable --> $DIR/issue-38147-2.rs:17:9 | -12 | s: &'a String +LL | s: &'a String | ---------- use `&'a mut String` here to make mutable ... -17 | self.s.push('x'); +LL | self.s.push('x'); | ^^^^^^ cannot borrow as mutable error: aborting due to previous error diff --git a/src/test/ui/did_you_mean/issue-38147-3.stderr b/src/test/ui/did_you_mean/issue-38147-3.stderr index 75d904d394a8b..9c76338c05c10 100644 --- a/src/test/ui/did_you_mean/issue-38147-3.stderr +++ b/src/test/ui/did_you_mean/issue-38147-3.stderr @@ -1,10 +1,10 @@ error[E0596]: cannot borrow borrowed content `*self.s` of immutable binding as mutable --> $DIR/issue-38147-3.rs:17:9 | -12 | s: &'a String +LL | s: &'a String | ---------- use `&'a mut String` here to make mutable ... -17 | self.s.push('x'); +LL | self.s.push('x'); | ^^^^^^ cannot borrow as mutable error: aborting due to previous error diff --git a/src/test/ui/did_you_mean/issue-38147-4.stderr b/src/test/ui/did_you_mean/issue-38147-4.stderr index 33bf2e1160c90..f4979446362ac 100644 --- a/src/test/ui/did_you_mean/issue-38147-4.stderr +++ b/src/test/ui/did_you_mean/issue-38147-4.stderr @@ -1,9 +1,9 @@ error[E0389]: cannot borrow data mutably in a `&` reference --> $DIR/issue-38147-4.rs:16:5 | -15 | fn f(x: usize, f: &Foo) { +LL | fn f(x: usize, f: &Foo) { | ---- use `&mut Foo` here to make mutable -16 | f.s.push('x'); //~ ERROR cannot borrow data mutably +LL | f.s.push('x'); //~ ERROR cannot borrow data mutably | ^^^ assignment into an immutable reference error: aborting due to previous error diff --git a/src/test/ui/did_you_mean/issue-39544.stderr b/src/test/ui/did_you_mean/issue-39544.stderr index d8c089806cdf9..82e9ad6acab83 100644 --- a/src/test/ui/did_you_mean/issue-39544.stderr +++ b/src/test/ui/did_you_mean/issue-39544.stderr @@ -1,99 +1,99 @@ error[E0596]: cannot borrow field `z.x` of immutable binding as mutable --> $DIR/issue-39544.rs:21:18 | -20 | let z = Z { x: X::Y }; +LL | let z = Z { x: X::Y }; | - consider changing this to `mut z` -21 | let _ = &mut z.x; //~ ERROR cannot borrow +LL | let _ = &mut z.x; //~ ERROR cannot borrow | ^^^ cannot mutably borrow field of immutable binding error[E0596]: cannot borrow field `self.x` of immutable binding as mutable --> $DIR/issue-39544.rs:26:22 | -25 | fn foo<'z>(&'z self) { +LL | fn foo<'z>(&'z self) { | -------- use `&'z mut self` here to make mutable -26 | let _ = &mut self.x; //~ ERROR cannot borrow +LL | let _ = &mut self.x; //~ ERROR cannot borrow | ^^^^^^ cannot mutably borrow field of immutable binding error[E0596]: cannot borrow field `self.x` of immutable binding as mutable --> $DIR/issue-39544.rs:30:22 | -29 | fn foo1(&self, other: &Z) { +LL | fn foo1(&self, other: &Z) { | ----- use `&mut self` here to make mutable -30 | let _ = &mut self.x; //~ ERROR cannot borrow +LL | let _ = &mut self.x; //~ ERROR cannot borrow | ^^^^^^ cannot mutably borrow field of immutable binding error[E0596]: cannot borrow field `other.x` of immutable binding as mutable --> $DIR/issue-39544.rs:31:22 | -29 | fn foo1(&self, other: &Z) { +LL | fn foo1(&self, other: &Z) { | -- use `&mut Z` here to make mutable -30 | let _ = &mut self.x; //~ ERROR cannot borrow -31 | let _ = &mut other.x; //~ ERROR cannot borrow +LL | let _ = &mut self.x; //~ ERROR cannot borrow +LL | let _ = &mut other.x; //~ ERROR cannot borrow | ^^^^^^^ cannot mutably borrow field of immutable binding error[E0596]: cannot borrow field `self.x` of immutable binding as mutable --> $DIR/issue-39544.rs:35:22 | -34 | fn foo2<'a>(&'a self, other: &Z) { +LL | fn foo2<'a>(&'a self, other: &Z) { | -------- use `&'a mut self` here to make mutable -35 | let _ = &mut self.x; //~ ERROR cannot borrow +LL | let _ = &mut self.x; //~ ERROR cannot borrow | ^^^^^^ cannot mutably borrow field of immutable binding error[E0596]: cannot borrow field `other.x` of immutable binding as mutable --> $DIR/issue-39544.rs:36:22 | -34 | fn foo2<'a>(&'a self, other: &Z) { +LL | fn foo2<'a>(&'a self, other: &Z) { | -- use `&mut Z` here to make mutable -35 | let _ = &mut self.x; //~ ERROR cannot borrow -36 | let _ = &mut other.x; //~ ERROR cannot borrow +LL | let _ = &mut self.x; //~ ERROR cannot borrow +LL | let _ = &mut other.x; //~ ERROR cannot borrow | ^^^^^^^ cannot mutably borrow field of immutable binding error[E0596]: cannot borrow field `self.x` of immutable binding as mutable --> $DIR/issue-39544.rs:40:22 | -39 | fn foo3<'a>(self: &'a Self, other: &Z) { +LL | fn foo3<'a>(self: &'a Self, other: &Z) { | -------- use `&'a mut Self` here to make mutable -40 | let _ = &mut self.x; //~ ERROR cannot borrow +LL | let _ = &mut self.x; //~ ERROR cannot borrow | ^^^^^^ cannot mutably borrow field of immutable binding error[E0596]: cannot borrow field `other.x` of immutable binding as mutable --> $DIR/issue-39544.rs:41:22 | -39 | fn foo3<'a>(self: &'a Self, other: &Z) { +LL | fn foo3<'a>(self: &'a Self, other: &Z) { | -- use `&mut Z` here to make mutable -40 | let _ = &mut self.x; //~ ERROR cannot borrow -41 | let _ = &mut other.x; //~ ERROR cannot borrow +LL | let _ = &mut self.x; //~ ERROR cannot borrow +LL | let _ = &mut other.x; //~ ERROR cannot borrow | ^^^^^^^ cannot mutably borrow field of immutable binding error[E0596]: cannot borrow field `other.x` of immutable binding as mutable --> $DIR/issue-39544.rs:45:22 | -44 | fn foo4(other: &Z) { +LL | fn foo4(other: &Z) { | -- use `&mut Z` here to make mutable -45 | let _ = &mut other.x; //~ ERROR cannot borrow +LL | let _ = &mut other.x; //~ ERROR cannot borrow | ^^^^^^^ cannot mutably borrow field of immutable binding error[E0596]: cannot borrow field `z.x` of immutable binding as mutable --> $DIR/issue-39544.rs:51:18 | -50 | pub fn with_arg(z: Z, w: &Z) { +LL | pub fn with_arg(z: Z, w: &Z) { | - consider changing this to `mut z` -51 | let _ = &mut z.x; //~ ERROR cannot borrow +LL | let _ = &mut z.x; //~ ERROR cannot borrow | ^^^ cannot mutably borrow field of immutable binding error[E0596]: cannot borrow field `w.x` of immutable binding as mutable --> $DIR/issue-39544.rs:52:18 | -50 | pub fn with_arg(z: Z, w: &Z) { +LL | pub fn with_arg(z: Z, w: &Z) { | -- use `&mut Z` here to make mutable -51 | let _ = &mut z.x; //~ ERROR cannot borrow -52 | let _ = &mut w.x; //~ ERROR cannot borrow +LL | let _ = &mut z.x; //~ ERROR cannot borrow +LL | let _ = &mut w.x; //~ ERROR cannot borrow | ^^^ cannot mutably borrow field of immutable binding error[E0594]: cannot assign to borrowed content `*x.0` of immutable binding --> $DIR/issue-39544.rs:58:5 | -58 | *x.0 = 1; +LL | *x.0 = 1; | ^^^^^^^^ cannot borrow as mutable error: aborting due to 12 previous errors diff --git a/src/test/ui/did_you_mean/issue-39802-show-5-trait-impls.stderr b/src/test/ui/did_you_mean/issue-39802-show-5-trait-impls.stderr index 7ca3e8728fd9c..bbf78395563d1 100644 --- a/src/test/ui/did_you_mean/issue-39802-show-5-trait-impls.stderr +++ b/src/test/ui/did_you_mean/issue-39802-show-5-trait-impls.stderr @@ -1,7 +1,7 @@ error[E0277]: the trait bound `i8: Foo` is not satisfied --> $DIR/issue-39802-show-5-trait-impls.rs:34:5 | -34 | Foo::::bar(&1i8); //~ ERROR is not satisfied +LL | Foo::::bar(&1i8); //~ ERROR is not satisfied | ^^^^^^^^^^^^^^^ the trait `Foo` is not implemented for `i8` | = help: the following implementations were found: @@ -13,13 +13,13 @@ error[E0277]: the trait bound `i8: Foo` is not satisfied note: required by `Foo::bar` --> $DIR/issue-39802-show-5-trait-impls.rs:12:5 | -12 | fn bar(&self){} +LL | fn bar(&self){} | ^^^^^^^^^^^^^ error[E0277]: the trait bound `u8: Foo` is not satisfied --> $DIR/issue-39802-show-5-trait-impls.rs:35:5 | -35 | Foo::::bar(&1u8); //~ ERROR is not satisfied +LL | Foo::::bar(&1u8); //~ ERROR is not satisfied | ^^^^^^^^^^^^^^^ the trait `Foo` is not implemented for `u8` | = help: the following implementations were found: @@ -30,13 +30,13 @@ error[E0277]: the trait bound `u8: Foo` is not satisfied note: required by `Foo::bar` --> $DIR/issue-39802-show-5-trait-impls.rs:12:5 | -12 | fn bar(&self){} +LL | fn bar(&self){} | ^^^^^^^^^^^^^ error[E0277]: the trait bound `bool: Foo` is not satisfied --> $DIR/issue-39802-show-5-trait-impls.rs:36:5 | -36 | Foo::::bar(&true); //~ ERROR is not satisfied +LL | Foo::::bar(&true); //~ ERROR is not satisfied | ^^^^^^^^^^^^^^^ the trait `Foo` is not implemented for `bool` | = help: the following implementations were found: @@ -48,7 +48,7 @@ error[E0277]: the trait bound `bool: Foo` is not satisfied note: required by `Foo::bar` --> $DIR/issue-39802-show-5-trait-impls.rs:12:5 | -12 | fn bar(&self){} +LL | fn bar(&self){} | ^^^^^^^^^^^^^ error: aborting due to 3 previous errors diff --git a/src/test/ui/did_you_mean/issue-40006.stderr b/src/test/ui/did_you_mean/issue-40006.stderr index 88d63cdbb5db4..f88bb550a3ef4 100644 --- a/src/test/ui/did_you_mean/issue-40006.stderr +++ b/src/test/ui/did_you_mean/issue-40006.stderr @@ -1,65 +1,65 @@ error: missing `fn`, `type`, or `const` for impl-item declaration --> $DIR/issue-40006.rs:11:9 | -11 | impl X { //~ ERROR cannot be made into an object +LL | impl X { //~ ERROR cannot be made into an object | _________^ -12 | | //~^ ERROR missing -13 | | Y +LL | | //~^ ERROR missing +LL | | Y | |____^ missing `fn`, `type`, or `const` error: missing `fn`, `type`, or `const` for trait-item declaration --> $DIR/issue-40006.rs:18:10 | -18 | trait X { //~ ERROR missing +LL | trait X { //~ ERROR missing | __________^ -19 | | X() {} +LL | | X() {} | |____^ missing `fn`, `type`, or `const` error: expected `[`, found `#` --> $DIR/issue-40006.rs:20:17 | -20 | fn xxx() { ### } //~ ERROR missing +LL | fn xxx() { ### } //~ ERROR missing | ^ error: missing `fn`, `type`, or `const` for trait-item declaration --> $DIR/issue-40006.rs:20:21 | -20 | fn xxx() { ### } //~ ERROR missing +LL | fn xxx() { ### } //~ ERROR missing | _____________________^ -21 | | //~^ ERROR expected -22 | | L = M; //~ ERROR missing +LL | | //~^ ERROR expected +LL | | L = M; //~ ERROR missing | |____^ missing `fn`, `type`, or `const` error: missing `fn`, `type`, or `const` for trait-item declaration --> $DIR/issue-40006.rs:22:11 | -22 | L = M; //~ ERROR missing +LL | L = M; //~ ERROR missing | ___________^ -23 | | Z = { 2 + 3 }; //~ ERROR expected one of +LL | | Z = { 2 + 3 }; //~ ERROR expected one of | |____^ missing `fn`, `type`, or `const` error: expected one of `const`, `extern`, `fn`, `type`, `unsafe`, or `}`, found `;` --> $DIR/issue-40006.rs:23:18 | -23 | Z = { 2 + 3 }; //~ ERROR expected one of +LL | Z = { 2 + 3 }; //~ ERROR expected one of | ^ expected one of `const`, `extern`, `fn`, `type`, `unsafe`, or `}` here error: expected one of `!` or `::`, found `(` --> $DIR/issue-40006.rs:24:9 | -24 | ::Y (); //~ ERROR expected one of +LL | ::Y (); //~ ERROR expected one of | ^ expected one of `!` or `::` here error: missing `fn`, `type`, or `const` for impl-item declaration --> $DIR/issue-40006.rs:28:8 | -28 | pub hello_method(&self) { //~ ERROR missing +LL | pub hello_method(&self) { //~ ERROR missing | ^ missing `fn`, `type`, or `const` error[E0038]: the trait `X` cannot be made into an object --> $DIR/issue-40006.rs:11:6 | -11 | impl X { //~ ERROR cannot be made into an object +LL | impl X { //~ ERROR cannot be made into an object | ^ the trait `X` cannot be made into an object | = note: method `xxx` has no receiver diff --git a/src/test/ui/did_you_mean/issue-40396.stderr b/src/test/ui/did_you_mean/issue-40396.stderr index 8f4118b3ff05a..219fd45665a94 100644 --- a/src/test/ui/did_you_mean/issue-40396.stderr +++ b/src/test/ui/did_you_mean/issue-40396.stderr @@ -1,7 +1,7 @@ error: chained comparison operators require parentheses --> $DIR/issue-40396.rs:12:37 | -12 | println!("{:?}", (0..13).collect>()); //~ ERROR chained comparison +LL | println!("{:?}", (0..13).collect>()); //~ ERROR chained comparison | ^^^^^^^^ | = help: use `::<...>` instead of `<...>` if you meant to specify type arguments @@ -10,7 +10,7 @@ error: chained comparison operators require parentheses error: chained comparison operators require parentheses --> $DIR/issue-40396.rs:16:25 | -16 | println!("{:?}", Vec::new()); //~ ERROR chained comparison +LL | println!("{:?}", Vec::new()); //~ ERROR chained comparison | ^^^^^^^ | = help: use `::<...>` instead of `<...>` if you meant to specify type arguments @@ -19,7 +19,7 @@ error: chained comparison operators require parentheses error: chained comparison operators require parentheses --> $DIR/issue-40396.rs:20:37 | -20 | println!("{:?}", (0..13).collect()); //~ ERROR chained comparison +LL | println!("{:?}", (0..13).collect()); //~ ERROR chained comparison | ^^^^^^^^ | = help: use `::<...>` instead of `<...>` if you meant to specify type arguments @@ -28,7 +28,7 @@ error: chained comparison operators require parentheses error: chained comparison operators require parentheses --> $DIR/issue-40396.rs:20:41 | -20 | println!("{:?}", (0..13).collect()); //~ ERROR chained comparison +LL | println!("{:?}", (0..13).collect()); //~ ERROR chained comparison | ^^^^^^ | = help: use `::<...>` instead of `<...>` if you meant to specify type arguments diff --git a/src/test/ui/did_you_mean/issue-40823.stderr b/src/test/ui/did_you_mean/issue-40823.stderr index 0b71fc1d306a2..f4b4428ef8375 100644 --- a/src/test/ui/did_you_mean/issue-40823.stderr +++ b/src/test/ui/did_you_mean/issue-40823.stderr @@ -1,7 +1,7 @@ error[E0596]: cannot borrow immutable borrowed content `*buf` as mutable --> $DIR/issue-40823.rs:13:5 | -13 | buf.iter_mut(); //~ ERROR cannot borrow immutable borrowed content +LL | buf.iter_mut(); //~ ERROR cannot borrow immutable borrowed content | ^^^ cannot borrow as mutable error: aborting due to previous error diff --git a/src/test/ui/did_you_mean/issue-41679.stderr b/src/test/ui/did_you_mean/issue-41679.stderr index f1ccb3e6e141c..c17812fc0cb9d 100644 --- a/src/test/ui/did_you_mean/issue-41679.stderr +++ b/src/test/ui/did_you_mean/issue-41679.stderr @@ -1,7 +1,7 @@ error: `~` can not be used as a unary operator --> $DIR/issue-41679.rs:12:13 | -12 | let x = ~1; //~ ERROR can not be used as a unary operator +LL | let x = ~1; //~ ERROR can not be used as a unary operator | ^ did you mean `!`? | = help: use `!` instead of `~` if you meant to perform bitwise negation diff --git a/src/test/ui/did_you_mean/issue-42599_available_fields_note.stderr b/src/test/ui/did_you_mean/issue-42599_available_fields_note.stderr index d5dcef638471e..77c7a0e6d93cd 100644 --- a/src/test/ui/did_you_mean/issue-42599_available_fields_note.stderr +++ b/src/test/ui/did_you_mean/issue-42599_available_fields_note.stderr @@ -1,13 +1,13 @@ error[E0560]: struct `submodule::Demo` has no field named `inocently_mispellable` --> $DIR/issue-42599_available_fields_note.rs:26:39 | -26 | Self { secret_integer: 2, inocently_mispellable: () } +LL | Self { secret_integer: 2, inocently_mispellable: () } | ^^^^^^^^^^^^^^^^^^^^^^ field does not exist - did you mean `innocently_misspellable`? error[E0560]: struct `submodule::Demo` has no field named `egregiously_nonexistent_field` --> $DIR/issue-42599_available_fields_note.rs:31:39 | -31 | Self { secret_integer: 3, egregiously_nonexistent_field: () } +LL | Self { secret_integer: 3, egregiously_nonexistent_field: () } | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `submodule::Demo` does not have this field | = note: available fields are: `favorite_integer`, `secret_integer`, `innocently_misspellable`, `another_field`, `yet_another_field` ... and 2 others @@ -15,13 +15,13 @@ error[E0560]: struct `submodule::Demo` has no field named `egregiously_nonexiste error[E0609]: no field `inocently_mispellable` on type `submodule::Demo` --> $DIR/issue-42599_available_fields_note.rs:42:41 | -42 | let innocent_field_misaccess = demo.inocently_mispellable; +LL | let innocent_field_misaccess = demo.inocently_mispellable; | ^^^^^^^^^^^^^^^^^^^^^ did you mean `innocently_misspellable`? error[E0609]: no field `egregiously_nonexistent_field` on type `submodule::Demo` --> $DIR/issue-42599_available_fields_note.rs:45:42 | -45 | let egregious_field_misaccess = demo.egregiously_nonexistent_field; +LL | let egregious_field_misaccess = demo.egregiously_nonexistent_field; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unknown field | = note: available fields are: `favorite_integer`, `innocently_misspellable` diff --git a/src/test/ui/did_you_mean/issue-42764.stderr b/src/test/ui/did_you_mean/issue-42764.stderr index 0cc157aa5bb5c..b0d55a1038072 100644 --- a/src/test/ui/did_you_mean/issue-42764.stderr +++ b/src/test/ui/did_you_mean/issue-42764.stderr @@ -1,16 +1,16 @@ error[E0308]: mismatched types --> $DIR/issue-42764.rs:21:43 | -21 | this_function_expects_a_double_option(n); +LL | this_function_expects_a_double_option(n); | ^ expected enum `DoubleOption`, found usize | = note: expected type `DoubleOption<_>` found type `usize` help: try using a variant of the expected type | -21 | this_function_expects_a_double_option(DoubleOption::FirstSome(n)); +LL | this_function_expects_a_double_option(DoubleOption::FirstSome(n)); | ^^^^^^^^^^^^^^^^^^^^^^^^^^ -21 | this_function_expects_a_double_option(DoubleOption::AlternativeSome(n)); +LL | this_function_expects_a_double_option(DoubleOption::AlternativeSome(n)); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/did_you_mean/issue-43871-enum-instead-of-variant.stderr b/src/test/ui/did_you_mean/issue-43871-enum-instead-of-variant.stderr index 5390e541fb714..be2d1dc59e9f8 100644 --- a/src/test/ui/did_you_mean/issue-43871-enum-instead-of-variant.stderr +++ b/src/test/ui/did_you_mean/issue-43871-enum-instead-of-variant.stderr @@ -1,7 +1,7 @@ error[E0423]: expected function, found enum `Option` --> $DIR/issue-43871-enum-instead-of-variant.rs:14:13 | -14 | let x = Option(1); //~ ERROR expected function, found enum +LL | let x = Option(1); //~ ERROR expected function, found enum | ^^^^^^ | = note: did you mean to use one of the following variants? @@ -11,7 +11,7 @@ error[E0423]: expected function, found enum `Option` error[E0532]: expected tuple struct/variant, found enum `Option` --> $DIR/issue-43871-enum-instead-of-variant.rs:16:12 | -16 | if let Option(_) = x { //~ ERROR expected tuple struct/variant, found enum +LL | if let Option(_) = x { //~ ERROR expected tuple struct/variant, found enum | ^^^^^^ | = note: did you mean to use one of the following variants? @@ -21,7 +21,7 @@ error[E0532]: expected tuple struct/variant, found enum `Option` error[E0532]: expected tuple struct/variant, found enum `Example` --> $DIR/issue-43871-enum-instead-of-variant.rs:22:12 | -22 | if let Example(_) = y { //~ ERROR expected tuple struct/variant, found enum +LL | if let Example(_) = y { //~ ERROR expected tuple struct/variant, found enum | ^^^^^^^ | = note: did you mean to use one of the following variants? diff --git a/src/test/ui/did_you_mean/issue-46718-struct-pattern-dotdotdot.stderr b/src/test/ui/did_you_mean/issue-46718-struct-pattern-dotdotdot.stderr index 69a76b923b891..d73e6287f12c9 100644 --- a/src/test/ui/did_you_mean/issue-46718-struct-pattern-dotdotdot.stderr +++ b/src/test/ui/did_you_mean/issue-46718-struct-pattern-dotdotdot.stderr @@ -1,7 +1,7 @@ error: expected field pattern, found `...` --> $DIR/issue-46718-struct-pattern-dotdotdot.rs:21:55 | -21 | PersonalityInventory { expressivity: exp, ... } => exp +LL | PersonalityInventory { expressivity: exp, ... } => exp | ^^^ help: to omit remaining fields, use one fewer `.`: `..` error: aborting due to previous error diff --git a/src/test/ui/did_you_mean/multiple-pattern-typo.stderr b/src/test/ui/did_you_mean/multiple-pattern-typo.stderr index a35aa6f3d1c97..c3a706d5901fb 100644 --- a/src/test/ui/did_you_mean/multiple-pattern-typo.stderr +++ b/src/test/ui/did_you_mean/multiple-pattern-typo.stderr @@ -1,7 +1,7 @@ error: unexpected token `||` after pattern --> $DIR/multiple-pattern-typo.rs:14:15 | -14 | 1 | 2 || 3 => (), //~ ERROR unexpected token `||` after pattern +LL | 1 | 2 || 3 => (), //~ ERROR unexpected token `||` after pattern | ^^ help: use a single `|` to specify multiple patterns: `|` error: aborting due to previous error diff --git a/src/test/ui/did_you_mean/recursion_limit.stderr b/src/test/ui/did_you_mean/recursion_limit.stderr index 2bc7e9e46e7c5..384c81b550631 100644 --- a/src/test/ui/did_you_mean/recursion_limit.stderr +++ b/src/test/ui/did_you_mean/recursion_limit.stderr @@ -1,7 +1,7 @@ error[E0275]: overflow evaluating the requirement `K: std::marker::Send` --> $DIR/recursion_limit.rs:44:5 | -44 | is_send::(); //~ ERROR overflow evaluating the requirement +LL | is_send::(); //~ ERROR overflow evaluating the requirement | ^^^^^^^^^^^^ | = help: consider adding a `#![recursion_limit="20"]` attribute to your crate @@ -18,7 +18,7 @@ error[E0275]: overflow evaluating the requirement `K: std::marker::Send` note: required by `is_send` --> $DIR/recursion_limit.rs:41:1 | -41 | fn is_send() { } +LL | fn is_send() { } | ^^^^^^^^^^^^^^^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/did_you_mean/recursion_limit_deref.stderr b/src/test/ui/did_you_mean/recursion_limit_deref.stderr index 860c6bb5b909f..1c617f6512bd9 100644 --- a/src/test/ui/did_you_mean/recursion_limit_deref.stderr +++ b/src/test/ui/did_you_mean/recursion_limit_deref.stderr @@ -1,19 +1,19 @@ error[E0055]: reached the recursion limit while auto-dereferencing I --> $DIR/recursion_limit_deref.rs:62:22 | -62 | let x: &Bottom = &t; //~ ERROR mismatched types +LL | let x: &Bottom = &t; //~ ERROR mismatched types | ^^ deref recursion limit reached | = help: consider adding a `#![recursion_limit="20"]` attribute to your crate error[E0055]: reached the recursion limit while auto-dereferencing I - | - = help: consider adding a `#![recursion_limit="20"]` attribute to your crate + | + = help: consider adding a `#![recursion_limit="20"]` attribute to your crate error[E0308]: mismatched types --> $DIR/recursion_limit_deref.rs:62:22 | -62 | let x: &Bottom = &t; //~ ERROR mismatched types +LL | let x: &Bottom = &t; //~ ERROR mismatched types | ^^ expected struct `Bottom`, found struct `Top` | = note: expected type `&Bottom` diff --git a/src/test/ui/did_you_mean/recursion_limit_macro.stderr b/src/test/ui/did_you_mean/recursion_limit_macro.stderr index 24e223c797b21..f6bce55528c7d 100644 --- a/src/test/ui/did_you_mean/recursion_limit_macro.stderr +++ b/src/test/ui/did_you_mean/recursion_limit_macro.stderr @@ -1,10 +1,10 @@ error: recursion limit reached while expanding the macro `recurse` --> $DIR/recursion_limit_macro.rs:20:31 | -20 | ($t:tt $($tail:tt)*) => { recurse!($($tail)*) }; //~ ERROR recursion limit +LL | ($t:tt $($tail:tt)*) => { recurse!($($tail)*) }; //~ ERROR recursion limit | ^^^^^^^^^^^^^^^^^^^ ... -24 | recurse!(0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9); +LL | recurse!(0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9); | -------------------------------------------------- in this macro invocation | = help: consider adding a `#![recursion_limit="20"]` attribute to your crate diff --git a/src/test/ui/did_you_mean/trait-object-reference-without-parens-suggestion.stderr b/src/test/ui/did_you_mean/trait-object-reference-without-parens-suggestion.stderr index 325a19eee140b..6017451d3d8f5 100644 --- a/src/test/ui/did_you_mean/trait-object-reference-without-parens-suggestion.stderr +++ b/src/test/ui/did_you_mean/trait-object-reference-without-parens-suggestion.stderr @@ -1,19 +1,19 @@ error[E0178]: expected a path on the left-hand side of `+`, not `&Copy` --> $DIR/trait-object-reference-without-parens-suggestion.rs:12:12 | -12 | let _: &Copy + 'static; //~ ERROR expected a path +LL | let _: &Copy + 'static; //~ ERROR expected a path | ^^^^^^^^^^^^^^^ help: try adding parentheses: `&(Copy + 'static)` error[E0178]: expected a path on the left-hand side of `+`, not `&'static Copy` --> $DIR/trait-object-reference-without-parens-suggestion.rs:14:12 | -14 | let _: &'static Copy + 'static; //~ ERROR expected a path +LL | let _: &'static Copy + 'static; //~ ERROR expected a path | ^^^^^^^^^^^^^^^^^^^^^^^ help: try adding parentheses: `&'static (Copy + 'static)` error[E0038]: the trait `std::marker::Copy` cannot be made into an object --> $DIR/trait-object-reference-without-parens-suggestion.rs:12:12 | -12 | let _: &Copy + 'static; //~ ERROR expected a path +LL | let _: &Copy + 'static; //~ ERROR expected a path | ^^^^^ the trait `std::marker::Copy` cannot be made into an object | = note: the trait cannot require that `Self : Sized` diff --git a/src/test/ui/discrim-overflow-2.stderr b/src/test/ui/discrim-overflow-2.stderr index 660110cd73715..bc5f0fc4c2677 100644 --- a/src/test/ui/discrim-overflow-2.stderr +++ b/src/test/ui/discrim-overflow-2.stderr @@ -1,7 +1,7 @@ error[E0370]: enum discriminant overflowed --> $DIR/discrim-overflow-2.rs:27:9 | -27 | OhNo, //~ ERROR enum discriminant overflowed [E0370] +LL | OhNo, //~ ERROR enum discriminant overflowed [E0370] | ^^^^ overflowed on value after 127i8 | = note: explicitly set `OhNo = -128i8` if that is desired outcome @@ -9,7 +9,7 @@ error[E0370]: enum discriminant overflowed error[E0370]: enum discriminant overflowed --> $DIR/discrim-overflow-2.rs:36:9 | -36 | OhNo, //~ ERROR enum discriminant overflowed [E0370] +LL | OhNo, //~ ERROR enum discriminant overflowed [E0370] | ^^^^ overflowed on value after 255u8 | = note: explicitly set `OhNo = 0u8` if that is desired outcome @@ -17,7 +17,7 @@ error[E0370]: enum discriminant overflowed error[E0370]: enum discriminant overflowed --> $DIR/discrim-overflow-2.rs:45:9 | -45 | OhNo, //~ ERROR enum discriminant overflowed [E0370] +LL | OhNo, //~ ERROR enum discriminant overflowed [E0370] | ^^^^ overflowed on value after 32767i16 | = note: explicitly set `OhNo = -32768i16` if that is desired outcome @@ -25,7 +25,7 @@ error[E0370]: enum discriminant overflowed error[E0370]: enum discriminant overflowed --> $DIR/discrim-overflow-2.rs:54:9 | -54 | OhNo, //~ ERROR enum discriminant overflowed [E0370] +LL | OhNo, //~ ERROR enum discriminant overflowed [E0370] | ^^^^ overflowed on value after 65535u16 | = note: explicitly set `OhNo = 0u16` if that is desired outcome @@ -33,7 +33,7 @@ error[E0370]: enum discriminant overflowed error[E0370]: enum discriminant overflowed --> $DIR/discrim-overflow-2.rs:63:9 | -63 | OhNo, //~ ERROR enum discriminant overflowed [E0370] +LL | OhNo, //~ ERROR enum discriminant overflowed [E0370] | ^^^^ overflowed on value after 2147483647i32 | = note: explicitly set `OhNo = -2147483648i32` if that is desired outcome @@ -41,7 +41,7 @@ error[E0370]: enum discriminant overflowed error[E0370]: enum discriminant overflowed --> $DIR/discrim-overflow-2.rs:72:9 | -72 | OhNo, //~ ERROR enum discriminant overflowed [E0370] +LL | OhNo, //~ ERROR enum discriminant overflowed [E0370] | ^^^^ overflowed on value after 4294967295u32 | = note: explicitly set `OhNo = 0u32` if that is desired outcome @@ -49,7 +49,7 @@ error[E0370]: enum discriminant overflowed error[E0370]: enum discriminant overflowed --> $DIR/discrim-overflow-2.rs:81:9 | -81 | OhNo, //~ ERROR enum discriminant overflowed [E0370] +LL | OhNo, //~ ERROR enum discriminant overflowed [E0370] | ^^^^ overflowed on value after 9223372036854775807i64 | = note: explicitly set `OhNo = -9223372036854775808i64` if that is desired outcome @@ -57,7 +57,7 @@ error[E0370]: enum discriminant overflowed error[E0370]: enum discriminant overflowed --> $DIR/discrim-overflow-2.rs:90:9 | -90 | OhNo, //~ ERROR enum discriminant overflowed [E0370] +LL | OhNo, //~ ERROR enum discriminant overflowed [E0370] | ^^^^ overflowed on value after 18446744073709551615u64 | = note: explicitly set `OhNo = 0u64` if that is desired outcome diff --git a/src/test/ui/discrim-overflow.stderr b/src/test/ui/discrim-overflow.stderr index 733810006d74a..8bdd82763b5ae 100644 --- a/src/test/ui/discrim-overflow.stderr +++ b/src/test/ui/discrim-overflow.stderr @@ -1,7 +1,7 @@ error[E0370]: enum discriminant overflowed --> $DIR/discrim-overflow.rs:25:9 | -25 | OhNo, //~ ERROR enum discriminant overflowed [E0370] +LL | OhNo, //~ ERROR enum discriminant overflowed [E0370] | ^^^^ overflowed on value after 127i8 | = note: explicitly set `OhNo = -128i8` if that is desired outcome @@ -9,7 +9,7 @@ error[E0370]: enum discriminant overflowed error[E0370]: enum discriminant overflowed --> $DIR/discrim-overflow.rs:36:9 | -36 | OhNo, //~ ERROR enum discriminant overflowed [E0370] +LL | OhNo, //~ ERROR enum discriminant overflowed [E0370] | ^^^^ overflowed on value after 255u8 | = note: explicitly set `OhNo = 0u8` if that is desired outcome @@ -17,7 +17,7 @@ error[E0370]: enum discriminant overflowed error[E0370]: enum discriminant overflowed --> $DIR/discrim-overflow.rs:47:9 | -47 | OhNo, //~ ERROR enum discriminant overflowed [E0370] +LL | OhNo, //~ ERROR enum discriminant overflowed [E0370] | ^^^^ overflowed on value after 32767i16 | = note: explicitly set `OhNo = -32768i16` if that is desired outcome @@ -25,7 +25,7 @@ error[E0370]: enum discriminant overflowed error[E0370]: enum discriminant overflowed --> $DIR/discrim-overflow.rs:58:9 | -58 | OhNo, //~ ERROR enum discriminant overflowed [E0370] +LL | OhNo, //~ ERROR enum discriminant overflowed [E0370] | ^^^^ overflowed on value after 65535u16 | = note: explicitly set `OhNo = 0u16` if that is desired outcome @@ -33,7 +33,7 @@ error[E0370]: enum discriminant overflowed error[E0370]: enum discriminant overflowed --> $DIR/discrim-overflow.rs:70:9 | -70 | OhNo, //~ ERROR enum discriminant overflowed [E0370] +LL | OhNo, //~ ERROR enum discriminant overflowed [E0370] | ^^^^ overflowed on value after 2147483647i32 | = note: explicitly set `OhNo = -2147483648i32` if that is desired outcome @@ -41,7 +41,7 @@ error[E0370]: enum discriminant overflowed error[E0370]: enum discriminant overflowed --> $DIR/discrim-overflow.rs:82:9 | -82 | OhNo, //~ ERROR enum discriminant overflowed [E0370] +LL | OhNo, //~ ERROR enum discriminant overflowed [E0370] | ^^^^ overflowed on value after 4294967295u32 | = note: explicitly set `OhNo = 0u32` if that is desired outcome @@ -49,18 +49,18 @@ error[E0370]: enum discriminant overflowed error[E0370]: enum discriminant overflowed --> $DIR/discrim-overflow.rs:94:9 | -94 | OhNo, //~ ERROR enum discriminant overflowed [E0370] +LL | OhNo, //~ ERROR enum discriminant overflowed [E0370] | ^^^^ overflowed on value after 9223372036854775807i64 | = note: explicitly set `OhNo = -9223372036854775808i64` if that is desired outcome error[E0370]: enum discriminant overflowed - --> $DIR/discrim-overflow.rs:106:9 - | -106 | OhNo, //~ ERROR enum discriminant overflowed [E0370] - | ^^^^ overflowed on value after 18446744073709551615u64 - | - = note: explicitly set `OhNo = 0u64` if that is desired outcome + --> $DIR/discrim-overflow.rs:106:9 + | +LL | OhNo, //~ ERROR enum discriminant overflowed [E0370] + | ^^^^ overflowed on value after 18446744073709551615u64 + | + = note: explicitly set `OhNo = 0u64` if that is desired outcome error: aborting due to 8 previous errors diff --git a/src/test/ui/double-import.stderr b/src/test/ui/double-import.stderr index 2a0f9ee34f2be..98f562c436d79 100644 --- a/src/test/ui/double-import.stderr +++ b/src/test/ui/double-import.stderr @@ -1,15 +1,15 @@ error[E0252]: the name `foo` is defined multiple times --> $DIR/double-import.rs:23:5 | -22 | use sub1::foo; +LL | use sub1::foo; | --------- previous import of the value `foo` here -23 | use sub2::foo; //~ ERROR the name `foo` is defined multiple times +LL | use sub2::foo; //~ ERROR the name `foo` is defined multiple times | ^^^^^^^^^ `foo` reimported here | = note: `foo` must be defined only once in the value namespace of this module help: You can use `as` to change the binding name of the import | -23 | use sub2::foo as other_foo; //~ ERROR the name `foo` is defined multiple times +LL | use sub2::foo as other_foo; //~ ERROR the name `foo` is defined multiple times | ^^^^^^^^^^^^^^^^^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/dropck/dropck-eyepatch-extern-crate.stderr b/src/test/ui/dropck/dropck-eyepatch-extern-crate.stderr index 8aa4fba708526..7b9aa622553ea 100644 --- a/src/test/ui/dropck/dropck-eyepatch-extern-crate.stderr +++ b/src/test/ui/dropck/dropck-eyepatch-extern-crate.stderr @@ -1,10 +1,10 @@ error[E0597]: `c` does not live long enough --> $DIR/dropck-eyepatch-extern-crate.rs:39:20 | -39 | dt = Dt("dt", &c); +LL | dt = Dt("dt", &c); | ^ borrowed value does not live long enough ... -59 | } +LL | } | - `c` dropped here while still borrowed | = note: values in a scope are dropped in the opposite order they are created @@ -12,10 +12,10 @@ error[E0597]: `c` does not live long enough error[E0597]: `c` does not live long enough --> $DIR/dropck-eyepatch-extern-crate.rs:41:20 | -41 | dr = Dr("dr", &c); +LL | dr = Dr("dr", &c); | ^ borrowed value does not live long enough ... -59 | } +LL | } | - `c` dropped here while still borrowed | = note: values in a scope are dropped in the opposite order they are created @@ -23,10 +23,10 @@ error[E0597]: `c` does not live long enough error[E0597]: `c` does not live long enough --> $DIR/dropck-eyepatch-extern-crate.rs:49:29 | -49 | pt = Pt("pt", &c_long, &c); +LL | pt = Pt("pt", &c_long, &c); | ^ borrowed value does not live long enough ... -59 | } +LL | } | - `c` dropped here while still borrowed | = note: values in a scope are dropped in the opposite order they are created @@ -34,10 +34,10 @@ error[E0597]: `c` does not live long enough error[E0597]: `c` does not live long enough --> $DIR/dropck-eyepatch-extern-crate.rs:51:29 | -51 | pr = Pr("pr", &c_long, &c); +LL | pr = Pr("pr", &c_long, &c); | ^ borrowed value does not live long enough ... -59 | } +LL | } | - `c` dropped here while still borrowed | = note: values in a scope are dropped in the opposite order they are created diff --git a/src/test/ui/dropck/dropck-eyepatch-implies-unsafe-impl.stderr b/src/test/ui/dropck/dropck-eyepatch-implies-unsafe-impl.stderr index 2c788e952edbf..02773754f6e1a 100644 --- a/src/test/ui/dropck/dropck-eyepatch-implies-unsafe-impl.stderr +++ b/src/test/ui/dropck/dropck-eyepatch-implies-unsafe-impl.stderr @@ -1,23 +1,23 @@ error[E0569]: requires an `unsafe impl` declaration due to `#[may_dangle]` attribute --> $DIR/dropck-eyepatch-implies-unsafe-impl.rs:32:1 | -32 | / impl<#[may_dangle] A, B: fmt::Debug> Drop for Pt { -33 | | //~^ ERROR requires an `unsafe impl` declaration due to `#[may_dangle]` attribute -34 | | -35 | | // (unsafe to access self.1 due to #[may_dangle] on A) -36 | | fn drop(&mut self) { println!("drop {} {:?}", self.0, self.2); } -37 | | } +LL | / impl<#[may_dangle] A, B: fmt::Debug> Drop for Pt { +LL | | //~^ ERROR requires an `unsafe impl` declaration due to `#[may_dangle]` attribute +LL | | +LL | | // (unsafe to access self.1 due to #[may_dangle] on A) +LL | | fn drop(&mut self) { println!("drop {} {:?}", self.0, self.2); } +LL | | } | |_^ error[E0569]: requires an `unsafe impl` declaration due to `#[may_dangle]` attribute --> $DIR/dropck-eyepatch-implies-unsafe-impl.rs:38:1 | -38 | / impl<#[may_dangle] 'a, 'b, B: fmt::Debug> Drop for Pr<'a, 'b, B> { -39 | | //~^ ERROR requires an `unsafe impl` declaration due to `#[may_dangle]` attribute -40 | | -41 | | // (unsafe to access self.1 due to #[may_dangle] on 'a) -42 | | fn drop(&mut self) { println!("drop {} {:?}", self.0, self.2); } -43 | | } +LL | / impl<#[may_dangle] 'a, 'b, B: fmt::Debug> Drop for Pr<'a, 'b, B> { +LL | | //~^ ERROR requires an `unsafe impl` declaration due to `#[may_dangle]` attribute +LL | | +LL | | // (unsafe to access self.1 due to #[may_dangle] on 'a) +LL | | fn drop(&mut self) { println!("drop {} {:?}", self.0, self.2); } +LL | | } | |_^ error: aborting due to 2 previous errors diff --git a/src/test/ui/dropck/dropck-eyepatch-reorder.stderr b/src/test/ui/dropck/dropck-eyepatch-reorder.stderr index 4fa188908fddb..2d442982b6310 100644 --- a/src/test/ui/dropck/dropck-eyepatch-reorder.stderr +++ b/src/test/ui/dropck/dropck-eyepatch-reorder.stderr @@ -1,10 +1,10 @@ error[E0597]: `c` does not live long enough --> $DIR/dropck-eyepatch-reorder.rs:57:20 | -57 | dt = Dt("dt", &c); +LL | dt = Dt("dt", &c); | ^ borrowed value does not live long enough ... -77 | } +LL | } | - `c` dropped here while still borrowed | = note: values in a scope are dropped in the opposite order they are created @@ -12,10 +12,10 @@ error[E0597]: `c` does not live long enough error[E0597]: `c` does not live long enough --> $DIR/dropck-eyepatch-reorder.rs:59:20 | -59 | dr = Dr("dr", &c); +LL | dr = Dr("dr", &c); | ^ borrowed value does not live long enough ... -77 | } +LL | } | - `c` dropped here while still borrowed | = note: values in a scope are dropped in the opposite order they are created @@ -23,10 +23,10 @@ error[E0597]: `c` does not live long enough error[E0597]: `c` does not live long enough --> $DIR/dropck-eyepatch-reorder.rs:67:29 | -67 | pt = Pt("pt", &c_long, &c); +LL | pt = Pt("pt", &c_long, &c); | ^ borrowed value does not live long enough ... -77 | } +LL | } | - `c` dropped here while still borrowed | = note: values in a scope are dropped in the opposite order they are created @@ -34,10 +34,10 @@ error[E0597]: `c` does not live long enough error[E0597]: `c` does not live long enough --> $DIR/dropck-eyepatch-reorder.rs:69:29 | -69 | pr = Pr("pr", &c_long, &c); +LL | pr = Pr("pr", &c_long, &c); | ^ borrowed value does not live long enough ... -77 | } +LL | } | - `c` dropped here while still borrowed | = note: values in a scope are dropped in the opposite order they are created diff --git a/src/test/ui/dropck/dropck-eyepatch.stderr b/src/test/ui/dropck/dropck-eyepatch.stderr index 79fb9222d5ca3..d924874fead4d 100644 --- a/src/test/ui/dropck/dropck-eyepatch.stderr +++ b/src/test/ui/dropck/dropck-eyepatch.stderr @@ -1,46 +1,46 @@ error[E0597]: `c` does not live long enough - --> $DIR/dropck-eyepatch.rs:80:20 - | -80 | dt = Dt("dt", &c); - | ^ borrowed value does not live long enough + --> $DIR/dropck-eyepatch.rs:80:20 + | +LL | dt = Dt("dt", &c); + | ^ borrowed value does not live long enough ... -100 | } - | - `c` dropped here while still borrowed - | - = note: values in a scope are dropped in the opposite order they are created +LL | } + | - `c` dropped here while still borrowed + | + = note: values in a scope are dropped in the opposite order they are created error[E0597]: `c` does not live long enough - --> $DIR/dropck-eyepatch.rs:82:20 - | -82 | dr = Dr("dr", &c); - | ^ borrowed value does not live long enough + --> $DIR/dropck-eyepatch.rs:82:20 + | +LL | dr = Dr("dr", &c); + | ^ borrowed value does not live long enough ... -100 | } - | - `c` dropped here while still borrowed - | - = note: values in a scope are dropped in the opposite order they are created +LL | } + | - `c` dropped here while still borrowed + | + = note: values in a scope are dropped in the opposite order they are created error[E0597]: `c` does not live long enough - --> $DIR/dropck-eyepatch.rs:90:29 - | -90 | pt = Pt("pt", &c_long, &c); - | ^ borrowed value does not live long enough + --> $DIR/dropck-eyepatch.rs:90:29 + | +LL | pt = Pt("pt", &c_long, &c); + | ^ borrowed value does not live long enough ... -100 | } - | - `c` dropped here while still borrowed - | - = note: values in a scope are dropped in the opposite order they are created +LL | } + | - `c` dropped here while still borrowed + | + = note: values in a scope are dropped in the opposite order they are created error[E0597]: `c` does not live long enough - --> $DIR/dropck-eyepatch.rs:92:29 - | -92 | pr = Pr("pr", &c_long, &c); - | ^ borrowed value does not live long enough + --> $DIR/dropck-eyepatch.rs:92:29 + | +LL | pr = Pr("pr", &c_long, &c); + | ^ borrowed value does not live long enough ... -100 | } - | - `c` dropped here while still borrowed - | - = note: values in a scope are dropped in the opposite order they are created +LL | } + | - `c` dropped here while still borrowed + | + = note: values in a scope are dropped in the opposite order they are created error: aborting due to 4 previous errors diff --git a/src/test/ui/duplicate-check-macro-exports.stderr b/src/test/ui/duplicate-check-macro-exports.stderr index 4e7176f351888..6d3bb669df975 100644 --- a/src/test/ui/duplicate-check-macro-exports.stderr +++ b/src/test/ui/duplicate-check-macro-exports.stderr @@ -1,13 +1,13 @@ error: a macro named `panic` has already been exported --> $DIR/duplicate-check-macro-exports.rs:16:1 | -16 | macro_rules! panic { () => {} } //~ ERROR a macro named `panic` has already been exported +LL | macro_rules! panic { () => {} } //~ ERROR a macro named `panic` has already been exported | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `panic` already exported | note: previous macro export here --> $DIR/duplicate-check-macro-exports.rs:13:9 | -13 | pub use std::panic; +LL | pub use std::panic; | ^^^^^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/e0119/complex-impl.stderr b/src/test/ui/e0119/complex-impl.stderr index 926dac3f9b132..b562f7396dbde 100644 --- a/src/test/ui/e0119/complex-impl.stderr +++ b/src/test/ui/e0119/complex-impl.stderr @@ -1,7 +1,7 @@ error[E0119]: conflicting implementations of trait `complex_impl_support::External` for type `(Q, complex_impl_support::M<'_, '_, '_, std::boxed::Box<_>, _, _>)`: --> $DIR/complex-impl.rs:19:1 | -19 | impl External for (Q, R) {} //~ ERROR must be used +LL | impl External for (Q, R) {} //~ ERROR must be used | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = note: conflicting implementation in crate `complex_impl_support`: @@ -11,7 +11,7 @@ error[E0119]: conflicting implementations of trait `complex_impl_support::Extern error[E0210]: type parameter `R` must be used as the type parameter for some local type (e.g. `MyStruct`); only traits defined in the current crate can be implemented for a type parameter --> $DIR/complex-impl.rs:19:1 | -19 | impl External for (Q, R) {} //~ ERROR must be used +LL | impl External for (Q, R) {} //~ ERROR must be used | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: aborting due to 2 previous errors diff --git a/src/test/ui/e0119/conflict-with-std.stderr b/src/test/ui/e0119/conflict-with-std.stderr index 4c1f9405fb962..1840777d254a9 100644 --- a/src/test/ui/e0119/conflict-with-std.stderr +++ b/src/test/ui/e0119/conflict-with-std.stderr @@ -1,7 +1,7 @@ error[E0119]: conflicting implementations of trait `std::convert::AsRef` for type `std::boxed::Box`: --> $DIR/conflict-with-std.rs:17:1 | -17 | impl AsRef for Box { //~ ERROR conflicting implementations +LL | impl AsRef for Box { //~ ERROR conflicting implementations | ^^^^^^^^^^^^^^^^^^^^^^^^ | = note: conflicting implementation in crate `alloc`: @@ -11,7 +11,7 @@ error[E0119]: conflicting implementations of trait `std::convert::AsRef` for error[E0119]: conflicting implementations of trait `std::convert::From` for type `S`: --> $DIR/conflict-with-std.rs:24:1 | -24 | impl From for S { //~ ERROR conflicting implementations +LL | impl From for S { //~ ERROR conflicting implementations | ^^^^^^^^^^^^^^^^^^ | = note: conflicting implementation in crate `core`: @@ -20,7 +20,7 @@ error[E0119]: conflicting implementations of trait `std::convert::From` for t error[E0119]: conflicting implementations of trait `std::convert::TryFrom` for type `X`: --> $DIR/conflict-with-std.rs:31:1 | -31 | impl TryFrom for X { //~ ERROR conflicting implementations +LL | impl TryFrom for X { //~ ERROR conflicting implementations | ^^^^^^^^^^^^^^^^^^^^^ | = note: conflicting implementation in crate `core`: diff --git a/src/test/ui/e0119/issue-23563.stderr b/src/test/ui/e0119/issue-23563.stderr index 8bbae56d8436d..08faf82d69315 100644 --- a/src/test/ui/e0119/issue-23563.stderr +++ b/src/test/ui/e0119/issue-23563.stderr @@ -1,7 +1,7 @@ error[E0119]: conflicting implementations of trait `a::LolFrom<&[_]>` for type `LocalType<_>`: --> $DIR/issue-23563.rs:23:1 | -23 | impl<'a, T> LolFrom<&'a [T]> for LocalType { //~ ERROR conflicting implementations of trait +LL | impl<'a, T> LolFrom<&'a [T]> for LocalType { //~ ERROR conflicting implementations of trait | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = note: conflicting implementation in crate `issue_23563_a`: diff --git a/src/test/ui/e0119/issue-27403.stderr b/src/test/ui/e0119/issue-27403.stderr index 4417ea9099fa8..2806dfa3f6c9f 100644 --- a/src/test/ui/e0119/issue-27403.stderr +++ b/src/test/ui/e0119/issue-27403.stderr @@ -1,7 +1,7 @@ error[E0119]: conflicting implementations of trait `std::convert::Into<_>` for type `GenX<_>`: --> $DIR/issue-27403.rs:15:1 | -15 | impl Into for GenX { //~ ERROR conflicting implementations +LL | impl Into for GenX { //~ ERROR conflicting implementations | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = note: conflicting implementation in crate `core`: diff --git a/src/test/ui/e0119/issue-28981.stderr b/src/test/ui/e0119/issue-28981.stderr index 3ea1c9adc9b46..f7ff9a77f88fc 100644 --- a/src/test/ui/e0119/issue-28981.stderr +++ b/src/test/ui/e0119/issue-28981.stderr @@ -1,7 +1,7 @@ error[E0119]: conflicting implementations of trait `std::ops::Deref` for type `&_`: --> $DIR/issue-28981.rs:15:1 | -15 | impl Deref for Foo { } //~ ERROR must be used +LL | impl Deref for Foo { } //~ ERROR must be used | ^^^^^^^^^^^^^^^^^^^^^^^ | = note: conflicting implementation in crate `core`: @@ -11,7 +11,7 @@ error[E0119]: conflicting implementations of trait `std::ops::Deref` for type `& error[E0210]: type parameter `Foo` must be used as the type parameter for some local type (e.g. `MyStruct`); only traits defined in the current crate can be implemented for a type parameter --> $DIR/issue-28981.rs:15:1 | -15 | impl Deref for Foo { } //~ ERROR must be used +LL | impl Deref for Foo { } //~ ERROR must be used | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: aborting due to 2 previous errors diff --git a/src/test/ui/e0119/so-37347311.stderr b/src/test/ui/e0119/so-37347311.stderr index 84fb049df357d..29f7c781d4597 100644 --- a/src/test/ui/e0119/so-37347311.stderr +++ b/src/test/ui/e0119/so-37347311.stderr @@ -1,7 +1,7 @@ error[E0119]: conflicting implementations of trait `std::convert::From>` for type `MyError<_>`: --> $DIR/so-37347311.rs:21:1 | -21 | impl From for MyError { //~ ERROR conflicting implementations +LL | impl From for MyError { //~ ERROR conflicting implementations | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = note: conflicting implementation in crate `core`: diff --git a/src/test/ui/empty-struct-unit-expr.stderr b/src/test/ui/empty-struct-unit-expr.stderr index aa242a530d0e3..c1f20c547e069 100644 --- a/src/test/ui/empty-struct-unit-expr.stderr +++ b/src/test/ui/empty-struct-unit-expr.stderr @@ -1,39 +1,39 @@ error[E0618]: expected function, found `Empty2` --> $DIR/empty-struct-unit-expr.rs:25:14 | -18 | struct Empty2; +LL | struct Empty2; | -------------- `Empty2` defined here ... -25 | let e2 = Empty2(); //~ ERROR expected function, found `Empty2` +LL | let e2 = Empty2(); //~ ERROR expected function, found `Empty2` | ^^^^^^^^ not a function error[E0618]: expected function, found enum variant `E::Empty4` --> $DIR/empty-struct-unit-expr.rs:26:14 | -21 | Empty4 +LL | Empty4 | ------ `E::Empty4` defined here ... -26 | let e4 = E::Empty4(); +LL | let e4 = E::Empty4(); | ^^^^^^^^^^^ not a function help: `E::Empty4` is a unit variant, you need to write it without the parenthesis | -26 | let e4 = E::Empty4; +LL | let e4 = E::Empty4; | ^^^^^^^^^ error[E0618]: expected function, found `empty_struct::XEmpty2` --> $DIR/empty-struct-unit-expr.rs:28:15 | -28 | let xe2 = XEmpty2(); //~ ERROR expected function, found `empty_struct::XEmpty2` +LL | let xe2 = XEmpty2(); //~ ERROR expected function, found `empty_struct::XEmpty2` | ^^^^^^^^^ not a function error[E0618]: expected function, found enum variant `XE::XEmpty4` --> $DIR/empty-struct-unit-expr.rs:29:15 | -29 | let xe4 = XE::XEmpty4(); +LL | let xe4 = XE::XEmpty4(); | ^^^^^^^^^^^^^ not a function help: `XE::XEmpty4` is a unit variant, you need to write it without the parenthesis | -29 | let xe4 = XE::XEmpty4; +LL | let xe4 = XE::XEmpty4; | ^^^^^^^^^^^ error: aborting due to 4 previous errors diff --git a/src/test/ui/enum-and-module-in-same-scope.stderr b/src/test/ui/enum-and-module-in-same-scope.stderr index ddbee0655e4cd..f31b94441d2b2 100644 --- a/src/test/ui/enum-and-module-in-same-scope.stderr +++ b/src/test/ui/enum-and-module-in-same-scope.stderr @@ -1,10 +1,10 @@ error[E0428]: the name `Foo` is defined multiple times --> $DIR/enum-and-module-in-same-scope.rs:15:1 | -11 | enum Foo { +LL | enum Foo { | -------- previous definition of the type `Foo` here ... -15 | mod Foo { //~ ERROR the name `Foo` is defined multiple times +LL | mod Foo { //~ ERROR the name `Foo` is defined multiple times | ^^^^^^^ `Foo` redefined here | = note: `Foo` must be defined only once in the type namespace of this module diff --git a/src/test/ui/enum-size-variance.stderr b/src/test/ui/enum-size-variance.stderr index a21243a49907f..f6df65b1d9da7 100644 --- a/src/test/ui/enum-size-variance.stderr +++ b/src/test/ui/enum-size-variance.stderr @@ -1,12 +1,12 @@ warning: enum variant is more than three times larger (32 bytes) than the next largest --> $DIR/enum-size-variance.rs:28:5 | -28 | L(i64, i64, i64, i64), //~ WARNING three times larger +LL | L(i64, i64, i64, i64), //~ WARNING three times larger | ^^^^^^^^^^^^^^^^^^^^^ | note: lint level defined here --> $DIR/enum-size-variance.rs:13:9 | -13 | #![warn(variant_size_differences)] +LL | #![warn(variant_size_differences)] | ^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/src/test/ui/error-codes/E0001.stderr b/src/test/ui/error-codes/E0001.stderr index d7d67af1492c6..af67a438f52fa 100644 --- a/src/test/ui/error-codes/E0001.stderr +++ b/src/test/ui/error-codes/E0001.stderr @@ -1,13 +1,13 @@ error: unreachable pattern --> $DIR/E0001.rs:18:9 | -18 | _ => {/* ... */} //~ ERROR unreachable pattern +LL | _ => {/* ... */} //~ ERROR unreachable pattern | ^ | note: lint level defined here --> $DIR/E0001.rs:11:9 | -11 | #![deny(unreachable_patterns)] +LL | #![deny(unreachable_patterns)] | ^^^^^^^^^^^^^^^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0004-2.stderr b/src/test/ui/error-codes/E0004-2.stderr index 2f4d26e2f327c..f170bcc59f2a1 100644 --- a/src/test/ui/error-codes/E0004-2.stderr +++ b/src/test/ui/error-codes/E0004-2.stderr @@ -1,13 +1,13 @@ error[E0004]: non-exhaustive patterns: type std::option::Option is non-empty --> $DIR/E0004-2.rs:14:11 | -14 | match x { } //~ ERROR E0004 +LL | match x { } //~ ERROR E0004 | ^ | help: Please ensure that all possible cases are being handled; possibly adding wildcards or more match arms. --> $DIR/E0004-2.rs:14:11 | -14 | match x { } //~ ERROR E0004 +LL | match x { } //~ ERROR E0004 | ^ error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0004.stderr b/src/test/ui/error-codes/E0004.stderr index 836afaf05ba9f..0ef8cba5cc27d 100644 --- a/src/test/ui/error-codes/E0004.stderr +++ b/src/test/ui/error-codes/E0004.stderr @@ -1,7 +1,7 @@ error[E0004]: non-exhaustive patterns: `HastaLaVistaBaby` not covered --> $DIR/E0004.rs:19:11 | -19 | match x { //~ ERROR E0004 +LL | match x { //~ ERROR E0004 | ^ pattern `HastaLaVistaBaby` not covered error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0005.stderr b/src/test/ui/error-codes/E0005.stderr index d052c12e9fe9d..c577d760ee44a 100644 --- a/src/test/ui/error-codes/E0005.stderr +++ b/src/test/ui/error-codes/E0005.stderr @@ -1,7 +1,7 @@ error[E0005]: refutable pattern in local binding: `None` not covered --> $DIR/E0005.rs:13:9 | -13 | let Some(y) = x; //~ ERROR E0005 +LL | let Some(y) = x; //~ ERROR E0005 | ^^^^^^^ pattern `None` not covered error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0007.stderr b/src/test/ui/error-codes/E0007.stderr index 1370cacd7cbfa..3c60e7f45c5df 100644 --- a/src/test/ui/error-codes/E0007.stderr +++ b/src/test/ui/error-codes/E0007.stderr @@ -1,13 +1,13 @@ error[E0007]: cannot bind by-move with sub-bindings --> $DIR/E0007.rs:14:9 | -14 | op_string @ Some(s) => {}, +LL | op_string @ Some(s) => {}, | ^^^^^^^^^^^^^^^^^^^ binds an already bound by-move value by moving it error[E0303]: pattern bindings are not allowed after an `@` --> $DIR/E0007.rs:14:26 | -14 | op_string @ Some(s) => {}, +LL | op_string @ Some(s) => {}, | ^ not allowed after `@` error: aborting due to 2 previous errors diff --git a/src/test/ui/error-codes/E0008.stderr b/src/test/ui/error-codes/E0008.stderr index 6ae4506a6e390..dde5018705a3e 100644 --- a/src/test/ui/error-codes/E0008.stderr +++ b/src/test/ui/error-codes/E0008.stderr @@ -1,7 +1,7 @@ error[E0008]: cannot bind by-move into a pattern guard --> $DIR/E0008.rs:13:14 | -13 | Some(s) if s.len() == 0 => {}, +LL | Some(s) if s.len() == 0 => {}, | ^ moves value into pattern guard error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0009.stderr b/src/test/ui/error-codes/E0009.stderr index 31db957621d21..806db82318e8a 100644 --- a/src/test/ui/error-codes/E0009.stderr +++ b/src/test/ui/error-codes/E0009.stderr @@ -1,7 +1,7 @@ error[E0009]: cannot bind by-move and by-ref in the same pattern --> $DIR/E0009.rs:15:15 | -15 | Some((y, ref z)) => {}, +LL | Some((y, ref z)) => {}, | ^ ----- both by-ref and by-move used | | | by-move pattern here diff --git a/src/test/ui/error-codes/E0010-teach.stderr b/src/test/ui/error-codes/E0010-teach.stderr index 46f8101ca65ad..c489abec0408d 100644 --- a/src/test/ui/error-codes/E0010-teach.stderr +++ b/src/test/ui/error-codes/E0010-teach.stderr @@ -1,7 +1,7 @@ error[E0010]: allocations are not allowed in constants --> $DIR/E0010-teach.rs:16:24 | -16 | const CON : Box = box 0; //~ ERROR E0010 +LL | const CON : Box = box 0; //~ ERROR E0010 | ^^^^^ allocation not allowed in constants | = note: The value of statics and constants must be known at compile time, and they live for the entire lifetime of a program. Creating a boxed value allocates memory on the heap at runtime, and therefore cannot be done at compile time. diff --git a/src/test/ui/error-codes/E0010.stderr b/src/test/ui/error-codes/E0010.stderr index 5cef631e05ed6..bf146fde02d7f 100644 --- a/src/test/ui/error-codes/E0010.stderr +++ b/src/test/ui/error-codes/E0010.stderr @@ -1,7 +1,7 @@ error[E0010]: allocations are not allowed in constants --> $DIR/E0010.rs:14:24 | -14 | const CON : Box = box 0; //~ ERROR E0010 +LL | const CON : Box = box 0; //~ ERROR E0010 | ^^^^^ allocation not allowed in constants error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0017.stderr b/src/test/ui/error-codes/E0017.stderr index f1fe1e58b34d7..0eadc2a38d8d6 100644 --- a/src/test/ui/error-codes/E0017.stderr +++ b/src/test/ui/error-codes/E0017.stderr @@ -1,25 +1,25 @@ error[E0017]: references in constants may only refer to immutable values --> $DIR/E0017.rs:14:30 | -14 | const CR: &'static mut i32 = &mut C; //~ ERROR E0017 +LL | const CR: &'static mut i32 = &mut C; //~ ERROR E0017 | ^^^^^^ constants require immutable values error[E0017]: references in statics may only refer to immutable values --> $DIR/E0017.rs:15:39 | -15 | static STATIC_REF: &'static mut i32 = &mut X; //~ ERROR E0017 +LL | static STATIC_REF: &'static mut i32 = &mut X; //~ ERROR E0017 | ^^^^^^ statics require immutable values error[E0596]: cannot borrow immutable static item as mutable --> $DIR/E0017.rs:15:44 | -15 | static STATIC_REF: &'static mut i32 = &mut X; //~ ERROR E0017 +LL | static STATIC_REF: &'static mut i32 = &mut X; //~ ERROR E0017 | ^ error[E0017]: references in statics may only refer to immutable values --> $DIR/E0017.rs:17:38 | -17 | static CONST_REF: &'static mut i32 = &mut C; //~ ERROR E0017 +LL | static CONST_REF: &'static mut i32 = &mut C; //~ ERROR E0017 | ^^^^^^ statics require immutable values error: aborting due to 4 previous errors diff --git a/src/test/ui/error-codes/E0023.stderr b/src/test/ui/error-codes/E0023.stderr index 582dffeb19ce2..b3353970d7309 100644 --- a/src/test/ui/error-codes/E0023.stderr +++ b/src/test/ui/error-codes/E0023.stderr @@ -1,19 +1,19 @@ error[E0023]: this pattern has 1 field, but the corresponding tuple variant has 2 fields --> $DIR/E0023.rs:20:9 | -20 | Fruit::Apple(a) => {}, //~ ERROR E0023 +LL | Fruit::Apple(a) => {}, //~ ERROR E0023 | ^^^^^^^^^^^^^^^ expected 2 fields, found 1 error[E0023]: this pattern has 3 fields, but the corresponding tuple variant has 2 fields --> $DIR/E0023.rs:21:9 | -21 | Fruit::Apple(a, b, c) => {}, //~ ERROR E0023 +LL | Fruit::Apple(a, b, c) => {}, //~ ERROR E0023 | ^^^^^^^^^^^^^^^^^^^^^ expected 2 fields, found 3 error[E0023]: this pattern has 2 fields, but the corresponding tuple variant has 1 field --> $DIR/E0023.rs:22:9 | -22 | Fruit::Pear(1, 2) => {}, //~ ERROR E0023 +LL | Fruit::Pear(1, 2) => {}, //~ ERROR E0023 | ^^^^^^^^^^^^^^^^^ expected 1 field, found 2 error: aborting due to 3 previous errors diff --git a/src/test/ui/error-codes/E0025.stderr b/src/test/ui/error-codes/E0025.stderr index 480cd2a5cc8a9..ddf6e5bd7fc43 100644 --- a/src/test/ui/error-codes/E0025.stderr +++ b/src/test/ui/error-codes/E0025.stderr @@ -1,7 +1,7 @@ error[E0025]: field `a` bound multiple times in the pattern --> $DIR/E0025.rs:18:21 | -18 | let Foo { a: x, a: y, b: 0 } = x; +LL | let Foo { a: x, a: y, b: 0 } = x; | ---- ^^^^ multiple uses of `a` in pattern | | | first use of `a` diff --git a/src/test/ui/error-codes/E0026-teach.stderr b/src/test/ui/error-codes/E0026-teach.stderr index ee83cfb353515..ca24d7b27519f 100644 --- a/src/test/ui/error-codes/E0026-teach.stderr +++ b/src/test/ui/error-codes/E0026-teach.stderr @@ -1,7 +1,7 @@ error[E0026]: struct `Thing` does not have a field named `z` --> $DIR/E0026-teach.rs:21:23 | -21 | Thing { x, y, z } => {} +LL | Thing { x, y, z } => {} | ^ struct `Thing` does not have field `z` | = note: This error indicates that a struct pattern attempted to extract a non-existent field from a struct. Struct fields are identified by the name used before the colon : so struct patterns should resemble the declaration of the struct type being matched. diff --git a/src/test/ui/error-codes/E0026.stderr b/src/test/ui/error-codes/E0026.stderr index c9819df3f9fbd..e48f588d963a1 100644 --- a/src/test/ui/error-codes/E0026.stderr +++ b/src/test/ui/error-codes/E0026.stderr @@ -1,7 +1,7 @@ error[E0026]: struct `Thing` does not have a field named `z` --> $DIR/E0026.rs:19:23 | -19 | Thing { x, y, z } => {} +LL | Thing { x, y, z } => {} | ^ struct `Thing` does not have field `z` error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0027-teach.stderr b/src/test/ui/error-codes/E0027-teach.stderr index e9f9e4ba766f2..0cf29ad1917ac 100644 --- a/src/test/ui/error-codes/E0027-teach.stderr +++ b/src/test/ui/error-codes/E0027-teach.stderr @@ -1,7 +1,7 @@ error[E0027]: pattern does not mention field `name` --> $DIR/E0027-teach.rs:22:9 | -22 | Dog { age: x } => {} +LL | Dog { age: x } => {} | ^^^^^^^^^^^^^^ missing field `name` | = note: This error indicates that a pattern for a struct fails to specify a sub-pattern for every one of the struct's fields. Ensure that each field from the struct's definition is mentioned in the pattern, or use `..` to ignore unwanted fields. diff --git a/src/test/ui/error-codes/E0027.stderr b/src/test/ui/error-codes/E0027.stderr index 0f93a776b9ef1..ee8c4691973fc 100644 --- a/src/test/ui/error-codes/E0027.stderr +++ b/src/test/ui/error-codes/E0027.stderr @@ -1,7 +1,7 @@ error[E0027]: pattern does not mention field `name` --> $DIR/E0027.rs:20:9 | -20 | Dog { age: x } => {} +LL | Dog { age: x } => {} | ^^^^^^^^^^^^^^ missing field `name` error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0029-teach.stderr b/src/test/ui/error-codes/E0029-teach.stderr index dbb8d972f5c22..ef09444685a6a 100644 --- a/src/test/ui/error-codes/E0029-teach.stderr +++ b/src/test/ui/error-codes/E0029-teach.stderr @@ -1,7 +1,7 @@ error[E0658]: non-reference pattern used to match a reference (see issue #42640) --> $DIR/E0029-teach.rs:17:9 | -17 | "hello" ... "world" => {} +LL | "hello" ... "world" => {} | ^^^^^^^^^^^^^^^^^^^ help: consider using a reference: `&"hello" ... "world"` | = help: add #![feature(match_default_bindings)] to the crate attributes to enable @@ -9,7 +9,7 @@ error[E0658]: non-reference pattern used to match a reference (see issue #42640) error[E0029]: only char and numeric types are allowed in range patterns --> $DIR/E0029-teach.rs:17:9 | -17 | "hello" ... "world" => {} +LL | "hello" ... "world" => {} | ^^^^^^^^^^^^^^^^^^^ ranges require char or numeric types | = note: start type: &'static str diff --git a/src/test/ui/error-codes/E0029.stderr b/src/test/ui/error-codes/E0029.stderr index 02fbd20386f2d..c5a7557fabdea 100644 --- a/src/test/ui/error-codes/E0029.stderr +++ b/src/test/ui/error-codes/E0029.stderr @@ -1,7 +1,7 @@ error[E0658]: non-reference pattern used to match a reference (see issue #42640) --> $DIR/E0029.rs:15:9 | -15 | "hello" ... "world" => {} +LL | "hello" ... "world" => {} | ^^^^^^^^^^^^^^^^^^^ help: consider using a reference: `&"hello" ... "world"` | = help: add #![feature(match_default_bindings)] to the crate attributes to enable @@ -9,7 +9,7 @@ error[E0658]: non-reference pattern used to match a reference (see issue #42640) error[E0029]: only char and numeric types are allowed in range patterns --> $DIR/E0029.rs:15:9 | -15 | "hello" ... "world" => {} +LL | "hello" ... "world" => {} | ^^^^^^^^^^^^^^^^^^^ ranges require char or numeric types | = note: start type: &'static str diff --git a/src/test/ui/error-codes/E0030-teach.stderr b/src/test/ui/error-codes/E0030-teach.stderr index 40b3d790e1245..acbfff5b14791 100644 --- a/src/test/ui/error-codes/E0030-teach.stderr +++ b/src/test/ui/error-codes/E0030-teach.stderr @@ -1,7 +1,7 @@ error[E0030]: lower range bound must be less than or equal to upper --> $DIR/E0030-teach.rs:15:9 | -15 | 1000 ... 5 => {} +LL | 1000 ... 5 => {} | ^^^^ lower bound larger than upper bound | = note: When matching against a range, the compiler verifies that the range is non-empty. Range patterns include both end-points, so this is equivalent to requiring the start of the range to be less than or equal to the end of the range. diff --git a/src/test/ui/error-codes/E0030.stderr b/src/test/ui/error-codes/E0030.stderr index 7bdecd0028e74..6edb37829c2cb 100644 --- a/src/test/ui/error-codes/E0030.stderr +++ b/src/test/ui/error-codes/E0030.stderr @@ -1,7 +1,7 @@ error[E0030]: lower range bound must be less than or equal to upper --> $DIR/E0030.rs:14:9 | -14 | 1000 ... 5 => {} +LL | 1000 ... 5 => {} | ^^^^ lower bound larger than upper bound error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0033-teach.stderr b/src/test/ui/error-codes/E0033-teach.stderr index ea60fcb6ccf1c..7d9b8110c355d 100644 --- a/src/test/ui/error-codes/E0033-teach.stderr +++ b/src/test/ui/error-codes/E0033-teach.stderr @@ -1,13 +1,13 @@ error[E0423]: expected value, found trait `SomeTrait` --> $DIR/E0033-teach.rs:18:33 | -18 | let trait_obj: &SomeTrait = SomeTrait; +LL | let trait_obj: &SomeTrait = SomeTrait; | ^^^^^^^^^ not a value error[E0038]: the trait `SomeTrait` cannot be made into an object --> $DIR/E0033-teach.rs:18:20 | -18 | let trait_obj: &SomeTrait = SomeTrait; +LL | let trait_obj: &SomeTrait = SomeTrait; | ^^^^^^^^^^ the trait `SomeTrait` cannot be made into an object | = note: method `foo` has no receiver @@ -15,7 +15,7 @@ error[E0038]: the trait `SomeTrait` cannot be made into an object error[E0033]: type `&SomeTrait` cannot be dereferenced --> $DIR/E0033-teach.rs:23:9 | -23 | let &invalid = trait_obj; +LL | let &invalid = trait_obj; | ^^^^^^^^ type `&SomeTrait` cannot be dereferenced | = note: This error indicates that a pointer to a trait type cannot be implicitly dereferenced by a pattern. Every trait defines a type, but because the size of trait implementors isn't fixed, this type has no compile-time size. Therefore, all accesses to trait types must be through pointers. If you encounter this error you should try to avoid dereferencing the pointer. diff --git a/src/test/ui/error-codes/E0033.stderr b/src/test/ui/error-codes/E0033.stderr index abc535ee2a647..15a3d1e6d8168 100644 --- a/src/test/ui/error-codes/E0033.stderr +++ b/src/test/ui/error-codes/E0033.stderr @@ -1,13 +1,13 @@ error[E0423]: expected value, found trait `SomeTrait` --> $DIR/E0033.rs:16:33 | -16 | let trait_obj: &SomeTrait = SomeTrait; +LL | let trait_obj: &SomeTrait = SomeTrait; | ^^^^^^^^^ not a value error[E0038]: the trait `SomeTrait` cannot be made into an object --> $DIR/E0033.rs:16:20 | -16 | let trait_obj: &SomeTrait = SomeTrait; +LL | let trait_obj: &SomeTrait = SomeTrait; | ^^^^^^^^^^ the trait `SomeTrait` cannot be made into an object | = note: method `foo` has no receiver @@ -15,7 +15,7 @@ error[E0038]: the trait `SomeTrait` cannot be made into an object error[E0033]: type `&SomeTrait` cannot be dereferenced --> $DIR/E0033.rs:21:9 | -21 | let &invalid = trait_obj; +LL | let &invalid = trait_obj; | ^^^^^^^^ type `&SomeTrait` cannot be dereferenced error: aborting due to 3 previous errors diff --git a/src/test/ui/error-codes/E0034.stderr b/src/test/ui/error-codes/E0034.stderr index 238fd0d67a080..e53efc4245d7d 100644 --- a/src/test/ui/error-codes/E0034.stderr +++ b/src/test/ui/error-codes/E0034.stderr @@ -1,18 +1,18 @@ error[E0034]: multiple applicable items in scope --> $DIR/E0034.rs:30:5 | -30 | Test::foo() //~ ERROR multiple applicable items in scope +LL | Test::foo() //~ ERROR multiple applicable items in scope | ^^^^^^^^^ multiple `foo` found | note: candidate #1 is defined in an impl of the trait `Trait1` for the type `Test` --> $DIR/E0034.rs:22:5 | -22 | fn foo() {} +LL | fn foo() {} | ^^^^^^^^ note: candidate #2 is defined in an impl of the trait `Trait2` for the type `Test` --> $DIR/E0034.rs:26:5 | -26 | fn foo() {} +LL | fn foo() {} | ^^^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0038.stderr b/src/test/ui/error-codes/E0038.stderr index e9423561f3775..7bbec01617777 100644 --- a/src/test/ui/error-codes/E0038.stderr +++ b/src/test/ui/error-codes/E0038.stderr @@ -1,7 +1,7 @@ error[E0038]: the trait `Trait` cannot be made into an object --> $DIR/E0038.rs:15:1 | -15 | fn call_foo(x: Box) { +LL | fn call_foo(x: Box) { | ^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Trait` cannot be made into an object | = note: method `foo` references the `Self` type in its arguments or return type diff --git a/src/test/ui/error-codes/E0040.stderr b/src/test/ui/error-codes/E0040.stderr index 73cb49fbf9878..21e80f29c32f3 100644 --- a/src/test/ui/error-codes/E0040.stderr +++ b/src/test/ui/error-codes/E0040.stderr @@ -1,7 +1,7 @@ error[E0040]: explicit use of destructor method --> $DIR/E0040.rs:23:7 | -23 | x.drop(); +LL | x.drop(); | ^^^^ explicit destructor calls not allowed error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0044.stderr b/src/test/ui/error-codes/E0044.stderr index 65a429c1fcacd..767699f1f0b28 100644 --- a/src/test/ui/error-codes/E0044.stderr +++ b/src/test/ui/error-codes/E0044.stderr @@ -1,13 +1,13 @@ error[E0044]: foreign items may not have type parameters --> $DIR/E0044.rs:11:10 | -11 | extern { fn some_func(x: T); } //~ ERROR E0044 +LL | extern { fn some_func(x: T); } //~ ERROR E0044 | ^^^^^^^^^^^^^^^^^^^^^^ | help: consider using specialization instead of type parameters --> $DIR/E0044.rs:11:10 | -11 | extern { fn some_func(x: T); } //~ ERROR E0044 +LL | extern { fn some_func(x: T); } //~ ERROR E0044 | ^^^^^^^^^^^^^^^^^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0045.stderr b/src/test/ui/error-codes/E0045.stderr index cd400564669f5..626d5bc20760f 100644 --- a/src/test/ui/error-codes/E0045.stderr +++ b/src/test/ui/error-codes/E0045.stderr @@ -1,7 +1,7 @@ error[E0045]: variadic function must have C or cdecl calling convention --> $DIR/E0045.rs:11:17 | -11 | extern "Rust" { fn foo(x: u8, ...); } //~ ERROR E0045 +LL | extern "Rust" { fn foo(x: u8, ...); } //~ ERROR E0045 | ^^^^^^^^^^^^^^^^^^^ variadics require C or cdecl calling convention error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0049.stderr b/src/test/ui/error-codes/E0049.stderr index e6f72bab50ad4..ded7ba1a6fdff 100644 --- a/src/test/ui/error-codes/E0049.stderr +++ b/src/test/ui/error-codes/E0049.stderr @@ -1,10 +1,10 @@ error[E0049]: method `foo` has 0 type parameters but its trait declaration has 1 type parameter --> $DIR/E0049.rs:18:5 | -12 | fn foo(x: T) -> Self; +LL | fn foo(x: T) -> Self; | --------------------------------- expected 1 type parameter ... -18 | fn foo(x: bool) -> Self { Bar } //~ ERROR E0049 +LL | fn foo(x: bool) -> Self { Bar } //~ ERROR E0049 | ^^^^^^^^^^^^^^^^^^^^^^^ found 0 type parameters error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0050.stderr b/src/test/ui/error-codes/E0050.stderr index d95a2005b1876..077c604db1d1c 100644 --- a/src/test/ui/error-codes/E0050.stderr +++ b/src/test/ui/error-codes/E0050.stderr @@ -1,28 +1,28 @@ error[E0050]: method `foo` has 1 parameter but the declaration in trait `Foo::foo` has 2 --> $DIR/E0050.rs:20:12 | -12 | fn foo(&self, x: u8) -> bool; +LL | fn foo(&self, x: u8) -> bool; | -- trait requires 2 parameters ... -20 | fn foo(&self) -> bool { true } //~ ERROR E0050 +LL | fn foo(&self) -> bool { true } //~ ERROR E0050 | ^^^^^ expected 2 parameters, found 1 error[E0050]: method `bar` has 1 parameter but the declaration in trait `Foo::bar` has 4 --> $DIR/E0050.rs:21:12 | -13 | fn bar(&self, x: u8, y: u8, z: u8); +LL | fn bar(&self, x: u8, y: u8, z: u8); | -- trait requires 4 parameters ... -21 | fn bar(&self) { } //~ ERROR E0050 +LL | fn bar(&self) { } //~ ERROR E0050 | ^^^^^ expected 4 parameters, found 1 error[E0050]: method `less` has 4 parameters but the declaration in trait `Foo::less` has 1 --> $DIR/E0050.rs:22:37 | -14 | fn less(&self); +LL | fn less(&self); | ----- trait requires 1 parameter ... -22 | fn less(&self, x: u8, y: u8, z: u8) { } //~ ERROR E0050 +LL | fn less(&self, x: u8, y: u8, z: u8) { } //~ ERROR E0050 | ^^ expected 1 parameter, found 4 error: aborting due to 3 previous errors diff --git a/src/test/ui/error-codes/E0054.stderr b/src/test/ui/error-codes/E0054.stderr index fc331579ef5f5..8764af635b78d 100644 --- a/src/test/ui/error-codes/E0054.stderr +++ b/src/test/ui/error-codes/E0054.stderr @@ -1,7 +1,7 @@ error[E0054]: cannot cast as `bool` --> $DIR/E0054.rs:13:24 | -13 | let x_is_nonzero = x as bool; //~ ERROR E0054 +LL | let x_is_nonzero = x as bool; //~ ERROR E0054 | ^^^^^^^^^ unsupported cast | = help: compare with zero instead diff --git a/src/test/ui/error-codes/E0055.stderr b/src/test/ui/error-codes/E0055.stderr index 001178e97c065..898debdd8aeaf 100644 --- a/src/test/ui/error-codes/E0055.stderr +++ b/src/test/ui/error-codes/E0055.stderr @@ -1,7 +1,7 @@ error[E0055]: reached the recursion limit while auto-dereferencing Foo --> $DIR/E0055.rs:21:13 | -21 | ref_foo.foo(); +LL | ref_foo.foo(); | ^^^ deref recursion limit reached | = help: consider adding a `#![recursion_limit="4"]` attribute to your crate diff --git a/src/test/ui/error-codes/E0057.stderr b/src/test/ui/error-codes/E0057.stderr index 450c87ca0322b..3250465c8f08e 100644 --- a/src/test/ui/error-codes/E0057.stderr +++ b/src/test/ui/error-codes/E0057.stderr @@ -1,13 +1,13 @@ error[E0057]: this function takes 1 parameter but 0 parameters were supplied --> $DIR/E0057.rs:13:13 | -13 | let a = f(); //~ ERROR E0057 +LL | let a = f(); //~ ERROR E0057 | ^^^ expected 1 parameter error[E0057]: this function takes 1 parameter but 2 parameters were supplied --> $DIR/E0057.rs:15:13 | -15 | let c = f(2, 3); //~ ERROR E0057 +LL | let c = f(2, 3); //~ ERROR E0057 | ^^^^^^^ expected 1 parameter error: aborting due to 2 previous errors diff --git a/src/test/ui/error-codes/E0059.stderr b/src/test/ui/error-codes/E0059.stderr index aca4b8881e28f..e85864ac58b31 100644 --- a/src/test/ui/error-codes/E0059.stderr +++ b/src/test/ui/error-codes/E0059.stderr @@ -1,7 +1,7 @@ error[E0059]: cannot use call notation; the first type parameter for the function trait is neither a tuple nor unit --> $DIR/E0059.rs:13:41 | -13 | fn foo>(f: F) -> F::Output { f(3) } //~ ERROR E0059 +LL | fn foo>(f: F) -> F::Output { f(3) } //~ ERROR E0059 | ^^^^ error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0060.stderr b/src/test/ui/error-codes/E0060.stderr index 8207220ba72c5..d2a430172a49c 100644 --- a/src/test/ui/error-codes/E0060.stderr +++ b/src/test/ui/error-codes/E0060.stderr @@ -1,10 +1,10 @@ error[E0060]: this function takes at least 1 parameter but 0 parameters were supplied --> $DIR/E0060.rs:16:14 | -12 | fn printf(_: *const u8, ...) -> u32; +LL | fn printf(_: *const u8, ...) -> u32; | ------------------------------------ defined here ... -16 | unsafe { printf(); } +LL | unsafe { printf(); } | ^^^^^^^^ expected at least 1 parameter error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0061.stderr b/src/test/ui/error-codes/E0061.stderr index 89d81b5acd76c..30fdb9fb4a790 100644 --- a/src/test/ui/error-codes/E0061.stderr +++ b/src/test/ui/error-codes/E0061.stderr @@ -1,19 +1,19 @@ error[E0061]: this function takes 2 parameters but 1 parameter was supplied --> $DIR/E0061.rs:16:5 | -11 | fn f(a: u16, b: &str) {} +LL | fn f(a: u16, b: &str) {} | --------------------- defined here ... -16 | f(0); +LL | f(0); | ^^^^ expected 2 parameters error[E0061]: this function takes 1 parameter but 0 parameters were supplied --> $DIR/E0061.rs:20:5 | -13 | fn f2(a: u16) {} +LL | fn f2(a: u16) {} | ------------- defined here ... -20 | f2(); +LL | f2(); | ^^^^ expected 1 parameter error: aborting due to 2 previous errors diff --git a/src/test/ui/error-codes/E0062.stderr b/src/test/ui/error-codes/E0062.stderr index 6c5ecf48045b1..0049926452e72 100644 --- a/src/test/ui/error-codes/E0062.stderr +++ b/src/test/ui/error-codes/E0062.stderr @@ -1,9 +1,9 @@ error[E0062]: field `x` specified more than once --> $DIR/E0062.rs:18:9 | -17 | x: 0, +LL | x: 0, | ---- first use of `x` -18 | x: 0, +LL | x: 0, | ^^ used more than once error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0063.stderr b/src/test/ui/error-codes/E0063.stderr index 023819cc778d0..8f916077ff76f 100644 --- a/src/test/ui/error-codes/E0063.stderr +++ b/src/test/ui/error-codes/E0063.stderr @@ -1,25 +1,25 @@ error[E0063]: missing field `x` in initializer of `SingleFoo` --> $DIR/E0063.rs:42:13 | -42 | let w = SingleFoo { }; +LL | let w = SingleFoo { }; | ^^^^^^^^^ missing `x` error[E0063]: missing fields `y`, `z` in initializer of `PluralFoo` --> $DIR/E0063.rs:44:13 | -44 | let x = PluralFoo {x: 1}; +LL | let x = PluralFoo {x: 1}; | ^^^^^^^^^ missing `y`, `z` error[E0063]: missing fields `a`, `b`, `y` and 1 other field in initializer of `TruncatedFoo` --> $DIR/E0063.rs:46:13 | -46 | let y = TruncatedFoo{x:1}; +LL | let y = TruncatedFoo{x:1}; | ^^^^^^^^^^^^ missing `a`, `b`, `y` and 1 other field error[E0063]: missing fields `a`, `b`, `c` and 2 other fields in initializer of `TruncatedPluralFoo` --> $DIR/E0063.rs:48:13 | -48 | let z = TruncatedPluralFoo{x:1}; +LL | let z = TruncatedPluralFoo{x:1}; | ^^^^^^^^^^^^^^^^^^ missing `a`, `b`, `c` and 2 other fields error: aborting due to 4 previous errors diff --git a/src/test/ui/error-codes/E0067.stderr b/src/test/ui/error-codes/E0067.stderr index a4e15619e8ba8..1a7cbfade7fab 100644 --- a/src/test/ui/error-codes/E0067.stderr +++ b/src/test/ui/error-codes/E0067.stderr @@ -1,7 +1,7 @@ error[E0368]: binary assignment operation `+=` cannot be applied to type `std::collections::LinkedList<_>` --> $DIR/E0067.rs:14:5 | -14 | LinkedList::new() += 1; //~ ERROR E0368 +LL | LinkedList::new() += 1; //~ ERROR E0368 | -----------------^^^^^ | | | cannot use `+=` on type `std::collections::LinkedList<_>` @@ -9,7 +9,7 @@ error[E0368]: binary assignment operation `+=` cannot be applied to type `std::c error[E0067]: invalid left-hand side expression --> $DIR/E0067.rs:14:5 | -14 | LinkedList::new() += 1; //~ ERROR E0368 +LL | LinkedList::new() += 1; //~ ERROR E0368 | ^^^^^^^^^^^^^^^^^ invalid expression for left-hand side error: aborting due to 2 previous errors diff --git a/src/test/ui/error-codes/E0069.stderr b/src/test/ui/error-codes/E0069.stderr index 8424531889f0f..72994fcf3b453 100644 --- a/src/test/ui/error-codes/E0069.stderr +++ b/src/test/ui/error-codes/E0069.stderr @@ -1,7 +1,7 @@ error[E0069]: `return;` in a function whose return type is not `()` --> $DIR/E0069.rs:12:5 | -12 | return; +LL | return; | ^^^^^^ return type is not () error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0070.stderr b/src/test/ui/error-codes/E0070.stderr index e1316e2e1306c..370d31451c973 100644 --- a/src/test/ui/error-codes/E0070.stderr +++ b/src/test/ui/error-codes/E0070.stderr @@ -1,19 +1,19 @@ error[E0070]: invalid left-hand side expression --> $DIR/E0070.rs:16:5 | -16 | SOME_CONST = 14; //~ ERROR E0070 +LL | SOME_CONST = 14; //~ ERROR E0070 | ^^^^^^^^^^^^^^^ left-hand of expression not valid error[E0070]: invalid left-hand side expression --> $DIR/E0070.rs:17:5 | -17 | 1 = 3; //~ ERROR E0070 +LL | 1 = 3; //~ ERROR E0070 | ^^^^^ left-hand of expression not valid error[E0308]: mismatched types --> $DIR/E0070.rs:18:25 | -18 | some_other_func() = 4; //~ ERROR E0070 +LL | some_other_func() = 4; //~ ERROR E0070 | ^ expected (), found integral variable | = note: expected type `()` @@ -22,7 +22,7 @@ error[E0308]: mismatched types error[E0070]: invalid left-hand side expression --> $DIR/E0070.rs:18:5 | -18 | some_other_func() = 4; //~ ERROR E0070 +LL | some_other_func() = 4; //~ ERROR E0070 | ^^^^^^^^^^^^^^^^^^^^^ left-hand of expression not valid error: aborting due to 4 previous errors diff --git a/src/test/ui/error-codes/E0071.stderr b/src/test/ui/error-codes/E0071.stderr index 020dad3ac9f8e..1623ebec860ab 100644 --- a/src/test/ui/error-codes/E0071.stderr +++ b/src/test/ui/error-codes/E0071.stderr @@ -1,7 +1,7 @@ error[E0071]: expected struct, variant or union type, found enum `Foo` --> $DIR/E0071.rs:15:13 | -15 | let u = FooAlias { value: 0 }; +LL | let u = FooAlias { value: 0 }; | ^^^^^^^^ not a struct error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0075.stderr b/src/test/ui/error-codes/E0075.stderr index 39d27d6f7e462..f1c9a8fb81152 100644 --- a/src/test/ui/error-codes/E0075.stderr +++ b/src/test/ui/error-codes/E0075.stderr @@ -1,7 +1,7 @@ error[E0075]: SIMD vector cannot be empty --> $DIR/E0075.rs:14:1 | -14 | struct Bad; //~ ERROR E0075 +LL | struct Bad; //~ ERROR E0075 | ^^^^^^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0076.stderr b/src/test/ui/error-codes/E0076.stderr index 02ce47977c8a2..4b0160185fd8b 100644 --- a/src/test/ui/error-codes/E0076.stderr +++ b/src/test/ui/error-codes/E0076.stderr @@ -1,7 +1,7 @@ error[E0076]: SIMD vector should be homogeneous --> $DIR/E0076.rs:14:1 | -14 | struct Bad(u16, u32, u32); +LL | struct Bad(u16, u32, u32); | ^^^^^^^^^^^^^^^^^^^^^^^^^^ SIMD elements must have the same type error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0077.stderr b/src/test/ui/error-codes/E0077.stderr index 7e7b55f9b7e77..40bb85aa60bdc 100644 --- a/src/test/ui/error-codes/E0077.stderr +++ b/src/test/ui/error-codes/E0077.stderr @@ -1,7 +1,7 @@ error[E0077]: SIMD vector element type should be machine type --> $DIR/E0077.rs:14:1 | -14 | struct Bad(String); //~ ERROR E0077 +LL | struct Bad(String); //~ ERROR E0077 | ^^^^^^^^^^^^^^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0080.stderr b/src/test/ui/error-codes/E0080.stderr index 2ec2ad31b53bb..6e1a9cec51a20 100644 --- a/src/test/ui/error-codes/E0080.stderr +++ b/src/test/ui/error-codes/E0080.stderr @@ -1,7 +1,7 @@ warning: constant evaluation error: attempt to shift left with overflow --> $DIR/E0080.rs:12:9 | -12 | X = (1 << 500), //~ ERROR E0080 +LL | X = (1 << 500), //~ ERROR E0080 | ^^^^^^^^^^ | = note: #[warn(const_err)] on by default @@ -9,19 +9,19 @@ warning: constant evaluation error: attempt to shift left with overflow error[E0080]: constant evaluation error --> $DIR/E0080.rs:12:9 | -12 | X = (1 << 500), //~ ERROR E0080 +LL | X = (1 << 500), //~ ERROR E0080 | ^^^^^^^^^^ attempt to shift left with overflow warning: constant evaluation error: attempt to divide by zero --> $DIR/E0080.rs:14:9 | -14 | Y = (1 / 0) //~ ERROR E0080 +LL | Y = (1 / 0) //~ ERROR E0080 | ^^^^^^^ error[E0080]: constant evaluation error --> $DIR/E0080.rs:14:9 | -14 | Y = (1 / 0) //~ ERROR E0080 +LL | Y = (1 / 0) //~ ERROR E0080 | ^^^^^^^ attempt to divide by zero error: aborting due to 2 previous errors diff --git a/src/test/ui/error-codes/E0081.stderr b/src/test/ui/error-codes/E0081.stderr index 035638b2f31df..bf9f7b42178d1 100644 --- a/src/test/ui/error-codes/E0081.stderr +++ b/src/test/ui/error-codes/E0081.stderr @@ -1,9 +1,9 @@ error[E0081]: discriminant value `3isize` already exists --> $DIR/E0081.rs:13:9 | -12 | P = 3, +LL | P = 3, | - first use of `3isize` -13 | X = 3, +LL | X = 3, | ^ enum already has `3isize` error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0084.stderr b/src/test/ui/error-codes/E0084.stderr index b39a129ba162e..01b627d371794 100644 --- a/src/test/ui/error-codes/E0084.stderr +++ b/src/test/ui/error-codes/E0084.stderr @@ -1,9 +1,9 @@ error[E0084]: unsupported representation for zero-variant enum --> $DIR/E0084.rs:11:1 | -11 | #[repr(i32)] //~ ERROR: E0084 +LL | #[repr(i32)] //~ ERROR: E0084 | ^^^^^^^^^^^^ -12 | enum Foo {} +LL | enum Foo {} | ----------- zero-variant enum error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0087.stderr b/src/test/ui/error-codes/E0087.stderr index 20c8cd45dfada..7c273be649cd4 100644 --- a/src/test/ui/error-codes/E0087.stderr +++ b/src/test/ui/error-codes/E0087.stderr @@ -1,13 +1,13 @@ error[E0087]: too many type parameters provided: expected at most 0 type parameters, found 1 type parameter --> $DIR/E0087.rs:15:11 | -15 | foo::(); //~ ERROR expected at most 0 type parameters, found 1 type parameter [E0087] +LL | foo::(); //~ ERROR expected at most 0 type parameters, found 1 type parameter [E0087] | ^^^ expected 0 type parameters error[E0087]: too many type parameters provided: expected at most 1 type parameter, found 2 type parameters --> $DIR/E0087.rs:17:16 | -17 | bar::(); //~ ERROR expected at most 1 type parameter, found 2 type parameters [E0087] +LL | bar::(); //~ ERROR expected at most 1 type parameter, found 2 type parameters [E0087] | ^^^ expected 1 type parameter error: aborting due to 2 previous errors diff --git a/src/test/ui/error-codes/E0088.stderr b/src/test/ui/error-codes/E0088.stderr index 615df88f1bb2e..cf37a67f6ac85 100644 --- a/src/test/ui/error-codes/E0088.stderr +++ b/src/test/ui/error-codes/E0088.stderr @@ -1,13 +1,13 @@ error[E0088]: too many lifetime parameters provided: expected at most 0 lifetime parameters, found 1 lifetime parameter --> $DIR/E0088.rs:15:9 | -15 | f::<'static>(); //~ ERROR E0088 +LL | f::<'static>(); //~ ERROR E0088 | ^^^^^^^ expected 0 lifetime parameters error[E0088]: too many lifetime parameters provided: expected at most 1 lifetime parameter, found 2 lifetime parameters --> $DIR/E0088.rs:16:18 | -16 | g::<'static, 'static>(); //~ ERROR E0088 +LL | g::<'static, 'static>(); //~ ERROR E0088 | ^^^^^^^ expected 1 lifetime parameter error: aborting due to 2 previous errors diff --git a/src/test/ui/error-codes/E0089.stderr b/src/test/ui/error-codes/E0089.stderr index 38b45e27fa796..9daeedf794f92 100644 --- a/src/test/ui/error-codes/E0089.stderr +++ b/src/test/ui/error-codes/E0089.stderr @@ -1,7 +1,7 @@ error[E0089]: too few type parameters provided: expected 2 type parameters, found 1 type parameter --> $DIR/E0089.rs:14:5 | -14 | foo::(); //~ ERROR expected 2 type parameters, found 1 type parameter [E0089] +LL | foo::(); //~ ERROR expected 2 type parameters, found 1 type parameter [E0089] | ^^^^^^^^^^ expected 2 type parameters error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0090.stderr b/src/test/ui/error-codes/E0090.stderr index 050082d84df58..7531abeac4a05 100644 --- a/src/test/ui/error-codes/E0090.stderr +++ b/src/test/ui/error-codes/E0090.stderr @@ -1,7 +1,7 @@ error[E0090]: too few lifetime parameters provided: expected 2 lifetime parameters, found 1 lifetime parameter --> $DIR/E0090.rs:14:5 | -14 | foo::<'static>(); //~ ERROR expected 2 lifetime parameters, found 1 lifetime parameter [E0090] +LL | foo::<'static>(); //~ ERROR expected 2 lifetime parameters, found 1 lifetime parameter [E0090] | ^^^^^^^^^^^^^^ expected 2 lifetime parameters error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0091.stderr b/src/test/ui/error-codes/E0091.stderr index 7d951dd6dfd19..db4098ec0cb28 100644 --- a/src/test/ui/error-codes/E0091.stderr +++ b/src/test/ui/error-codes/E0091.stderr @@ -1,13 +1,13 @@ error[E0091]: type parameter `T` is unused --> $DIR/E0091.rs:11:10 | -11 | type Foo = u32; //~ ERROR E0091 +LL | type Foo = u32; //~ ERROR E0091 | ^ unused type parameter error[E0091]: type parameter `B` is unused --> $DIR/E0091.rs:12:14 | -12 | type Foo2 = Box; //~ ERROR E0091 +LL | type Foo2 = Box; //~ ERROR E0091 | ^ unused type parameter error: aborting due to 2 previous errors diff --git a/src/test/ui/error-codes/E0092.stderr b/src/test/ui/error-codes/E0092.stderr index 788f89944110a..5398fefc7e48b 100644 --- a/src/test/ui/error-codes/E0092.stderr +++ b/src/test/ui/error-codes/E0092.stderr @@ -1,7 +1,7 @@ error[E0092]: unrecognized atomic operation function: `foo` --> $DIR/E0092.rs:13:5 | -13 | fn atomic_foo(); //~ ERROR E0092 +LL | fn atomic_foo(); //~ ERROR E0092 | ^^^^^^^^^^^^^^^^ unrecognized atomic operation error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0093.stderr b/src/test/ui/error-codes/E0093.stderr index 959d64af433f5..18ea177041835 100644 --- a/src/test/ui/error-codes/E0093.stderr +++ b/src/test/ui/error-codes/E0093.stderr @@ -1,7 +1,7 @@ error[E0093]: unrecognized intrinsic function: `foo` --> $DIR/E0093.rs:13:5 | -13 | fn foo(); +LL | fn foo(); | ^^^^^^^^^ unrecognized intrinsic error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0094.stderr b/src/test/ui/error-codes/E0094.stderr index fdef3d8877bcf..7209ff16edc68 100644 --- a/src/test/ui/error-codes/E0094.stderr +++ b/src/test/ui/error-codes/E0094.stderr @@ -1,7 +1,7 @@ error[E0094]: intrinsic has wrong number of type parameters: found 2, expected 1 --> $DIR/E0094.rs:13:15 | -13 | fn size_of() -> usize; //~ ERROR E0094 +LL | fn size_of() -> usize; //~ ERROR E0094 | ^^^^^^ expected 1 type parameter error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0106.stderr b/src/test/ui/error-codes/E0106.stderr index 98442804708ea..00b9d4b170719 100644 --- a/src/test/ui/error-codes/E0106.stderr +++ b/src/test/ui/error-codes/E0106.stderr @@ -1,31 +1,31 @@ error[E0106]: missing lifetime specifier --> $DIR/E0106.rs:12:8 | -12 | x: &bool, +LL | x: &bool, | ^ expected lifetime parameter error[E0106]: missing lifetime specifier --> $DIR/E0106.rs:17:7 | -17 | B(&bool), +LL | B(&bool), | ^ expected lifetime parameter error[E0106]: missing lifetime specifier --> $DIR/E0106.rs:20:14 | -20 | type MyStr = &str; +LL | type MyStr = &str; | ^ expected lifetime parameter error[E0106]: missing lifetime specifier --> $DIR/E0106.rs:27:10 | -27 | baz: Baz, +LL | baz: Baz, | ^^^ expected lifetime parameter error[E0106]: missing lifetime specifiers --> $DIR/E0106.rs:30:11 | -30 | buzz: Buzz, +LL | buzz: Buzz, | ^^^^ expected 2 lifetime parameters error: aborting due to 5 previous errors diff --git a/src/test/ui/error-codes/E0107.stderr b/src/test/ui/error-codes/E0107.stderr index 6283486039c8d..9aedcbfe529be 100644 --- a/src/test/ui/error-codes/E0107.stderr +++ b/src/test/ui/error-codes/E0107.stderr @@ -1,19 +1,19 @@ error[E0107]: wrong number of lifetime parameters: expected 2, found 1 --> $DIR/E0107.rs:21:11 | -21 | buzz: Buzz<'a>, +LL | buzz: Buzz<'a>, | ^^^^^^^^ expected 2 lifetime parameters error[E0107]: wrong number of lifetime parameters: expected 0, found 1 --> $DIR/E0107.rs:24:10 | -24 | bar: Bar<'a>, +LL | bar: Bar<'a>, | ^^^^^^^ unexpected lifetime parameter error[E0107]: wrong number of lifetime parameters: expected 1, found 3 --> $DIR/E0107.rs:27:11 | -27 | foo2: Foo<'a, 'b, 'c>, +LL | foo2: Foo<'a, 'b, 'c>, | ^^^^^^^^^^^^^^^ 2 unexpected lifetime parameters error: aborting due to 3 previous errors diff --git a/src/test/ui/error-codes/E0109.stderr b/src/test/ui/error-codes/E0109.stderr index 59da11140b1e7..c7022fee6b621 100644 --- a/src/test/ui/error-codes/E0109.stderr +++ b/src/test/ui/error-codes/E0109.stderr @@ -1,7 +1,7 @@ error[E0109]: type parameters are not allowed on this type --> $DIR/E0109.rs:11:14 | -11 | type X = u32; //~ ERROR E0109 +LL | type X = u32; //~ ERROR E0109 | ^^^ type parameter not allowed error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0110.stderr b/src/test/ui/error-codes/E0110.stderr index 7417351c16d2c..73d75cf2181d6 100644 --- a/src/test/ui/error-codes/E0110.stderr +++ b/src/test/ui/error-codes/E0110.stderr @@ -1,7 +1,7 @@ error[E0110]: lifetime parameters are not allowed on this type --> $DIR/E0110.rs:11:14 | -11 | type X = u32<'static>; //~ ERROR E0110 +LL | type X = u32<'static>; //~ ERROR E0110 | ^^^^^^^ lifetime parameter not allowed on this type error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0116.stderr b/src/test/ui/error-codes/E0116.stderr index c090060e7d67d..cc4677d2596c9 100644 --- a/src/test/ui/error-codes/E0116.stderr +++ b/src/test/ui/error-codes/E0116.stderr @@ -1,7 +1,7 @@ error[E0116]: cannot define inherent `impl` for a type outside of the crate where the type is defined --> $DIR/E0116.rs:11:1 | -11 | impl Vec {} +LL | impl Vec {} | ^^^^^^^^^^^^^^^ impl for type defined outside of crate. | = note: define and implement a trait or new type instead diff --git a/src/test/ui/error-codes/E0117.stderr b/src/test/ui/error-codes/E0117.stderr index 9856692659a50..087a424f929bf 100644 --- a/src/test/ui/error-codes/E0117.stderr +++ b/src/test/ui/error-codes/E0117.stderr @@ -1,13 +1,13 @@ error[E0120]: the Drop trait may only be implemented on structures --> $DIR/E0117.rs:11:15 | -11 | impl Drop for u32 {} //~ ERROR E0117 +LL | impl Drop for u32 {} //~ ERROR E0117 | ^^^ implementing Drop requires a struct error[E0117]: only traits defined in the current crate can be implemented for arbitrary types --> $DIR/E0117.rs:11:1 | -11 | impl Drop for u32 {} //~ ERROR E0117 +LL | impl Drop for u32 {} //~ ERROR E0117 | ^^^^^^^^^^^^^^^^^^^^ impl doesn't use types inside crate | = note: the impl does not reference any types defined in this crate diff --git a/src/test/ui/error-codes/E0118.stderr b/src/test/ui/error-codes/E0118.stderr index 8c78890b88acc..02f2af5e52b5f 100644 --- a/src/test/ui/error-codes/E0118.stderr +++ b/src/test/ui/error-codes/E0118.stderr @@ -1,7 +1,7 @@ error[E0118]: no base type found for inherent implementation --> $DIR/E0118.rs:11:6 | -11 | impl (u8, u8) { //~ ERROR E0118 +LL | impl (u8, u8) { //~ ERROR E0118 | ^^^^^^^^ impl requires a base type | = note: either implement a trait on it or create a newtype to wrap it instead diff --git a/src/test/ui/error-codes/E0119.stderr b/src/test/ui/error-codes/E0119.stderr index 91bb74a10d67d..829599677d737 100644 --- a/src/test/ui/error-codes/E0119.stderr +++ b/src/test/ui/error-codes/E0119.stderr @@ -1,10 +1,10 @@ error[E0119]: conflicting implementations of trait `MyTrait` for type `Foo`: --> $DIR/E0119.rs:23:1 | -15 | impl MyTrait for T { +LL | impl MyTrait for T { | --------------------- first implementation here ... -23 | impl MyTrait for Foo { //~ ERROR E0119 +LL | impl MyTrait for Foo { //~ ERROR E0119 | ^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `Foo` error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0120.stderr b/src/test/ui/error-codes/E0120.stderr index 7c666d9fd0a6d..c822470dadf9a 100644 --- a/src/test/ui/error-codes/E0120.stderr +++ b/src/test/ui/error-codes/E0120.stderr @@ -1,7 +1,7 @@ error[E0120]: the Drop trait may only be implemented on structures --> $DIR/E0120.rs:13:15 | -13 | impl Drop for MyTrait { +LL | impl Drop for MyTrait { | ^^^^^^^ implementing Drop requires a struct error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0121.stderr b/src/test/ui/error-codes/E0121.stderr index fa54d67856318..f5d69245e12c5 100644 --- a/src/test/ui/error-codes/E0121.stderr +++ b/src/test/ui/error-codes/E0121.stderr @@ -1,13 +1,13 @@ error[E0121]: the type placeholder `_` is not allowed within types on item signatures --> $DIR/E0121.rs:11:13 | -11 | fn foo() -> _ { 5 } //~ ERROR E0121 +LL | fn foo() -> _ { 5 } //~ ERROR E0121 | ^ not allowed in type signatures error[E0121]: the type placeholder `_` is not allowed within types on item signatures --> $DIR/E0121.rs:13:13 | -13 | static BAR: _ = "test"; //~ ERROR E0121 +LL | static BAR: _ = "test"; //~ ERROR E0121 | ^ not allowed in type signatures error: aborting due to 2 previous errors diff --git a/src/test/ui/error-codes/E0124.stderr b/src/test/ui/error-codes/E0124.stderr index 8e1ec51ea1cb7..3a6ff75b011cd 100644 --- a/src/test/ui/error-codes/E0124.stderr +++ b/src/test/ui/error-codes/E0124.stderr @@ -1,9 +1,9 @@ error[E0124]: field `field1` is already declared --> $DIR/E0124.rs:13:5 | -12 | field1: i32, +LL | field1: i32, | ----------- `field1` first declared here -13 | field1: i32, +LL | field1: i32, | ^^^^^^^^^^^ field already declared error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0128.stderr b/src/test/ui/error-codes/E0128.stderr index fad2d0db8abdf..71eafff90341a 100644 --- a/src/test/ui/error-codes/E0128.stderr +++ b/src/test/ui/error-codes/E0128.stderr @@ -1,7 +1,7 @@ error[E0128]: type parameters with a default cannot use forward declared identifiers --> $DIR/E0128.rs:11:14 | -11 | struct Foo { //~ ERROR E0128 +LL | struct Foo { //~ ERROR E0128 | ^ defaulted type parameters cannot be forward declared error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0130.stderr b/src/test/ui/error-codes/E0130.stderr index 02aebe0362a13..c15c69262414e 100644 --- a/src/test/ui/error-codes/E0130.stderr +++ b/src/test/ui/error-codes/E0130.stderr @@ -1,7 +1,7 @@ error[E0130]: patterns aren't allowed in foreign function declarations --> $DIR/E0130.rs:12:12 | -12 | fn foo((a, b): (u32, u32)); +LL | fn foo((a, b): (u32, u32)); | ^^^^^^ pattern not allowed in foreign function error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0131.stderr b/src/test/ui/error-codes/E0131.stderr index d97e00fb82df1..9480af9bd8318 100644 --- a/src/test/ui/error-codes/E0131.stderr +++ b/src/test/ui/error-codes/E0131.stderr @@ -1,7 +1,7 @@ error[E0131]: main function is not allowed to have type parameters --> $DIR/E0131.rs:11:8 | -11 | fn main() { +LL | fn main() { | ^^^ main cannot have type parameters error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0132.stderr b/src/test/ui/error-codes/E0132.stderr index 5c66d67b907b3..801ca1f1081ae 100644 --- a/src/test/ui/error-codes/E0132.stderr +++ b/src/test/ui/error-codes/E0132.stderr @@ -1,7 +1,7 @@ error[E0132]: start function is not allowed to have type parameters --> $DIR/E0132.rs:14:5 | -14 | fn f< T >() {} //~ ERROR E0132 +LL | fn f< T >() {} //~ ERROR E0132 | ^^^^^ start function cannot have type parameters error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0133.stderr b/src/test/ui/error-codes/E0133.stderr index 4d2ebd111ddf6..b7faacbd36b82 100644 --- a/src/test/ui/error-codes/E0133.stderr +++ b/src/test/ui/error-codes/E0133.stderr @@ -1,7 +1,7 @@ error[E0133]: call to unsafe function requires unsafe function or block --> $DIR/E0133.rs:14:5 | -14 | f(); +LL | f(); | ^^^ call to unsafe function error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0137.stderr b/src/test/ui/error-codes/E0137.stderr index bc6bbffb18e72..d2d98ee73ce51 100644 --- a/src/test/ui/error-codes/E0137.stderr +++ b/src/test/ui/error-codes/E0137.stderr @@ -1,10 +1,10 @@ error[E0137]: multiple functions with a #[main] attribute --> $DIR/E0137.rs:17:1 | -14 | fn foo() {} +LL | fn foo() {} | ----------- first #[main] function ... -17 | fn f() {} +LL | fn f() {} | ^^^^^^^^^ additional #[main] function error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0138.stderr b/src/test/ui/error-codes/E0138.stderr index cee7cc5d90629..4a14d55d12420 100644 --- a/src/test/ui/error-codes/E0138.stderr +++ b/src/test/ui/error-codes/E0138.stderr @@ -1,10 +1,10 @@ error[E0138]: multiple 'start' functions --> $DIR/E0138.rs:17:1 | -14 | fn foo(argc: isize, argv: *const *const u8) -> isize { 0 } +LL | fn foo(argc: isize, argv: *const *const u8) -> isize { 0 } | ---------------------------------------------------------- previous `start` function here ... -17 | fn f(argc: isize, argv: *const *const u8) -> isize { 0 } +LL | fn f(argc: isize, argv: *const *const u8) -> isize { 0 } | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ multiple `start` functions error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0152.stderr b/src/test/ui/error-codes/E0152.stderr index a1d5597f031f6..4f00bec230a49 100644 --- a/src/test/ui/error-codes/E0152.stderr +++ b/src/test/ui/error-codes/E0152.stderr @@ -1,7 +1,7 @@ error[E0152]: duplicate lang item found: `panic_fmt`. --> $DIR/E0152.rs:14:1 | -14 | struct Foo; //~ ERROR E0152 +LL | struct Foo; //~ ERROR E0152 | ^^^^^^^^^^^ | = note: first defined in crate `std`. diff --git a/src/test/ui/error-codes/E0161.stderr b/src/test/ui/error-codes/E0161.stderr index 9914fdd2d6155..2489b6c844aa8 100644 --- a/src/test/ui/error-codes/E0161.stderr +++ b/src/test/ui/error-codes/E0161.stderr @@ -1,13 +1,13 @@ error[E0161]: cannot move a value of type str: the size of str cannot be statically determined --> $DIR/E0161.rs:14:28 | -14 | let _x: Box = box *"hello"; //~ ERROR E0161 +LL | let _x: Box = box *"hello"; //~ ERROR E0161 | ^^^^^^^^ error[E0507]: cannot move out of borrowed content --> $DIR/E0161.rs:14:28 | -14 | let _x: Box = box *"hello"; //~ ERROR E0161 +LL | let _x: Box = box *"hello"; //~ ERROR E0161 | ^^^^^^^^ cannot move out of borrowed content error: aborting due to 2 previous errors diff --git a/src/test/ui/error-codes/E0162.stderr b/src/test/ui/error-codes/E0162.stderr index 318a023d30213..8eb649e1b8f6f 100644 --- a/src/test/ui/error-codes/E0162.stderr +++ b/src/test/ui/error-codes/E0162.stderr @@ -1,7 +1,7 @@ error[E0162]: irrefutable if-let pattern --> $DIR/E0162.rs:15:12 | -15 | if let Irrefutable(x) = irr { //~ ERROR E0162 +LL | if let Irrefutable(x) = irr { //~ ERROR E0162 | ^^^^^^^^^^^^^^ irrefutable pattern error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0164.stderr b/src/test/ui/error-codes/E0164.stderr index a515c83d14b2d..640637b03274f 100644 --- a/src/test/ui/error-codes/E0164.stderr +++ b/src/test/ui/error-codes/E0164.stderr @@ -1,7 +1,7 @@ error[E0164]: expected tuple struct/variant, found associated constant `::B` --> $DIR/E0164.rs:20:9 | -20 | Foo::B(i) => i, //~ ERROR E0164 +LL | Foo::B(i) => i, //~ ERROR E0164 | ^^^^^^^^^ not a tuple variant or struct error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0165.stderr b/src/test/ui/error-codes/E0165.stderr index 3c90f19a0dc7c..80b44352888fd 100644 --- a/src/test/ui/error-codes/E0165.stderr +++ b/src/test/ui/error-codes/E0165.stderr @@ -1,7 +1,7 @@ error[E0165]: irrefutable while-let pattern --> $DIR/E0165.rs:15:15 | -15 | while let Irrefutable(x) = irr { //~ ERROR E0165 +LL | while let Irrefutable(x) = irr { //~ ERROR E0165 | ^^^^^^^^^^^^^^ irrefutable pattern error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0184.stderr b/src/test/ui/error-codes/E0184.stderr index 53bda3bb57591..b91d45a448b04 100644 --- a/src/test/ui/error-codes/E0184.stderr +++ b/src/test/ui/error-codes/E0184.stderr @@ -1,7 +1,7 @@ error[E0184]: the trait `Copy` may not be implemented for this type; the type has a destructor --> $DIR/E0184.rs:11:10 | -11 | #[derive(Copy)] //~ ERROR E0184 +LL | #[derive(Copy)] //~ ERROR E0184 | ^^^^ Copy not allowed on types with destructors error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0185.stderr b/src/test/ui/error-codes/E0185.stderr index 0d24a3712d558..ef2607fdcf0e6 100644 --- a/src/test/ui/error-codes/E0185.stderr +++ b/src/test/ui/error-codes/E0185.stderr @@ -1,10 +1,10 @@ error[E0185]: method `foo` has a `&self` declaration in the impl, but not in the trait --> $DIR/E0185.rs:19:5 | -12 | fn foo(); +LL | fn foo(); | --------- trait method declared without `&self` ... -19 | fn foo(&self) {} +LL | fn foo(&self) {} | ^^^^^^^^^^^^^ `&self` used in impl error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0186.stderr b/src/test/ui/error-codes/E0186.stderr index 598057db3a662..394a7ceedcc8b 100644 --- a/src/test/ui/error-codes/E0186.stderr +++ b/src/test/ui/error-codes/E0186.stderr @@ -1,10 +1,10 @@ error[E0186]: method `foo` has a `&self` declaration in the trait, but not in the impl --> $DIR/E0186.rs:18:5 | -12 | fn foo(&self); //~ `&self` used in trait +LL | fn foo(&self); //~ `&self` used in trait | -------------- `&self` used in trait ... -18 | fn foo() {} //~ ERROR E0186 +LL | fn foo() {} //~ ERROR E0186 | ^^^^^^^^ expected `&self` in impl error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0191.stderr b/src/test/ui/error-codes/E0191.stderr index 8f99a6ecffb99..556b97456a515 100644 --- a/src/test/ui/error-codes/E0191.stderr +++ b/src/test/ui/error-codes/E0191.stderr @@ -1,7 +1,7 @@ error[E0191]: the value of the associated type `Bar` (from the trait `Trait`) must be specified --> $DIR/E0191.rs:15:12 | -15 | type Foo = Trait; //~ ERROR E0191 +LL | type Foo = Trait; //~ ERROR E0191 | ^^^^^ missing associated type `Bar` value error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0192.stderr b/src/test/ui/error-codes/E0192.stderr index b592c87efa7a0..fce415c70f3ed 100644 --- a/src/test/ui/error-codes/E0192.stderr +++ b/src/test/ui/error-codes/E0192.stderr @@ -1,7 +1,7 @@ error[E0192]: negative impls are only allowed for auto traits (e.g., `Send` and `Sync`) --> $DIR/E0192.rs:19:1 | -19 | impl !Trait for Foo { } //~ ERROR E0192 +LL | impl !Trait for Foo { } //~ ERROR E0192 | ^^^^^^^^^^^^^^^^^^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0194.stderr b/src/test/ui/error-codes/E0194.stderr index 360e8c08a3c97..e749fdd1966b0 100644 --- a/src/test/ui/error-codes/E0194.stderr +++ b/src/test/ui/error-codes/E0194.stderr @@ -1,10 +1,10 @@ error[E0194]: type parameter `T` shadows another type parameter of the same name --> $DIR/E0194.rs:13:26 | -11 | trait Foo { +LL | trait Foo { | - first `T` declared here -12 | fn do_something(&self) -> T; -13 | fn do_something_else(&self, bar: T); +LL | fn do_something(&self) -> T; +LL | fn do_something_else(&self, bar: T); | ^ shadows another type parameter error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0195.stderr b/src/test/ui/error-codes/E0195.stderr index 3cce3d0799416..a8eccce0bab86 100644 --- a/src/test/ui/error-codes/E0195.stderr +++ b/src/test/ui/error-codes/E0195.stderr @@ -1,10 +1,10 @@ error[E0195]: lifetime parameters or bounds on method `bar` do not match the trait declaration --> $DIR/E0195.rs:19:5 | -12 | fn bar<'a,'b:'a>(x: &'a str, y: &'b str); +LL | fn bar<'a,'b:'a>(x: &'a str, y: &'b str); | ----------------------------------------- lifetimes in impl do not match this method in trait ... -19 | fn bar<'a,'b>(x: &'a str, y: &'b str) { //~ ERROR E0195 +LL | fn bar<'a,'b>(x: &'a str, y: &'b str) { //~ ERROR E0195 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ lifetimes do not match method in trait error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0197.stderr b/src/test/ui/error-codes/E0197.stderr index 277f523e497aa..604496985129f 100644 --- a/src/test/ui/error-codes/E0197.stderr +++ b/src/test/ui/error-codes/E0197.stderr @@ -1,7 +1,7 @@ error[E0197]: inherent impls cannot be unsafe --> $DIR/E0197.rs:13:1 | -13 | unsafe impl Foo { } //~ ERROR E0197 +LL | unsafe impl Foo { } //~ ERROR E0197 | ^^^^^^^^^^^^^^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0198.stderr b/src/test/ui/error-codes/E0198.stderr index a85419e9a1397..aa212c8c01c39 100644 --- a/src/test/ui/error-codes/E0198.stderr +++ b/src/test/ui/error-codes/E0198.stderr @@ -1,7 +1,7 @@ error[E0198]: negative impls cannot be unsafe --> $DIR/E0198.rs:15:1 | -15 | unsafe impl !Send for Foo { } //~ ERROR E0198 +LL | unsafe impl !Send for Foo { } //~ ERROR E0198 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0199.stderr b/src/test/ui/error-codes/E0199.stderr index efbe066e52e7e..10116af3f05c3 100644 --- a/src/test/ui/error-codes/E0199.stderr +++ b/src/test/ui/error-codes/E0199.stderr @@ -1,7 +1,7 @@ error[E0199]: implementing the trait `Bar` is not unsafe --> $DIR/E0199.rs:16:1 | -16 | unsafe impl Bar for Foo { } //~ ERROR implementing the trait `Bar` is not unsafe [E0199] +LL | unsafe impl Bar for Foo { } //~ ERROR implementing the trait `Bar` is not unsafe [E0199] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0200.stderr b/src/test/ui/error-codes/E0200.stderr index fb71da23677bd..43c04823e8cad 100644 --- a/src/test/ui/error-codes/E0200.stderr +++ b/src/test/ui/error-codes/E0200.stderr @@ -1,7 +1,7 @@ error[E0200]: the trait `Bar` requires an `unsafe impl` declaration --> $DIR/E0200.rs:15:1 | -15 | impl Bar for Foo { } //~ ERROR E0200 +LL | impl Bar for Foo { } //~ ERROR E0200 | ^^^^^^^^^^^^^^^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0201.stderr b/src/test/ui/error-codes/E0201.stderr index 01dbee6e09236..505b00950496b 100644 --- a/src/test/ui/error-codes/E0201.stderr +++ b/src/test/ui/error-codes/E0201.stderr @@ -1,26 +1,26 @@ error[E0201]: duplicate definitions with name `bar`: --> $DIR/E0201.rs:15:5 | -14 | fn bar(&self) -> bool { self.0 > 5 } +LL | fn bar(&self) -> bool { self.0 > 5 } | ------------------------------------ previous definition of `bar` here -15 | fn bar() {} //~ ERROR E0201 +LL | fn bar() {} //~ ERROR E0201 | ^^^^^^^^^^^ duplicate definition error[E0201]: duplicate definitions with name `baz`: --> $DIR/E0201.rs:27:5 | -26 | fn baz(&self) -> bool { true } +LL | fn baz(&self) -> bool { true } | ------------------------------ previous definition of `baz` here -27 | fn baz(&self) -> bool { self.0 > 5 } //~ ERROR E0201 +LL | fn baz(&self) -> bool { self.0 > 5 } //~ ERROR E0201 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ duplicate definition error[E0201]: duplicate definitions with name `Quux`: --> $DIR/E0201.rs:28:5 | -24 | type Quux = u32; +LL | type Quux = u32; | ---------------- previous definition of `Quux` here ... -28 | type Quux = u32; //~ ERROR E0201 +LL | type Quux = u32; //~ ERROR E0201 | ^^^^^^^^^^^^^^^^ duplicate definition error: aborting due to 3 previous errors diff --git a/src/test/ui/error-codes/E0206.stderr b/src/test/ui/error-codes/E0206.stderr index 8eeb94a42f4b8..51bbc450cc0df 100644 --- a/src/test/ui/error-codes/E0206.stderr +++ b/src/test/ui/error-codes/E0206.stderr @@ -1,19 +1,19 @@ error[E0206]: the trait `Copy` may not be implemented for this type --> $DIR/E0206.rs:13:15 | -13 | impl Copy for Foo { } +LL | impl Copy for Foo { } | ^^^ type is not a structure or enumeration error[E0206]: the trait `Copy` may not be implemented for this type --> $DIR/E0206.rs:20:15 | -20 | impl Copy for &'static Bar { } +LL | impl Copy for &'static Bar { } | ^^^^^^^^^^^^ type is not a structure or enumeration error[E0117]: only traits defined in the current crate can be implemented for arbitrary types --> $DIR/E0206.rs:13:1 | -13 | impl Copy for Foo { } +LL | impl Copy for Foo { } | ^^^^^^^^^^^^^^^^^^^^^ impl doesn't use types inside crate | = note: the impl does not reference any types defined in this crate diff --git a/src/test/ui/error-codes/E0207.stderr b/src/test/ui/error-codes/E0207.stderr index 35f9109fe99ed..8937f6d409b53 100644 --- a/src/test/ui/error-codes/E0207.stderr +++ b/src/test/ui/error-codes/E0207.stderr @@ -1,7 +1,7 @@ error[E0207]: the type parameter `T` is not constrained by the impl trait, self type, or predicates --> $DIR/E0207.rs:13:6 | -13 | impl Foo { //~ ERROR E0207 +LL | impl Foo { //~ ERROR E0207 | ^ unconstrained type parameter error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0214.stderr b/src/test/ui/error-codes/E0214.stderr index 30f5b960a364e..ec9b6baf34cb6 100644 --- a/src/test/ui/error-codes/E0214.stderr +++ b/src/test/ui/error-codes/E0214.stderr @@ -1,7 +1,7 @@ error[E0214]: parenthesized parameters may only be used with a trait --> $DIR/E0214.rs:12:15 | -12 | let v: Vec(&str) = vec!["foo"]; +LL | let v: Vec(&str) = vec!["foo"]; | ^^^^^^ only traits may use parentheses error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0220.stderr b/src/test/ui/error-codes/E0220.stderr index 70b017b782f2d..794e2264edd0f 100644 --- a/src/test/ui/error-codes/E0220.stderr +++ b/src/test/ui/error-codes/E0220.stderr @@ -1,13 +1,13 @@ error[E0220]: associated type `F` not found for `Trait` --> $DIR/E0220.rs:15:18 | -15 | type Foo = Trait; //~ ERROR E0220 +LL | type Foo = Trait; //~ ERROR E0220 | ^^^^^ associated type `F` not found error[E0191]: the value of the associated type `Bar` (from the trait `Trait`) must be specified --> $DIR/E0220.rs:15:12 | -15 | type Foo = Trait; //~ ERROR E0220 +LL | type Foo = Trait; //~ ERROR E0220 | ^^^^^^^^^^^^ missing associated type `Bar` value error: aborting due to 2 previous errors diff --git a/src/test/ui/error-codes/E0221.stderr b/src/test/ui/error-codes/E0221.stderr index 3dd9393d6b32a..8fe5a0ae4b978 100644 --- a/src/test/ui/error-codes/E0221.stderr +++ b/src/test/ui/error-codes/E0221.stderr @@ -1,28 +1,28 @@ error[E0221]: ambiguous associated type `A` in bounds of `Self` --> $DIR/E0221.rs:21:16 | -15 | type A: T1; +LL | type A: T1; | ----------- ambiguous `A` from `Foo` ... -19 | type A: T2; +LL | type A: T2; | ----------- ambiguous `A` from `Bar` -20 | fn do_something() { -21 | let _: Self::A; +LL | fn do_something() { +LL | let _: Self::A; | ^^^^^^^ ambiguous associated type `A` error[E0221]: ambiguous associated type `Err` in bounds of `Self` --> $DIR/E0221.rs:31:16 | -29 | type Err: T3; +LL | type Err: T3; | ------------- ambiguous `Err` from `My` -30 | fn test() { -31 | let _: Self::Err; +LL | fn test() { +LL | let _: Self::Err; | ^^^^^^^^^ ambiguous associated type `Err` | note: associated type `Self` could derive from `std::str::FromStr` --> $DIR/E0221.rs:31:16 | -31 | let _: Self::Err; +LL | let _: Self::Err; | ^^^^^^^^^ error: aborting due to 2 previous errors diff --git a/src/test/ui/error-codes/E0223.stderr b/src/test/ui/error-codes/E0223.stderr index efd0d7806581c..807601700e743 100644 --- a/src/test/ui/error-codes/E0223.stderr +++ b/src/test/ui/error-codes/E0223.stderr @@ -1,7 +1,7 @@ error[E0223]: ambiguous associated type --> $DIR/E0223.rs:14:14 | -14 | let foo: MyTrait::X; +LL | let foo: MyTrait::X; | ^^^^^^^^^^ ambiguous associated type | = note: specify the type using the syntax `::X` diff --git a/src/test/ui/error-codes/E0225.stderr b/src/test/ui/error-codes/E0225.stderr index 35d40cb1017d1..8e821992568e8 100644 --- a/src/test/ui/error-codes/E0225.stderr +++ b/src/test/ui/error-codes/E0225.stderr @@ -1,7 +1,7 @@ error[E0225]: only auto traits can be used as additional traits in a trait object --> $DIR/E0225.rs:12:32 | -12 | let _: Box; +LL | let _: Box; | ^^^^^^^^^^^^^^ non-auto additional trait error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0229.stderr b/src/test/ui/error-codes/E0229.stderr index 6d88ef88bffc3..de565308ffb74 100644 --- a/src/test/ui/error-codes/E0229.stderr +++ b/src/test/ui/error-codes/E0229.stderr @@ -1,7 +1,7 @@ error[E0229]: associated type bindings are not allowed here --> $DIR/E0229.rs:23:25 | -23 | fn baz(x: &>::A) {} +LL | fn baz(x: &>::A) {} | ^^^^^ associated type not allowed here error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0232.stderr b/src/test/ui/error-codes/E0232.stderr index e13ba62b073ce..d5b3afd232e17 100644 --- a/src/test/ui/error-codes/E0232.stderr +++ b/src/test/ui/error-codes/E0232.stderr @@ -1,7 +1,7 @@ error[E0232]: `#[rustc_on_unimplemented]` requires a value --> $DIR/E0232.rs:13:1 | -13 | #[rustc_on_unimplemented] +LL | #[rustc_on_unimplemented] | ^^^^^^^^^^^^^^^^^^^^^^^^^ value required here | = note: eg `#[rustc_on_unimplemented = "foo"]` diff --git a/src/test/ui/error-codes/E0243.stderr b/src/test/ui/error-codes/E0243.stderr index 82a90fff34208..e92e12dc2e304 100644 --- a/src/test/ui/error-codes/E0243.stderr +++ b/src/test/ui/error-codes/E0243.stderr @@ -1,7 +1,7 @@ error[E0243]: wrong number of type arguments: expected 1, found 0 --> $DIR/E0243.rs:12:17 | -12 | struct Bar { x: Foo } +LL | struct Bar { x: Foo } | ^^^ expected 1 type argument error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0244.stderr b/src/test/ui/error-codes/E0244.stderr index d873fbe9819f8..cb7bae70338b6 100644 --- a/src/test/ui/error-codes/E0244.stderr +++ b/src/test/ui/error-codes/E0244.stderr @@ -1,7 +1,7 @@ error[E0244]: wrong number of type arguments: expected 0, found 2 --> $DIR/E0244.rs:12:23 | -12 | struct Bar { x: Foo } +LL | struct Bar { x: Foo } | ^^^^^^^^^ expected no type arguments error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0252.stderr b/src/test/ui/error-codes/E0252.stderr index f63597d697086..c3ec524df6bdb 100644 --- a/src/test/ui/error-codes/E0252.stderr +++ b/src/test/ui/error-codes/E0252.stderr @@ -1,15 +1,15 @@ error[E0252]: the name `baz` is defined multiple times --> $DIR/E0252.rs:12:5 | -11 | use foo::baz; +LL | use foo::baz; | -------- previous import of the type `baz` here -12 | use bar::baz; //~ ERROR E0252 +LL | use bar::baz; //~ ERROR E0252 | ^^^^^^^^ `baz` reimported here | = note: `baz` must be defined only once in the type namespace of this module help: You can use `as` to change the binding name of the import | -12 | use bar::baz as other_baz; //~ ERROR E0252 +LL | use bar::baz as other_baz; //~ ERROR E0252 | ^^^^^^^^^^^^^^^^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0253.stderr b/src/test/ui/error-codes/E0253.stderr index e5a311537810d..839f8a02dddf8 100644 --- a/src/test/ui/error-codes/E0253.stderr +++ b/src/test/ui/error-codes/E0253.stderr @@ -1,7 +1,7 @@ error[E0253]: `do_something` is not directly importable --> $DIR/E0253.rs:17:5 | -17 | use foo::MyTrait::do_something; +LL | use foo::MyTrait::do_something; | ^^^^^^^^^^^^^^^^^^^^^^^^^^ cannot be imported directly error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0254.stderr b/src/test/ui/error-codes/E0254.stderr index 4181c7b1f7fb0..2a1210c36b20c 100644 --- a/src/test/ui/error-codes/E0254.stderr +++ b/src/test/ui/error-codes/E0254.stderr @@ -1,16 +1,16 @@ error[E0254]: the name `alloc` is defined multiple times --> $DIR/E0254.rs:22:5 | -14 | extern crate alloc; +LL | extern crate alloc; | ------------------- previous import of the extern crate `alloc` here ... -22 | use foo::alloc; +LL | use foo::alloc; | ^^^^^^^^^^ `alloc` reimported here | = note: `alloc` must be defined only once in the type namespace of this module help: You can use `as` to change the binding name of the import | -22 | use foo::alloc as other_alloc; +LL | use foo::alloc as other_alloc; | ^^^^^^^^^^^^^^^^^^^^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0255.stderr b/src/test/ui/error-codes/E0255.stderr index 924ac49695c63..82f79054faa59 100644 --- a/src/test/ui/error-codes/E0255.stderr +++ b/src/test/ui/error-codes/E0255.stderr @@ -1,16 +1,16 @@ error[E0255]: the name `foo` is defined multiple times --> $DIR/E0255.rs:13:1 | -11 | use bar::foo; +LL | use bar::foo; | -------- previous import of the value `foo` here -12 | -13 | fn foo() {} //~ ERROR E0255 +LL | +LL | fn foo() {} //~ ERROR E0255 | ^^^^^^^^ `foo` redefined here | = note: `foo` must be defined only once in the value namespace of this module help: You can use `as` to change the binding name of the import | -11 | use bar::foo as other_foo; +LL | use bar::foo as other_foo; | ^^^^^^^^^^^^^^^^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0259.stderr b/src/test/ui/error-codes/E0259.stderr index e05e4e1cac74e..943ef2df8977c 100644 --- a/src/test/ui/error-codes/E0259.stderr +++ b/src/test/ui/error-codes/E0259.stderr @@ -1,10 +1,10 @@ error[E0259]: the name `alloc` is defined multiple times --> $DIR/E0259.rs:16:1 | -14 | extern crate alloc; +LL | extern crate alloc; | ------------------- previous import of the extern crate `alloc` here -15 | -16 | extern crate libc as alloc; +LL | +LL | extern crate libc as alloc; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ | | | `alloc` reimported here diff --git a/src/test/ui/error-codes/E0260.stderr b/src/test/ui/error-codes/E0260.stderr index 3d899e636ee38..f639de3b3c255 100644 --- a/src/test/ui/error-codes/E0260.stderr +++ b/src/test/ui/error-codes/E0260.stderr @@ -1,16 +1,16 @@ error[E0260]: the name `alloc` is defined multiple times --> $DIR/E0260.rs:16:1 | -14 | extern crate alloc; +LL | extern crate alloc; | ------------------- previous import of the extern crate `alloc` here -15 | -16 | mod alloc { +LL | +LL | mod alloc { | ^^^^^^^^^ `alloc` redefined here | = note: `alloc` must be defined only once in the type namespace of this module help: You can use `as` to change the binding name of the import | -14 | extern crate alloc as other_alloc; +LL | extern crate alloc as other_alloc; | error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0261.stderr b/src/test/ui/error-codes/E0261.stderr index c8dd08211ecb0..72c9aaf024767 100644 --- a/src/test/ui/error-codes/E0261.stderr +++ b/src/test/ui/error-codes/E0261.stderr @@ -1,13 +1,13 @@ error[E0261]: use of undeclared lifetime name `'a` --> $DIR/E0261.rs:11:12 | -11 | fn foo(x: &'a str) { } //~ ERROR E0261 +LL | fn foo(x: &'a str) { } //~ ERROR E0261 | ^^ undeclared lifetime error[E0261]: use of undeclared lifetime name `'a` --> $DIR/E0261.rs:15:9 | -15 | x: &'a str, //~ ERROR E0261 +LL | x: &'a str, //~ ERROR E0261 | ^^ undeclared lifetime error: aborting due to 2 previous errors diff --git a/src/test/ui/error-codes/E0262.stderr b/src/test/ui/error-codes/E0262.stderr index 0910009d2c0dc..94cfd30f04914 100644 --- a/src/test/ui/error-codes/E0262.stderr +++ b/src/test/ui/error-codes/E0262.stderr @@ -1,7 +1,7 @@ error[E0262]: invalid lifetime parameter name: `'static` --> $DIR/E0262.rs:11:8 | -11 | fn foo<'static>(x: &'static str) { } //~ ERROR E0262 +LL | fn foo<'static>(x: &'static str) { } //~ ERROR E0262 | ^^^^^^^ 'static is a reserved lifetime name error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0263.stderr b/src/test/ui/error-codes/E0263.stderr index 942718d50f727..d58f92fc44178 100644 --- a/src/test/ui/error-codes/E0263.stderr +++ b/src/test/ui/error-codes/E0263.stderr @@ -1,7 +1,7 @@ error[E0263]: lifetime name `'a` declared twice in the same scope --> $DIR/E0263.rs:11:16 | -11 | fn foo<'a, 'b, 'a>(x: &'a str, y: &'b str) { +LL | fn foo<'a, 'b, 'a>(x: &'a str, y: &'b str) { | -- ^^ declared twice | | | previous declaration here diff --git a/src/test/ui/error-codes/E0264.stderr b/src/test/ui/error-codes/E0264.stderr index b10494633edf3..a9555b2a09988 100644 --- a/src/test/ui/error-codes/E0264.stderr +++ b/src/test/ui/error-codes/E0264.stderr @@ -1,7 +1,7 @@ error[E0264]: unknown external lang item: `cake` --> $DIR/E0264.rs:15:5 | -15 | fn cake(); //~ ERROR E0264 +LL | fn cake(); //~ ERROR E0264 | ^^^^^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0267.stderr b/src/test/ui/error-codes/E0267.stderr index 2f6d9c72eeb1a..ef1cc7578ddb5 100644 --- a/src/test/ui/error-codes/E0267.stderr +++ b/src/test/ui/error-codes/E0267.stderr @@ -1,7 +1,7 @@ error[E0267]: `break` inside of a closure --> $DIR/E0267.rs:12:18 | -12 | let w = || { break; }; //~ ERROR E0267 +LL | let w = || { break; }; //~ ERROR E0267 | ^^^^^ cannot break inside of a closure error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0268.stderr b/src/test/ui/error-codes/E0268.stderr index cf89e46af047e..3130407fb2198 100644 --- a/src/test/ui/error-codes/E0268.stderr +++ b/src/test/ui/error-codes/E0268.stderr @@ -1,7 +1,7 @@ error[E0268]: `break` outside of loop --> $DIR/E0268.rs:12:5 | -12 | break; //~ ERROR E0268 +LL | break; //~ ERROR E0268 | ^^^^^ cannot break outside of a loop error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0271.stderr b/src/test/ui/error-codes/E0271.stderr index c596b560ea7f8..2f37657f0e06a 100644 --- a/src/test/ui/error-codes/E0271.stderr +++ b/src/test/ui/error-codes/E0271.stderr @@ -1,7 +1,7 @@ error[E0271]: type mismatch resolving `::AssociatedType == u32` --> $DIR/E0271.rs:20:5 | -20 | foo(3_i8); //~ ERROR E0271 +LL | foo(3_i8); //~ ERROR E0271 | ^^^ expected reference, found u32 | = note: expected type `&'static str` @@ -9,7 +9,7 @@ error[E0271]: type mismatch resolving `::AssociatedType == u32` note: required by `foo` --> $DIR/E0271.rs:13:1 | -13 | fn foo(t: T) where T: Trait { +LL | fn foo(t: T) where T: Trait { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0275.stderr b/src/test/ui/error-codes/E0275.stderr index 2dbe5be215546..d9344306cb353 100644 --- a/src/test/ui/error-codes/E0275.stderr +++ b/src/test/ui/error-codes/E0275.stderr @@ -1,7 +1,7 @@ error[E0275]: overflow evaluating the requirement `Bar>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>: std::marker::Sized` --> $DIR/E0275.rs:15:1 | -15 | impl Foo for T where Bar: Foo {} //~ ERROR E0275 +LL | impl Foo for T where Bar: Foo {} //~ ERROR E0275 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: consider adding a `#![recursion_limit="128"]` attribute to your crate @@ -72,7 +72,7 @@ error[E0275]: overflow evaluating the requirement `Bar $DIR/E0275.rs:11:1 | -11 | trait Foo {} +LL | trait Foo {} | ^^^^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0276.stderr b/src/test/ui/error-codes/E0276.stderr index bcbe81ac11a05..fb5f931fc3cae 100644 --- a/src/test/ui/error-codes/E0276.stderr +++ b/src/test/ui/error-codes/E0276.stderr @@ -1,10 +1,10 @@ error[E0276]: impl has stricter requirements than trait --> $DIR/E0276.rs:16:5 | -12 | fn foo(x: T); +LL | fn foo(x: T); | ---------------- definition of `foo` from trait ... -16 | fn foo(x: T) where T: Copy {} //~ ERROR E0276 +LL | fn foo(x: T) where T: Copy {} //~ ERROR E0276 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ impl has extra requirement `T: std::marker::Copy` error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0277-2.stderr b/src/test/ui/error-codes/E0277-2.stderr index 6a0f21ef14438..cbd2ea1a78f07 100644 --- a/src/test/ui/error-codes/E0277-2.stderr +++ b/src/test/ui/error-codes/E0277-2.stderr @@ -1,7 +1,7 @@ error[E0277]: the trait bound `*const u8: std::marker::Send` is not satisfied in `Foo` --> $DIR/E0277-2.rs:26:5 | -26 | is_send::(); +LL | is_send::(); | ^^^^^^^^^^^^^^ `*const u8` cannot be sent between threads safely | = help: within `Foo`, the trait `std::marker::Send` is not implemented for `*const u8` @@ -11,7 +11,7 @@ error[E0277]: the trait bound `*const u8: std::marker::Send` is not satisfied in note: required by `is_send` --> $DIR/E0277-2.rs:23:1 | -23 | fn is_send() { } +LL | fn is_send() { } | ^^^^^^^^^^^^^^^^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0277.stderr b/src/test/ui/error-codes/E0277.stderr index 38d14ed7bce25..d41808ce3672b 100644 --- a/src/test/ui/error-codes/E0277.stderr +++ b/src/test/ui/error-codes/E0277.stderr @@ -1,7 +1,7 @@ error[E0277]: the trait bound `[u8]: std::marker::Sized` is not satisfied in `std::path::Path` --> $DIR/E0277.rs:23:6 | -23 | fn f(p: Path) { } +LL | fn f(p: Path) { } | ^ `[u8]` does not have a constant size known at compile-time | = help: within `std::path::Path`, the trait `std::marker::Sized` is not implemented for `[u8]` @@ -11,13 +11,13 @@ error[E0277]: the trait bound `[u8]: std::marker::Sized` is not satisfied in `st error[E0277]: the trait bound `i32: Foo` is not satisfied --> $DIR/E0277.rs:27:5 | -27 | some_func(5i32); +LL | some_func(5i32); | ^^^^^^^^^ the trait `Foo` is not implemented for `i32` | note: required by `some_func` --> $DIR/E0277.rs:19:1 | -19 | fn some_func(foo: T) { +LL | fn some_func(foo: T) { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: aborting due to 2 previous errors diff --git a/src/test/ui/error-codes/E0282.stderr b/src/test/ui/error-codes/E0282.stderr index 835162740da90..3a10d33fc21ba 100644 --- a/src/test/ui/error-codes/E0282.stderr +++ b/src/test/ui/error-codes/E0282.stderr @@ -1,7 +1,7 @@ error[E0282]: type annotations needed --> $DIR/E0282.rs:12:9 | -12 | let x = "hello".chars().rev().collect(); //~ ERROR E0282 +LL | let x = "hello".chars().rev().collect(); //~ ERROR E0282 | ^ | | | cannot infer type for `_` diff --git a/src/test/ui/error-codes/E0283.stderr b/src/test/ui/error-codes/E0283.stderr index 9fdb6b178c4d7..20607ff256a6f 100644 --- a/src/test/ui/error-codes/E0283.stderr +++ b/src/test/ui/error-codes/E0283.stderr @@ -1,13 +1,13 @@ error[E0283]: type annotations required: cannot resolve `_: Generator` --> $DIR/E0283.rs:28:21 | -28 | let cont: u32 = Generator::create(); //~ ERROR E0283 +LL | let cont: u32 = Generator::create(); //~ ERROR E0283 | ^^^^^^^^^^^^^^^^^ | note: required by `Generator::create` --> $DIR/E0283.rs:12:5 | -12 | fn create() -> u32; +LL | fn create() -> u32; | ^^^^^^^^^^^^^^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0296.stderr b/src/test/ui/error-codes/E0296.stderr index f6a2adc0ad3f7..11f9fabb4d83d 100644 --- a/src/test/ui/error-codes/E0296.stderr +++ b/src/test/ui/error-codes/E0296.stderr @@ -1,7 +1,7 @@ error[E0296]: malformed recursion limit attribute, expected #![recursion_limit="N"] --> $DIR/E0296.rs:11:1 | -11 | #![recursion_limit] //~ ERROR E0296 +LL | #![recursion_limit] //~ ERROR E0296 | ^^^^^^^^^^^^^^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0297.stderr b/src/test/ui/error-codes/E0297.stderr index 2dfed66ecaca6..0dfbb9becdcfe 100644 --- a/src/test/ui/error-codes/E0297.stderr +++ b/src/test/ui/error-codes/E0297.stderr @@ -1,7 +1,7 @@ error[E0005]: refutable pattern in `for` loop binding: `None` not covered --> $DIR/E0297.rs:14:9 | -14 | for Some(x) in xs {} +LL | for Some(x) in xs {} | ^^^^^^^ pattern `None` not covered error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0301.stderr b/src/test/ui/error-codes/E0301.stderr index ff4ee32d47b09..4f7b8b11151a2 100644 --- a/src/test/ui/error-codes/E0301.stderr +++ b/src/test/ui/error-codes/E0301.stderr @@ -1,7 +1,7 @@ error[E0301]: cannot mutably borrow in a pattern guard --> $DIR/E0301.rs:14:19 | -14 | option if option.take().is_none() => {}, //~ ERROR E0301 +LL | option if option.take().is_none() => {}, //~ ERROR E0301 | ^^^^^^ borrowed mutably in pattern guard error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0302.stderr b/src/test/ui/error-codes/E0302.stderr index c7b33a490d1c9..66215ef3d692b 100644 --- a/src/test/ui/error-codes/E0302.stderr +++ b/src/test/ui/error-codes/E0302.stderr @@ -1,7 +1,7 @@ error[E0302]: cannot assign in a pattern guard --> $DIR/E0302.rs:14:21 | -14 | option if { option = None; false } => { }, //~ ERROR E0302 +LL | option if { option = None; false } => { }, //~ ERROR E0302 | ^^^^^^^^^^^^^ assignment in pattern guard error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0303.stderr b/src/test/ui/error-codes/E0303.stderr index 6528c97a560df..4e541eecc7516 100644 --- a/src/test/ui/error-codes/E0303.stderr +++ b/src/test/ui/error-codes/E0303.stderr @@ -1,7 +1,7 @@ error[E0009]: cannot bind by-move and by-ref in the same pattern --> $DIR/E0303.rs:13:34 | -13 | ref op_string_ref @ Some(s) => {}, +LL | ref op_string_ref @ Some(s) => {}, | -------------------------^- | | | | | by-move pattern here @@ -10,7 +10,7 @@ error[E0009]: cannot bind by-move and by-ref in the same pattern error[E0303]: pattern bindings are not allowed after an `@` --> $DIR/E0303.rs:13:34 | -13 | ref op_string_ref @ Some(s) => {}, +LL | ref op_string_ref @ Some(s) => {}, | ^ not allowed after `@` error: aborting due to 2 previous errors diff --git a/src/test/ui/error-codes/E0308-4.stderr b/src/test/ui/error-codes/E0308-4.stderr index 1e4beeae17691..38f29cdbca3fd 100644 --- a/src/test/ui/error-codes/E0308-4.stderr +++ b/src/test/ui/error-codes/E0308-4.stderr @@ -1,7 +1,7 @@ error[E0308]: mismatched types --> $DIR/E0308-4.rs:14:9 | -14 | 0u8...3i8 => (), //~ ERROR E0308 +LL | 0u8...3i8 => (), //~ ERROR E0308 | ^^^^^^^^^ expected u8, found i8 error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0308.stderr b/src/test/ui/error-codes/E0308.stderr index 905b0210abfbf..de8080b7a935f 100644 --- a/src/test/ui/error-codes/E0308.stderr +++ b/src/test/ui/error-codes/E0308.stderr @@ -1,7 +1,7 @@ error[E0308]: intrinsic has wrong type --> $DIR/E0308.rs:14:5 | -14 | fn size_of(); //~ ERROR E0308 +LL | fn size_of(); //~ ERROR E0308 | ^^^^^^^^^^^^^^^^ expected (), found usize | = note: expected type `unsafe extern "rust-intrinsic" fn()` diff --git a/src/test/ui/error-codes/E0365.stderr b/src/test/ui/error-codes/E0365.stderr index ccb13856df9e1..09f6908074a24 100644 --- a/src/test/ui/error-codes/E0365.stderr +++ b/src/test/ui/error-codes/E0365.stderr @@ -1,7 +1,7 @@ error[E0365]: `foo` is private, and cannot be re-exported --> $DIR/E0365.rs:15:9 | -15 | pub use foo as foo2; +LL | pub use foo as foo2; | ^^^^^^^^^^^ re-export of private `foo` | = note: consider declaring type or module `foo` with `pub` diff --git a/src/test/ui/error-codes/E0370.stderr b/src/test/ui/error-codes/E0370.stderr index 1f248f4ed2c21..fbacd3a4ce70f 100644 --- a/src/test/ui/error-codes/E0370.stderr +++ b/src/test/ui/error-codes/E0370.stderr @@ -1,7 +1,7 @@ error[E0370]: enum discriminant overflowed --> $DIR/E0370.rs:17:5 | -17 | Y, //~ ERROR E0370 +LL | Y, //~ ERROR E0370 | ^ overflowed on value after 9223372036854775807i64 | = note: explicitly set `Y = -9223372036854775808i64` if that is desired outcome diff --git a/src/test/ui/error-codes/E0374.stderr b/src/test/ui/error-codes/E0374.stderr index edd463d705c19..6ff9f2b3f8fc3 100644 --- a/src/test/ui/error-codes/E0374.stderr +++ b/src/test/ui/error-codes/E0374.stderr @@ -1,8 +1,8 @@ error[E0374]: the trait `CoerceUnsized` may only be implemented for a coercion between structures with one field being coerced, none found --> $DIR/E0374.rs:18:1 | -18 | / impl CoerceUnsized> for Foo //~ ERROR E0374 -19 | | where T: CoerceUnsized {} +LL | / impl CoerceUnsized> for Foo //~ ERROR E0374 +LL | | where T: CoerceUnsized {} | |________________________________^ error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0375.stderr b/src/test/ui/error-codes/E0375.stderr index a37591521c8ca..b5a64764c064d 100644 --- a/src/test/ui/error-codes/E0375.stderr +++ b/src/test/ui/error-codes/E0375.stderr @@ -1,7 +1,7 @@ error[E0375]: implementing the trait `CoerceUnsized` requires multiple coercions --> $DIR/E0375.rs:22:12 | -22 | impl CoerceUnsized> for Foo {} +LL | impl CoerceUnsized> for Foo {} | ^^^^^^^^^^^^^^^^^^^^^^^^ requires multiple coercions | = note: `CoerceUnsized` may only be implemented for a coercion between structures with one field being coerced diff --git a/src/test/ui/error-codes/E0376.stderr b/src/test/ui/error-codes/E0376.stderr index d036adb4e2950..912d46764f104 100644 --- a/src/test/ui/error-codes/E0376.stderr +++ b/src/test/ui/error-codes/E0376.stderr @@ -1,7 +1,7 @@ error[E0376]: the trait `CoerceUnsized` may only be implemented for a coercion between structures --> $DIR/E0376.rs:18:1 | -18 | impl CoerceUnsized for Foo {} //~ ERROR E0376 +LL | impl CoerceUnsized for Foo {} //~ ERROR E0376 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0388.stderr b/src/test/ui/error-codes/E0388.stderr index ec210294cdbd4..449423c3d00bf 100644 --- a/src/test/ui/error-codes/E0388.stderr +++ b/src/test/ui/error-codes/E0388.stderr @@ -1,25 +1,25 @@ error[E0017]: references in constants may only refer to immutable values --> $DIR/E0388.rs:14:30 | -14 | const CR: &'static mut i32 = &mut C; //~ ERROR E0017 +LL | const CR: &'static mut i32 = &mut C; //~ ERROR E0017 | ^^^^^^ constants require immutable values error[E0017]: references in statics may only refer to immutable values --> $DIR/E0388.rs:15:39 | -15 | static STATIC_REF: &'static mut i32 = &mut X; //~ ERROR E0017 +LL | static STATIC_REF: &'static mut i32 = &mut X; //~ ERROR E0017 | ^^^^^^ statics require immutable values error[E0596]: cannot borrow immutable static item as mutable --> $DIR/E0388.rs:15:44 | -15 | static STATIC_REF: &'static mut i32 = &mut X; //~ ERROR E0017 +LL | static STATIC_REF: &'static mut i32 = &mut X; //~ ERROR E0017 | ^ error[E0017]: references in statics may only refer to immutable values --> $DIR/E0388.rs:17:38 | -17 | static CONST_REF: &'static mut i32 = &mut C; //~ ERROR E0017 +LL | static CONST_REF: &'static mut i32 = &mut C; //~ ERROR E0017 | ^^^^^^ statics require immutable values error: aborting due to 4 previous errors diff --git a/src/test/ui/error-codes/E0389.stderr b/src/test/ui/error-codes/E0389.stderr index e085329bac508..00f992e57a301 100644 --- a/src/test/ui/error-codes/E0389.stderr +++ b/src/test/ui/error-codes/E0389.stderr @@ -1,7 +1,7 @@ error[E0389]: cannot assign to data in a `&` reference --> $DIR/E0389.rs:18:5 | -18 | fancy_ref.num = 6; //~ ERROR E0389 +LL | fancy_ref.num = 6; //~ ERROR E0389 | ^^^^^^^^^^^^^^^^^ assignment into an immutable reference error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0390.stderr b/src/test/ui/error-codes/E0390.stderr index a10b0b87f37bd..0743fa5b79063 100644 --- a/src/test/ui/error-codes/E0390.stderr +++ b/src/test/ui/error-codes/E0390.stderr @@ -1,13 +1,13 @@ error[E0390]: only a single inherent implementation marked with `#[lang = "mut_ptr"]` is allowed for the `*mut T` primitive --> $DIR/E0390.rs:15:1 | -15 | impl *mut Foo {} //~ ERROR E0390 +LL | impl *mut Foo {} //~ ERROR E0390 | ^^^^^^^^^^^^^^^^ | help: consider using a trait to implement these methods --> $DIR/E0390.rs:15:1 | -15 | impl *mut Foo {} //~ ERROR E0390 +LL | impl *mut Foo {} //~ ERROR E0390 | ^^^^^^^^^^^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0392.stderr b/src/test/ui/error-codes/E0392.stderr index 6c466cbb52e38..468144c0f229b 100644 --- a/src/test/ui/error-codes/E0392.stderr +++ b/src/test/ui/error-codes/E0392.stderr @@ -1,7 +1,7 @@ error[E0392]: parameter `T` is never used --> $DIR/E0392.rs:11:10 | -11 | enum Foo { Bar } //~ ERROR E0392 +LL | enum Foo { Bar } //~ ERROR E0392 | ^ unused type parameter | = help: consider removing `T` or using a marker such as `std::marker::PhantomData` diff --git a/src/test/ui/error-codes/E0393.stderr b/src/test/ui/error-codes/E0393.stderr index 10728e21901cd..cc9281191cbaf 100644 --- a/src/test/ui/error-codes/E0393.stderr +++ b/src/test/ui/error-codes/E0393.stderr @@ -1,7 +1,7 @@ error[E0393]: the type parameter `T` must be explicitly specified --> $DIR/E0393.rs:13:43 | -13 | fn together_we_will_rule_the_galaxy(son: &A) {} +LL | fn together_we_will_rule_the_galaxy(son: &A) {} | ^ missing reference to `T` | = note: because of the default `Self` reference, type parameters must be specified on object types diff --git a/src/test/ui/error-codes/E0394.stderr b/src/test/ui/error-codes/E0394.stderr index 728cec1032558..c96ad0af70e66 100644 --- a/src/test/ui/error-codes/E0394.stderr +++ b/src/test/ui/error-codes/E0394.stderr @@ -1,7 +1,7 @@ error[E0394]: cannot refer to other statics by value, use the address-of operator or a constant instead --> $DIR/E0394.rs:14:17 | -14 | static B: u32 = A; +LL | static B: u32 = A; | ^ referring to another static by value | = note: use the address-of operator or a constant instead diff --git a/src/test/ui/error-codes/E0395.stderr b/src/test/ui/error-codes/E0395.stderr index e6d76a696d3cf..342bc9e1eeb06 100644 --- a/src/test/ui/error-codes/E0395.stderr +++ b/src/test/ui/error-codes/E0395.stderr @@ -1,7 +1,7 @@ error[E0395]: raw pointers cannot be compared in statics --> $DIR/E0395.rs:14:22 | -14 | static BAZ: bool = { (&FOO as *const i32) == (&BAR as *const i32) }; //~ ERROR E0395 +LL | static BAZ: bool = { (&FOO as *const i32) == (&BAR as *const i32) }; //~ ERROR E0395 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ comparing raw pointers in static error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0396.stderr b/src/test/ui/error-codes/E0396.stderr index 5c5c01cb98854..d7c76c74f228d 100644 --- a/src/test/ui/error-codes/E0396.stderr +++ b/src/test/ui/error-codes/E0396.stderr @@ -1,7 +1,7 @@ error[E0396]: raw pointers cannot be dereferenced in constants --> $DIR/E0396.rs:13:28 | -13 | const VALUE: u8 = unsafe { *REG_ADDR }; //~ ERROR E0396 +LL | const VALUE: u8 = unsafe { *REG_ADDR }; //~ ERROR E0396 | ^^^^^^^^^ dereference of raw pointer in constant error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0401.stderr b/src/test/ui/error-codes/E0401.stderr index d63aa378eee7d..2908c85b6d7e8 100644 --- a/src/test/ui/error-codes/E0401.stderr +++ b/src/test/ui/error-codes/E0401.stderr @@ -1,7 +1,7 @@ error[E0401]: can't use type parameters from outer function; try using a local type parameter instead --> $DIR/E0401.rs:12:15 | -12 | fn bar(y: T) { //~ ERROR E0401 +LL | fn bar(y: T) { //~ ERROR E0401 | ^ use of type variable from outer function error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0403.stderr b/src/test/ui/error-codes/E0403.stderr index 125af35cb5798..c43d68491b9ea 100644 --- a/src/test/ui/error-codes/E0403.stderr +++ b/src/test/ui/error-codes/E0403.stderr @@ -1,7 +1,7 @@ error[E0403]: the name `T` is already used for a type parameter in this type parameter list --> $DIR/E0403.rs:11:11 | -11 | fn foo(s: T, u: T) {} //~ ERROR E0403 +LL | fn foo(s: T, u: T) {} //~ ERROR E0403 | - ^ already used | | | first use of `T` diff --git a/src/test/ui/error-codes/E0404.stderr b/src/test/ui/error-codes/E0404.stderr index c30d8c00b80e2..3ee797b197682 100644 --- a/src/test/ui/error-codes/E0404.stderr +++ b/src/test/ui/error-codes/E0404.stderr @@ -1,7 +1,7 @@ error[E0404]: expected trait, found struct `Foo` --> $DIR/E0404.rs:14:6 | -14 | impl Foo for Bar {} //~ ERROR E0404 +LL | impl Foo for Bar {} //~ ERROR E0404 | ^^^ not a trait error: cannot continue compilation due to previous error diff --git a/src/test/ui/error-codes/E0405.stderr b/src/test/ui/error-codes/E0405.stderr index 29bab3f6dd99a..b5901dd9c848b 100644 --- a/src/test/ui/error-codes/E0405.stderr +++ b/src/test/ui/error-codes/E0405.stderr @@ -1,7 +1,7 @@ error[E0405]: cannot find trait `SomeTrait` in this scope --> $DIR/E0405.rs:13:6 | -13 | impl SomeTrait for Foo {} //~ ERROR E0405 +LL | impl SomeTrait for Foo {} //~ ERROR E0405 | ^^^^^^^^^ not found in this scope error: cannot continue compilation due to previous error diff --git a/src/test/ui/error-codes/E0407.stderr b/src/test/ui/error-codes/E0407.stderr index f71437cd6b07c..d78983f3850d6 100644 --- a/src/test/ui/error-codes/E0407.stderr +++ b/src/test/ui/error-codes/E0407.stderr @@ -1,7 +1,7 @@ error[E0407]: method `b` is not a member of trait `Foo` --> $DIR/E0407.rs:19:5 | -19 | fn b() {} +LL | fn b() {} | ^^^^^^^^^ not a member of trait `Foo` error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0408.stderr b/src/test/ui/error-codes/E0408.stderr index 1c66bb0e5f07b..474cdb517f057 100644 --- a/src/test/ui/error-codes/E0408.stderr +++ b/src/test/ui/error-codes/E0408.stderr @@ -1,7 +1,7 @@ error[E0408]: variable `y` is not bound in all patterns --> $DIR/E0408.rs:15:19 | -15 | Some(y) | None => {} //~ ERROR variable `y` is not bound in all patterns +LL | Some(y) | None => {} //~ ERROR variable `y` is not bound in all patterns | - ^^^^ pattern doesn't bind `y` | | | variable not in all patterns diff --git a/src/test/ui/error-codes/E0411.stderr b/src/test/ui/error-codes/E0411.stderr index dda922b5b6891..e9a3096218106 100644 --- a/src/test/ui/error-codes/E0411.stderr +++ b/src/test/ui/error-codes/E0411.stderr @@ -1,7 +1,7 @@ error[E0411]: cannot find type `Self` in this scope --> $DIR/E0411.rs:12:6 | -12 | ::foo; //~ ERROR E0411 +LL | ::foo; //~ ERROR E0411 | ^^^^ `Self` is only available in traits and impls error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0412.stderr b/src/test/ui/error-codes/E0412.stderr index 6ee2125af04e8..acb5421ac9b9d 100644 --- a/src/test/ui/error-codes/E0412.stderr +++ b/src/test/ui/error-codes/E0412.stderr @@ -1,7 +1,7 @@ error[E0412]: cannot find type `Something` in this scope --> $DIR/E0412.rs:11:6 | -11 | impl Something {} //~ ERROR E0412 +LL | impl Something {} //~ ERROR E0412 | ^^^^^^^^^ not found in this scope error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0415.stderr b/src/test/ui/error-codes/E0415.stderr index 5e5cfe16e5038..7f95b9b40cb61 100644 --- a/src/test/ui/error-codes/E0415.stderr +++ b/src/test/ui/error-codes/E0415.stderr @@ -1,7 +1,7 @@ error[E0415]: identifier `f` is bound more than once in this parameter list --> $DIR/E0415.rs:11:16 | -11 | fn foo(f: i32, f: i32) {} //~ ERROR E0415 +LL | fn foo(f: i32, f: i32) {} //~ ERROR E0415 | ^ used as parameter more than once error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0416.stderr b/src/test/ui/error-codes/E0416.stderr index a48a3ade5c9a4..be7571c50a2a4 100644 --- a/src/test/ui/error-codes/E0416.stderr +++ b/src/test/ui/error-codes/E0416.stderr @@ -1,7 +1,7 @@ error[E0416]: identifier `x` is bound more than once in the same pattern --> $DIR/E0416.rs:13:13 | -13 | (x, x) => {} //~ ERROR E0416 +LL | (x, x) => {} //~ ERROR E0416 | ^ used in a pattern more than once error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0423.stderr b/src/test/ui/error-codes/E0423.stderr index aee398efeddee..09ad11843ee97 100644 --- a/src/test/ui/error-codes/E0423.stderr +++ b/src/test/ui/error-codes/E0423.stderr @@ -1,7 +1,7 @@ error[E0423]: expected function, found struct `Foo` --> $DIR/E0423.rs:14:13 | -14 | let f = Foo(); //~ ERROR E0423 +LL | let f = Foo(); //~ ERROR E0423 | ^^^ did you mean `Foo { /* fields */ }`? error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0424.stderr b/src/test/ui/error-codes/E0424.stderr index d1fd432f4f032..856374c4f673a 100644 --- a/src/test/ui/error-codes/E0424.stderr +++ b/src/test/ui/error-codes/E0424.stderr @@ -1,7 +1,7 @@ error[E0424]: expected value, found module `self` --> $DIR/E0424.rs:17:9 | -17 | self.bar(); //~ ERROR E0424 +LL | self.bar(); //~ ERROR E0424 | ^^^^ `self` value is only available in methods with `self` parameter error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0425.stderr b/src/test/ui/error-codes/E0425.stderr index 250ecaeb368ee..785a1b6a5493a 100644 --- a/src/test/ui/error-codes/E0425.stderr +++ b/src/test/ui/error-codes/E0425.stderr @@ -1,7 +1,7 @@ error[E0425]: cannot find value `elf` in this scope --> $DIR/E0425.rs:13:9 | -13 | elf; //~ ERROR E0425 +LL | elf; //~ ERROR E0425 | ^^^ not found in this scope error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0426.stderr b/src/test/ui/error-codes/E0426.stderr index bb05effd732cd..93662cf204341 100644 --- a/src/test/ui/error-codes/E0426.stderr +++ b/src/test/ui/error-codes/E0426.stderr @@ -1,7 +1,7 @@ error[E0426]: use of undeclared label `'a` --> $DIR/E0426.rs:13:15 | -13 | break 'a; +LL | break 'a; | ^^ undeclared label `'a` error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0428.stderr b/src/test/ui/error-codes/E0428.stderr index c739536c0ab55..552e71125fa01 100644 --- a/src/test/ui/error-codes/E0428.stderr +++ b/src/test/ui/error-codes/E0428.stderr @@ -1,9 +1,9 @@ error[E0428]: the name `Bar` is defined multiple times --> $DIR/E0428.rs:12:1 | -11 | struct Bar; //~ previous definition of the type `Bar` here +LL | struct Bar; //~ previous definition of the type `Bar` here | ----------- previous definition of the type `Bar` here -12 | struct Bar; //~ ERROR E0428 +LL | struct Bar; //~ ERROR E0428 | ^^^^^^^^^^^ `Bar` redefined here | = note: `Bar` must be defined only once in the type namespace of this module diff --git a/src/test/ui/error-codes/E0429.stderr b/src/test/ui/error-codes/E0429.stderr index 96cf50500fdb4..05b4c6b0342a1 100644 --- a/src/test/ui/error-codes/E0429.stderr +++ b/src/test/ui/error-codes/E0429.stderr @@ -1,7 +1,7 @@ error[E0429]: `self` imports are only allowed within a { } list --> $DIR/E0429.rs:11:5 | -11 | use std::fmt::self; //~ ERROR E0429 +LL | use std::fmt::self; //~ ERROR E0429 | ^^^^^^^^^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0430.stderr b/src/test/ui/error-codes/E0430.stderr index b5c80aa23f62d..34aced3d0b077 100644 --- a/src/test/ui/error-codes/E0430.stderr +++ b/src/test/ui/error-codes/E0430.stderr @@ -1,7 +1,7 @@ error[E0430]: `self` import can only appear once in an import list --> $DIR/E0430.rs:11:16 | -11 | use std::fmt::{self, self}; //~ ERROR E0430 +LL | use std::fmt::{self, self}; //~ ERROR E0430 | ^^^^ ---- another `self` import appears here | | | can only appear once in an import list @@ -9,7 +9,7 @@ error[E0430]: `self` import can only appear once in an import list error[E0252]: the name `fmt` is defined multiple times --> $DIR/E0430.rs:11:22 | -11 | use std::fmt::{self, self}; //~ ERROR E0430 +LL | use std::fmt::{self, self}; //~ ERROR E0430 | ---- ^^^^ `fmt` reimported here | | | previous import of the module `fmt` here @@ -17,7 +17,7 @@ error[E0252]: the name `fmt` is defined multiple times = note: `fmt` must be defined only once in the type namespace of this module help: You can use `as` to change the binding name of the import | -11 | use std::fmt::{self, self as other_fmt}; //~ ERROR E0430 +LL | use std::fmt::{self, self as other_fmt}; //~ ERROR E0430 | ^^^^^^^^^^^^^^^^^ error: aborting due to 2 previous errors diff --git a/src/test/ui/error-codes/E0431.stderr b/src/test/ui/error-codes/E0431.stderr index c7a786b7402d2..33fdae3cd7ee0 100644 --- a/src/test/ui/error-codes/E0431.stderr +++ b/src/test/ui/error-codes/E0431.stderr @@ -1,7 +1,7 @@ error[E0431]: `self` import can only appear in an import list with a non-empty prefix --> $DIR/E0431.rs:11:6 | -11 | use {self}; //~ ERROR E0431 +LL | use {self}; //~ ERROR E0431 | ^^^^ can only appear in an import list with a non-empty prefix error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0432.stderr b/src/test/ui/error-codes/E0432.stderr index 6d808f038a333..4c4b0187fe63a 100644 --- a/src/test/ui/error-codes/E0432.stderr +++ b/src/test/ui/error-codes/E0432.stderr @@ -1,7 +1,7 @@ error[E0432]: unresolved import `something` --> $DIR/E0432.rs:11:5 | -11 | use something::Foo; //~ ERROR E0432 +LL | use something::Foo; //~ ERROR E0432 | ^^^^^^^^^ Maybe a missing `extern crate something;`? error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0433.stderr b/src/test/ui/error-codes/E0433.stderr index 691c5922f8fbc..f26a384370f03 100644 --- a/src/test/ui/error-codes/E0433.stderr +++ b/src/test/ui/error-codes/E0433.stderr @@ -1,7 +1,7 @@ error[E0433]: failed to resolve. Use of undeclared type or module `HashMap` --> $DIR/E0433.rs:12:15 | -12 | let map = HashMap::new(); //~ ERROR E0433 +LL | let map = HashMap::new(); //~ ERROR E0433 | ^^^^^^^ Use of undeclared type or module `HashMap` error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0434.stderr b/src/test/ui/error-codes/E0434.stderr index 06880acdb3573..b37034708bfb3 100644 --- a/src/test/ui/error-codes/E0434.stderr +++ b/src/test/ui/error-codes/E0434.stderr @@ -1,7 +1,7 @@ error[E0434]: can't capture dynamic environment in a fn item --> $DIR/E0434.rs:14:9 | -14 | y //~ ERROR E0434 +LL | y //~ ERROR E0434 | ^ | = help: use the `|| { ... }` closure form instead diff --git a/src/test/ui/error-codes/E0435.stderr b/src/test/ui/error-codes/E0435.stderr index 855903b7ec35e..272713cda75d5 100644 --- a/src/test/ui/error-codes/E0435.stderr +++ b/src/test/ui/error-codes/E0435.stderr @@ -1,7 +1,7 @@ error[E0435]: attempt to use a non-constant value in a constant --> $DIR/E0435.rs:13:17 | -13 | let _: [u8; foo]; //~ ERROR E0435 +LL | let _: [u8; foo]; //~ ERROR E0435 | ^^^ non-constant value error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0437.stderr b/src/test/ui/error-codes/E0437.stderr index ffad571d06125..cd3353076d58f 100644 --- a/src/test/ui/error-codes/E0437.stderr +++ b/src/test/ui/error-codes/E0437.stderr @@ -1,7 +1,7 @@ error[E0437]: type `Bar` is not a member of trait `Foo` --> $DIR/E0437.rs:14:5 | -14 | type Bar = bool; //~ ERROR E0437 +LL | type Bar = bool; //~ ERROR E0437 | ^^^^^^^^^^^^^^^^ not a member of trait `Foo` error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0438.stderr b/src/test/ui/error-codes/E0438.stderr index df587395356f1..6dbe5f0d6ce12 100644 --- a/src/test/ui/error-codes/E0438.stderr +++ b/src/test/ui/error-codes/E0438.stderr @@ -1,7 +1,7 @@ error[E0438]: const `BAR` is not a member of trait `Bar` --> $DIR/E0438.rs:15:5 | -15 | const BAR: bool = true; //~ ERROR E0438 +LL | const BAR: bool = true; //~ ERROR E0438 | ^^^^^^^^^^^^^^^^^^^^^^^ not a member of trait `Bar` error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0439.stderr b/src/test/ui/error-codes/E0439.stderr index 77930d5e08d94..6f7430f053f57 100644 --- a/src/test/ui/error-codes/E0439.stderr +++ b/src/test/ui/error-codes/E0439.stderr @@ -1,7 +1,7 @@ error[E0439]: invalid `simd_shuffle`, needs length: `simd_shuffle` --> $DIR/E0439.rs:14:5 | -14 | fn simd_shuffle(a: A, b: A, c: [u32; 8]) -> B; //~ ERROR E0439 +LL | fn simd_shuffle(a: A, b: A, c: [u32; 8]) -> B; //~ ERROR E0439 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0440.stderr b/src/test/ui/error-codes/E0440.stderr index 83210a996e0e1..e664b401a17c2 100644 --- a/src/test/ui/error-codes/E0440.stderr +++ b/src/test/ui/error-codes/E0440.stderr @@ -1,7 +1,7 @@ error[E0440]: platform-specific intrinsic has wrong number of type parameters: found 1, expected 0 --> $DIR/E0440.rs:18:5 | -18 | fn x86_mm_movemask_pd(x: f64x2) -> i32; //~ ERROR E0440 +LL | fn x86_mm_movemask_pd(x: f64x2) -> i32; //~ ERROR E0440 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0441.stderr b/src/test/ui/error-codes/E0441.stderr index 34a387e64597a..ab2e2819dfc4c 100644 --- a/src/test/ui/error-codes/E0441.stderr +++ b/src/test/ui/error-codes/E0441.stderr @@ -1,7 +1,7 @@ error[E0441]: unrecognized platform-specific intrinsic function: `x86_mm_adds_ep16` --> $DIR/E0441.rs:18:5 | -18 | fn x86_mm_adds_ep16(x: i16x8, y: i16x8) -> i16x8; //~ ERROR E0441 +LL | fn x86_mm_adds_ep16(x: i16x8, y: i16x8) -> i16x8; //~ ERROR E0441 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0442.stderr b/src/test/ui/error-codes/E0442.stderr index 6f19fd17eb2df..93c92802f2c81 100644 --- a/src/test/ui/error-codes/E0442.stderr +++ b/src/test/ui/error-codes/E0442.stderr @@ -1,19 +1,19 @@ error[E0442]: intrinsic argument 1 has wrong type: found vector with length 16, expected length 8 --> $DIR/E0442.rs:23:5 | -23 | fn x86_mm_adds_epi16(x: i8x16, y: i32x4) -> i64x2; +LL | fn x86_mm_adds_epi16(x: i8x16, y: i32x4) -> i64x2; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error[E0442]: intrinsic argument 2 has wrong type: found vector with length 4, expected length 8 --> $DIR/E0442.rs:23:5 | -23 | fn x86_mm_adds_epi16(x: i8x16, y: i32x4) -> i64x2; +LL | fn x86_mm_adds_epi16(x: i8x16, y: i32x4) -> i64x2; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error[E0442]: intrinsic return value has wrong type: found vector with length 2, expected length 8 --> $DIR/E0442.rs:23:5 | -23 | fn x86_mm_adds_epi16(x: i8x16, y: i32x4) -> i64x2; +LL | fn x86_mm_adds_epi16(x: i8x16, y: i32x4) -> i64x2; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: aborting due to 3 previous errors diff --git a/src/test/ui/error-codes/E0443.stderr b/src/test/ui/error-codes/E0443.stderr index ebf8ef5ccf102..f507d09a7af4d 100644 --- a/src/test/ui/error-codes/E0443.stderr +++ b/src/test/ui/error-codes/E0443.stderr @@ -1,7 +1,7 @@ error[E0443]: intrinsic return value has wrong type: found `i64x8`, expected `i16x8` which was used for this vector type previously in this signature --> $DIR/E0443.rs:20:5 | -20 | fn x86_mm_adds_epi16(x: i16x8, y: i16x8) -> i64x8; //~ ERROR E0443 +LL | fn x86_mm_adds_epi16(x: i16x8, y: i16x8) -> i64x8; //~ ERROR E0443 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0444.stderr b/src/test/ui/error-codes/E0444.stderr index e44d9457045c4..1695d891be667 100644 --- a/src/test/ui/error-codes/E0444.stderr +++ b/src/test/ui/error-codes/E0444.stderr @@ -1,7 +1,7 @@ error[E0444]: platform-specific intrinsic has invalid number of arguments: found 3, expected 1 --> $DIR/E0444.rs:18:5 | -18 | fn x86_mm_movemask_pd(x: f64x2, y: f64x2, z: f64x2) -> i32; //~ ERROR E0444 +LL | fn x86_mm_movemask_pd(x: f64x2, y: f64x2, z: f64x2) -> i32; //~ ERROR E0444 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0445.stderr b/src/test/ui/error-codes/E0445.stderr index 7b599543e00c6..866639d9ad9aa 100644 --- a/src/test/ui/error-codes/E0445.stderr +++ b/src/test/ui/error-codes/E0445.stderr @@ -1,19 +1,19 @@ error[E0445]: private trait `Foo` in public interface --> $DIR/E0445.rs:15:1 | -15 | pub trait Bar : Foo {} +LL | pub trait Bar : Foo {} | ^^^^^^^^^^^^^^^^^^^^^^ can't leak private trait error[E0445]: private trait `Foo` in public interface --> $DIR/E0445.rs:18:1 | -18 | pub struct Bar2(pub T); +LL | pub struct Bar2(pub T); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ can't leak private trait error[E0445]: private trait `Foo` in public interface --> $DIR/E0445.rs:21:1 | -21 | pub fn foo (t: T) {} +LL | pub fn foo (t: T) {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ can't leak private trait error: aborting due to 3 previous errors diff --git a/src/test/ui/error-codes/E0446.stderr b/src/test/ui/error-codes/E0446.stderr index 1b61ca9b1773b..9a561a15f4750 100644 --- a/src/test/ui/error-codes/E0446.stderr +++ b/src/test/ui/error-codes/E0446.stderr @@ -1,9 +1,9 @@ error[E0446]: private type `Foo::Bar` in public interface --> $DIR/E0446.rs:14:5 | -14 | / pub fn bar() -> Bar { //~ ERROR E0446 -15 | | Bar(0) -16 | | } +LL | / pub fn bar() -> Bar { //~ ERROR E0446 +LL | | Bar(0) +LL | | } | |_____^ can't leak private type error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0449.stderr b/src/test/ui/error-codes/E0449.stderr index 3587319ed0cbc..75ffe9e849a5d 100644 --- a/src/test/ui/error-codes/E0449.stderr +++ b/src/test/ui/error-codes/E0449.stderr @@ -1,7 +1,7 @@ error[E0449]: unnecessary visibility qualifier --> $DIR/E0449.rs:17:1 | -17 | pub impl Bar {} //~ ERROR E0449 +LL | pub impl Bar {} //~ ERROR E0449 | ^^^ `pub` not needed here | = note: place qualifiers on individual impl items instead @@ -9,13 +9,13 @@ error[E0449]: unnecessary visibility qualifier error[E0449]: unnecessary visibility qualifier --> $DIR/E0449.rs:19:1 | -19 | pub impl Foo for Bar { //~ ERROR E0449 +LL | pub impl Foo for Bar { //~ ERROR E0449 | ^^^ `pub` not needed here error[E0449]: unnecessary visibility qualifier --> $DIR/E0449.rs:20:5 | -20 | pub fn foo() {} //~ ERROR E0449 +LL | pub fn foo() {} //~ ERROR E0449 | ^^^ `pub` not needed here error: aborting due to 3 previous errors diff --git a/src/test/ui/error-codes/E0451.stderr b/src/test/ui/error-codes/E0451.stderr index 0c29bee849b3b..1e3347a85463f 100644 --- a/src/test/ui/error-codes/E0451.stderr +++ b/src/test/ui/error-codes/E0451.stderr @@ -1,13 +1,13 @@ error[E0451]: field `b` of struct `Bar::Foo` is private --> $DIR/E0451.rs:24:23 | -24 | let Bar::Foo{a:a, b:b} = foo; //~ ERROR E0451 +LL | let Bar::Foo{a:a, b:b} = foo; //~ ERROR E0451 | ^^^ field `b` is private error[E0451]: field `b` of struct `Bar::Foo` is private --> $DIR/E0451.rs:28:29 | -28 | let f = Bar::Foo{ a: 0, b: 0 }; //~ ERROR E0451 +LL | let f = Bar::Foo{ a: 0, b: 0 }; //~ ERROR E0451 | ^^^^ field `b` is private error: aborting due to 2 previous errors diff --git a/src/test/ui/error-codes/E0452.stderr b/src/test/ui/error-codes/E0452.stderr index d63d0edc2c60c..3d3de1dfc48d8 100644 --- a/src/test/ui/error-codes/E0452.stderr +++ b/src/test/ui/error-codes/E0452.stderr @@ -1,7 +1,7 @@ error[E0452]: malformed lint attribute --> $DIR/E0452.rs:11:10 | -11 | #![allow(foo = "")] //~ ERROR E0452 +LL | #![allow(foo = "")] //~ ERROR E0452 | ^^^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0453.stderr b/src/test/ui/error-codes/E0453.stderr index 467784f336745..2e8a3f08090d6 100644 --- a/src/test/ui/error-codes/E0453.stderr +++ b/src/test/ui/error-codes/E0453.stderr @@ -1,10 +1,10 @@ error[E0453]: allow(non_snake_case) overruled by outer forbid(non_snake_case) --> $DIR/E0453.rs:13:9 | -11 | #![forbid(non_snake_case)] +LL | #![forbid(non_snake_case)] | -------------- `forbid` level set here -12 | -13 | #[allow(non_snake_case)] +LL | +LL | #[allow(non_snake_case)] | ^^^^^^^^^^^^^^ overruled by previous forbid error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0454.stderr b/src/test/ui/error-codes/E0454.stderr index aee8b53e39dd5..4649f1d4b4180 100644 --- a/src/test/ui/error-codes/E0454.stderr +++ b/src/test/ui/error-codes/E0454.stderr @@ -1,7 +1,7 @@ error[E0454]: #[link(name = "")] given with empty name --> $DIR/E0454.rs:11:1 | -11 | #[link(name = "")] extern {} +LL | #[link(name = "")] extern {} | ^^^^^^^^^^^^^^^^^^ empty name given error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0458.stderr b/src/test/ui/error-codes/E0458.stderr index 9cdd0d5f3003a..f5e93577cbf55 100644 --- a/src/test/ui/error-codes/E0458.stderr +++ b/src/test/ui/error-codes/E0458.stderr @@ -1,13 +1,13 @@ error[E0458]: unknown kind: `wonderful_unicorn` --> $DIR/E0458.rs:11:1 | -11 | #[link(kind = "wonderful_unicorn")] extern {} //~ ERROR E0458 +LL | #[link(kind = "wonderful_unicorn")] extern {} //~ ERROR E0458 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unknown kind error[E0459]: #[link(...)] specified without `name = "foo"` --> $DIR/E0458.rs:11:1 | -11 | #[link(kind = "wonderful_unicorn")] extern {} //~ ERROR E0458 +LL | #[link(kind = "wonderful_unicorn")] extern {} //~ ERROR E0458 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ missing `name` argument error: aborting due to 2 previous errors diff --git a/src/test/ui/error-codes/E0459.stderr b/src/test/ui/error-codes/E0459.stderr index 512788e1948a7..ad51b2e6b393b 100644 --- a/src/test/ui/error-codes/E0459.stderr +++ b/src/test/ui/error-codes/E0459.stderr @@ -1,7 +1,7 @@ error[E0459]: #[link(...)] specified without `name = "foo"` --> $DIR/E0459.rs:11:1 | -11 | #[link(kind = "dylib")] extern {} //~ ERROR E0459 +LL | #[link(kind = "dylib")] extern {} //~ ERROR E0459 | ^^^^^^^^^^^^^^^^^^^^^^^ missing `name` argument error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0463.stderr b/src/test/ui/error-codes/E0463.stderr index 208c00cc7c977..83cdff4ad57a9 100644 --- a/src/test/ui/error-codes/E0463.stderr +++ b/src/test/ui/error-codes/E0463.stderr @@ -1,7 +1,7 @@ error[E0463]: can't find crate for `cookie_monster` --> $DIR/E0463.rs:12:11 | -12 | #![plugin(cookie_monster)] +LL | #![plugin(cookie_monster)] | ^^^^^^^^^^^^^^ can't find crate error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0478.stderr b/src/test/ui/error-codes/E0478.stderr index f909fa48c2769..cc144c2cf6e15 100644 --- a/src/test/ui/error-codes/E0478.stderr +++ b/src/test/ui/error-codes/E0478.stderr @@ -1,18 +1,18 @@ error[E0478]: lifetime bound not satisfied --> $DIR/E0478.rs:14:5 | -14 | child: Box + 'SnowWhite>, //~ ERROR E0478 +LL | child: Box + 'SnowWhite>, //~ ERROR E0478 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | note: lifetime parameter instantiated with the lifetime 'SnowWhite as defined on the struct at 13:1 --> $DIR/E0478.rs:13:1 | -13 | struct Prince<'kiss, 'SnowWhite> { +LL | struct Prince<'kiss, 'SnowWhite> { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ note: but lifetime parameter must outlive the lifetime 'kiss as defined on the struct at 13:1 --> $DIR/E0478.rs:13:1 | -13 | struct Prince<'kiss, 'SnowWhite> { +LL | struct Prince<'kiss, 'SnowWhite> { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0492.stderr b/src/test/ui/error-codes/E0492.stderr index c19896623128f..d75a4b2e0048c 100644 --- a/src/test/ui/error-codes/E0492.stderr +++ b/src/test/ui/error-codes/E0492.stderr @@ -1,7 +1,7 @@ error[E0492]: cannot borrow a constant which may contain interior mutability, create a static instead --> $DIR/E0492.rs:14:34 | -14 | static B: &'static AtomicUsize = &A; //~ ERROR E0492 +LL | static B: &'static AtomicUsize = &A; //~ ERROR E0492 | ^^ error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0494.stderr b/src/test/ui/error-codes/E0494.stderr index 1d5ded5bd9aa1..8b5f8a0500fcb 100644 --- a/src/test/ui/error-codes/E0494.stderr +++ b/src/test/ui/error-codes/E0494.stderr @@ -1,7 +1,7 @@ error[E0494]: cannot refer to the interior of another static, use a constant instead --> $DIR/E0494.rs:16:27 | -16 | static A : &'static u32 = &S.a; //~ ERROR E0494 +LL | static A : &'static u32 = &S.a; //~ ERROR E0494 | ^^^^ error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0496.stderr b/src/test/ui/error-codes/E0496.stderr index ab9a08a534897..735e228d527f5 100644 --- a/src/test/ui/error-codes/E0496.stderr +++ b/src/test/ui/error-codes/E0496.stderr @@ -1,9 +1,9 @@ error[E0496]: lifetime name `'a` shadows a lifetime name that is already in scope --> $DIR/E0496.rs:16:10 | -15 | impl<'a> Foo<'a> { +LL | impl<'a> Foo<'a> { | -- first declared here -16 | fn f<'a>(x: &'a i32) { //~ ERROR E0496 +LL | fn f<'a>(x: &'a i32) { //~ ERROR E0496 | ^^ lifetime 'a already in scope error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0499.stderr b/src/test/ui/error-codes/E0499.stderr index c3057d9b558d7..f6e3d551f38ee 100644 --- a/src/test/ui/error-codes/E0499.stderr +++ b/src/test/ui/error-codes/E0499.stderr @@ -1,11 +1,11 @@ error[E0499]: cannot borrow `i` as mutable more than once at a time --> $DIR/E0499.rs:14:22 | -13 | let mut x = &mut i; +LL | let mut x = &mut i; | - first mutable borrow occurs here -14 | let mut a = &mut i; //~ ERROR E0499 +LL | let mut a = &mut i; //~ ERROR E0499 | ^ second mutable borrow occurs here -15 | } +LL | } | - first borrow ends here error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0502.stderr b/src/test/ui/error-codes/E0502.stderr index e578cffe56463..7928b008ec695 100644 --- a/src/test/ui/error-codes/E0502.stderr +++ b/src/test/ui/error-codes/E0502.stderr @@ -1,11 +1,11 @@ error[E0502]: cannot borrow `*a` as mutable because `a` is also borrowed as immutable --> $DIR/E0502.rs:14:9 | -13 | let ref y = a; +LL | let ref y = a; | ----- immutable borrow occurs here -14 | bar(a); //~ ERROR E0502 +LL | bar(a); //~ ERROR E0502 | ^ mutable borrow occurs here -15 | } +LL | } | - immutable borrow ends here error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0503.stderr b/src/test/ui/error-codes/E0503.stderr index 112e2c477802e..5c6c6f6be0946 100644 --- a/src/test/ui/error-codes/E0503.stderr +++ b/src/test/ui/error-codes/E0503.stderr @@ -1,9 +1,9 @@ error[E0503]: cannot use `value` because it was mutably borrowed --> $DIR/E0503.rs:14:16 | -13 | let _borrow = &mut value; +LL | let _borrow = &mut value; | ----- borrow of `value` occurs here -14 | let _sum = value + 1; //~ ERROR E0503 +LL | let _sum = value + 1; //~ ERROR E0503 | ^^^^^ use of borrowed `value` error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0504.stderr b/src/test/ui/error-codes/E0504.stderr index 0f1b183dba92f..0444c6dbb8f2a 100644 --- a/src/test/ui/error-codes/E0504.stderr +++ b/src/test/ui/error-codes/E0504.stderr @@ -1,10 +1,10 @@ error[E0504]: cannot move `fancy_num` into closure because it is borrowed --> $DIR/E0504.rs:20:40 | -17 | let fancy_ref = &fancy_num; +LL | let fancy_ref = &fancy_num; | --------- borrow of `fancy_num` occurs here ... -20 | println!("child function: {}", fancy_num.num); //~ ERROR E0504 +LL | println!("child function: {}", fancy_num.num); //~ ERROR E0504 | ^^^^^^^^^ move into closure occurs here error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0505.stderr b/src/test/ui/error-codes/E0505.stderr index dfb327d48eaa5..5e42fbfbcf7f6 100644 --- a/src/test/ui/error-codes/E0505.stderr +++ b/src/test/ui/error-codes/E0505.stderr @@ -1,9 +1,9 @@ error[E0505]: cannot move out of `x` because it is borrowed --> $DIR/E0505.rs:19:13 | -18 | let _ref_to_val: &Value = &x; +LL | let _ref_to_val: &Value = &x; | - borrow of `x` occurs here -19 | eat(x); //~ ERROR E0505 +LL | eat(x); //~ ERROR E0505 | ^ move out of `x` occurs here error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0507.stderr b/src/test/ui/error-codes/E0507.stderr index 407ebb8fc7be5..e3109f3d93b49 100644 --- a/src/test/ui/error-codes/E0507.stderr +++ b/src/test/ui/error-codes/E0507.stderr @@ -1,7 +1,7 @@ error[E0507]: cannot move out of borrowed content --> $DIR/E0507.rs:22:5 | -22 | x.borrow().nothing_is_true(); //~ ERROR E0507 +LL | x.borrow().nothing_is_true(); //~ ERROR E0507 | ^^^^^^^^^^ cannot move out of borrowed content error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0509.stderr b/src/test/ui/error-codes/E0509.stderr index 6da0fdbeb34e1..58c2df8d6d9e5 100644 --- a/src/test/ui/error-codes/E0509.stderr +++ b/src/test/ui/error-codes/E0509.stderr @@ -1,7 +1,7 @@ error[E0509]: cannot move out of type `DropStruct`, which implements the `Drop` trait --> $DIR/E0509.rs:26:23 | -26 | let fancy_field = drop_struct.fancy; //~ ERROR E0509 +LL | let fancy_field = drop_struct.fancy; //~ ERROR E0509 | ^^^^^^^^^^^^^^^^^ | | | cannot move out of here diff --git a/src/test/ui/error-codes/E0511.stderr b/src/test/ui/error-codes/E0511.stderr index b714350393b6a..c68e6f00d2fbb 100644 --- a/src/test/ui/error-codes/E0511.stderr +++ b/src/test/ui/error-codes/E0511.stderr @@ -1,7 +1,7 @@ error[E0511]: invalid monomorphization of `simd_add` intrinsic: expected SIMD input type, found non-SIMD `i32` --> $DIR/E0511.rs:18:14 | -18 | unsafe { simd_add(0, 1); } //~ ERROR E0511 +LL | unsafe { simd_add(0, 1); } //~ ERROR E0511 | ^^^^^^^^^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0512.stderr b/src/test/ui/error-codes/E0512.stderr index ad25bb216a390..b10da6ffca8fa 100644 --- a/src/test/ui/error-codes/E0512.stderr +++ b/src/test/ui/error-codes/E0512.stderr @@ -1,7 +1,7 @@ error[E0512]: transmute called with types of different sizes --> $DIR/E0512.rs:14:23 | -14 | unsafe { takes_u8(::std::mem::transmute(0u16)); } //~ ERROR E0512 +LL | unsafe { takes_u8(::std::mem::transmute(0u16)); } //~ ERROR E0512 | ^^^^^^^^^^^^^^^^^^^^^ | = note: source type: u16 (16 bits) diff --git a/src/test/ui/error-codes/E0516.stderr b/src/test/ui/error-codes/E0516.stderr index 620929653f665..c0694992f3f52 100644 --- a/src/test/ui/error-codes/E0516.stderr +++ b/src/test/ui/error-codes/E0516.stderr @@ -1,7 +1,7 @@ error[E0516]: `typeof` is a reserved keyword but unimplemented --> $DIR/E0516.rs:12:12 | -12 | let x: typeof(92) = 92; //~ ERROR E0516 +LL | let x: typeof(92) = 92; //~ ERROR E0516 | ^^^^^^^^^^ reserved keyword error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0517.stderr b/src/test/ui/error-codes/E0517.stderr index 968c47fa7a26f..eb80cf9fc604d 100644 --- a/src/test/ui/error-codes/E0517.stderr +++ b/src/test/ui/error-codes/E0517.stderr @@ -1,34 +1,34 @@ error[E0517]: attribute should be applied to struct, enum or union --> $DIR/E0517.rs:11:8 | -11 | #[repr(C)] //~ ERROR: E0517 +LL | #[repr(C)] //~ ERROR: E0517 | ^ -12 | type Foo = u8; +LL | type Foo = u8; | -------------- not a struct, enum or union error[E0517]: attribute should be applied to struct or union --> $DIR/E0517.rs:14:8 | -14 | #[repr(packed)] //~ ERROR: E0517 +LL | #[repr(packed)] //~ ERROR: E0517 | ^^^^^^ -15 | enum Foo2 {Bar, Baz} +LL | enum Foo2 {Bar, Baz} | -------------------- not a struct or union error[E0517]: attribute should be applied to enum --> $DIR/E0517.rs:17:8 | -17 | #[repr(u8)] //~ ERROR: E0517 +LL | #[repr(u8)] //~ ERROR: E0517 | ^^ -18 | struct Foo3 {bar: bool, baz: bool} +LL | struct Foo3 {bar: bool, baz: bool} | ---------------------------------- not an enum error[E0517]: attribute should be applied to struct, enum or union --> $DIR/E0517.rs:20:8 | -20 | #[repr(C)] //~ ERROR: E0517 +LL | #[repr(C)] //~ ERROR: E0517 | ^ -21 | / impl Foo3 { -22 | | } +LL | / impl Foo3 { +LL | | } | |_- not a struct, enum or union error: aborting due to 4 previous errors diff --git a/src/test/ui/error-codes/E0518.stderr b/src/test/ui/error-codes/E0518.stderr index 99a4a63cc9f2e..6c798d365bde3 100644 --- a/src/test/ui/error-codes/E0518.stderr +++ b/src/test/ui/error-codes/E0518.stderr @@ -1,18 +1,18 @@ error[E0518]: attribute should be applied to function --> $DIR/E0518.rs:11:1 | -11 | #[inline(always)] //~ ERROR: E0518 +LL | #[inline(always)] //~ ERROR: E0518 | ^^^^^^^^^^^^^^^^^ -12 | struct Foo; +LL | struct Foo; | ----------- not a function error[E0518]: attribute should be applied to function --> $DIR/E0518.rs:14:1 | -14 | #[inline(never)] //~ ERROR: E0518 +LL | #[inline(never)] //~ ERROR: E0518 | ^^^^^^^^^^^^^^^^ -15 | / impl Foo { -16 | | } +LL | / impl Foo { +LL | | } | |_- not a function error: aborting due to 2 previous errors diff --git a/src/test/ui/error-codes/E0520.stderr b/src/test/ui/error-codes/E0520.stderr index 272c38859ab0a..dc6ee9986d74c 100644 --- a/src/test/ui/error-codes/E0520.stderr +++ b/src/test/ui/error-codes/E0520.stderr @@ -1,12 +1,12 @@ error[E0520]: `fly` specializes an item from a parent `impl`, but that item is not marked `default` --> $DIR/E0520.rs:26:5 | -21 | / impl SpaceLlama for T { -22 | | fn fly(&self) {} -23 | | } +LL | / impl SpaceLlama for T { +LL | | fn fly(&self) {} +LL | | } | |_- parent `impl` is here ... -26 | default fn fly(&self) {} +LL | default fn fly(&self) {} | ^^^^^^^^^^^^^^^^^^^^^^^^ cannot specialize default item `fly` | = note: to specialize, `fly` in the parent `impl` must be marked `default` diff --git a/src/test/ui/error-codes/E0522.stderr b/src/test/ui/error-codes/E0522.stderr index 819fab0088f55..1444e8b788d3b 100644 --- a/src/test/ui/error-codes/E0522.stderr +++ b/src/test/ui/error-codes/E0522.stderr @@ -3,7 +3,7 @@ error[E0601]: main function not found error[E0522]: definition of an unknown language item: `cookie` --> $DIR/E0522.rs:13:1 | -13 | #[lang = "cookie"] +LL | #[lang = "cookie"] | ^^^^^^^^^^^^^^^^^^ definition of unknown language item `cookie` error: aborting due to 2 previous errors diff --git a/src/test/ui/error-codes/E0527.stderr b/src/test/ui/error-codes/E0527.stderr index 7cd705e6d0b9d..4b6a9fb269025 100644 --- a/src/test/ui/error-codes/E0527.stderr +++ b/src/test/ui/error-codes/E0527.stderr @@ -1,7 +1,7 @@ error[E0527]: pattern requires 2 elements but array has 4 --> $DIR/E0527.rs:16:10 | -16 | &[a, b] => { +LL | &[a, b] => { | ^^^^^^ expected 4 elements error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0528.stderr b/src/test/ui/error-codes/E0528.stderr index ff75b07ced602..66fb711d37881 100644 --- a/src/test/ui/error-codes/E0528.stderr +++ b/src/test/ui/error-codes/E0528.stderr @@ -1,7 +1,7 @@ error[E0528]: pattern requires at least 3 elements but array has 2 --> $DIR/E0528.rs:16:10 | -16 | &[a, b, c, rest..] => { +LL | &[a, b, c, rest..] => { | ^^^^^^^^^^^^^^^^^ pattern cannot match array of 2 elements error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0529.stderr b/src/test/ui/error-codes/E0529.stderr index be9039be2b668..893774a17f285 100644 --- a/src/test/ui/error-codes/E0529.stderr +++ b/src/test/ui/error-codes/E0529.stderr @@ -1,7 +1,7 @@ error[E0529]: expected an array or slice, found `f32` --> $DIR/E0529.rs:16:9 | -16 | [a, b] => { +LL | [a, b] => { | ^^^^^^ pattern cannot match with input type `f32` error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0530.stderr b/src/test/ui/error-codes/E0530.stderr index 7c0306cc772fa..8e2c73535279b 100644 --- a/src/test/ui/error-codes/E0530.stderr +++ b/src/test/ui/error-codes/E0530.stderr @@ -1,10 +1,10 @@ error[E0530]: match bindings cannot shadow statics --> $DIR/E0530.rs:16:9 | -12 | static TEST: i32 = 0; +LL | static TEST: i32 = 0; | --------------------- a static `TEST` is defined here ... -16 | TEST => {} //~ ERROR E0530 +LL | TEST => {} //~ ERROR E0530 | ^^^^ cannot be named the same as a static error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0532.stderr b/src/test/ui/error-codes/E0532.stderr index 4eb91ce35d44a..0d051aad80dd7 100644 --- a/src/test/ui/error-codes/E0532.stderr +++ b/src/test/ui/error-codes/E0532.stderr @@ -1,7 +1,7 @@ error[E0532]: expected tuple struct/variant, found constant `StructConst1` --> $DIR/E0532.rs:15:9 | -15 | StructConst1(_) => { }, +LL | StructConst1(_) => { }, | ^^^^^^^^^^^^ not a tuple struct/variant error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0534.stderr b/src/test/ui/error-codes/E0534.stderr index fe7a5483e59df..f3437b49c70d5 100644 --- a/src/test/ui/error-codes/E0534.stderr +++ b/src/test/ui/error-codes/E0534.stderr @@ -1,7 +1,7 @@ error[E0534]: expected one argument --> $DIR/E0534.rs:11:1 | -11 | #[inline()] //~ ERROR E0534 +LL | #[inline()] //~ ERROR E0534 | ^^^^^^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0558.stderr b/src/test/ui/error-codes/E0558.stderr index c116201794d47..775ac9e8cbdde 100644 --- a/src/test/ui/error-codes/E0558.stderr +++ b/src/test/ui/error-codes/E0558.stderr @@ -1,7 +1,7 @@ error[E0558]: export_name attribute has invalid format --> $DIR/E0558.rs:11:1 | -11 | #[export_name] +LL | #[export_name] | ^^^^^^^^^^^^^^ did you mean #[export_name="*"]? error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0559.stderr b/src/test/ui/error-codes/E0559.stderr index 5d145a9518095..a8d0c980f60e5 100644 --- a/src/test/ui/error-codes/E0559.stderr +++ b/src/test/ui/error-codes/E0559.stderr @@ -1,7 +1,7 @@ error[E0559]: variant `Field::Fool` has no field named `joke` --> $DIR/E0559.rs:16:27 | -16 | let s = Field::Fool { joke: 0 }; +LL | let s = Field::Fool { joke: 0 }; | ^^^^^ `Field::Fool` does not have this field | = note: available fields are: `x` diff --git a/src/test/ui/error-codes/E0560.stderr b/src/test/ui/error-codes/E0560.stderr index a0185aa8af64b..44f998be8b02b 100644 --- a/src/test/ui/error-codes/E0560.stderr +++ b/src/test/ui/error-codes/E0560.stderr @@ -1,7 +1,7 @@ error[E0560]: struct `Simba` has no field named `father` --> $DIR/E0560.rs:16:32 | -16 | let s = Simba { mother: 1, father: 0 }; +LL | let s = Simba { mother: 1, father: 0 }; | ^^^^^^^ `Simba` does not have this field | = note: available fields are: `mother` diff --git a/src/test/ui/error-codes/E0565-1.stderr b/src/test/ui/error-codes/E0565-1.stderr index 65b917ad4bd32..3ec753af706ee 100644 --- a/src/test/ui/error-codes/E0565-1.stderr +++ b/src/test/ui/error-codes/E0565-1.stderr @@ -1,7 +1,7 @@ error[E0565]: unsupported literal --> $DIR/E0565-1.rs:14:14 | -14 | #[deprecated("since")] //~ ERROR E0565 +LL | #[deprecated("since")] //~ ERROR E0565 | ^^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0565.stderr b/src/test/ui/error-codes/E0565.stderr index 0041b7689a671..de083153ef0af 100644 --- a/src/test/ui/error-codes/E0565.stderr +++ b/src/test/ui/error-codes/E0565.stderr @@ -1,7 +1,7 @@ error[E0565]: unsupported literal --> $DIR/E0565.rs:14:8 | -14 | #[repr("C")] //~ ERROR E0565 +LL | #[repr("C")] //~ ERROR E0565 | ^^^ error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0572.stderr b/src/test/ui/error-codes/E0572.stderr index cad313b90a613..8f1b0c675904a 100644 --- a/src/test/ui/error-codes/E0572.stderr +++ b/src/test/ui/error-codes/E0572.stderr @@ -1,7 +1,7 @@ error[E0572]: return statement outside of function body --> $DIR/E0572.rs:11:18 | -11 | const FOO: u32 = return 0; //~ ERROR E0572 +LL | const FOO: u32 = return 0; //~ ERROR E0572 | ^^^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0582.stderr b/src/test/ui/error-codes/E0582.stderr index ac20683402302..99bed7e305f00 100644 --- a/src/test/ui/error-codes/E0582.stderr +++ b/src/test/ui/error-codes/E0582.stderr @@ -1,13 +1,13 @@ error[E0582]: binding for associated type `Output` references lifetime `'a`, which does not appear in the trait input types --> $DIR/E0582.rs:38:30 | -38 | where F: for<'a> Fn() -> Option<&'a i32> +LL | where F: for<'a> Fn() -> Option<&'a i32> | ^^^^^^^^^^^^^^^ error[E0582]: binding for associated type `Item` references lifetime `'a`, which does not appear in the trait input types --> $DIR/E0582.rs:46:31 | -46 | where F: for<'a> Iterator +LL | where F: for<'a> Iterator | ^^^^^^^^^^^^ error: aborting due to 2 previous errors diff --git a/src/test/ui/error-codes/E0585.stderr b/src/test/ui/error-codes/E0585.stderr index 49967f4ad81d5..3a705f9a9ef2a 100644 --- a/src/test/ui/error-codes/E0585.stderr +++ b/src/test/ui/error-codes/E0585.stderr @@ -1,7 +1,7 @@ error[E0585]: found a documentation comment that doesn't document anything --> $DIR/E0585.rs:12:5 | -12 | /// Hello! I'm useless... +LL | /// Hello! I'm useless... | ^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: doc comments must come before what they document, maybe a comment was intended with `//`? diff --git a/src/test/ui/error-codes/E0586.stderr b/src/test/ui/error-codes/E0586.stderr index 3cf16bdc3c318..5761909d01834 100644 --- a/src/test/ui/error-codes/E0586.stderr +++ b/src/test/ui/error-codes/E0586.stderr @@ -1,7 +1,7 @@ error[E0586]: inclusive range with no end --> $DIR/E0586.rs:13:22 | -13 | let x = &tmp[1..=]; //~ ERROR E0586 +LL | let x = &tmp[1..=]; //~ ERROR E0586 | ^ | = help: inclusive ranges must be bounded at the end (`..=b` or `a..=b`) diff --git a/src/test/ui/error-codes/E0597.stderr b/src/test/ui/error-codes/E0597.stderr index 7316ee6475f18..aa4004d49ab1a 100644 --- a/src/test/ui/error-codes/E0597.stderr +++ b/src/test/ui/error-codes/E0597.stderr @@ -1,10 +1,10 @@ error[E0597]: `y` does not live long enough --> $DIR/E0597.rs:18:17 | -18 | x.x = Some(&y); +LL | x.x = Some(&y); | ^ borrowed value does not live long enough -19 | //~^ `y` does not live long enough [E0597] -20 | } +LL | //~^ `y` does not live long enough [E0597] +LL | } | - `y` dropped here while still borrowed | = note: values in a scope are dropped in the opposite order they are created diff --git a/src/test/ui/error-codes/E0599.stderr b/src/test/ui/error-codes/E0599.stderr index 0274506926f8d..f9d55685980a2 100644 --- a/src/test/ui/error-codes/E0599.stderr +++ b/src/test/ui/error-codes/E0599.stderr @@ -1,10 +1,10 @@ error[E0599]: no associated item named `NotEvenReal` found for type `Foo` in the current scope --> $DIR/E0599.rs:14:15 | -11 | struct Foo; +LL | struct Foo; | ----------- associated item `NotEvenReal` not found for this ... -14 | || if let Foo::NotEvenReal() = Foo {}; //~ ERROR E0599 +LL | || if let Foo::NotEvenReal() = Foo {}; //~ ERROR E0599 | ^^^^^^^^^^^^^^^^^^ associated item not found in `Foo` error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0600.stderr b/src/test/ui/error-codes/E0600.stderr index fec5f4169196e..c61c6d4b5fd51 100644 --- a/src/test/ui/error-codes/E0600.stderr +++ b/src/test/ui/error-codes/E0600.stderr @@ -1,7 +1,7 @@ error[E0600]: cannot apply unary operator `!` to type `&'static str` --> $DIR/E0600.rs:12:5 | -12 | !"a"; //~ ERROR E0600 +LL | !"a"; //~ ERROR E0600 | ^^^^ error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0602.stderr b/src/test/ui/error-codes/E0602.stderr index cb6c05326e230..51cb57114cd7a 100644 --- a/src/test/ui/error-codes/E0602.stderr +++ b/src/test/ui/error-codes/E0602.stderr @@ -1,6 +1,6 @@ error[E0602]: unknown lint: `bogus` - | - = note: requested on the command line with `-D bogus` + | + = note: requested on the command line with `-D bogus` error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0603.stderr b/src/test/ui/error-codes/E0603.stderr index 1d8e2fa9340e3..69efa250ca1fa 100644 --- a/src/test/ui/error-codes/E0603.stderr +++ b/src/test/ui/error-codes/E0603.stderr @@ -1,7 +1,7 @@ error[E0603]: constant `PRIVATE` is private --> $DIR/E0603.rs:16:5 | -16 | SomeModule::PRIVATE; //~ ERROR E0603 +LL | SomeModule::PRIVATE; //~ ERROR E0603 | ^^^^^^^^^^^^^^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0604.stderr b/src/test/ui/error-codes/E0604.stderr index 78d1c4dd47654..7d2508e7195bb 100644 --- a/src/test/ui/error-codes/E0604.stderr +++ b/src/test/ui/error-codes/E0604.stderr @@ -1,7 +1,7 @@ error[E0604]: only `u8` can be cast as `char`, not `u32` --> $DIR/E0604.rs:12:5 | -12 | 1u32 as char; //~ ERROR E0604 +LL | 1u32 as char; //~ ERROR E0604 | ^^^^^^^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0605.stderr b/src/test/ui/error-codes/E0605.stderr index 0b44de25fb5cd..e05bd2de1f463 100644 --- a/src/test/ui/error-codes/E0605.stderr +++ b/src/test/ui/error-codes/E0605.stderr @@ -1,7 +1,7 @@ error[E0605]: non-primitive cast: `u8` as `std::vec::Vec` --> $DIR/E0605.rs:13:5 | -13 | x as Vec; //~ ERROR E0605 +LL | x as Vec; //~ ERROR E0605 | ^^^^^^^^^^^^ | = note: an `as` expression can only be used to convert between primitive types. Consider using the `From` trait @@ -9,7 +9,7 @@ error[E0605]: non-primitive cast: `u8` as `std::vec::Vec` error[E0605]: non-primitive cast: `*const u8` as `&u8` --> $DIR/E0605.rs:16:5 | -16 | v as &u8; //~ ERROR E0605 +LL | v as &u8; //~ ERROR E0605 | ^^^^^^^^ | = note: an `as` expression can only be used to convert between primitive types. Consider using the `From` trait diff --git a/src/test/ui/error-codes/E0606.stderr b/src/test/ui/error-codes/E0606.stderr index 17051da1319d9..811e8f1ca3977 100644 --- a/src/test/ui/error-codes/E0606.stderr +++ b/src/test/ui/error-codes/E0606.stderr @@ -1,13 +1,13 @@ error[E0606]: casting `&u8` as `u8` is invalid --> $DIR/E0606.rs:12:5 | -12 | &0u8 as u8; //~ ERROR E0606 +LL | &0u8 as u8; //~ ERROR E0606 | ^^^^^^^^^^ cannot cast `&u8` as `u8` | help: did you mean `*&0u8`? --> $DIR/E0606.rs:12:5 | -12 | &0u8 as u8; //~ ERROR E0606 +LL | &0u8 as u8; //~ ERROR E0606 | ^^^^ error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0607.stderr b/src/test/ui/error-codes/E0607.stderr index 5dfe6ad59b879..f7939b2b6b673 100644 --- a/src/test/ui/error-codes/E0607.stderr +++ b/src/test/ui/error-codes/E0607.stderr @@ -1,7 +1,7 @@ error[E0607]: cannot cast thin pointer `*const u8` to fat pointer `*const [u8]` --> $DIR/E0607.rs:13:5 | -13 | v as *const [u8]; //~ ERROR E0607 +LL | v as *const [u8]; //~ ERROR E0607 | ^^^^^^^^^^^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0608.stderr b/src/test/ui/error-codes/E0608.stderr index ab75fe82af350..ec4d1b4a8488d 100644 --- a/src/test/ui/error-codes/E0608.stderr +++ b/src/test/ui/error-codes/E0608.stderr @@ -1,7 +1,7 @@ error[E0608]: cannot index into a value of type `u8` --> $DIR/E0608.rs:12:5 | -12 | 0u8[2]; //~ ERROR E0608 +LL | 0u8[2]; //~ ERROR E0608 | ^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0609.stderr b/src/test/ui/error-codes/E0609.stderr index 561164cd277dc..5b714ad72bf76 100644 --- a/src/test/ui/error-codes/E0609.stderr +++ b/src/test/ui/error-codes/E0609.stderr @@ -1,7 +1,7 @@ error[E0609]: no field `foo` on type `Foo` --> $DIR/E0609.rs:18:15 | -18 | let _ = x.foo; //~ ERROR E0609 +LL | let _ = x.foo; //~ ERROR E0609 | ^^^ unknown field | = note: available fields are: `x` @@ -9,7 +9,7 @@ error[E0609]: no field `foo` on type `Foo` error[E0609]: no field `1` on type `Bar` --> $DIR/E0609.rs:21:5 | -21 | y.1; //~ ERROR E0609 +LL | y.1; //~ ERROR E0609 | ^^^ error: aborting due to 2 previous errors diff --git a/src/test/ui/error-codes/E0610.stderr b/src/test/ui/error-codes/E0610.stderr index 351e9208e95bd..66be790132db2 100644 --- a/src/test/ui/error-codes/E0610.stderr +++ b/src/test/ui/error-codes/E0610.stderr @@ -1,7 +1,7 @@ error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields --> $DIR/E0610.rs:13:15 | -13 | let _ = x.foo; //~ ERROR E0610 +LL | let _ = x.foo; //~ ERROR E0610 | ^^^ error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0611.stderr b/src/test/ui/error-codes/E0611.stderr index 33fe78bc18c60..deb3461f58e06 100644 --- a/src/test/ui/error-codes/E0611.stderr +++ b/src/test/ui/error-codes/E0611.stderr @@ -1,7 +1,7 @@ error[E0611]: field `0` of tuple-struct `a::Foo` is private --> $DIR/E0611.rs:21:4 | -21 | y.0; //~ ERROR E0611 +LL | y.0; //~ ERROR E0611 | ^^^ error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0612.stderr b/src/test/ui/error-codes/E0612.stderr index 21fdaf84dc94d..a7841b06bdcf3 100644 --- a/src/test/ui/error-codes/E0612.stderr +++ b/src/test/ui/error-codes/E0612.stderr @@ -1,7 +1,7 @@ error[E0612]: attempted out-of-bounds tuple index `1` on type `Foo` --> $DIR/E0612.rs:15:4 | -15 | y.1; //~ ERROR E0612 +LL | y.1; //~ ERROR E0612 | ^^^ error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0614.stderr b/src/test/ui/error-codes/E0614.stderr index 242cc36f0b9a1..100935350fb92 100644 --- a/src/test/ui/error-codes/E0614.stderr +++ b/src/test/ui/error-codes/E0614.stderr @@ -1,7 +1,7 @@ error[E0614]: type `u32` cannot be dereferenced --> $DIR/E0614.rs:13:5 | -13 | *y; //~ ERROR E0614 +LL | *y; //~ ERROR E0614 | ^^ error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0615.stderr b/src/test/ui/error-codes/E0615.stderr index fb3f9269f7c2b..15e0ef530403c 100644 --- a/src/test/ui/error-codes/E0615.stderr +++ b/src/test/ui/error-codes/E0615.stderr @@ -1,7 +1,7 @@ error[E0615]: attempted to take value of method `method` on type `Foo` --> $DIR/E0615.rs:21:7 | -21 | f.method; //~ ERROR E0615 +LL | f.method; //~ ERROR E0615 | ^^^^^^ | = help: maybe a `()` to call it is missing? diff --git a/src/test/ui/error-codes/E0616.stderr b/src/test/ui/error-codes/E0616.stderr index 1dccd06b376d9..81ee8fa6b5c88 100644 --- a/src/test/ui/error-codes/E0616.stderr +++ b/src/test/ui/error-codes/E0616.stderr @@ -1,7 +1,7 @@ error[E0616]: field `x` of struct `a::Foo` is private --> $DIR/E0616.rs:23:5 | -23 | f.x; //~ ERROR E0616 +LL | f.x; //~ ERROR E0616 | ^^^ error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0617.stderr b/src/test/ui/error-codes/E0617.stderr index 49d63538624e6..cf6b716944e2c 100644 --- a/src/test/ui/error-codes/E0617.stderr +++ b/src/test/ui/error-codes/E0617.stderr @@ -1,41 +1,41 @@ error[E0617]: can't pass `f32` to variadic function --> $DIR/E0617.rs:19:36 | -19 | printf(::std::ptr::null(), 0f32); +LL | printf(::std::ptr::null(), 0f32); | ^^^^ help: cast the value to `c_double`: `0f32 as c_double` error[E0617]: can't pass `i8` to variadic function --> $DIR/E0617.rs:22:36 | -22 | printf(::std::ptr::null(), 0i8); +LL | printf(::std::ptr::null(), 0i8); | ^^^ help: cast the value to `c_int`: `0i8 as c_int` error[E0617]: can't pass `i16` to variadic function --> $DIR/E0617.rs:25:36 | -25 | printf(::std::ptr::null(), 0i16); +LL | printf(::std::ptr::null(), 0i16); | ^^^^ help: cast the value to `c_int`: `0i16 as c_int` error[E0617]: can't pass `u8` to variadic function --> $DIR/E0617.rs:28:36 | -28 | printf(::std::ptr::null(), 0u8); +LL | printf(::std::ptr::null(), 0u8); | ^^^ help: cast the value to `c_uint`: `0u8 as c_uint` error[E0617]: can't pass `u16` to variadic function --> $DIR/E0617.rs:31:36 | -31 | printf(::std::ptr::null(), 0u16); +LL | printf(::std::ptr::null(), 0u16); | ^^^^ help: cast the value to `c_uint`: `0u16 as c_uint` error[E0617]: can't pass `unsafe extern "C" fn(*const i8, ...) {printf}` to variadic function --> $DIR/E0617.rs:34:36 | -34 | printf(::std::ptr::null(), printf); +LL | printf(::std::ptr::null(), printf); | ^^^^^^ help: cast the value to `unsafe extern "C" fn(*const i8, ...)` | -34 | printf(::std::ptr::null(), printf as unsafe extern "C" fn(*const i8, ...)); +LL | printf(::std::ptr::null(), printf as unsafe extern "C" fn(*const i8, ...)); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: aborting due to 6 previous errors diff --git a/src/test/ui/error-codes/E0618.stderr b/src/test/ui/error-codes/E0618.stderr index 8702437659693..41f45cf2e851f 100644 --- a/src/test/ui/error-codes/E0618.stderr +++ b/src/test/ui/error-codes/E0618.stderr @@ -1,22 +1,22 @@ error[E0618]: expected function, found enum variant `X::Entry` --> $DIR/E0618.rs:16:5 | -12 | Entry, +LL | Entry, | ----- `X::Entry` defined here ... -16 | X::Entry(); +LL | X::Entry(); | ^^^^^^^^^^ not a function help: `X::Entry` is a unit variant, you need to write it without the parenthesis | -16 | X::Entry; +LL | X::Entry; | ^^^^^^^^ error[E0618]: expected function, found `i32` --> $DIR/E0618.rs:19:5 | -18 | let x = 0i32; +LL | let x = 0i32; | - `i32` defined here -19 | x(); +LL | x(); | ^^^ not a function error: aborting due to 2 previous errors diff --git a/src/test/ui/error-codes/E0620.stderr b/src/test/ui/error-codes/E0620.stderr index 564a9472ac9a2..24b9c26f34b5e 100644 --- a/src/test/ui/error-codes/E0620.stderr +++ b/src/test/ui/error-codes/E0620.stderr @@ -1,13 +1,13 @@ error[E0620]: cast to unsized type: `&[usize; 2]` as `[usize]` --> $DIR/E0620.rs:12:16 | -12 | let _foo = &[1_usize, 2] as [usize]; //~ ERROR E0620 +LL | let _foo = &[1_usize, 2] as [usize]; //~ ERROR E0620 | ^^^^^^^^^^^^^^^^^^^^^^^^ | help: consider using an implicit coercion to `&[usize]` instead --> $DIR/E0620.rs:12:16 | -12 | let _foo = &[1_usize, 2] as [usize]; //~ ERROR E0620 +LL | let _foo = &[1_usize, 2] as [usize]; //~ ERROR E0620 | ^^^^^^^^^^^^^^^^^^^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0621-does-not-trigger-for-closures.stderr b/src/test/ui/error-codes/E0621-does-not-trigger-for-closures.stderr index c529a838bf739..cc26477688329 100644 --- a/src/test/ui/error-codes/E0621-does-not-trigger-for-closures.stderr +++ b/src/test/ui/error-codes/E0621-does-not-trigger-for-closures.stderr @@ -1,28 +1,28 @@ error[E0495]: cannot infer an appropriate lifetime for lifetime parameter `'a` due to conflicting requirements --> $DIR/E0621-does-not-trigger-for-closures.rs:25:5 | -25 | invoke(&x, |a, b| if a > b { a } else { b }); //~ ERROR E0495 +LL | invoke(&x, |a, b| if a > b { a } else { b }); //~ ERROR E0495 | ^^^^^^ | note: first, the lifetime cannot outlive the anonymous lifetime #2 defined on the body at 25:16... --> $DIR/E0621-does-not-trigger-for-closures.rs:25:16 | -25 | invoke(&x, |a, b| if a > b { a } else { b }); //~ ERROR E0495 +LL | invoke(&x, |a, b| if a > b { a } else { b }); //~ ERROR E0495 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ note: ...so that reference does not outlive borrowed content --> $DIR/E0621-does-not-trigger-for-closures.rs:25:45 | -25 | invoke(&x, |a, b| if a > b { a } else { b }); //~ ERROR E0495 +LL | invoke(&x, |a, b| if a > b { a } else { b }); //~ ERROR E0495 | ^ note: but, the lifetime must be valid for the call at 25:5... --> $DIR/E0621-does-not-trigger-for-closures.rs:25:5 | -25 | invoke(&x, |a, b| if a > b { a } else { b }); //~ ERROR E0495 +LL | invoke(&x, |a, b| if a > b { a } else { b }); //~ ERROR E0495 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ note: ...so type `&i32` of expression is valid during the expression --> $DIR/E0621-does-not-trigger-for-closures.rs:25:5 | -25 | invoke(&x, |a, b| if a > b { a } else { b }); //~ ERROR E0495 +LL | invoke(&x, |a, b| if a > b { a } else { b }); //~ ERROR E0495 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0622.stderr b/src/test/ui/error-codes/E0622.stderr index 977f44a9c9781..0588db8635e39 100644 --- a/src/test/ui/error-codes/E0622.stderr +++ b/src/test/ui/error-codes/E0622.stderr @@ -1,7 +1,7 @@ error[E0622]: intrinsic must be a function --> $DIR/E0622.rs:13:5 | -13 | pub static breakpoint : unsafe extern "rust-intrinsic" fn(); +LL | pub static breakpoint : unsafe extern "rust-intrinsic" fn(); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected a function error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0624.stderr b/src/test/ui/error-codes/E0624.stderr index 0afb05a8a5e81..ad3069190b3a9 100644 --- a/src/test/ui/error-codes/E0624.stderr +++ b/src/test/ui/error-codes/E0624.stderr @@ -1,7 +1,7 @@ error[E0624]: method `method` is private --> $DIR/E0624.rs:21:9 | -21 | foo.method(); //~ ERROR method `method` is private [E0624] +LL | foo.method(); //~ ERROR method `method` is private [E0624] | ^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0637.stderr b/src/test/ui/error-codes/E0637.stderr index e314afd221e40..9bd3ef2943396 100644 --- a/src/test/ui/error-codes/E0637.stderr +++ b/src/test/ui/error-codes/E0637.stderr @@ -1,19 +1,19 @@ error[E0637]: invalid lifetime bound name: `'_` --> $DIR/E0637.rs:12:16 | -12 | struct Foo<'a: '_>(&'a u8); //~ ERROR invalid lifetime bound name: `'_` +LL | struct Foo<'a: '_>(&'a u8); //~ ERROR invalid lifetime bound name: `'_` | ^^ `'_` is a reserved lifetime name error[E0637]: invalid lifetime bound name: `'_` --> $DIR/E0637.rs:13:12 | -13 | fn foo<'a: '_>(_: &'a u8) {} //~ ERROR invalid lifetime bound name: `'_` +LL | fn foo<'a: '_>(_: &'a u8) {} //~ ERROR invalid lifetime bound name: `'_` | ^^ `'_` is a reserved lifetime name error[E0637]: invalid lifetime bound name: `'_` --> $DIR/E0637.rs:16:10 | -16 | impl<'a: '_> Bar<'a> { //~ ERROR invalid lifetime bound name: `'_` +LL | impl<'a: '_> Bar<'a> { //~ ERROR invalid lifetime bound name: `'_` | ^^ `'_` is a reserved lifetime name error: aborting due to 3 previous errors diff --git a/src/test/ui/error-codes/E0657.stderr b/src/test/ui/error-codes/E0657.stderr index e039d645fa6db..0ef4ca317f4e8 100644 --- a/src/test/ui/error-codes/E0657.stderr +++ b/src/test/ui/error-codes/E0657.stderr @@ -1,13 +1,13 @@ error[E0657]: `impl Trait` can only capture lifetimes bound at the fn or impl level --> $DIR/E0657.rs:20:31 | -20 | -> Box Id>> +LL | -> Box Id>> | ^^ error[E0657]: `impl Trait` can only capture lifetimes bound at the fn or impl level --> $DIR/E0657.rs:29:35 | -29 | -> Box Id>> +LL | -> Box Id>> | ^^ error: aborting due to 2 previous errors diff --git a/src/test/ui/error-codes/E0658.stderr b/src/test/ui/error-codes/E0658.stderr index c18d8090233d4..a5fb826a590b2 100644 --- a/src/test/ui/error-codes/E0658.stderr +++ b/src/test/ui/error-codes/E0658.stderr @@ -1,7 +1,7 @@ error[E0658]: use of unstable library feature 'i128' (see issue #35118) --> $DIR/E0658.rs:12:13 | -12 | let _ = ::std::u128::MAX; //~ ERROR E0658 +LL | let _ = ::std::u128::MAX; //~ ERROR E0658 | ^^^^^^^^^^^^^^^^ | = help: add #![feature(i128)] to the crate attributes to enable diff --git a/src/test/ui/error-codes/E0659.stderr b/src/test/ui/error-codes/E0659.stderr index c2410e2f733bc..d372f681ef291 100644 --- a/src/test/ui/error-codes/E0659.stderr +++ b/src/test/ui/error-codes/E0659.stderr @@ -1,18 +1,18 @@ error[E0659]: `foo` is ambiguous --> $DIR/E0659.rs:25:5 | -25 | collider::foo(); //~ ERROR E0659 +LL | collider::foo(); //~ ERROR E0659 | ^^^^^^^^^^^^^ | note: `foo` could refer to the name imported here --> $DIR/E0659.rs:20:13 | -20 | pub use moon::*; +LL | pub use moon::*; | ^^^^^^^ note: `foo` could also refer to the name imported here --> $DIR/E0659.rs:21:13 | -21 | pub use earth::*; +LL | pub use earth::*; | ^^^^^^^^ = note: consider adding an explicit import of `foo` to disambiguate diff --git a/src/test/ui/extern-const.stderr b/src/test/ui/extern-const.stderr index c5a3149e85a7a..f416f596b2552 100644 --- a/src/test/ui/extern-const.stderr +++ b/src/test/ui/extern-const.stderr @@ -1,7 +1,7 @@ error: extern items cannot be `const` --> $DIR/extern-const.rs:14:5 | -14 | const C: u8; //~ ERROR extern items cannot be `const` +LL | const C: u8; //~ ERROR extern items cannot be `const` | ^^^^^ help: instead try using: `static` error: aborting due to previous error diff --git a/src/test/ui/fat-ptr-cast.stderr b/src/test/ui/fat-ptr-cast.stderr index b3c2b23cd3272..5316aad74b7b3 100644 --- a/src/test/ui/fat-ptr-cast.stderr +++ b/src/test/ui/fat-ptr-cast.stderr @@ -1,7 +1,7 @@ error[E0606]: casting `&[i32]` as `usize` is invalid --> $DIR/fat-ptr-cast.rs:20:5 | -20 | a as usize; //~ ERROR casting +LL | a as usize; //~ ERROR casting | ^^^^^^^^^^ | = help: cast through a raw pointer first @@ -9,7 +9,7 @@ error[E0606]: casting `&[i32]` as `usize` is invalid error[E0606]: casting `&[i32]` as `isize` is invalid --> $DIR/fat-ptr-cast.rs:21:5 | -21 | a as isize; //~ ERROR casting +LL | a as isize; //~ ERROR casting | ^^^^^^^^^^ | = help: cast through a raw pointer first @@ -17,7 +17,7 @@ error[E0606]: casting `&[i32]` as `isize` is invalid error[E0606]: casting `&[i32]` as `i16` is invalid --> $DIR/fat-ptr-cast.rs:22:5 | -22 | a as i16; //~ ERROR casting `&[i32]` as `i16` is invalid +LL | a as i16; //~ ERROR casting `&[i32]` as `i16` is invalid | ^^^^^^^^ | = help: cast through a raw pointer first @@ -25,7 +25,7 @@ error[E0606]: casting `&[i32]` as `i16` is invalid error[E0606]: casting `&[i32]` as `u32` is invalid --> $DIR/fat-ptr-cast.rs:23:5 | -23 | a as u32; //~ ERROR casting `&[i32]` as `u32` is invalid +LL | a as u32; //~ ERROR casting `&[i32]` as `u32` is invalid | ^^^^^^^^ | = help: cast through a raw pointer first @@ -33,7 +33,7 @@ error[E0606]: casting `&[i32]` as `u32` is invalid error[E0605]: non-primitive cast: `std::boxed::Box<[i32]>` as `usize` --> $DIR/fat-ptr-cast.rs:24:5 | -24 | b as usize; //~ ERROR non-primitive cast +LL | b as usize; //~ ERROR non-primitive cast | ^^^^^^^^^^ | = note: an `as` expression can only be used to convert between primitive types. Consider using the `From` trait @@ -41,7 +41,7 @@ error[E0605]: non-primitive cast: `std::boxed::Box<[i32]>` as `usize` error[E0606]: casting `*const [i32]` as `usize` is invalid --> $DIR/fat-ptr-cast.rs:25:5 | -25 | p as usize; +LL | p as usize; | ^^^^^^^^^^ | = help: cast through a thin pointer first @@ -49,19 +49,19 @@ error[E0606]: casting `*const [i32]` as `usize` is invalid error[E0607]: cannot cast thin pointer `*const i32` to fat pointer `*const [i32]` --> $DIR/fat-ptr-cast.rs:29:5 | -29 | q as *const [i32]; //~ ERROR cannot cast +LL | q as *const [i32]; //~ ERROR cannot cast | ^^^^^^^^^^^^^^^^^ error[E0606]: casting `usize` as `*mut Trait + 'static` is invalid --> $DIR/fat-ptr-cast.rs:32:37 | -32 | let t: *mut (Trait + 'static) = 0 as *mut _; //~ ERROR casting +LL | let t: *mut (Trait + 'static) = 0 as *mut _; //~ ERROR casting | ^^^^^^^^^^^ error[E0606]: casting `usize` as `*const str` is invalid --> $DIR/fat-ptr-cast.rs:33:32 | -33 | let mut fail: *const str = 0 as *const str; //~ ERROR casting +LL | let mut fail: *const str = 0 as *const str; //~ ERROR casting | ^^^^^^^^^^^^^^^ error: aborting due to 9 previous errors diff --git a/src/test/ui/feature-gate-abi-msp430-interrupt.stderr b/src/test/ui/feature-gate-abi-msp430-interrupt.stderr index e1621d34d46ac..3a67daa647c63 100644 --- a/src/test/ui/feature-gate-abi-msp430-interrupt.stderr +++ b/src/test/ui/feature-gate-abi-msp430-interrupt.stderr @@ -1,7 +1,7 @@ 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() {} +LL | extern "msp430-interrupt" fn foo() {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(abi_msp430_interrupt)] to the crate attributes to enable diff --git a/src/test/ui/feature-gate-abi.stderr b/src/test/ui/feature-gate-abi.stderr index ce31474caed9b..f9f5c864a81c0 100644 --- a/src/test/ui/feature-gate-abi.stderr +++ b/src/test/ui/feature-gate-abi.stderr @@ -1,7 +1,7 @@ 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 +LL | extern "rust-intrinsic" fn f1() {} //~ ERROR intrinsics are subject to change | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(intrinsics)] to the crate attributes to enable @@ -9,7 +9,7 @@ error[E0658]: intrinsics are subject to change 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 +LL | extern "platform-intrinsic" fn f2() {} //~ ERROR platform intrinsics are experimental | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(platform_intrinsics)] to the crate attributes to enable @@ -17,7 +17,7 @@ error[E0658]: platform intrinsics are experimental and possibly buggy (see issue 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 +LL | extern "vectorcall" fn f3() {} //~ ERROR vectorcall is experimental and subject to change | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(abi_vectorcall)] to the crate attributes to enable @@ -25,7 +25,7 @@ error[E0658]: vectorcall is experimental and subject to change 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 +LL | extern "rust-call" fn f4() {} //~ ERROR rust-call ABI is subject to change | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(unboxed_closures)] to the crate attributes to enable @@ -33,7 +33,7 @@ error[E0658]: rust-call ABI is subject to change (see issue #29625) 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 +LL | extern "msp430-interrupt" fn f5() {} //~ ERROR msp430-interrupt ABI is experimental | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(abi_msp430_interrupt)] to the crate attributes to enable @@ -41,7 +41,7 @@ error[E0658]: msp430-interrupt ABI is experimental and subject to change (see is 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 +LL | extern "ptx-kernel" fn f6() {} //~ ERROR PTX ABIs are experimental and subject to change | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(abi_ptx)] to the crate attributes to enable @@ -49,7 +49,7 @@ error[E0658]: PTX ABIs are experimental and subject to change 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 +LL | extern "x86-interrupt" fn f7() {} //~ ERROR x86-interrupt ABI is experimental | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(abi_x86_interrupt)] to the crate attributes to enable @@ -57,7 +57,7 @@ error[E0658]: x86-interrupt ABI is experimental and subject to change (see issue 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 +LL | extern "thiscall" fn f8() {} //~ ERROR thiscall is experimental and subject to change | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(abi_thiscall)] to the crate attributes to enable @@ -65,7 +65,7 @@ error[E0658]: thiscall is experimental and 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 +LL | extern "rust-intrinsic" fn m1(); //~ ERROR intrinsics are subject to change | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(intrinsics)] to the crate attributes to enable @@ -73,7 +73,7 @@ error[E0658]: intrinsics are subject to change 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 +LL | extern "platform-intrinsic" fn m2(); //~ ERROR platform intrinsics are experimental | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(platform_intrinsics)] to the crate attributes to enable @@ -81,7 +81,7 @@ error[E0658]: platform intrinsics are experimental and possibly buggy (see issue 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 +LL | extern "vectorcall" fn m3(); //~ ERROR vectorcall is experimental and subject to change | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(abi_vectorcall)] to the crate attributes to enable @@ -89,7 +89,7 @@ error[E0658]: vectorcall is experimental and subject to change 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 +LL | extern "rust-call" fn m4(); //~ ERROR rust-call ABI is subject to change | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(unboxed_closures)] to the crate attributes to enable @@ -97,7 +97,7 @@ error[E0658]: rust-call ABI is subject to change (see issue #29625) 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 +LL | extern "msp430-interrupt" fn m5(); //~ ERROR msp430-interrupt ABI is experimental | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(abi_msp430_interrupt)] to the crate attributes to enable @@ -105,7 +105,7 @@ error[E0658]: msp430-interrupt ABI is experimental and subject to change (see is 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 +LL | extern "ptx-kernel" fn m6(); //~ ERROR PTX ABIs are experimental and subject to change | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(abi_ptx)] to the crate attributes to enable @@ -113,7 +113,7 @@ error[E0658]: PTX ABIs are experimental and subject to change 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 +LL | extern "x86-interrupt" fn m7(); //~ ERROR x86-interrupt ABI is experimental | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(abi_x86_interrupt)] to the crate attributes to enable @@ -121,7 +121,7 @@ error[E0658]: x86-interrupt ABI is experimental and subject to change (see issue 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 +LL | extern "thiscall" fn m8(); //~ ERROR thiscall is experimental and subject to change | ^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(abi_thiscall)] to the crate attributes to enable @@ -129,7 +129,7 @@ error[E0658]: thiscall is experimental and 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 +LL | extern "rust-intrinsic" fn dm1() {} //~ ERROR intrinsics are subject to change | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(intrinsics)] to the crate attributes to enable @@ -137,7 +137,7 @@ error[E0658]: intrinsics are subject to change 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 +LL | extern "platform-intrinsic" fn dm2() {} //~ ERROR platform intrinsics are experimental | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(platform_intrinsics)] to the crate attributes to enable @@ -145,7 +145,7 @@ error[E0658]: platform intrinsics are experimental and possibly buggy (see issue 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 +LL | extern "vectorcall" fn dm3() {} //~ ERROR vectorcall is experimental and subject to change | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(abi_vectorcall)] to the crate attributes to enable @@ -153,7 +153,7 @@ error[E0658]: vectorcall is experimental and subject to change 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 +LL | extern "rust-call" fn dm4() {} //~ ERROR rust-call ABI is subject to change | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(unboxed_closures)] to the crate attributes to enable @@ -161,7 +161,7 @@ error[E0658]: rust-call ABI is subject to change (see issue #29625) 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 +LL | extern "msp430-interrupt" fn dm5() {} //~ ERROR msp430-interrupt ABI is experimental | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(abi_msp430_interrupt)] to the crate attributes to enable @@ -169,7 +169,7 @@ error[E0658]: msp430-interrupt ABI is experimental and subject to change (see is 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 +LL | extern "ptx-kernel" fn dm6() {} //~ ERROR PTX ABIs are experimental and subject to change | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(abi_ptx)] to the crate attributes to enable @@ -177,7 +177,7 @@ error[E0658]: PTX ABIs are experimental and subject to change 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 +LL | extern "x86-interrupt" fn dm7() {} //~ ERROR x86-interrupt ABI is experimental | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(abi_x86_interrupt)] to the crate attributes to enable @@ -185,7 +185,7 @@ error[E0658]: x86-interrupt ABI is experimental and subject to change (see issue 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 +LL | extern "thiscall" fn dm8() {} //~ ERROR thiscall is experimental and subject to change | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(abi_thiscall)] to the crate attributes to enable @@ -193,7 +193,7 @@ error[E0658]: thiscall is experimental and 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 +LL | extern "rust-intrinsic" fn m1() {} //~ ERROR intrinsics are subject to change | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(intrinsics)] to the crate attributes to enable @@ -201,7 +201,7 @@ error[E0658]: intrinsics are subject to change 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 +LL | extern "platform-intrinsic" fn m2() {} //~ ERROR platform intrinsics are experimental | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(platform_intrinsics)] to the crate attributes to enable @@ -209,7 +209,7 @@ error[E0658]: platform intrinsics are experimental and possibly buggy (see issue 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 +LL | extern "vectorcall" fn m3() {} //~ ERROR vectorcall is experimental and subject to change | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(abi_vectorcall)] to the crate attributes to enable @@ -217,7 +217,7 @@ error[E0658]: vectorcall is experimental and subject to change 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 +LL | extern "rust-call" fn m4() {} //~ ERROR rust-call ABI is subject to change | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(unboxed_closures)] to the crate attributes to enable @@ -225,7 +225,7 @@ error[E0658]: rust-call ABI is subject to change (see issue #29625) 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 +LL | extern "msp430-interrupt" fn m5() {} //~ ERROR msp430-interrupt ABI is experimental | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(abi_msp430_interrupt)] to the crate attributes to enable @@ -233,7 +233,7 @@ error[E0658]: msp430-interrupt ABI is experimental and subject to change (see is 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 +LL | extern "ptx-kernel" fn m6() {} //~ ERROR PTX ABIs are experimental and subject to change | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(abi_ptx)] to the crate attributes to enable @@ -241,7 +241,7 @@ error[E0658]: PTX ABIs are experimental and subject to change 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 +LL | extern "x86-interrupt" fn m7() {} //~ ERROR x86-interrupt ABI is experimental | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(abi_x86_interrupt)] to the crate attributes to enable @@ -249,7 +249,7 @@ error[E0658]: x86-interrupt ABI is experimental and subject to change (see issue 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 +LL | extern "thiscall" fn m8() {} //~ ERROR thiscall is experimental and subject to change | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(abi_thiscall)] to the crate attributes to enable @@ -257,7 +257,7 @@ error[E0658]: thiscall is experimental and 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 +LL | extern "rust-intrinsic" fn im1() {} //~ ERROR intrinsics are subject to change | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(intrinsics)] to the crate attributes to enable @@ -265,7 +265,7 @@ error[E0658]: intrinsics are subject to change 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 +LL | extern "platform-intrinsic" fn im2() {} //~ ERROR platform intrinsics are experimental | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(platform_intrinsics)] to the crate attributes to enable @@ -273,7 +273,7 @@ error[E0658]: platform intrinsics are experimental and possibly buggy (see issue 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 +LL | extern "vectorcall" fn im3() {} //~ ERROR vectorcall is experimental and subject to change | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(abi_vectorcall)] to the crate attributes to enable @@ -281,7 +281,7 @@ error[E0658]: vectorcall is experimental and subject to change 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 +LL | extern "rust-call" fn im4() {} //~ ERROR rust-call ABI is subject to change | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(unboxed_closures)] to the crate attributes to enable @@ -289,7 +289,7 @@ error[E0658]: rust-call ABI is subject to change (see issue #29625) 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 +LL | extern "msp430-interrupt" fn im5() {} //~ ERROR msp430-interrupt ABI is experimental | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(abi_msp430_interrupt)] to the crate attributes to enable @@ -297,7 +297,7 @@ error[E0658]: msp430-interrupt ABI is experimental and subject to change (see is 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 +LL | extern "ptx-kernel" fn im6() {} //~ ERROR PTX ABIs are experimental and subject to change | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(abi_ptx)] to the crate attributes to enable @@ -305,7 +305,7 @@ error[E0658]: PTX ABIs are experimental and subject to change 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 +LL | extern "x86-interrupt" fn im7() {} //~ ERROR x86-interrupt ABI is experimental | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(abi_x86_interrupt)] to the crate attributes to enable @@ -313,7 +313,7 @@ error[E0658]: x86-interrupt ABI is experimental and subject to change (see issue 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 +LL | extern "thiscall" fn im8() {} //~ ERROR thiscall is experimental and subject to change | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(abi_thiscall)] to the crate attributes to enable @@ -321,7 +321,7 @@ error[E0658]: thiscall is experimental and 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 +LL | type A1 = extern "rust-intrinsic" fn(); //~ ERROR intrinsics are subject to change | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(intrinsics)] to the crate attributes to enable @@ -329,7 +329,7 @@ error[E0658]: intrinsics are subject to change 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 +LL | type A2 = extern "platform-intrinsic" fn(); //~ ERROR platform intrinsics are experimental | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(platform_intrinsics)] to the crate attributes to enable @@ -337,7 +337,7 @@ error[E0658]: platform intrinsics are experimental and possibly buggy (see issue 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 +LL | type A3 = extern "vectorcall" fn(); //~ ERROR vectorcall is experimental and subject to change | ^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(abi_vectorcall)] to the crate attributes to enable @@ -345,7 +345,7 @@ error[E0658]: vectorcall is experimental and subject to change 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 +LL | type A4 = extern "rust-call" fn(); //~ ERROR rust-call ABI is subject to change | ^^^^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(unboxed_closures)] to the crate attributes to enable @@ -353,7 +353,7 @@ error[E0658]: rust-call ABI is subject to change (see issue #29625) 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 +LL | type A5 = extern "msp430-interrupt" fn(); //~ ERROR msp430-interrupt ABI is experimental | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(abi_msp430_interrupt)] to the crate attributes to enable @@ -361,7 +361,7 @@ error[E0658]: msp430-interrupt ABI is experimental and subject to change (see is 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 +LL | type A6 = extern "ptx-kernel" fn (); //~ ERROR PTX ABIs are experimental and subject to change | ^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(abi_ptx)] to the crate attributes to enable @@ -369,7 +369,7 @@ error[E0658]: PTX ABIs are experimental and subject to change 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 +LL | type A7 = extern "x86-interrupt" fn(); //~ ERROR x86-interrupt ABI is experimental | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(abi_x86_interrupt)] to the crate attributes to enable @@ -377,7 +377,7 @@ error[E0658]: x86-interrupt ABI is experimental and subject to change (see issue 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 +LL | type A8 = extern "thiscall" fn(); //~ ERROR thiscall is experimental and subject to change | ^^^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(abi_thiscall)] to the crate attributes to enable @@ -385,7 +385,7 @@ error[E0658]: thiscall is experimental and 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 +LL | extern "rust-intrinsic" {} //~ ERROR intrinsics are subject to change | ^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(intrinsics)] to the crate attributes to enable @@ -393,7 +393,7 @@ error[E0658]: intrinsics are subject to change 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 +LL | extern "platform-intrinsic" {} //~ ERROR platform intrinsics are experimental | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(platform_intrinsics)] to the crate attributes to enable @@ -401,7 +401,7 @@ error[E0658]: platform intrinsics are experimental and possibly buggy (see issue 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 +LL | extern "vectorcall" {} //~ ERROR vectorcall is experimental and subject to change | ^^^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(abi_vectorcall)] to the crate attributes to enable @@ -409,7 +409,7 @@ error[E0658]: vectorcall is experimental and subject to change 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 +LL | extern "rust-call" {} //~ ERROR rust-call ABI is subject to change | ^^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(unboxed_closures)] to the crate attributes to enable @@ -417,7 +417,7 @@ error[E0658]: rust-call ABI is subject to change (see issue #29625) 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 +LL | extern "msp430-interrupt" {} //~ ERROR msp430-interrupt ABI is experimental | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(abi_msp430_interrupt)] to the crate attributes to enable @@ -425,7 +425,7 @@ error[E0658]: msp430-interrupt ABI is experimental and subject to change (see is 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 +LL | extern "ptx-kernel" {} //~ ERROR PTX ABIs are experimental and subject to change | ^^^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(abi_ptx)] to the crate attributes to enable @@ -433,7 +433,7 @@ error[E0658]: PTX ABIs are experimental and subject to change 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 +LL | extern "x86-interrupt" {} //~ ERROR x86-interrupt ABI is experimental | ^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(abi_x86_interrupt)] to the crate attributes to enable @@ -441,7 +441,7 @@ error[E0658]: x86-interrupt ABI is experimental and subject to change (see issue 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 +LL | extern "thiscall" {} //~ ERROR thiscall is experimental and subject to change | ^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(abi_thiscall)] to the crate attributes to enable diff --git a/src/test/ui/feature-gate-abi_unadjusted.stderr b/src/test/ui/feature-gate-abi_unadjusted.stderr index b3f7cd218d3e9..64e6e8f420c8d 100644 --- a/src/test/ui/feature-gate-abi_unadjusted.stderr +++ b/src/test/ui/feature-gate-abi_unadjusted.stderr @@ -1,9 +1,9 @@ error[E0658]: unadjusted ABI is an implementation detail and perma-unstable --> $DIR/feature-gate-abi_unadjusted.rs:11:1 | -11 | / extern "unadjusted" fn foo() { -12 | | //~^ ERROR: unadjusted ABI is an implementation detail and perma-unstable -13 | | } +LL | / extern "unadjusted" fn foo() { +LL | | //~^ ERROR: unadjusted ABI is an implementation detail and perma-unstable +LL | | } | |_^ | = help: add #![feature(abi_unadjusted)] to the crate attributes to enable diff --git a/src/test/ui/feature-gate-advanced-slice-features.stderr b/src/test/ui/feature-gate-advanced-slice-features.stderr index 63ede50e1ea3a..5f0ae32f9385d 100644 --- a/src/test/ui/feature-gate-advanced-slice-features.stderr +++ b/src/test/ui/feature-gate-advanced-slice-features.stderr @@ -1,7 +1,7 @@ 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 +LL | [ xs.., 4, 5 ] => {} //~ ERROR multiple-element slice matches | ^^^^^^^^^^^^^^ | = help: add #![feature(advanced_slice_patterns)] to the crate attributes to enable @@ -9,7 +9,7 @@ error[E0658]: multiple-element slice matches anywhere but at the end of a slice 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 +LL | [ 1, xs.., 5 ] => {} //~ ERROR multiple-element slice matches | ^^^^^^^^^^^^^^ | = help: add #![feature(advanced_slice_patterns)] to the crate attributes to enable diff --git a/src/test/ui/feature-gate-allocator_internals.stderr b/src/test/ui/feature-gate-allocator_internals.stderr index 76d96f929bec1..6ac8bbd752943 100644 --- a/src/test/ui/feature-gate-allocator_internals.stderr +++ b/src/test/ui/feature-gate-allocator_internals.stderr @@ -1,7 +1,7 @@ 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 +LL | #![default_lib_allocator] //~ ERROR: attribute is an experimental feature | ^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(allocator_internals)] to the crate attributes to enable 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 31de8d7628556..56bb20f97947f 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,10 +1,10 @@ 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 +LL | #[allow_internal_unsafe] //~ ERROR allow_internal_unsafe side-steps | ^^^^^^^^^^^^^^^^^^^^^^^^ ... -25 | bar!(); +LL | bar!(); | ------- in this macro invocation | = help: add #![feature(allow_internal_unsafe)] to the crate attributes to enable 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 3e2573eda21cb..7ca2c1ff126a4 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,10 +1,10 @@ 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 +LL | #[allow_internal_unstable] //~ ERROR allow_internal_unstable side-steps | ^^^^^^^^^^^^^^^^^^^^^^^^^^ ... -25 | bar!(); +LL | bar!(); | ------- in this macro invocation | = help: add #![feature(allow_internal_unstable)] to the crate attributes to enable 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 e19f3288e8163..c9ad0993fe4bf 100644 --- a/src/test/ui/feature-gate-allow-internal-unstable-struct.stderr +++ b/src/test/ui/feature-gate-allow-internal-unstable-struct.stderr @@ -1,7 +1,7 @@ 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 +LL | #[allow_internal_unstable] //~ ERROR allow_internal_unstable side-steps | ^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(allow_internal_unstable)] to the crate attributes to enable diff --git a/src/test/ui/feature-gate-allow-internal-unstable.stderr b/src/test/ui/feature-gate-allow-internal-unstable.stderr index f110afb35a034..bb5235db9e463 100644 --- a/src/test/ui/feature-gate-allow-internal-unstable.stderr +++ b/src/test/ui/feature-gate-allow-internal-unstable.stderr @@ -1,7 +1,7 @@ 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 +LL | #[allow_internal_unstable] //~ ERROR allow_internal_unstable side-steps | ^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(allow_internal_unstable)] to the crate attributes to enable diff --git a/src/test/ui/feature-gate-allow_fail.stderr b/src/test/ui/feature-gate-allow_fail.stderr index e04f44886dd2e..8df109a00fa57 100644 --- a/src/test/ui/feature-gate-allow_fail.stderr +++ b/src/test/ui/feature-gate-allow_fail.stderr @@ -1,7 +1,7 @@ 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 +LL | #[allow_fail] //~ ERROR allow_fail attribute is currently unstable | ^^^^^^^^^^^^^ | = help: add #![feature(allow_fail)] to the crate attributes to enable diff --git a/src/test/ui/feature-gate-arbitrary-self-types.stderr b/src/test/ui/feature-gate-arbitrary-self-types.stderr index ca47d40dc8f86..6672396d7f7e5 100644 --- a/src/test/ui/feature-gate-arbitrary-self-types.stderr +++ b/src/test/ui/feature-gate-arbitrary-self-types.stderr @@ -1,7 +1,7 @@ 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 +LL | fn foo(self: Rc>); //~ ERROR arbitrary `self` types are unstable | ^^^^^^^^^^^^^ | = help: add #![feature(arbitrary_self_types)] to the crate attributes to enable @@ -10,7 +10,7 @@ error[E0658]: 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 +LL | fn foo(self: Rc>) {} //~ ERROR arbitrary `self` types are unstable | ^^^^^^^^^^^^^ | = help: add #![feature(arbitrary_self_types)] to the crate attributes to enable @@ -19,7 +19,7 @@ error[E0658]: 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 +LL | fn bar(self: Box>) {} //~ ERROR arbitrary `self` types are unstable | ^^^^^^^^^^^^^ | = help: add #![feature(arbitrary_self_types)] to the crate attributes to enable 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 33e8806678d66..0354754044c2a 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,7 +1,7 @@ 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); +LL | fn bar(self: *const Self); | ^^^^^^^^^^^ | = help: add #![feature(arbitrary_self_types)] to the crate attributes to enable @@ -10,7 +10,7 @@ error[E0658]: 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) {} +LL | fn foo(self: *const Self) {} | ^^^^^^^^^^^ | = help: add #![feature(arbitrary_self_types)] to the crate attributes to enable @@ -19,7 +19,7 @@ error[E0658]: 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) {} +LL | fn bar(self: *const Self) {} | ^^^^^^^^^^^ | = help: add #![feature(arbitrary_self_types)] to the crate attributes to enable diff --git a/src/test/ui/feature-gate-asm.stderr b/src/test/ui/feature-gate-asm.stderr index 481e6dc7055cc..53883f55664aa 100644 --- a/src/test/ui/feature-gate-asm.stderr +++ b/src/test/ui/feature-gate-asm.stderr @@ -1,7 +1,7 @@ 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 +LL | asm!(""); //~ ERROR inline assembly is not stable enough | ^^^^^^^^^ | = help: add #![feature(asm)] to the crate attributes to enable diff --git a/src/test/ui/feature-gate-asm2.stderr b/src/test/ui/feature-gate-asm2.stderr index aba0f72d35c1d..97e9a076fbb48 100644 --- a/src/test/ui/feature-gate-asm2.stderr +++ b/src/test/ui/feature-gate-asm2.stderr @@ -1,7 +1,7 @@ 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 +LL | println!("{}", asm!("")); //~ ERROR inline assembly is not stable | ^^^^^^^^ | = help: add #![feature(asm)] to the crate attributes to enable diff --git a/src/test/ui/feature-gate-assoc-type-defaults.stderr b/src/test/ui/feature-gate-assoc-type-defaults.stderr index 1d44797cddc9b..4a1a73bb8cf1e 100644 --- a/src/test/ui/feature-gate-assoc-type-defaults.stderr +++ b/src/test/ui/feature-gate-assoc-type-defaults.stderr @@ -1,7 +1,7 @@ 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 +LL | type Bar = u8; //~ ERROR associated type defaults are unstable | ^^^^^^^^^^^^^^ | = help: add #![feature(associated_type_defaults)] to the crate attributes to enable diff --git a/src/test/ui/feature-gate-box-expr.stderr b/src/test/ui/feature-gate-box-expr.stderr index f9cccde376158..ab5ba29ce788d 100644 --- a/src/test/ui/feature-gate-box-expr.stderr +++ b/src/test/ui/feature-gate-box-expr.stderr @@ -1,7 +1,7 @@ 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 +LL | let x = box 'c'; //~ ERROR box expression syntax is experimental | ^^^^^^^ | = help: add #![feature(box_syntax)] to the crate attributes to enable diff --git a/src/test/ui/feature-gate-box_patterns.stderr b/src/test/ui/feature-gate-box_patterns.stderr index ca009331b69c6..b89506ec3e7db 100644 --- a/src/test/ui/feature-gate-box_patterns.stderr +++ b/src/test/ui/feature-gate-box_patterns.stderr @@ -1,7 +1,7 @@ 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 +LL | let box x = Box::new('c'); //~ ERROR box pattern syntax is experimental | ^^^^^ | = help: add #![feature(box_patterns)] to the crate attributes to enable diff --git a/src/test/ui/feature-gate-box_syntax.stderr b/src/test/ui/feature-gate-box_syntax.stderr index eefaa724650da..798b40c4ea23f 100644 --- a/src/test/ui/feature-gate-box_syntax.stderr +++ b/src/test/ui/feature-gate-box_syntax.stderr @@ -1,7 +1,7 @@ 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; +LL | let x = box 3; | ^^^^^ | = help: add #![feature(box_syntax)] to the crate attributes to enable diff --git a/src/test/ui/feature-gate-catch_expr.stderr b/src/test/ui/feature-gate-catch_expr.stderr index 4b3bfbbe27ac8..f6f0c64a66918 100644 --- a/src/test/ui/feature-gate-catch_expr.stderr +++ b/src/test/ui/feature-gate-catch_expr.stderr @@ -1,11 +1,11 @@ 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 +LL | let catch_result = do catch { //~ ERROR `catch` expression is experimental | ________________________^ -13 | | let x = 5; -14 | | x -15 | | }; +LL | | let x = 5; +LL | | x +LL | | }; | |_____^ | = help: add #![feature(catch_expr)] to the crate attributes to enable diff --git a/src/test/ui/feature-gate-cfg-target-feature.stderr b/src/test/ui/feature-gate-cfg-target-feature.stderr index f808e78acce1a..5939faaede76c 100644 --- a/src/test/ui/feature-gate-cfg-target-feature.stderr +++ b/src/test/ui/feature-gate-cfg-target-feature.stderr @@ -1,7 +1,7 @@ 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 +LL | #[cfg_attr(target_feature = "x", x)] //~ ERROR `cfg(target_feature)` is experimental | ^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(cfg_target_feature)] to the crate attributes to enable @@ -9,7 +9,7 @@ error[E0658]: `cfg(target_feature)` is experimental and subject to change (see i 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 +LL | #[cfg(target_feature = "x")] //~ ERROR `cfg(target_feature)` is experimental | ^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(cfg_target_feature)] to the crate attributes to enable @@ -17,7 +17,7 @@ error[E0658]: `cfg(target_feature)` is experimental and subject to change (see i 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 +LL | #[cfg(not(any(all(target_feature = "x"))))] //~ ERROR `cfg(target_feature)` is experimental | ^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(cfg_target_feature)] to the crate attributes to enable @@ -25,7 +25,7 @@ error[E0658]: `cfg(target_feature)` is experimental and subject to change (see i 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"); +LL | cfg!(target_feature = "x"); | ^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(cfg_target_feature)] to the crate attributes to enable 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 ace23b38d2dc5..05894ae928446 100644 --- a/src/test/ui/feature-gate-cfg-target-has-atomic.stderr +++ b/src/test/ui/feature-gate-cfg-target-has-atomic.stderr @@ -1,7 +1,7 @@ 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")] +LL | #[cfg(target_has_atomic = "8")] | ^^^^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(cfg_target_has_atomic)] to the crate attributes to enable @@ -9,7 +9,7 @@ error[E0658]: `cfg(target_has_atomic)` is experimental and subject to change (se 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")] +LL | #[cfg(target_has_atomic = "8")] | ^^^^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(cfg_target_has_atomic)] to the crate attributes to enable @@ -17,7 +17,7 @@ error[E0658]: `cfg(target_has_atomic)` is experimental and subject to change (se 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")] +LL | #[cfg(target_has_atomic = "16")] | ^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(cfg_target_has_atomic)] to the crate attributes to enable @@ -25,7 +25,7 @@ error[E0658]: `cfg(target_has_atomic)` is experimental and subject to change (se 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")] +LL | #[cfg(target_has_atomic = "16")] | ^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(cfg_target_has_atomic)] to the crate attributes to enable @@ -33,7 +33,7 @@ error[E0658]: `cfg(target_has_atomic)` is experimental and subject to change (se 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")] +LL | #[cfg(target_has_atomic = "32")] | ^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(cfg_target_has_atomic)] to the crate attributes to enable @@ -41,7 +41,7 @@ error[E0658]: `cfg(target_has_atomic)` is experimental and subject to change (se 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")] +LL | #[cfg(target_has_atomic = "32")] | ^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(cfg_target_has_atomic)] to the crate attributes to enable @@ -49,7 +49,7 @@ error[E0658]: `cfg(target_has_atomic)` is experimental and subject to change (se 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")] +LL | #[cfg(target_has_atomic = "64")] | ^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(cfg_target_has_atomic)] to the crate attributes to enable @@ -57,7 +57,7 @@ error[E0658]: `cfg(target_has_atomic)` is experimental and subject to change (se 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")] +LL | #[cfg(target_has_atomic = "64")] | ^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(cfg_target_has_atomic)] to the crate attributes to enable @@ -65,7 +65,7 @@ error[E0658]: `cfg(target_has_atomic)` is experimental and subject to change (se 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")] +LL | #[cfg(target_has_atomic = "ptr")] | ^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(cfg_target_has_atomic)] to the crate attributes to enable @@ -73,7 +73,7 @@ error[E0658]: `cfg(target_has_atomic)` is experimental and subject to change (se 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")] +LL | #[cfg(target_has_atomic = "ptr")] | ^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(cfg_target_has_atomic)] to the crate attributes to enable @@ -81,7 +81,7 @@ error[E0658]: `cfg(target_has_atomic)` is experimental and subject to change (se 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"); +LL | cfg!(target_has_atomic = "8"); | ^^^^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(cfg_target_has_atomic)] to the crate attributes to enable @@ -89,7 +89,7 @@ error[E0658]: `cfg(target_has_atomic)` is experimental and subject to change (se 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"); +LL | cfg!(target_has_atomic = "16"); | ^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(cfg_target_has_atomic)] to the crate attributes to enable @@ -97,7 +97,7 @@ error[E0658]: `cfg(target_has_atomic)` is experimental and subject to change (se 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"); +LL | cfg!(target_has_atomic = "32"); | ^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(cfg_target_has_atomic)] to the crate attributes to enable @@ -105,7 +105,7 @@ error[E0658]: `cfg(target_has_atomic)` is experimental and subject to change (se 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"); +LL | cfg!(target_has_atomic = "64"); | ^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(cfg_target_has_atomic)] to the crate attributes to enable @@ -113,7 +113,7 @@ error[E0658]: `cfg(target_has_atomic)` is experimental and subject to change (se 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"); +LL | cfg!(target_has_atomic = "ptr"); | ^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(cfg_target_has_atomic)] to the crate attributes to enable 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 a0a03bdcd4696..98f696cca1ffc 100644 --- a/src/test/ui/feature-gate-cfg-target-thread-local.stderr +++ b/src/test/ui/feature-gate-cfg-target-thread-local.stderr @@ -1,7 +1,7 @@ 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)] +LL | #[cfg_attr(target_thread_local, thread_local)] | ^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(cfg_target_thread_local)] to the crate attributes to enable diff --git a/src/test/ui/feature-gate-cfg-target-vendor.stderr b/src/test/ui/feature-gate-cfg-target-vendor.stderr index 3e4a74636f923..cc0e489f3dcf0 100644 --- a/src/test/ui/feature-gate-cfg-target-vendor.stderr +++ b/src/test/ui/feature-gate-cfg-target-vendor.stderr @@ -1,7 +1,7 @@ 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 +LL | #[cfg_attr(target_vendor = "x", x)] //~ ERROR `cfg(target_vendor)` is experimental | ^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(cfg_target_vendor)] to the crate attributes to enable @@ -9,7 +9,7 @@ error[E0658]: `cfg(target_vendor)` is experimental and subject to change (see is 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 +LL | #[cfg(target_vendor = "x")] //~ ERROR `cfg(target_vendor)` is experimental | ^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(cfg_target_vendor)] to the crate attributes to enable @@ -17,7 +17,7 @@ error[E0658]: `cfg(target_vendor)` is experimental and subject to change (see is 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 +LL | #[cfg(not(any(all(target_vendor = "x"))))] //~ ERROR `cfg(target_vendor)` is experimental | ^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(cfg_target_vendor)] to the crate attributes to enable @@ -25,7 +25,7 @@ error[E0658]: `cfg(target_vendor)` is experimental and subject to change (see is 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"); +LL | cfg!(target_vendor = "x"); | ^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(cfg_target_vendor)] to the crate attributes to enable diff --git a/src/test/ui/feature-gate-clone-closures.stderr b/src/test/ui/feature-gate-clone-closures.stderr index 3e07aa1744080..22671b4e110a5 100644 --- a/src/test/ui/feature-gate-clone-closures.stderr +++ b/src/test/ui/feature-gate-clone-closures.stderr @@ -1,7 +1,7 @@ error[E0599]: no method named `clone` found for type `[closure@$DIR/feature-gate-clone-closures.rs:16:17: 18:6 a:_]` in the current scope --> $DIR/feature-gate-clone-closures.rs:20:23 | -20 | let hello = hello.clone(); //~ ERROR no method named `clone` found for type +LL | let hello = hello.clone(); //~ ERROR no method named `clone` found for type | ^^^^^ | = note: hello is a function, perhaps you wish to call it diff --git a/src/test/ui/feature-gate-compiler-builtins.stderr b/src/test/ui/feature-gate-compiler-builtins.stderr index edb3c5d62aeed..d3df1677b81a1 100644 --- a/src/test/ui/feature-gate-compiler-builtins.stderr +++ b/src/test/ui/feature-gate-compiler-builtins.stderr @@ -1,7 +1,7 @@ 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 +LL | #![compiler_builtins] //~ ERROR the `#[compiler_builtins]` attribute is | ^^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(compiler_builtins)] to the crate attributes to enable diff --git a/src/test/ui/feature-gate-concat_idents.stderr b/src/test/ui/feature-gate-concat_idents.stderr index d0a07e3d3c9ed..1e102b4ab55d6 100644 --- a/src/test/ui/feature-gate-concat_idents.stderr +++ b/src/test/ui/feature-gate-concat_idents.stderr @@ -1,7 +1,7 @@ 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 +LL | let a = concat_idents!(X, Y_1); //~ ERROR `concat_idents` is not stable | ^^^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(concat_idents)] to the crate attributes to enable @@ -9,7 +9,7 @@ error[E0658]: `concat_idents` is not stable enough for use and is subject to cha 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 +LL | let b = concat_idents!(X, Y_2); //~ ERROR `concat_idents` is not stable | ^^^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(concat_idents)] to the crate attributes to enable diff --git a/src/test/ui/feature-gate-concat_idents2.stderr b/src/test/ui/feature-gate-concat_idents2.stderr index 0ef6921c64d8b..4aac1302d4b51 100644 --- a/src/test/ui/feature-gate-concat_idents2.stderr +++ b/src/test/ui/feature-gate-concat_idents2.stderr @@ -1,7 +1,7 @@ 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 +LL | concat_idents!(a, b); //~ ERROR `concat_idents` is not stable enough | ^^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(concat_idents)] to the crate attributes to enable diff --git a/src/test/ui/feature-gate-concat_idents3.stderr b/src/test/ui/feature-gate-concat_idents3.stderr index a9a1e493a45f7..848db50bd0fe2 100644 --- a/src/test/ui/feature-gate-concat_idents3.stderr +++ b/src/test/ui/feature-gate-concat_idents3.stderr @@ -1,7 +1,7 @@ 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 +LL | assert_eq!(10, concat_idents!(X, Y_1)); //~ ERROR `concat_idents` is not stable | ^^^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(concat_idents)] to the crate attributes to enable @@ -9,7 +9,7 @@ error[E0658]: `concat_idents` is not stable enough for use and is subject to cha 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 +LL | assert_eq!(20, concat_idents!(X, Y_2)); //~ ERROR `concat_idents` is not stable | ^^^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(concat_idents)] to the crate attributes to enable diff --git a/src/test/ui/feature-gate-conservative_impl_trait.stderr b/src/test/ui/feature-gate-conservative_impl_trait.stderr index f3d39477387a4..29314f63b2b68 100644 --- a/src/test/ui/feature-gate-conservative_impl_trait.stderr +++ b/src/test/ui/feature-gate-conservative_impl_trait.stderr @@ -1,7 +1,7 @@ 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() { || {} } +LL | fn foo() -> impl Fn() { || {} } | ^^^^^^^^^ | = help: add #![feature(conservative_impl_trait)] to the crate attributes to enable diff --git a/src/test/ui/feature-gate-const-indexing.stderr b/src/test/ui/feature-gate-const-indexing.stderr index bc4b687800d75..a6f21debc65b2 100644 --- a/src/test/ui/feature-gate-const-indexing.stderr +++ b/src/test/ui/feature-gate-const-indexing.stderr @@ -1,7 +1,7 @@ error[E0080]: constant evaluation error --> $DIR/feature-gate-const-indexing.rs:16:24 | -16 | const BLUB: [i32; (ARR[0] - 41) as usize] = [5]; //~ ERROR constant evaluation error +LL | const BLUB: [i32; (ARR[0] - 41) as usize] = [5]; //~ ERROR constant evaluation error | ^^^^^^ the index operation on const values is unstable error: aborting due to previous error diff --git a/src/test/ui/feature-gate-const_fn.stderr b/src/test/ui/feature-gate-const_fn.stderr index ecd1ff5a6c455..5ce90f6c6f38a 100644 --- a/src/test/ui/feature-gate-const_fn.stderr +++ b/src/test/ui/feature-gate-const_fn.stderr @@ -1,25 +1,25 @@ error[E0379]: trait fns cannot be declared const --> $DIR/feature-gate-const_fn.rs:16:5 | -16 | const fn foo() -> u32; //~ ERROR const fn is unstable +LL | const fn foo() -> u32; //~ ERROR const fn is unstable | ^^^^^ trait fns cannot be const error[E0379]: trait fns cannot be declared const --> $DIR/feature-gate-const_fn.rs:18:5 | -18 | const fn bar() -> u32 { 0 } //~ ERROR const fn is unstable +LL | const fn bar() -> u32 { 0 } //~ ERROR const fn is unstable | ^^^^^ trait fns cannot be const error[E0379]: trait fns cannot be declared const --> $DIR/feature-gate-const_fn.rs:27:5 | -27 | const fn foo() -> u32 { 0 } //~ ERROR const fn is unstable +LL | const fn foo() -> u32 { 0 } //~ ERROR const fn is unstable | ^^^^^ trait fns cannot be const 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 +LL | const fn foo() -> usize { 0 } //~ ERROR const fn is unstable | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(const_fn)] to the crate attributes to enable @@ -27,7 +27,7 @@ error[E0658]: 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 +LL | const fn foo() -> u32; //~ ERROR const fn is unstable | ^^^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(const_fn)] to the crate attributes to enable @@ -35,7 +35,7 @@ error[E0658]: 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 +LL | const fn bar() -> u32 { 0 } //~ ERROR const fn is unstable | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(const_fn)] to the crate attributes to enable @@ -43,7 +43,7 @@ error[E0658]: 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 +LL | const fn baz() -> u32 { 0 } //~ ERROR const fn is unstable | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(const_fn)] to the crate attributes to enable @@ -51,7 +51,7 @@ error[E0658]: 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 +LL | const fn foo() -> u32 { 0 } //~ ERROR const fn is unstable | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(const_fn)] to the crate attributes to enable diff --git a/src/test/ui/feature-gate-copy-closures.stderr b/src/test/ui/feature-gate-copy-closures.stderr index 9b324672f2246..f3252bd21cfd0 100644 --- a/src/test/ui/feature-gate-copy-closures.stderr +++ b/src/test/ui/feature-gate-copy-closures.stderr @@ -1,9 +1,9 @@ error[E0382]: use of moved value: `hello` --> $DIR/feature-gate-copy-closures.rs:18:9 | -17 | let b = hello; +LL | let b = hello; | - value moved here -18 | let c = hello; //~ ERROR use of moved value: `hello` [E0382] +LL | let c = hello; //~ ERROR use of moved value: `hello` [E0382] | ^ value used here after move | = note: move occurs because `hello` has type `[closure@$DIR/feature-gate-copy-closures.rs:13:17: 15:6 a:&i32]`, which does not implement the `Copy` trait diff --git a/src/test/ui/feature-gate-crate_in_paths.stderr b/src/test/ui/feature-gate-crate_in_paths.stderr index 322a38a996f77..7a83ad7786276 100644 --- a/src/test/ui/feature-gate-crate_in_paths.stderr +++ b/src/test/ui/feature-gate-crate_in_paths.stderr @@ -1,7 +1,7 @@ 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 +LL | let _ = ::crate::S; //~ ERROR `crate` in paths is experimental | ^^^^^ | = help: add #![feature(crate_in_paths)] to the crate attributes to enable diff --git a/src/test/ui/feature-gate-crate_visibility_modifier.stderr b/src/test/ui/feature-gate-crate_visibility_modifier.stderr index fadc76bc0c036..9de89fcbca742 100644 --- a/src/test/ui/feature-gate-crate_visibility_modifier.stderr +++ b/src/test/ui/feature-gate-crate_visibility_modifier.stderr @@ -1,7 +1,7 @@ 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 +LL | crate struct Bender { //~ ERROR `crate` visibility modifier is experimental | ^^^^^ | = help: add #![feature(crate_visibility_modifier)] to the crate attributes to enable diff --git a/src/test/ui/feature-gate-custom_attribute.stderr b/src/test/ui/feature-gate-custom_attribute.stderr index f4d726c8c41c9..190dff07d6aed 100644 --- a/src/test/ui/feature-gate-custom_attribute.stderr +++ b/src/test/ui/feature-gate-custom_attribute.stderr @@ -1,7 +1,7 @@ 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 +LL | #[fake_attr] //~ ERROR attribute `fake_attr` is currently unknown | ^^^^^^^^^^^^ | = help: add #![feature(custom_attribute)] to the crate attributes to enable @@ -9,7 +9,7 @@ error[E0658]: The attribute `fake_attr` is currently unknown to the compiler and 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 +LL | #[fake_attr(100)] //~ ERROR attribute `fake_attr` is currently unknown | ^^^^^^^^^^^^^^^^^ | = help: add #![feature(custom_attribute)] to the crate attributes to enable @@ -17,7 +17,7 @@ error[E0658]: The attribute `fake_attr` is currently unknown to the compiler and 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 +LL | #[fake_attr(1, 2, 3)] //~ ERROR attribute `fake_attr` is currently unknown | ^^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(custom_attribute)] to the crate attributes to enable @@ -25,7 +25,7 @@ error[E0658]: The attribute `fake_attr` is currently unknown to the compiler and 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 +LL | #[fake_attr("hello")] //~ ERROR attribute `fake_attr` is currently unknown | ^^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(custom_attribute)] to the crate attributes to enable @@ -33,7 +33,7 @@ error[E0658]: The attribute `fake_attr` is currently unknown to the compiler and 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 +LL | #[fake_attr(name = "hello")] //~ ERROR attribute `fake_attr` is currently unknown | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(custom_attribute)] to the crate attributes to enable @@ -41,7 +41,7 @@ error[E0658]: The attribute `fake_attr` is currently unknown to the compiler and 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 +LL | #[fake_attr(1, "hi", key = 12, true, false)] //~ ERROR attribute `fake_attr` is currently unknown | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(custom_attribute)] to the crate attributes to enable @@ -49,7 +49,7 @@ error[E0658]: The attribute `fake_attr` is currently unknown to the compiler and 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 +LL | #[fake_attr(key = "hello", val = 10)] //~ ERROR attribute `fake_attr` is currently unknown | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(custom_attribute)] to the crate attributes to enable @@ -57,7 +57,7 @@ error[E0658]: The attribute `fake_attr` is currently unknown to the compiler and 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 +LL | #[fake_attr(key("hello"), val(10))] //~ ERROR attribute `fake_attr` is currently unknown | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(custom_attribute)] to the crate attributes to enable @@ -65,7 +65,7 @@ error[E0658]: The attribute `fake_attr` is currently unknown to the compiler and 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 +LL | #[fake_attr(enabled = true, disabled = false)] //~ ERROR attribute `fake_attr` is currently unknown | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(custom_attribute)] to the crate attributes to enable @@ -73,7 +73,7 @@ error[E0658]: The attribute `fake_attr` is currently unknown to the compiler and 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 +LL | #[fake_attr(true)] //~ ERROR attribute `fake_attr` is currently unknown | ^^^^^^^^^^^^^^^^^^ | = help: add #![feature(custom_attribute)] to the crate attributes to enable @@ -81,7 +81,7 @@ error[E0658]: The attribute `fake_attr` is currently unknown to the compiler and 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 +LL | #[fake_attr(pi = 3.14159)] //~ ERROR attribute `fake_attr` is currently unknown | ^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(custom_attribute)] to the crate attributes to enable @@ -89,7 +89,7 @@ error[E0658]: The attribute `fake_attr` is currently unknown to the compiler and 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 +LL | #[fake_attr(b"hi")] //~ ERROR attribute `fake_attr` is currently unknown | ^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(custom_attribute)] to the crate attributes to enable @@ -97,7 +97,7 @@ error[E0658]: The attribute `fake_attr` is currently unknown to the compiler and 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 +LL | #[fake_doc(r"doc")] //~ ERROR attribute `fake_doc` is currently unknown | ^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(custom_attribute)] to the crate attributes to enable diff --git a/src/test/ui/feature-gate-custom_attribute2.stderr b/src/test/ui/feature-gate-custom_attribute2.stderr index 08878e172042b..eae99d0afd0ac 100644 --- a/src/test/ui/feature-gate-custom_attribute2.stderr +++ b/src/test/ui/feature-gate-custom_attribute2.stderr @@ -1,7 +1,7 @@ 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); +LL | struct StLt<#[lt_struct] 'a>(&'a u32); | ^^^^^^^^^^^^ | = help: add #![feature(custom_attribute)] to the crate attributes to enable @@ -9,7 +9,7 @@ error[E0658]: The attribute `lt_struct` is currently unknown to the compiler and 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); +LL | struct StTy<#[ty_struct] I>(I); | ^^^^^^^^^^^^ | = help: add #![feature(custom_attribute)] to the crate attributes to enable @@ -17,7 +17,7 @@ error[E0658]: The attribute `ty_struct` is currently unknown to the compiler and 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 } +LL | enum EnLt<#[lt_enum] 'b> { A(&'b u32), B } | ^^^^^^^^^^ | = help: add #![feature(custom_attribute)] to the crate attributes to enable @@ -25,7 +25,7 @@ error[E0658]: The attribute `lt_enum` is currently unknown to the compiler and m 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 } +LL | enum EnTy<#[ty_enum] J> { A(J), B } | ^^^^^^^^^^ | = help: add #![feature(custom_attribute)] to the crate attributes to enable @@ -33,7 +33,7 @@ error[E0658]: The attribute `ty_enum` is currently unknown to the compiler and m 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; } +LL | trait TrLt<#[lt_trait] 'c> { fn foo(&self, _: &'c [u32]) -> &'c u32; } | ^^^^^^^^^^^ | = help: add #![feature(custom_attribute)] to the crate attributes to enable @@ -41,7 +41,7 @@ error[E0658]: The attribute `lt_trait` is currently unknown to the compiler and 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); } +LL | trait TrTy<#[ty_trait] K> { fn foo(&self, _: K); } | ^^^^^^^^^^^ | = help: add #![feature(custom_attribute)] to the crate attributes to enable @@ -49,7 +49,7 @@ error[E0658]: The attribute `ty_trait` is currently unknown to the compiler and 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; +LL | type TyLt<#[lt_type] 'd> = &'d u32; | ^^^^^^^^^^ | = help: add #![feature(custom_attribute)] to the crate attributes to enable @@ -57,7 +57,7 @@ error[E0658]: The attribute `lt_type` is currently unknown to the compiler and m 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, ); +LL | type TyTy<#[ty_type] L> = (L, ); | ^^^^^^^^^^ | = help: add #![feature(custom_attribute)] to the crate attributes to enable @@ -65,7 +65,7 @@ error[E0658]: The attribute `ty_type` is currently unknown to the compiler and m 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> { } +LL | impl<#[lt_inherent] 'e> StLt<'e> { } | ^^^^^^^^^^^^^^ | = help: add #![feature(custom_attribute)] to the crate attributes to enable @@ -73,7 +73,7 @@ error[E0658]: The attribute `lt_inherent` is currently unknown to the compiler a 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 { } +LL | impl<#[ty_inherent] M> StTy { } | ^^^^^^^^^^^^^^ | = help: add #![feature(custom_attribute)] to the crate attributes to enable @@ -81,7 +81,7 @@ error[E0658]: The attribute `ty_inherent` is currently unknown to the compiler a 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> { +LL | impl<#[lt_impl_for] 'f> TrLt<'f> for StLt<'f> { | ^^^^^^^^^^^^^^ | = help: add #![feature(custom_attribute)] to the crate attributes to enable @@ -89,7 +89,7 @@ error[E0658]: The attribute `lt_impl_for` is currently unknown to the compiler a 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 { +LL | impl<#[ty_impl_for] N> TrTy for StTy { | ^^^^^^^^^^^^^^ | = help: add #![feature(custom_attribute)] to the crate attributes to enable @@ -97,7 +97,7 @@ error[E0658]: The attribute `ty_impl_for` is currently unknown to the compiler a 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 { } } +LL | fn f_lt<#[lt_fn] 'g>(_: &'g [u32]) -> &'g u32 { loop { } } | ^^^^^^^^ | = help: add #![feature(custom_attribute)] to the crate attributes to enable @@ -105,7 +105,7 @@ error[E0658]: The attribute `lt_fn` is currently unknown to the compiler and may 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) { } +LL | fn f_ty<#[ty_fn] O>(_: O) { } | ^^^^^^^^ | = help: add #![feature(custom_attribute)] to the crate attributes to enable @@ -113,7 +113,7 @@ error[E0658]: The attribute `ty_fn` is currently unknown to the compiler and may 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 { } } +LL | fn m_lt<#[lt_meth] 'h>(_: &'h [u32]) -> &'h u32 { loop { } } | ^^^^^^^^^^ | = help: add #![feature(custom_attribute)] to the crate attributes to enable @@ -121,7 +121,7 @@ error[E0658]: The attribute `lt_meth` is currently unknown to the compiler and m 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) { } +LL | fn m_ty<#[ty_meth] P>(_: P) { } | ^^^^^^^^^^ | = help: add #![feature(custom_attribute)] to the crate attributes to enable @@ -129,7 +129,7 @@ error[E0658]: The attribute `ty_meth` is currently unknown to the compiler and m 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 +LL | where Q: for <#[lt_hof] 'i> Fn(&'i [u32]) -> &'i u32 | ^^^^^^^^^ | = help: add #![feature(custom_attribute)] to the crate attributes to enable diff --git a/src/test/ui/feature-gate-custom_derive.stderr b/src/test/ui/feature-gate-custom_derive.stderr index 86066285a55b3..8667547a82608 100644 --- a/src/test/ui/feature-gate-custom_derive.stderr +++ b/src/test/ui/feature-gate-custom_derive.stderr @@ -1,7 +1,7 @@ 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] +LL | #[derive_Clone] | ^^^^^^^^^^^^^^^ | = help: add #![feature(custom_derive)] to the crate attributes to enable diff --git a/src/test/ui/feature-gate-decl_macro.stderr b/src/test/ui/feature-gate-decl_macro.stderr index c7144f09bd613..186e74035295f 100644 --- a/src/test/ui/feature-gate-decl_macro.stderr +++ b/src/test/ui/feature-gate-decl_macro.stderr @@ -1,7 +1,7 @@ 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) +LL | macro m() {} //~ ERROR `macro` is experimental (see issue #39412) | ^^^^^^^^^^^^ | = help: add #![feature(decl_macro)] to the crate attributes to enable diff --git a/src/test/ui/feature-gate-default_type_parameter_fallback.stderr b/src/test/ui/feature-gate-default_type_parameter_fallback.stderr index d756a69e8c1ec..134bf29d2aa40 100644 --- a/src/test/ui/feature-gate-default_type_parameter_fallback.stderr +++ b/src/test/ui/feature-gate-default_type_parameter_fallback.stderr @@ -1,7 +1,7 @@ error: defaults for type parameters are only allowed in `struct`, `enum`, `type`, or `trait` definitions. --> $DIR/feature-gate-default_type_parameter_fallback.rs:13:8 | -13 | fn avg(_: T) {} +LL | fn avg(_: T) {} | ^ | = note: #[deny(invalid_type_param_default)] on by default @@ -11,7 +11,7 @@ error: defaults for type parameters are only allowed in `struct`, `enum`, `type` error: defaults for type parameters are only allowed in `struct`, `enum`, `type`, or `trait` definitions. --> $DIR/feature-gate-default_type_parameter_fallback.rs:18:6 | -18 | impl S {} +LL | impl S {} | ^ | = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! diff --git a/src/test/ui/feature-gate-doc_cfg.stderr b/src/test/ui/feature-gate-doc_cfg.stderr index e009e0bc3c471..e99d790245f0b 100644 --- a/src/test/ui/feature-gate-doc_cfg.stderr +++ b/src/test/ui/feature-gate-doc_cfg.stderr @@ -1,7 +1,7 @@ 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 +LL | #[doc(cfg(unix))] //~ ERROR: #[doc(cfg(...))] is experimental | ^^^^^^^^^^^^^^^^^ | = help: add #![feature(doc_cfg)] to the crate attributes to enable diff --git a/src/test/ui/feature-gate-doc_masked.stderr b/src/test/ui/feature-gate-doc_masked.stderr index ee2d384e99841..be994eec9a69d 100644 --- a/src/test/ui/feature-gate-doc_masked.stderr +++ b/src/test/ui/feature-gate-doc_masked.stderr @@ -1,7 +1,7 @@ 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 +LL | #[doc(masked)] //~ ERROR: #[doc(masked)] is experimental | ^^^^^^^^^^^^^^ | = help: add #![feature(doc_masked)] to the crate attributes to enable diff --git a/src/test/ui/feature-gate-doc_spotlight.stderr b/src/test/ui/feature-gate-doc_spotlight.stderr index 36d854892be28..6f15bde03f34d 100644 --- a/src/test/ui/feature-gate-doc_spotlight.stderr +++ b/src/test/ui/feature-gate-doc_spotlight.stderr @@ -1,7 +1,7 @@ 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 +LL | #[doc(spotlight)] //~ ERROR: #[doc(spotlight)] is experimental | ^^^^^^^^^^^^^^^^^ | = help: add #![feature(doc_spotlight)] to the crate attributes to enable diff --git a/src/test/ui/feature-gate-dotdoteq_in_patterns.stderr b/src/test/ui/feature-gate-dotdoteq_in_patterns.stderr index 2d26c6ae8ebe7..55d94fa0fb282 100644 --- a/src/test/ui/feature-gate-dotdoteq_in_patterns.stderr +++ b/src/test/ui/feature-gate-dotdoteq_in_patterns.stderr @@ -1,7 +1,7 @@ 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 +LL | 0 ..= 3 => {} //~ ERROR `..=` syntax in patterns is experimental | ^^^^^^^ | = help: add #![feature(dotdoteq_in_patterns)] to the crate attributes to enable diff --git a/src/test/ui/feature-gate-dropck-ugeh-2.stderr b/src/test/ui/feature-gate-dropck-ugeh-2.stderr index 0555b485d4c05..80d81ea03cb6d 100644 --- a/src/test/ui/feature-gate-dropck-ugeh-2.stderr +++ b/src/test/ui/feature-gate-dropck-ugeh-2.stderr @@ -1,13 +1,13 @@ error: use of deprecated attribute `dropck_parametricity`: unsafe_destructor_blind_to_params has been replaced by may_dangle and will be removed in the future. See https://github.com/rust-lang/rust/issues/34761 --> $DIR/feature-gate-dropck-ugeh-2.rs:17:5 | -17 | #[unsafe_destructor_blind_to_params] +LL | #[unsafe_destructor_blind_to_params] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove this attribute | note: lint level defined here --> $DIR/feature-gate-dropck-ugeh-2.rs:11:9 | -11 | #![deny(deprecated)] +LL | #![deny(deprecated)] | ^^^^^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/feature-gate-dropck-ugeh.stderr b/src/test/ui/feature-gate-dropck-ugeh.stderr index cdeca7026b0c6..6766308a34d80 100644 --- a/src/test/ui/feature-gate-dropck-ugeh.stderr +++ b/src/test/ui/feature-gate-dropck-ugeh.stderr @@ -1,7 +1,7 @@ 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 +LL | #[unsafe_destructor_blind_to_params] // This is the UGEH attribute | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(dropck_parametricity)] to the crate attributes to enable diff --git a/src/test/ui/feature-gate-dyn-trait.stderr b/src/test/ui/feature-gate-dyn-trait.stderr index d6ba4b8ad6698..ac36d715c46b1 100644 --- a/src/test/ui/feature-gate-dyn-trait.stderr +++ b/src/test/ui/feature-gate-dyn-trait.stderr @@ -1,7 +1,7 @@ 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 +LL | type A = Box; //~ ERROR `dyn Trait` syntax is unstable | ^^^^^^^^^ | = help: add #![feature(dyn_trait)] to the crate attributes to enable diff --git a/src/test/ui/feature-gate-exclusive-range-pattern.stderr b/src/test/ui/feature-gate-exclusive-range-pattern.stderr index 3185281ce4bb4..41ba4215dd69c 100644 --- a/src/test/ui/feature-gate-exclusive-range-pattern.stderr +++ b/src/test/ui/feature-gate-exclusive-range-pattern.stderr @@ -1,7 +1,7 @@ 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 +LL | 0 .. 3 => {} //~ ERROR exclusive range pattern syntax is experimental | ^^^^^^ | = help: add #![feature(exclusive_range_pattern)] to the crate attributes to enable diff --git a/src/test/ui/feature-gate-extern_absolute_paths.stderr b/src/test/ui/feature-gate-extern_absolute_paths.stderr index 111cd06cb3c3e..55b49ced375aa 100644 --- a/src/test/ui/feature-gate-extern_absolute_paths.stderr +++ b/src/test/ui/feature-gate-extern_absolute_paths.stderr @@ -1,13 +1,13 @@ error[E0432]: unresolved import `core` --> $DIR/feature-gate-extern_absolute_paths.rs:11:5 | -11 | use core::default; //~ ERROR unresolved import `core` +LL | use core::default; //~ ERROR unresolved import `core` | ^^^^ Maybe a missing `extern crate core;`? error[E0433]: failed to resolve. Maybe a missing `extern crate core;`? --> $DIR/feature-gate-extern_absolute_paths.rs:14:19 | -14 | let _: u8 = ::core::default::Default(); //~ ERROR failed to resolve +LL | let _: u8 = ::core::default::Default(); //~ ERROR failed to resolve | ^^^^ Maybe a missing `extern crate core;`? error: aborting due to 2 previous errors diff --git a/src/test/ui/feature-gate-extern_in_paths.stderr b/src/test/ui/feature-gate-extern_in_paths.stderr index 022e53b6be096..8fe7586c5a7e7 100644 --- a/src/test/ui/feature-gate-extern_in_paths.stderr +++ b/src/test/ui/feature-gate-extern_in_paths.stderr @@ -1,7 +1,7 @@ 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 +LL | let _ = extern::std::vec::Vec::new(); //~ ERROR `extern` in paths is experimental | ^^^^^^ | = help: add #![feature(extern_in_paths)] to the crate attributes to enable diff --git a/src/test/ui/feature-gate-extern_types.stderr b/src/test/ui/feature-gate-extern_types.stderr index 71caa37963f4f..46e34a2ccf12a 100644 --- a/src/test/ui/feature-gate-extern_types.stderr +++ b/src/test/ui/feature-gate-extern_types.stderr @@ -1,7 +1,7 @@ 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 +LL | type T; //~ ERROR extern types are experimental | ^^^^^^^ | = help: add #![feature(extern_types)] to the crate attributes to enable diff --git a/src/test/ui/feature-gate-external_doc.stderr b/src/test/ui/feature-gate-external_doc.stderr index db6c99bceede6..22b6856f91556 100644 --- a/src/test/ui/feature-gate-external_doc.stderr +++ b/src/test/ui/feature-gate-external_doc.stderr @@ -1,7 +1,7 @@ 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 +LL | #[doc(include="asdf.md")] //~ ERROR: #[doc(include = "...")] is experimental | ^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(external_doc)] to the crate attributes to enable diff --git a/src/test/ui/feature-gate-feature-gate.stderr b/src/test/ui/feature-gate-feature-gate.stderr index 3d5f0d70bb2d7..256cf47c12021 100644 --- a/src/test/ui/feature-gate-feature-gate.stderr +++ b/src/test/ui/feature-gate-feature-gate.stderr @@ -1,13 +1,13 @@ error: unstable feature --> $DIR/feature-gate-feature-gate.rs:12:12 | -12 | #![feature(intrinsics)] //~ ERROR unstable feature +LL | #![feature(intrinsics)] //~ ERROR unstable feature | ^^^^^^^^^^ | note: lint level defined here --> $DIR/feature-gate-feature-gate.rs:11:11 | -11 | #![forbid(unstable_features)] +LL | #![forbid(unstable_features)] | ^^^^^^^^^^^^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/feature-gate-fn_must_use-cap-lints-allow.stderr b/src/test/ui/feature-gate-fn_must_use-cap-lints-allow.stderr index 9b16e9be68ab3..a9952ff4fac13 100644 --- a/src/test/ui/feature-gate-fn_must_use-cap-lints-allow.stderr +++ b/src/test/ui/feature-gate-fn_must_use-cap-lints-allow.stderr @@ -1,6 +1,6 @@ error: compilation successful --> $DIR/feature-gate-fn_must_use-cap-lints-allow.rs:22:1 | -22 | fn main() {} //~ ERROR compilation successful +LL | fn main() {} //~ ERROR compilation successful | ^^^^^^^^^^^^ diff --git a/src/test/ui/feature-gate-fn_must_use.stderr b/src/test/ui/feature-gate-fn_must_use.stderr index ed4953d27b85f..4772cf28f6c12 100644 --- a/src/test/ui/feature-gate-fn_must_use.stderr +++ b/src/test/ui/feature-gate-fn_must_use.stderr @@ -1,7 +1,7 @@ warning: `#[must_use]` on methods is experimental (see issue #43302) --> $DIR/feature-gate-fn_must_use.rs:16:5 | -16 | #[must_use] //~ WARN `#[must_use]` on methods is experimental +LL | #[must_use] //~ WARN `#[must_use]` on methods is experimental | ^^^^^^^^^^^ | = help: add #![feature(fn_must_use)] to the crate attributes to enable @@ -9,7 +9,7 @@ warning: `#[must_use]` on methods is experimental (see issue #43302) warning: `#[must_use]` on functions is experimental (see issue #43302) --> $DIR/feature-gate-fn_must_use.rs:20:1 | -20 | #[must_use] //~ WARN `#[must_use]` on functions is experimental +LL | #[must_use] //~ WARN `#[must_use]` on functions is experimental | ^^^^^^^^^^^ | = help: add #![feature(fn_must_use)] to the crate attributes to enable @@ -17,6 +17,6 @@ warning: `#[must_use]` on functions is experimental (see issue #43302) error: compilation successful --> $DIR/feature-gate-fn_must_use.rs:31:1 | -31 | fn main() {} //~ ERROR compilation successful +LL | fn main() {} //~ ERROR compilation successful | ^^^^^^^^^^^^ diff --git a/src/test/ui/feature-gate-fundamental.stderr b/src/test/ui/feature-gate-fundamental.stderr index 28d8a80e602ab..aab20880b0061 100644 --- a/src/test/ui/feature-gate-fundamental.stderr +++ b/src/test/ui/feature-gate-fundamental.stderr @@ -1,7 +1,7 @@ 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 +LL | #[fundamental] //~ ERROR the `#[fundamental]` attribute is an experimental feature | ^^^^^^^^^^^^^^ | = help: add #![feature(fundamental)] to the crate attributes to enable diff --git a/src/test/ui/feature-gate-generators.stderr b/src/test/ui/feature-gate-generators.stderr index f559227f717e4..9b606bfa7af1f 100644 --- a/src/test/ui/feature-gate-generators.stderr +++ b/src/test/ui/feature-gate-generators.stderr @@ -1,7 +1,7 @@ error[E0658]: yield syntax is experimental --> $DIR/feature-gate-generators.rs:12:5 | -12 | yield true; //~ ERROR yield syntax is experimental +LL | yield true; //~ ERROR yield syntax is experimental | ^^^^^^^^^^ | = help: add #![feature(generators)] to the crate attributes to enable diff --git a/src/test/ui/feature-gate-generic_associated_types.stderr b/src/test/ui/feature-gate-generic_associated_types.stderr index c047914fb3b84..f5d0385a99a04 100644 --- a/src/test/ui/feature-gate-generic_associated_types.stderr +++ b/src/test/ui/feature-gate-generic_associated_types.stderr @@ -1,7 +1,7 @@ error[E0658]: generic associated types are unstable (see issue #44265) --> $DIR/feature-gate-generic_associated_types.rs:14:5 | -14 | type Pointer: Deref; +LL | type Pointer: Deref; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(generic_associated_types)] to the crate attributes to enable @@ -9,7 +9,7 @@ error[E0658]: 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; +LL | type Pointer2: Deref where T: Clone, U: Clone; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(generic_associated_types)] to the crate attributes to enable @@ -17,7 +17,7 @@ error[E0658]: 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; +LL | type Pointer = Box; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(generic_associated_types)] to the crate attributes to enable @@ -25,7 +25,7 @@ error[E0658]: 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; +LL | type Pointer2 = Box; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(generic_associated_types)] to the crate attributes to enable diff --git a/src/test/ui/feature-gate-generic_param_attrs.stderr b/src/test/ui/feature-gate-generic_param_attrs.stderr index a18d104cc2b33..ed39d3369ae94 100644 --- a/src/test/ui/feature-gate-generic_param_attrs.stderr +++ b/src/test/ui/feature-gate-generic_param_attrs.stderr @@ -1,7 +1,7 @@ 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); +LL | struct StLt<#[rustc_lt_struct] 'a>(&'a u32); | ^^^^^^^^^^^^^^^^^^ | = help: add #![feature(generic_param_attrs)] to the crate attributes to enable @@ -9,7 +9,7 @@ error[E0658]: attributes on lifetime 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); +LL | struct StTy<#[rustc_ty_struct] I>(I); | ^^^^^^^^^^^^^^^^^^ | = help: add #![feature(generic_param_attrs)] to the crate attributes to enable @@ -17,7 +17,7 @@ error[E0658]: attributes on type parameter bindings are experimental (see issue 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 } +LL | enum EnLt<#[rustc_lt_enum] 'b> { A(&'b u32), B } | ^^^^^^^^^^^^^^^^ | = help: add #![feature(generic_param_attrs)] to the crate attributes to enable @@ -25,7 +25,7 @@ error[E0658]: attributes on lifetime 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 } +LL | enum EnTy<#[rustc_ty_enum] J> { A(J), B } | ^^^^^^^^^^^^^^^^ | = help: add #![feature(generic_param_attrs)] to the crate attributes to enable @@ -33,7 +33,7 @@ error[E0658]: attributes on type parameter bindings are experimental (see issue 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; } +LL | trait TrLt<#[rustc_lt_trait] 'c> { fn foo(&self, _: &'c [u32]) -> &'c u32; } | ^^^^^^^^^^^^^^^^^ | = help: add #![feature(generic_param_attrs)] to the crate attributes to enable @@ -41,7 +41,7 @@ error[E0658]: attributes on lifetime 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); } +LL | trait TrTy<#[rustc_ty_trait] K> { fn foo(&self, _: K); } | ^^^^^^^^^^^^^^^^^ | = help: add #![feature(generic_param_attrs)] to the crate attributes to enable @@ -49,7 +49,7 @@ error[E0658]: attributes on type parameter bindings are experimental (see issue 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; +LL | type TyLt<#[rustc_lt_type] 'd> = &'d u32; | ^^^^^^^^^^^^^^^^ | = help: add #![feature(generic_param_attrs)] to the crate attributes to enable @@ -57,7 +57,7 @@ error[E0658]: attributes on lifetime 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, ); +LL | type TyTy<#[rustc_ty_type] L> = (L, ); | ^^^^^^^^^^^^^^^^ | = help: add #![feature(generic_param_attrs)] to the crate attributes to enable @@ -65,7 +65,7 @@ error[E0658]: attributes on type parameter bindings are experimental (see issue 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> { } +LL | impl<#[rustc_lt_inherent] 'e> StLt<'e> { } | ^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(generic_param_attrs)] to the crate attributes to enable @@ -73,7 +73,7 @@ error[E0658]: attributes on lifetime 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 { } +LL | impl<#[rustc_ty_inherent] M> StTy { } | ^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(generic_param_attrs)] to the crate attributes to enable @@ -81,7 +81,7 @@ error[E0658]: attributes on type parameter bindings are experimental (see issue 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> { +LL | impl<#[rustc_lt_impl_for] 'f> TrLt<'f> for StLt<'f> { | ^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(generic_param_attrs)] to the crate attributes to enable @@ -89,7 +89,7 @@ error[E0658]: attributes on lifetime 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 { +LL | impl<#[rustc_ty_impl_for] N> TrTy for StTy { | ^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(generic_param_attrs)] to the crate attributes to enable @@ -97,7 +97,7 @@ error[E0658]: attributes on type parameter bindings are experimental (see issue 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 { } } +LL | fn f_lt<#[rustc_lt_fn] 'g>(_: &'g [u32]) -> &'g u32 { loop { } } | ^^^^^^^^^^^^^^ | = help: add #![feature(generic_param_attrs)] to the crate attributes to enable @@ -105,7 +105,7 @@ error[E0658]: attributes on lifetime 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) { } +LL | fn f_ty<#[rustc_ty_fn] O>(_: O) { } | ^^^^^^^^^^^^^^ | = help: add #![feature(generic_param_attrs)] to the crate attributes to enable @@ -113,7 +113,7 @@ error[E0658]: attributes on type parameter bindings are experimental (see issue 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 { } } +LL | fn m_lt<#[rustc_lt_meth] 'h>(_: &'h [u32]) -> &'h u32 { loop { } } | ^^^^^^^^^^^^^^^^ | = help: add #![feature(generic_param_attrs)] to the crate attributes to enable @@ -121,7 +121,7 @@ error[E0658]: attributes on lifetime 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) { } +LL | fn m_ty<#[rustc_ty_meth] P>(_: P) { } | ^^^^^^^^^^^^^^^^ | = help: add #![feature(generic_param_attrs)] to the crate attributes to enable @@ -129,7 +129,7 @@ error[E0658]: attributes on type parameter bindings are experimental (see issue 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 +LL | where Q: for <#[rustc_lt_hof] 'i> Fn(&'i [u32]) -> &'i u32 | ^^^^^^^^^^^^^^^ | = help: add #![feature(generic_param_attrs)] to the crate attributes to enable diff --git a/src/test/ui/feature-gate-global_allocator.stderr b/src/test/ui/feature-gate-global_allocator.stderr index 8d82f6ee9e395..210b615a43754 100644 --- a/src/test/ui/feature-gate-global_allocator.stderr +++ b/src/test/ui/feature-gate-global_allocator.stderr @@ -1,7 +1,7 @@ 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 +LL | #[global_allocator] //~ ERROR: attribute is an experimental feature | ^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(global_allocator)] to the crate attributes to enable diff --git a/src/test/ui/feature-gate-global_asm.stderr b/src/test/ui/feature-gate-global_asm.stderr index ca946579f5dbe..7f4547b37ffe4 100644 --- a/src/test/ui/feature-gate-global_asm.stderr +++ b/src/test/ui/feature-gate-global_asm.stderr @@ -1,7 +1,7 @@ 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 +LL | global_asm!(""); //~ ERROR `global_asm!` is not stable | ^^^^^^^^^^^^^^^^ | = help: add #![feature(global_asm)] to the crate attributes to enable diff --git a/src/test/ui/feature-gate-i128_type.stderr b/src/test/ui/feature-gate-i128_type.stderr index 06fdeadbbf693..3a64c94c95b45 100644 --- a/src/test/ui/feature-gate-i128_type.stderr +++ b/src/test/ui/feature-gate-i128_type.stderr @@ -1,7 +1,7 @@ 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 +LL | 0i128; //~ ERROR 128-bit integers are not stable | ^^^^^ | = help: add #![feature(i128_type)] to the crate attributes to enable @@ -9,7 +9,7 @@ error[E0658]: 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 +LL | 0u128; //~ ERROR 128-bit integers are not stable | ^^^^^ | = help: add #![feature(i128_type)] to the crate attributes to enable diff --git a/src/test/ui/feature-gate-i128_type2.stderr b/src/test/ui/feature-gate-i128_type2.stderr index ee81a26921498..9628797881bc0 100644 --- a/src/test/ui/feature-gate-i128_type2.stderr +++ b/src/test/ui/feature-gate-i128_type2.stderr @@ -1,7 +1,7 @@ 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 +LL | fn test1() -> i128 { //~ ERROR 128-bit type is unstable | ^^^^ | = help: add #![feature(i128_type)] to the crate attributes to enable @@ -9,7 +9,7 @@ error[E0658]: 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 +LL | fn test1_2() -> u128 { //~ ERROR 128-bit type is unstable | ^^^^ | = help: add #![feature(i128_type)] to the crate attributes to enable @@ -17,7 +17,7 @@ error[E0658]: 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 +LL | let x: i128 = 0; //~ ERROR 128-bit type is unstable | ^^^^ | = help: add #![feature(i128_type)] to the crate attributes to enable @@ -25,7 +25,7 @@ error[E0658]: 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 +LL | let x: u128 = 0; //~ ERROR 128-bit type is unstable | ^^^^ | = help: add #![feature(i128_type)] to the crate attributes to enable @@ -35,9 +35,9 @@ error[E0601]: main function not found 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 -31 | | A(u64) -32 | | } +LL | / enum A { //~ ERROR 128-bit type is unstable +LL | | A(u64) +LL | | } | |_^ | = help: add #![feature(repr128)] to the crate attributes to enable diff --git a/src/test/ui/feature-gate-in_band_lifetimes.stderr b/src/test/ui/feature-gate-in_band_lifetimes.stderr index 3b03ef2dd338a..3a4ef684c06e7 100644 --- a/src/test/ui/feature-gate-in_band_lifetimes.stderr +++ b/src/test/ui/feature-gate-in_band_lifetimes.stderr @@ -1,103 +1,103 @@ error[E0261]: use of undeclared lifetime name `'x` --> $DIR/feature-gate-in_band_lifetimes.rs:13:12 | -13 | fn foo(x: &'x u8) -> &'x u8 { x } +LL | fn foo(x: &'x u8) -> &'x u8 { x } | ^^ undeclared lifetime error[E0261]: use of undeclared lifetime name `'x` --> $DIR/feature-gate-in_band_lifetimes.rs:13:23 | -13 | fn foo(x: &'x u8) -> &'x u8 { x } +LL | fn foo(x: &'x u8) -> &'x u8 { x } | ^^ undeclared lifetime error[E0261]: use of undeclared lifetime name `'b` --> $DIR/feature-gate-in_band_lifetimes.rs:25:12 | -25 | impl<'a> X<'b> { +LL | impl<'a> X<'b> { | ^^ undeclared lifetime error[E0261]: use of undeclared lifetime name `'b` --> $DIR/feature-gate-in_band_lifetimes.rs:27:27 | -27 | fn inner_2(&self) -> &'b u8 { +LL | fn inner_2(&self) -> &'b u8 { | ^^ undeclared lifetime error[E0261]: use of undeclared lifetime name `'b` --> $DIR/feature-gate-in_band_lifetimes.rs:33:8 | -33 | impl X<'b> { +LL | impl X<'b> { | ^^ undeclared lifetime error[E0261]: use of undeclared lifetime name `'b` --> $DIR/feature-gate-in_band_lifetimes.rs:35:27 | -35 | fn inner_3(&self) -> &'b u8 { +LL | fn inner_3(&self) -> &'b u8 { | ^^ undeclared lifetime error[E0261]: use of undeclared lifetime name `'a` --> $DIR/feature-gate-in_band_lifetimes.rs:43:9 | -43 | impl Y<&'a u8> { +LL | impl Y<&'a u8> { | ^^ undeclared lifetime error[E0261]: use of undeclared lifetime name `'a` --> $DIR/feature-gate-in_band_lifetimes.rs:45:25 | -45 | fn inner(&self) -> &'a u8 { +LL | fn inner(&self) -> &'a u8 { | ^^ undeclared lifetime error[E0261]: use of undeclared lifetime name `'b` --> $DIR/feature-gate-in_band_lifetimes.rs:53:27 | -53 | fn any_lifetime() -> &'b u8; +LL | fn any_lifetime() -> &'b u8; | ^^ undeclared lifetime error[E0261]: use of undeclared lifetime name `'b` --> $DIR/feature-gate-in_band_lifetimes.rs:55:27 | -55 | fn borrowed_lifetime(&'b self) -> &'b u8; +LL | fn borrowed_lifetime(&'b self) -> &'b u8; | ^^ undeclared lifetime error[E0261]: use of undeclared lifetime name `'b` --> $DIR/feature-gate-in_band_lifetimes.rs:55:40 | -55 | fn borrowed_lifetime(&'b self) -> &'b u8; +LL | fn borrowed_lifetime(&'b self) -> &'b u8; | ^^ undeclared lifetime error[E0261]: use of undeclared lifetime name `'a` --> $DIR/feature-gate-in_band_lifetimes.rs:60:14 | -60 | impl MyTrait<'a> for Y<&'a u8> { +LL | impl MyTrait<'a> for Y<&'a u8> { | ^^ undeclared lifetime error[E0261]: use of undeclared lifetime name `'a` --> $DIR/feature-gate-in_band_lifetimes.rs:60:25 | -60 | impl MyTrait<'a> for Y<&'a u8> { +LL | impl MyTrait<'a> for Y<&'a u8> { | ^^ undeclared lifetime error[E0261]: use of undeclared lifetime name `'a` --> $DIR/feature-gate-in_band_lifetimes.rs:63:31 | -63 | fn my_lifetime(&self) -> &'a u8 { self.0 } +LL | fn my_lifetime(&self) -> &'a u8 { self.0 } | ^^ undeclared lifetime error[E0261]: use of undeclared lifetime name `'b` --> $DIR/feature-gate-in_band_lifetimes.rs:65:27 | -65 | fn any_lifetime() -> &'b u8 { &0 } +LL | fn any_lifetime() -> &'b u8 { &0 } | ^^ undeclared lifetime error[E0261]: use of undeclared lifetime name `'b` --> $DIR/feature-gate-in_band_lifetimes.rs:67:27 | -67 | fn borrowed_lifetime(&'b self) -> &'b u8 { &*self.0 } +LL | fn borrowed_lifetime(&'b self) -> &'b u8 { &*self.0 } | ^^ undeclared lifetime error[E0261]: use of undeclared lifetime name `'b` --> $DIR/feature-gate-in_band_lifetimes.rs:67:40 | -67 | fn borrowed_lifetime(&'b self) -> &'b u8 { &*self.0 } +LL | fn borrowed_lifetime(&'b self) -> &'b u8 { &*self.0 } | ^^ undeclared lifetime error: aborting due to 17 previous errors diff --git a/src/test/ui/feature-gate-intrinsics.stderr b/src/test/ui/feature-gate-intrinsics.stderr index 918c749504aea..5ca67a303d667 100644 --- a/src/test/ui/feature-gate-intrinsics.stderr +++ b/src/test/ui/feature-gate-intrinsics.stderr @@ -1,9 +1,9 @@ error[E0658]: intrinsics are subject to change --> $DIR/feature-gate-intrinsics.rs:11:1 | -11 | / extern "rust-intrinsic" { //~ ERROR intrinsics are subject to change -12 | | fn bar(); -13 | | } +LL | / extern "rust-intrinsic" { //~ ERROR intrinsics are subject to change +LL | | fn bar(); +LL | | } | |_^ | = help: add #![feature(intrinsics)] to the crate attributes to enable @@ -11,8 +11,8 @@ error[E0658]: 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 -16 | | } +LL | / extern "rust-intrinsic" fn baz() { //~ ERROR intrinsics are subject to change +LL | | } | |_^ | = help: add #![feature(intrinsics)] to the crate attributes to enable diff --git a/src/test/ui/feature-gate-lang-items.stderr b/src/test/ui/feature-gate-lang-items.stderr index 28e3dab8fa72a..6c4cf19f1c836 100644 --- a/src/test/ui/feature-gate-lang-items.stderr +++ b/src/test/ui/feature-gate-lang-items.stderr @@ -1,7 +1,7 @@ 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 +LL | #[lang="foo"] //~ ERROR language items are subject to change | ^^^^^^^^^^^^^ | = help: add #![feature(lang_items)] to the crate attributes to enable diff --git a/src/test/ui/feature-gate-link_args.stderr b/src/test/ui/feature-gate-link_args.stderr index 78070d52f1f15..60c12921c0875 100644 --- a/src/test/ui/feature-gate-link_args.stderr +++ b/src/test/ui/feature-gate-link_args.stderr @@ -1,7 +1,7 @@ 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"] +LL | #[link_args = "-l expected_use_case"] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(link_args)] to the crate attributes to enable @@ -9,7 +9,7 @@ error[E0658]: the `link_args` attribute is experimental and not portable across 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"] +LL | #[link_args = "-l unexected_use_on_non_extern_item"] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(link_args)] to the crate attributes to enable @@ -17,7 +17,7 @@ error[E0658]: the `link_args` attribute is experimental and not portable across 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"] +LL | #![link_args = "-l unexpected_use_as_inner_attr_on_mod"] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(link_args)] to the crate attributes to enable diff --git a/src/test/ui/feature-gate-link_cfg.stderr b/src/test/ui/feature-gate-link_cfg.stderr index 8aada72fb0c8b..e024edc7067e3 100644 --- a/src/test/ui/feature-gate-link_cfg.stderr +++ b/src/test/ui/feature-gate-link_cfg.stderr @@ -1,7 +1,7 @@ error[E0658]: is feature gated (see issue #37406) --> $DIR/feature-gate-link_cfg.rs:11:1 | -11 | #[link(name = "foo", cfg(foo))] +LL | #[link(name = "foo", cfg(foo))] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(link_cfg)] to the crate attributes to enable diff --git a/src/test/ui/feature-gate-link_llvm_intrinsics.stderr b/src/test/ui/feature-gate-link_llvm_intrinsics.stderr index 136658f23fdd8..ab8868e877fbe 100644 --- a/src/test/ui/feature-gate-link_llvm_intrinsics.stderr +++ b/src/test/ui/feature-gate-link_llvm_intrinsics.stderr @@ -1,7 +1,7 @@ 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; +LL | fn sqrt(x: f32) -> f32; | ^^^^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(link_llvm_intrinsics)] to the crate attributes to enable diff --git a/src/test/ui/feature-gate-linkage.stderr b/src/test/ui/feature-gate-linkage.stderr index 54764b1920c4d..f1d93c7efcdb0 100644 --- a/src/test/ui/feature-gate-linkage.stderr +++ b/src/test/ui/feature-gate-linkage.stderr @@ -1,7 +1,7 @@ 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; +LL | #[linkage = "extern_weak"] static foo: isize; | ^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(linkage)] to the crate attributes to enable diff --git a/src/test/ui/feature-gate-linker-flavor.stderr b/src/test/ui/feature-gate-linker-flavor.stderr index e58693d35c210..00d09157c4a27 100644 --- a/src/test/ui/feature-gate-linker-flavor.stderr +++ b/src/test/ui/feature-gate-linker-flavor.stderr @@ -1,7 +1,7 @@ error[E0658]: the `#[used]` attribute is an experimental feature (see issue #40289) --> $DIR/feature-gate-linker-flavor.rs:16:1 | -16 | #[used] +LL | #[used] | ^^^^^^^ | = help: add #![feature(used)] to the crate attributes to enable diff --git a/src/test/ui/feature-gate-log_syntax.stderr b/src/test/ui/feature-gate-log_syntax.stderr index 363b1753f4ad9..004c822dc6a76 100644 --- a/src/test/ui/feature-gate-log_syntax.stderr +++ b/src/test/ui/feature-gate-log_syntax.stderr @@ -1,7 +1,7 @@ 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 +LL | log_syntax!() //~ ERROR `log_syntax!` is not stable enough | ^^^^^^^^^^^^^ | = help: add #![feature(log_syntax)] to the crate attributes to enable diff --git a/src/test/ui/feature-gate-log_syntax2.stderr b/src/test/ui/feature-gate-log_syntax2.stderr index f47a5076e7953..1b8e74ab25a2a 100644 --- a/src/test/ui/feature-gate-log_syntax2.stderr +++ b/src/test/ui/feature-gate-log_syntax2.stderr @@ -1,7 +1,7 @@ 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 +LL | println!("{}", log_syntax!()); //~ ERROR `log_syntax!` is not stable | ^^^^^^^^^^^^^ | = help: add #![feature(log_syntax)] to the crate attributes to enable diff --git a/src/test/ui/feature-gate-macro-lifetime-matcher.stderr b/src/test/ui/feature-gate-macro-lifetime-matcher.stderr index 553a7d3d13158..1519c7cd373a2 100644 --- a/src/test/ui/feature-gate-macro-lifetime-matcher.stderr +++ b/src/test/ui/feature-gate-macro-lifetime-matcher.stderr @@ -1,7 +1,7 @@ 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) => {} } +LL | macro_rules! m { ($lt:lifetime) => {} } | ^^^^^^^^^^^^ | = help: add #![feature(macro_lifetime_matcher)] to the crate attributes to enable diff --git a/src/test/ui/feature-gate-macro-vis-matcher.stderr b/src/test/ui/feature-gate-macro-vis-matcher.stderr index ee1844c092259..5354a3e0cc6a2 100644 --- a/src/test/ui/feature-gate-macro-vis-matcher.stderr +++ b/src/test/ui/feature-gate-macro-vis-matcher.stderr @@ -1,7 +1,7 @@ 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) => {} } +LL | macro_rules! m { ($v:vis) => {} } | ^^^^^^ | = help: add #![feature(macro_vis_matcher)] to the crate attributes to enable diff --git a/src/test/ui/feature-gate-macro_at_most_once_rep.stderr b/src/test/ui/feature-gate-macro_at_most_once_rep.stderr index 02dbab07bdecc..111d555dba0d0 100644 --- a/src/test/ui/feature-gate-macro_at_most_once_rep.stderr +++ b/src/test/ui/feature-gate-macro_at_most_once_rep.stderr @@ -1,7 +1,7 @@ error[E0658]: Using the `?` macro Kleene operator for "at most one" repetition is unstable (see issue #48075) --> $DIR/feature-gate-macro_at_most_once_rep.rs:14:20 | -14 | macro_rules! m { ($(a)?) => {} } +LL | macro_rules! m { ($(a)?) => {} } | ^^^ | = help: add #![feature(macro_at_most_once_rep)] to the crate attributes to enable diff --git a/src/test/ui/feature-gate-main.stderr b/src/test/ui/feature-gate-main.stderr index 56e9c8b37e31e..f638d3691c619 100644 --- a/src/test/ui/feature-gate-main.stderr +++ b/src/test/ui/feature-gate-main.stderr @@ -1,7 +1,7 @@ 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 +LL | fn foo() {} //~ ERROR: declaration of a nonstandard #[main] function may change over time | ^^^^^^^^^^^ | = help: add #![feature(main)] to the crate attributes to enable diff --git a/src/test/ui/feature-gate-match_default_bindings.stderr b/src/test/ui/feature-gate-match_default_bindings.stderr index 1bedfb7f8bee7..2512cf8a11136 100644 --- a/src/test/ui/feature-gate-match_default_bindings.stderr +++ b/src/test/ui/feature-gate-match_default_bindings.stderr @@ -1,7 +1,7 @@ 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) => {}, +LL | Some(n) => {}, | ^^^^^^^ help: consider using a reference: `&Some(n)` | = help: add #![feature(match_default_bindings)] to the crate attributes to enable diff --git a/src/test/ui/feature-gate-may-dangle.stderr b/src/test/ui/feature-gate-may-dangle.stderr index a3a3f7bd1742d..bd8b39581ced1 100644 --- a/src/test/ui/feature-gate-may-dangle.stderr +++ b/src/test/ui/feature-gate-may-dangle.stderr @@ -1,7 +1,7 @@ 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 { +LL | impl<#[may_dangle] A> Drop for Pt { | ^^^^^^^^^^^^^ | = help: add #![feature(dropck_eyepatch)] to the crate attributes to enable diff --git a/src/test/ui/feature-gate-naked_functions.stderr b/src/test/ui/feature-gate-naked_functions.stderr index 5f72234e5df5b..903edfe092d4c 100644 --- a/src/test/ui/feature-gate-naked_functions.stderr +++ b/src/test/ui/feature-gate-naked_functions.stderr @@ -1,7 +1,7 @@ error[E0658]: the `#[naked]` attribute is an experimental feature (see issue #32408) --> $DIR/feature-gate-naked_functions.rs:11:1 | -11 | #[naked] +LL | #[naked] | ^^^^^^^^ | = help: add #![feature(naked_functions)] to the crate attributes to enable @@ -9,7 +9,7 @@ error[E0658]: the `#[naked]` attribute is an experimental feature (see issue #32 error[E0658]: the `#[naked]` attribute is an experimental feature (see issue #32408) --> $DIR/feature-gate-naked_functions.rs:15:1 | -15 | #[naked] +LL | #[naked] | ^^^^^^^^ | = help: add #![feature(naked_functions)] to the crate attributes to enable diff --git a/src/test/ui/feature-gate-needs-allocator.stderr b/src/test/ui/feature-gate-needs-allocator.stderr index 11b8c31e6df5a..aed6f3d92fe6b 100644 --- a/src/test/ui/feature-gate-needs-allocator.stderr +++ b/src/test/ui/feature-gate-needs-allocator.stderr @@ -1,7 +1,7 @@ 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 +LL | #![needs_allocator] //~ ERROR the `#[needs_allocator]` attribute is | ^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(allocator_internals)] to the crate attributes to enable diff --git a/src/test/ui/feature-gate-negate-unsigned.stderr b/src/test/ui/feature-gate-negate-unsigned.stderr index d4311594517c7..a852f9e7dbea1 100644 --- a/src/test/ui/feature-gate-negate-unsigned.stderr +++ b/src/test/ui/feature-gate-negate-unsigned.stderr @@ -1,13 +1,13 @@ error[E0600]: cannot apply unary operator `-` to type `usize` --> $DIR/feature-gate-negate-unsigned.rs:20:23 | -20 | let _max: usize = -1; +LL | let _max: usize = -1; | ^^ error[E0600]: cannot apply unary operator `-` to type `u8` --> $DIR/feature-gate-negate-unsigned.rs:24:14 | -24 | let _y = -x; +LL | let _y = -x; | ^^ error: aborting due to 2 previous errors diff --git a/src/test/ui/feature-gate-never_type.stderr b/src/test/ui/feature-gate-never_type.stderr index 2fd04f51e7e52..0159d9c1ae8b2 100644 --- a/src/test/ui/feature-gate-never_type.stderr +++ b/src/test/ui/feature-gate-never_type.stderr @@ -1,7 +1,7 @@ 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 +LL | type Ma = (u32, !, i32); //~ ERROR type is experimental | ^ | = help: add #![feature(never_type)] to the crate attributes to enable @@ -9,7 +9,7 @@ error[E0658]: 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 +LL | type Meeshka = Vec; //~ ERROR type is experimental | ^ | = help: add #![feature(never_type)] to the crate attributes to enable @@ -17,7 +17,7 @@ error[E0658]: 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 +LL | type Mow = &fn(!) -> !; //~ ERROR type is experimental | ^ | = help: add #![feature(never_type)] to the crate attributes to enable @@ -25,7 +25,7 @@ error[E0658]: 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 +LL | type Skwoz = &mut !; //~ ERROR type is experimental | ^ | = help: add #![feature(never_type)] to the crate attributes to enable @@ -33,7 +33,7 @@ error[E0658]: 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 +LL | type Wub = !; //~ ERROR type is experimental | ^ | = help: add #![feature(never_type)] to the crate attributes to enable diff --git a/src/test/ui/feature-gate-nll.stderr b/src/test/ui/feature-gate-nll.stderr index 4135462305a89..c557bf3cbbbab 100644 --- a/src/test/ui/feature-gate-nll.stderr +++ b/src/test/ui/feature-gate-nll.stderr @@ -1,9 +1,9 @@ error[E0506]: cannot assign to `x` because it is borrowed --> $DIR/feature-gate-nll.rs:17:5 | -16 | let p = &x; +LL | let p = &x; | - borrow of `x` occurs here -17 | x = 22; //~ ERROR cannot assign to `x` because it is borrowed [E0506] +LL | x = 22; //~ ERROR cannot assign to `x` because it is borrowed [E0506] | ^^^^^^ assignment to borrowed `x` occurs here error: aborting due to previous error diff --git a/src/test/ui/feature-gate-no-debug-2.stderr b/src/test/ui/feature-gate-no-debug-2.stderr index 231fc40011514..183feae223231 100644 --- a/src/test/ui/feature-gate-no-debug-2.stderr +++ b/src/test/ui/feature-gate-no-debug-2.stderr @@ -1,13 +1,13 @@ error: use of deprecated attribute `no_debug`: the `#[no_debug]` attribute was an experimental feature that has been deprecated due to lack of demand. See https://github.com/rust-lang/rust/issues/29721 --> $DIR/feature-gate-no-debug-2.rs:14:1 | -14 | #[no_debug] //~ ERROR use of deprecated attribute `no_debug` +LL | #[no_debug] //~ ERROR use of deprecated attribute `no_debug` | ^^^^^^^^^^^ help: remove this attribute | note: lint level defined here --> $DIR/feature-gate-no-debug-2.rs:11:9 | -11 | #![deny(deprecated)] +LL | #![deny(deprecated)] | ^^^^^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/feature-gate-no-debug.stderr b/src/test/ui/feature-gate-no-debug.stderr index c7af8cf6aab7e..7d22a6c35752b 100644 --- a/src/test/ui/feature-gate-no-debug.stderr +++ b/src/test/ui/feature-gate-no-debug.stderr @@ -1,7 +1,7 @@ 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 +LL | #[no_debug] //~ ERROR the `#[no_debug]` attribute was | ^^^^^^^^^^^ | = help: add #![feature(no_debug)] to the crate attributes to enable diff --git a/src/test/ui/feature-gate-no_core.stderr b/src/test/ui/feature-gate-no_core.stderr index 7fc898520022e..41f54803a4dc4 100644 --- a/src/test/ui/feature-gate-no_core.stderr +++ b/src/test/ui/feature-gate-no_core.stderr @@ -1,7 +1,7 @@ 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 +LL | #![no_core] //~ ERROR no_core is experimental | ^^^^^^^^^^^ | = help: add #![feature(no_core)] to the crate attributes to enable diff --git a/src/test/ui/feature-gate-non_ascii_idents.stderr b/src/test/ui/feature-gate-non_ascii_idents.stderr index deb707752b066..84d5d9f6a39c6 100644 --- a/src/test/ui/feature-gate-non_ascii_idents.stderr +++ b/src/test/ui/feature-gate-non_ascii_idents.stderr @@ -1,7 +1,7 @@ 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 +LL | extern crate core as bäz; //~ ERROR non-ascii idents | ^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(non_ascii_idents)] to the crate attributes to enable @@ -9,7 +9,7 @@ error[E0658]: 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 +LL | use föö::bar; //~ ERROR non-ascii idents | ^^^^^^^^ | = help: add #![feature(non_ascii_idents)] to the crate attributes to enable @@ -17,7 +17,7 @@ error[E0658]: 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 +LL | mod föö { //~ ERROR non-ascii idents | ^^^^^^^ | = help: add #![feature(non_ascii_idents)] to the crate attributes to enable @@ -25,13 +25,13 @@ error[E0658]: 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 -20 | | bäz: isize //~ ERROR non-ascii idents -21 | | ) { -22 | | let _ö: isize; //~ ERROR non-ascii idents +LL | / fn bär( //~ ERROR non-ascii idents +LL | | bäz: isize //~ ERROR non-ascii idents +LL | | ) { +LL | | let _ö: isize; //~ ERROR non-ascii idents ... | -26 | | } -27 | | } +LL | | } +LL | | } | |_^ | = help: add #![feature(non_ascii_idents)] to the crate attributes to enable @@ -39,7 +39,7 @@ error[E0658]: 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 +LL | bäz: isize //~ ERROR non-ascii idents | ^^^ | = help: add #![feature(non_ascii_idents)] to the crate attributes to enable @@ -47,7 +47,7 @@ error[E0658]: 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 +LL | let _ö: isize; //~ ERROR non-ascii idents | ^^ | = help: add #![feature(non_ascii_idents)] to the crate attributes to enable @@ -55,7 +55,7 @@ error[E0658]: 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 +LL | (_ä, _) => {} //~ ERROR non-ascii idents | ^^ | = help: add #![feature(non_ascii_idents)] to the crate attributes to enable @@ -63,7 +63,7 @@ error[E0658]: 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 +LL | struct Föö { //~ ERROR non-ascii idents | ^^^^^^^^^^ | = help: add #![feature(non_ascii_idents)] to the crate attributes to enable @@ -71,7 +71,7 @@ error[E0658]: 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 +LL | föö: isize //~ ERROR non-ascii idents | ^^^^^^^^^^ | = help: add #![feature(non_ascii_idents)] to the crate attributes to enable @@ -79,7 +79,7 @@ error[E0658]: 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 +LL | enum Bär { //~ ERROR non-ascii idents | ^^^^^^^^ | = help: add #![feature(non_ascii_idents)] to the crate attributes to enable @@ -87,7 +87,7 @@ error[E0658]: 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 +LL | Bäz { //~ ERROR non-ascii idents | ^^^ | = help: add #![feature(non_ascii_idents)] to the crate attributes to enable @@ -95,7 +95,7 @@ error[E0658]: 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 +LL | qüx: isize //~ ERROR non-ascii idents | ^^^^^^^^^^ | = help: add #![feature(non_ascii_idents)] to the crate attributes to enable @@ -103,7 +103,7 @@ error[E0658]: 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 +LL | fn qüx(); //~ ERROR non-ascii idents | ^^^^^^^^^ | = help: add #![feature(non_ascii_idents)] to the crate attributes to enable diff --git a/src/test/ui/feature-gate-non_exhaustive.stderr b/src/test/ui/feature-gate-non_exhaustive.stderr index 320f40e31b814..a1cac15948a6a 100644 --- a/src/test/ui/feature-gate-non_exhaustive.stderr +++ b/src/test/ui/feature-gate-non_exhaustive.stderr @@ -1,7 +1,7 @@ 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) +LL | #[non_exhaustive] //~ERROR non exhaustive is an experimental feature (see issue #44109) | ^^^^^^^^^^^^^^^^^ | = help: add #![feature(non_exhaustive)] to the crate attributes to enable 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 4ceb697d0df31..2d4098923a86a 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,7 +1,7 @@ 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 +LL | #[omit_gdb_pretty_printer_section] //~ ERROR the `#[omit_gdb_pretty_printer_section]` attribute is | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(omit_gdb_pretty_printer_section)] to the crate attributes to enable diff --git a/src/test/ui/feature-gate-on-unimplemented.stderr b/src/test/ui/feature-gate-on-unimplemented.stderr index b1658c3be1647..0669fc17e23c5 100644 --- a/src/test/ui/feature-gate-on-unimplemented.stderr +++ b/src/test/ui/feature-gate-on-unimplemented.stderr @@ -1,7 +1,7 @@ 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}`"] +LL | #[rustc_on_unimplemented = "test error `{Self}` with `{Bar}`"] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(on_unimplemented)] to the crate attributes to enable diff --git a/src/test/ui/feature-gate-optin-builtin-traits.stderr b/src/test/ui/feature-gate-optin-builtin-traits.stderr index beb734a8ef871..f5b950e024427 100644 --- a/src/test/ui/feature-gate-optin-builtin-traits.stderr +++ b/src/test/ui/feature-gate-optin-builtin-traits.stderr @@ -1,7 +1,7 @@ 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 {} +LL | auto trait AutoDummyTrait {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(optin_builtin_traits)] to the crate attributes to enable @@ -9,7 +9,7 @@ error[E0658]: auto traits are experimental and possibly buggy (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 {} +LL | impl !DummyTrait for DummyStruct {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(optin_builtin_traits)] to the crate attributes to enable diff --git a/src/test/ui/feature-gate-overlapping_marker_traits.stderr b/src/test/ui/feature-gate-overlapping_marker_traits.stderr index c1725a62adaf4..d66eb221ce216 100644 --- a/src/test/ui/feature-gate-overlapping_marker_traits.stderr +++ b/src/test/ui/feature-gate-overlapping_marker_traits.stderr @@ -1,9 +1,9 @@ error[E0119]: conflicting implementations of trait `MyMarker`: --> $DIR/feature-gate-overlapping_marker_traits.rs:16:1 | -15 | impl MyMarker for T {} +LL | impl MyMarker for T {} | ------------------------------- first implementation here -16 | impl MyMarker for T {} +LL | impl MyMarker for T {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation error: aborting due to previous error diff --git a/src/test/ui/feature-gate-placement-expr.stderr b/src/test/ui/feature-gate-placement-expr.stderr index c588cabe23993..f3fcb053cdaa3 100644 --- a/src/test/ui/feature-gate-placement-expr.stderr +++ b/src/test/ui/feature-gate-placement-expr.stderr @@ -1,7 +1,7 @@ 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 +LL | let x = HEAP <- 'c'; //~ ERROR placement-in expression syntax is experimental | ^^^^^^^^^^^ | = help: add #![feature(placement_in_syntax)] to the crate attributes to enable diff --git a/src/test/ui/feature-gate-plugin.stderr b/src/test/ui/feature-gate-plugin.stderr index b54b2d8999452..2b38183b40af6 100644 --- a/src/test/ui/feature-gate-plugin.stderr +++ b/src/test/ui/feature-gate-plugin.stderr @@ -1,7 +1,7 @@ error[E0658]: compiler plugins are experimental and possibly buggy (see issue #29597) --> $DIR/feature-gate-plugin.rs:13:1 | -13 | #![plugin(foo)] +LL | #![plugin(foo)] | ^^^^^^^^^^^^^^^ | = help: add #![feature(plugin)] to the crate attributes to enable diff --git a/src/test/ui/feature-gate-plugin_registrar.stderr b/src/test/ui/feature-gate-plugin_registrar.stderr index fb5bd9d1afe8b..3e91ef1a24448 100644 --- a/src/test/ui/feature-gate-plugin_registrar.stderr +++ b/src/test/ui/feature-gate-plugin_registrar.stderr @@ -1,7 +1,7 @@ error[E0658]: compiler plugins are experimental and possibly buggy (see issue #29597) --> $DIR/feature-gate-plugin_registrar.rs:16:1 | -16 | pub fn registrar() {} +LL | pub fn registrar() {} | ^^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(plugin_registrar)] to the crate attributes to enable diff --git a/src/test/ui/feature-gate-prelude_import.stderr b/src/test/ui/feature-gate-prelude_import.stderr index 5487ae21f3b89..07a61b150516d 100644 --- a/src/test/ui/feature-gate-prelude_import.stderr +++ b/src/test/ui/feature-gate-prelude_import.stderr @@ -1,7 +1,7 @@ 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 +LL | #[prelude_import] //~ ERROR `#[prelude_import]` is for use by rustc only | ^^^^^^^^^^^^^^^^^ | = help: add #![feature(prelude_import)] to the crate attributes to enable diff --git a/src/test/ui/feature-gate-profiler-runtime.stderr b/src/test/ui/feature-gate-profiler-runtime.stderr index f2893cbb97d6a..e30f20b87763c 100644 --- a/src/test/ui/feature-gate-profiler-runtime.stderr +++ b/src/test/ui/feature-gate-profiler-runtime.stderr @@ -1,7 +1,7 @@ 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 +LL | #![profiler_runtime] //~ ERROR the `#[profiler_runtime]` attribute is | ^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(profiler_runtime)] to the crate attributes to enable diff --git a/src/test/ui/feature-gate-repr-simd.stderr b/src/test/ui/feature-gate-repr-simd.stderr index e430a04a3e84d..37915cca2dda1 100644 --- a/src/test/ui/feature-gate-repr-simd.stderr +++ b/src/test/ui/feature-gate-repr-simd.stderr @@ -1,7 +1,7 @@ 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 +LL | #[repr(simd)] //~ error: SIMD types are experimental | ^^^^^^^^^^^^^ | = help: add #![feature(repr_simd)] to the crate attributes to enable diff --git a/src/test/ui/feature-gate-repr128.stderr b/src/test/ui/feature-gate-repr128.stderr index 982ebb0101662..51055a2a581ac 100644 --- a/src/test/ui/feature-gate-repr128.stderr +++ b/src/test/ui/feature-gate-repr128.stderr @@ -1,9 +1,9 @@ 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 -13 | | A(u64) -14 | | } +LL | / enum A { //~ ERROR repr with 128-bit type is unstable +LL | | A(u64) +LL | | } | |_^ | = help: add #![feature(repr128)] to the crate attributes to enable diff --git a/src/test/ui/feature-gate-repr_transparent.stderr b/src/test/ui/feature-gate-repr_transparent.stderr index d1292e95491ab..29ed843085b5c 100644 --- a/src/test/ui/feature-gate-repr_transparent.stderr +++ b/src/test/ui/feature-gate-repr_transparent.stderr @@ -1,7 +1,7 @@ error[E0658]: the `#[repr(transparent)]` attribute is experimental (see issue #43036) --> $DIR/feature-gate-repr_transparent.rs:11:1 | -11 | #[repr(transparent)] //~ error: the `#[repr(transparent)]` attribute is experimental +LL | #[repr(transparent)] //~ error: the `#[repr(transparent)]` attribute is experimental | ^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(repr_transparent)] to the crate attributes to enable diff --git a/src/test/ui/feature-gate-rustc-attrs.stderr b/src/test/ui/feature-gate-rustc-attrs.stderr index f47588c3a7d63..0dc30481b5f88 100644 --- a/src/test/ui/feature-gate-rustc-attrs.stderr +++ b/src/test/ui/feature-gate-rustc-attrs.stderr @@ -1,7 +1,7 @@ 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 +LL | #[rustc_variance] //~ ERROR the `#[rustc_variance]` attribute is just used for rustc unit tests and will never be stable | ^^^^^^^^^^^^^^^^^ | = help: add #![feature(rustc_attrs)] to the crate attributes to enable @@ -9,7 +9,7 @@ error[E0658]: the `#[rustc_variance]` attribute is just used for rustc unit test 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 +LL | #[rustc_error] //~ ERROR the `#[rustc_error]` attribute is just used for rustc unit tests and will never be stable | ^^^^^^^^^^^^^^ | = help: add #![feature(rustc_attrs)] to the crate attributes to enable @@ -17,7 +17,7 @@ error[E0658]: the `#[rustc_error]` attribute is just used for rustc unit tests a 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] +LL | #[rustc_foo] | ^^^^^^^^^^^^ | = help: add #![feature(rustc_attrs)] to the crate attributes to enable diff --git a/src/test/ui/feature-gate-rustc-diagnostic-macros.stderr b/src/test/ui/feature-gate-rustc-diagnostic-macros.stderr index 843879036ed4a..70b66db608342 100644 --- a/src/test/ui/feature-gate-rustc-diagnostic-macros.stderr +++ b/src/test/ui/feature-gate-rustc-diagnostic-macros.stderr @@ -1,19 +1,19 @@ error: cannot find macro `__build_diagnostic_array!` in this scope --> $DIR/feature-gate-rustc-diagnostic-macros.rs:22:1 | -22 | __build_diagnostic_array!(DIAGNOSTICS); +LL | __build_diagnostic_array!(DIAGNOSTICS); | ^^^^^^^^^^^^^^^^^^^^^^^^ error: cannot find macro `__register_diagnostic!` in this scope --> $DIR/feature-gate-rustc-diagnostic-macros.rs:14:1 | -14 | __register_diagnostic!(E0001); +LL | __register_diagnostic!(E0001); | ^^^^^^^^^^^^^^^^^^^^^ error: cannot find macro `__diagnostic_used!` in this scope --> $DIR/feature-gate-rustc-diagnostic-macros.rs:18:5 | -18 | __diagnostic_used!(E0001); +LL | __diagnostic_used!(E0001); | ^^^^^^^^^^^^^^^^^ error: aborting due to 3 previous errors diff --git a/src/test/ui/feature-gate-rustc_const_unstable.stderr b/src/test/ui/feature-gate-rustc_const_unstable.stderr index 922898b7d36f0..b3760f745cac9 100644 --- a/src/test/ui/feature-gate-rustc_const_unstable.stderr +++ b/src/test/ui/feature-gate-rustc_const_unstable.stderr @@ -1,7 +1,7 @@ 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 +LL | #[rustc_const_unstable(feature="fzzzzzt")] //~ERROR internal feature | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(rustc_const_unstable)] to the crate attributes to enable diff --git a/src/test/ui/feature-gate-sanitizer-runtime.stderr b/src/test/ui/feature-gate-sanitizer-runtime.stderr index 6d77161864ff8..e2be5c8b6d9bd 100644 --- a/src/test/ui/feature-gate-sanitizer-runtime.stderr +++ b/src/test/ui/feature-gate-sanitizer-runtime.stderr @@ -1,7 +1,7 @@ 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 +LL | #![sanitizer_runtime] //~ ERROR the `#[sanitizer_runtime]` attribute is | ^^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(sanitizer_runtime)] to the crate attributes to enable diff --git a/src/test/ui/feature-gate-simd-ffi.stderr b/src/test/ui/feature-gate-simd-ffi.stderr index ab1ebefa333ea..f7b17aa4e6ad5 100644 --- a/src/test/ui/feature-gate-simd-ffi.stderr +++ b/src/test/ui/feature-gate-simd-ffi.stderr @@ -1,7 +1,7 @@ error: use of SIMD type `LocalSimd` in FFI is highly experimental and may result in invalid code --> $DIR/feature-gate-simd-ffi.rs:19:17 | -19 | fn baz() -> LocalSimd; //~ ERROR use of SIMD type +LL | fn baz() -> LocalSimd; //~ ERROR use of SIMD type | ^^^^^^^^^ | = help: add #![feature(simd_ffi)] to the crate attributes to enable @@ -9,7 +9,7 @@ error: use of SIMD type `LocalSimd` in FFI is highly experimental and may result error: use of SIMD type `LocalSimd` in FFI is highly experimental and may result in invalid code --> $DIR/feature-gate-simd-ffi.rs:20:15 | -20 | fn qux(x: LocalSimd); //~ ERROR use of SIMD type +LL | fn qux(x: LocalSimd); //~ ERROR use of SIMD type | ^^^^^^^^^ | = help: add #![feature(simd_ffi)] to the crate attributes to enable diff --git a/src/test/ui/feature-gate-simd.stderr b/src/test/ui/feature-gate-simd.stderr index 447706ab858c4..3e6fb9582d7ec 100644 --- a/src/test/ui/feature-gate-simd.stderr +++ b/src/test/ui/feature-gate-simd.stderr @@ -1,7 +1,7 @@ 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 +LL | #[repr(simd)] //~ ERROR SIMD types are experimental | ^^^^^^^^^^^^^ | = help: add #![feature(repr_simd)] to the crate attributes to enable diff --git a/src/test/ui/feature-gate-slice-patterns.stderr b/src/test/ui/feature-gate-slice-patterns.stderr index 7a2e67c89821c..7242666cbcaa6 100644 --- a/src/test/ui/feature-gate-slice-patterns.stderr +++ b/src/test/ui/feature-gate-slice-patterns.stderr @@ -1,7 +1,7 @@ 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 +LL | [1, 2, xs..] => {} //~ ERROR slice pattern syntax is experimental | ^^^^^^^^^^^^ | = help: add #![feature(slice_patterns)] to the crate attributes to enable diff --git a/src/test/ui/feature-gate-staged_api.stderr b/src/test/ui/feature-gate-staged_api.stderr index 30593d45760ef..7b395ffb74bad 100644 --- a/src/test/ui/feature-gate-staged_api.stderr +++ b/src/test/ui/feature-gate-staged_api.stderr @@ -1,13 +1,13 @@ error: stability attributes may not be used outside of the standard library --> $DIR/feature-gate-staged_api.rs:11:1 | -11 | #![stable(feature = "a", since = "b")] +LL | #![stable(feature = "a", since = "b")] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: stability attributes may not be used outside of the standard library --> $DIR/feature-gate-staged_api.rs:18:1 | -18 | #[stable(feature = "a", since = "b")] +LL | #[stable(feature = "a", since = "b")] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: aborting due to 2 previous errors diff --git a/src/test/ui/feature-gate-start.stderr b/src/test/ui/feature-gate-start.stderr index 61cbe42d0fb44..f18b06f49b016 100644 --- a/src/test/ui/feature-gate-start.stderr +++ b/src/test/ui/feature-gate-start.stderr @@ -1,7 +1,7 @@ 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 +LL | fn foo() {} //~ ERROR: a #[start] function is an experimental feature | ^^^^^^^^^^^ | = help: add #![feature(start)] to the crate attributes to enable diff --git a/src/test/ui/feature-gate-static-nobundle.stderr b/src/test/ui/feature-gate-static-nobundle.stderr index 9ec4f6480b1f4..5be626852e155 100644 --- a/src/test/ui/feature-gate-static-nobundle.stderr +++ b/src/test/ui/feature-gate-static-nobundle.stderr @@ -1,7 +1,7 @@ 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")] +LL | #[link(name="foo", kind="static-nobundle")] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(static_nobundle)] to the crate attributes to enable diff --git a/src/test/ui/feature-gate-stmt_expr_attributes.stderr b/src/test/ui/feature-gate-stmt_expr_attributes.stderr index 4d2e2f671c51c..df66307f99260 100644 --- a/src/test/ui/feature-gate-stmt_expr_attributes.stderr +++ b/src/test/ui/feature-gate-stmt_expr_attributes.stderr @@ -1,7 +1,7 @@ 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; +LL | const X: i32 = #[allow(dead_code)] 8; | ^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(stmt_expr_attributes)] to the crate attributes to enable diff --git a/src/test/ui/feature-gate-target_feature.stderr b/src/test/ui/feature-gate-target_feature.stderr index b6ad1b65691ce..af71e2aad8658 100644 --- a/src/test/ui/feature-gate-target_feature.stderr +++ b/src/test/ui/feature-gate-target_feature.stderr @@ -1,7 +1,7 @@ error[E0658]: the `#[target_feature]` attribute is an experimental feature --> $DIR/feature-gate-target_feature.rs:11:1 | -11 | #[target_feature = "+sse2"] +LL | #[target_feature = "+sse2"] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(target_feature)] to the crate attributes to enable diff --git a/src/test/ui/feature-gate-thread_local.stderr b/src/test/ui/feature-gate-thread_local.stderr index f7b05d5cf2561..1c6099698123f 100644 --- a/src/test/ui/feature-gate-thread_local.stderr +++ b/src/test/ui/feature-gate-thread_local.stderr @@ -1,7 +1,7 @@ error[E0658]: `#[thread_local]` is an experimental feature, and does not currently handle destructors. (see issue #29594) --> $DIR/feature-gate-thread_local.rs:18:1 | -18 | #[thread_local] //~ ERROR `#[thread_local]` is an experimental feature +LL | #[thread_local] //~ ERROR `#[thread_local]` is an experimental feature | ^^^^^^^^^^^^^^^ | = help: add #![feature(thread_local)] to the crate attributes to enable diff --git a/src/test/ui/feature-gate-trace_macros.stderr b/src/test/ui/feature-gate-trace_macros.stderr index eae3baa7e4d23..5e57741bcdda7 100644 --- a/src/test/ui/feature-gate-trace_macros.stderr +++ b/src/test/ui/feature-gate-trace_macros.stderr @@ -1,7 +1,7 @@ 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 +LL | trace_macros!(true); //~ ERROR: `trace_macros` is not stable | ^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(trace_macros)] to the crate attributes to enable diff --git a/src/test/ui/feature-gate-type_ascription.stderr b/src/test/ui/feature-gate-type_ascription.stderr index fa6ef84a7f557..24abaabee9574 100644 --- a/src/test/ui/feature-gate-type_ascription.stderr +++ b/src/test/ui/feature-gate-type_ascription.stderr @@ -1,7 +1,7 @@ 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 +LL | let a = 10: u8; //~ ERROR type ascription is experimental | ^^^^^^ | = help: add #![feature(type_ascription)] to the crate attributes to enable 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 ae14054b6e394..bb11dd9706468 100644 --- a/src/test/ui/feature-gate-unboxed-closures-manual-impls.stderr +++ b/src/test/ui/feature-gate-unboxed-closures-manual-impls.stderr @@ -1,7 +1,7 @@ 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: ()) -> () {} +LL | extern "rust-call" fn call(self, args: ()) -> () {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(unboxed_closures)] to the crate attributes to enable @@ -9,7 +9,7 @@ error[E0658]: 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: ()) -> () {} +LL | extern "rust-call" fn call_once(self, args: ()) -> () {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(unboxed_closures)] to the crate attributes to enable @@ -17,7 +17,7 @@ error[E0658]: 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: ()) -> () {} +LL | extern "rust-call" fn call_mut(&self, args: ()) -> () {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(unboxed_closures)] to the crate attributes to enable @@ -25,7 +25,7 @@ error[E0658]: 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: ()) -> () {} +LL | extern "rust-call" fn call_once(&self, args: ()) -> () {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(unboxed_closures)] to the crate attributes to enable 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 a27b00aaac0fa..12023a4961884 100644 --- a/src/test/ui/feature-gate-unboxed-closures-method-calls.stderr +++ b/src/test/ui/feature-gate-unboxed-closures-method-calls.stderr @@ -1,7 +1,7 @@ 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' +LL | f.call(()); //~ ERROR use of unstable library feature 'fn_traits' | ^^^^ | = help: add #![feature(fn_traits)] to the crate attributes to enable @@ -9,7 +9,7 @@ error[E0658]: 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' +LL | f.call_mut(()); //~ ERROR use of unstable library feature 'fn_traits' | ^^^^^^^^ | = help: add #![feature(fn_traits)] to the crate attributes to enable @@ -17,7 +17,7 @@ error[E0658]: 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' +LL | f.call_once(()); //~ ERROR use of unstable library feature 'fn_traits' | ^^^^^^^^^ | = help: add #![feature(fn_traits)] to the crate attributes to enable 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 3d0dd15b07f6c..9a0fe58f3e532 100644 --- a/src/test/ui/feature-gate-unboxed-closures-ufcs-calls.stderr +++ b/src/test/ui/feature-gate-unboxed-closures-ufcs-calls.stderr @@ -1,7 +1,7 @@ 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' +LL | Fn::call(&f, ()); //~ ERROR use of unstable library feature 'fn_traits' | ^^^^^^^^ | = help: add #![feature(fn_traits)] to the crate attributes to enable @@ -9,7 +9,7 @@ error[E0658]: 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' +LL | FnMut::call_mut(&mut f, ()); //~ ERROR use of unstable library feature 'fn_traits' | ^^^^^^^^^^^^^^^ | = help: add #![feature(fn_traits)] to the crate attributes to enable @@ -17,7 +17,7 @@ error[E0658]: 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' +LL | FnOnce::call_once(f, ()); //~ ERROR use of unstable library feature 'fn_traits' | ^^^^^^^^^^^^^^^^^ | = help: add #![feature(fn_traits)] to the crate attributes to enable diff --git a/src/test/ui/feature-gate-unboxed-closures.stderr b/src/test/ui/feature-gate-unboxed-closures.stderr index ca8a59249463d..21956ac97c7a8 100644 --- a/src/test/ui/feature-gate-unboxed-closures.stderr +++ b/src/test/ui/feature-gate-unboxed-closures.stderr @@ -1,9 +1,9 @@ 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 { -17 | | a + b -18 | | } +LL | / extern "rust-call" fn call_once(self, (a, b): (u32, u32)) -> u32 { +LL | | a + b +LL | | } | |_____^ | = help: add #![feature(unboxed_closures)] to the crate attributes to enable diff --git a/src/test/ui/feature-gate-underscore-lifetimes.stderr b/src/test/ui/feature-gate-underscore-lifetimes.stderr index 07c5e1ad640fa..fe5a43fee736b 100644 --- a/src/test/ui/feature-gate-underscore-lifetimes.stderr +++ b/src/test/ui/feature-gate-underscore-lifetimes.stderr @@ -1,7 +1,7 @@ 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 +LL | fn foo(x: &u8) -> Foo<'_> { //~ ERROR underscore lifetimes are unstable | ^^ | = help: add #![feature(underscore_lifetimes)] to the crate attributes to enable diff --git a/src/test/ui/feature-gate-universal.stderr b/src/test/ui/feature-gate-universal.stderr index 978ce5982bad1..b615292d00f4b 100644 --- a/src/test/ui/feature-gate-universal.stderr +++ b/src/test/ui/feature-gate-universal.stderr @@ -1,7 +1,7 @@ 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); } +LL | fn foo(x: impl std::fmt::Debug) { print!("{:?}", x); } | ^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(universal_impl_trait)] to the crate attributes to enable diff --git a/src/test/ui/feature-gate-unsized_tuple_coercion.stderr b/src/test/ui/feature-gate-unsized_tuple_coercion.stderr index 4714df9e96cd2..b2d5e5a30aac9 100644 --- a/src/test/ui/feature-gate-unsized_tuple_coercion.stderr +++ b/src/test/ui/feature-gate-unsized_tuple_coercion.stderr @@ -1,7 +1,7 @@ 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,) = &((),); +LL | let _ : &(Send,) = &((),); | ^^^^^^ | = help: add #![feature(unsized_tuple_coercion)] to the crate attributes to enable diff --git a/src/test/ui/feature-gate-untagged_unions.stderr b/src/test/ui/feature-gate-untagged_unions.stderr index 14b66cb5c815a..5d10fcb01bb1e 100644 --- a/src/test/ui/feature-gate-untagged_unions.stderr +++ b/src/test/ui/feature-gate-untagged_unions.stderr @@ -1,9 +1,9 @@ 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 -20 | | a: String, -21 | | } +LL | / union U3 { //~ ERROR unions with non-`Copy` fields are unstable +LL | | a: String, +LL | | } | |_^ | = help: add #![feature(untagged_unions)] to the crate attributes to enable @@ -11,9 +11,9 @@ error[E0658]: 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 -24 | | a: T, -25 | | } +LL | / union U4 { //~ ERROR unions with non-`Copy` fields are unstable +LL | | a: T, +LL | | } | |_^ | = help: add #![feature(untagged_unions)] to the crate attributes to enable @@ -21,9 +21,9 @@ error[E0658]: unions with non-`Copy` fields 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 -28 | | a: u8, -29 | | } +LL | / union U5 { //~ ERROR unions with `Drop` implementations are unstable +LL | | a: u8, +LL | | } | |_^ | = help: add #![feature(untagged_unions)] to the crate attributes to enable diff --git a/src/test/ui/feature-gate-unwind-attributes.stderr b/src/test/ui/feature-gate-unwind-attributes.stderr index d9b555e2634e8..4faf8d6c90215 100644 --- a/src/test/ui/feature-gate-unwind-attributes.stderr +++ b/src/test/ui/feature-gate-unwind-attributes.stderr @@ -1,7 +1,7 @@ error[E0658]: #[unwind] is experimental --> $DIR/feature-gate-unwind-attributes.rs:21:5 | -21 | #[unwind] //~ ERROR #[unwind] is experimental +LL | #[unwind] //~ ERROR #[unwind] is experimental | ^^^^^^^^^ | = help: add #![feature(unwind_attributes)] to the crate attributes to enable diff --git a/src/test/ui/feature-gate-used.stderr b/src/test/ui/feature-gate-used.stderr index 6d5ab1fd2c582..f8254ec639cf3 100644 --- a/src/test/ui/feature-gate-used.stderr +++ b/src/test/ui/feature-gate-used.stderr @@ -1,7 +1,7 @@ error[E0658]: the `#[used]` attribute is an experimental feature (see issue #40289) --> $DIR/feature-gate-used.rs:11:1 | -11 | #[used] +LL | #[used] | ^^^^^^^ | = help: add #![feature(used)] to the crate attributes to enable diff --git a/src/test/ui/feature-gate-wasm_import_memory.stderr b/src/test/ui/feature-gate-wasm_import_memory.stderr index 10190ef93f0d9..a33860504f685 100644 --- a/src/test/ui/feature-gate-wasm_import_memory.stderr +++ b/src/test/ui/feature-gate-wasm_import_memory.stderr @@ -1,7 +1,7 @@ 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 +LL | #![wasm_import_memory] //~ ERROR: currently unstable | ^^^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(wasm_import_memory)] to the crate attributes to enable diff --git a/src/test/ui/feature-gate/issue-43106-gating-of-builtin-attrs.stderr b/src/test/ui/feature-gate/issue-43106-gating-of-builtin-attrs.stderr index df831ded9a74d..9c4fb79f6f1aa 100644 --- a/src/test/ui/feature-gate/issue-43106-gating-of-builtin-attrs.stderr +++ b/src/test/ui/feature-gate/issue-43106-gating-of-builtin-attrs.stderr @@ -1,1318 +1,1318 @@ warning: macro_escape is a deprecated synonym for macro_use - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:513:1 - | -513 | #[macro_escape] - | ^^^^^^^^^^^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:513:1 + | +LL | #[macro_escape] + | ^^^^^^^^^^^^^^^ warning: macro_escape is a deprecated synonym for macro_use - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:516:17 - | -516 | mod inner { #![macro_escape] } - | ^^^^^^^^^^^^^^^^ - | - = help: consider an outer attribute, #[macro_use] mod ... + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:516:17 + | +LL | mod inner { #![macro_escape] } + | ^^^^^^^^^^^^^^^^ + | + = help: consider an outer attribute, #[macro_use] mod ... warning: `#[must_use]` on functions is experimental (see issue #43302) - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:663:5 - | -663 | #[must_use = "1400"] fn f() { } - | ^^^^^^^^^^^^^^^^^^^^ - | - = help: add #![feature(fn_must_use)] to the crate attributes to enable + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:663:5 + | +LL | #[must_use = "1400"] fn f() { } + | ^^^^^^^^^^^^^^^^^^^^ + | + = help: add #![feature(fn_must_use)] to the crate attributes to enable warning: unknown lint: `x5400` --> $DIR/issue-43106-gating-of-builtin-attrs.rs:49:33 | -49 | #![warn (x5400)] //~ WARN unknown lint: `x5400` +LL | #![warn (x5400)] //~ WARN unknown lint: `x5400` | ^^^^^ | note: lint level defined here --> $DIR/issue-43106-gating-of-builtin-attrs.rs:44:28 | -44 | #![warn(unused_attributes, unknown_lints)] +LL | #![warn(unused_attributes, unknown_lints)] | ^^^^^^^^^^^^^ warning: unknown lint: `x5300` --> $DIR/issue-43106-gating-of-builtin-attrs.rs:50:33 | -50 | #![allow (x5300)] //~ WARN unknown lint: `x5300` +LL | #![allow (x5300)] //~ WARN unknown lint: `x5300` | ^^^^^ warning: unknown lint: `x5200` --> $DIR/issue-43106-gating-of-builtin-attrs.rs:51:33 | -51 | #![forbid (x5200)] //~ WARN unknown lint: `x5200` +LL | #![forbid (x5200)] //~ WARN unknown lint: `x5200` | ^^^^^ warning: unknown lint: `x5100` --> $DIR/issue-43106-gating-of-builtin-attrs.rs:52:33 | -52 | #![deny (x5100)] //~ WARN unknown lint: `x5100` +LL | #![deny (x5100)] //~ WARN unknown lint: `x5100` | ^^^^^ warning: unknown lint: `x5400` - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:113:8 - | -113 | #[warn(x5400)] - | ^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:113:8 + | +LL | #[warn(x5400)] + | ^^^^^ warning: unknown lint: `x5400` - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:116:25 - | -116 | mod inner { #![warn(x5400)] } - | ^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:116:25 + | +LL | mod inner { #![warn(x5400)] } + | ^^^^^ warning: unknown lint: `x5400` - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:119:12 - | -119 | #[warn(x5400)] fn f() { } - | ^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:119:12 + | +LL | #[warn(x5400)] fn f() { } + | ^^^^^ warning: unknown lint: `x5400` - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:122:12 - | -122 | #[warn(x5400)] struct S; - | ^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:122:12 + | +LL | #[warn(x5400)] struct S; + | ^^^^^ warning: unknown lint: `x5400` - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:125:12 - | -125 | #[warn(x5400)] type T = S; - | ^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:125:12 + | +LL | #[warn(x5400)] type T = S; + | ^^^^^ warning: unknown lint: `x5400` - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:128:12 - | -128 | #[warn(x5400)] impl S { } - | ^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:128:12 + | +LL | #[warn(x5400)] impl S { } + | ^^^^^ warning: unknown lint: `x5300` - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:132:9 - | -132 | #[allow(x5300)] - | ^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:132:9 + | +LL | #[allow(x5300)] + | ^^^^^ warning: unknown lint: `x5300` - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:135:26 - | -135 | mod inner { #![allow(x5300)] } - | ^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:135:26 + | +LL | mod inner { #![allow(x5300)] } + | ^^^^^ warning: unknown lint: `x5300` - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:138:13 - | -138 | #[allow(x5300)] fn f() { } - | ^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:138:13 + | +LL | #[allow(x5300)] fn f() { } + | ^^^^^ warning: unknown lint: `x5300` - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:141:13 - | -141 | #[allow(x5300)] struct S; - | ^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:141:13 + | +LL | #[allow(x5300)] struct S; + | ^^^^^ warning: unknown lint: `x5300` - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:144:13 - | -144 | #[allow(x5300)] type T = S; - | ^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:144:13 + | +LL | #[allow(x5300)] type T = S; + | ^^^^^ warning: unknown lint: `x5300` - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:147:13 - | -147 | #[allow(x5300)] impl S { } - | ^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:147:13 + | +LL | #[allow(x5300)] impl S { } + | ^^^^^ warning: unknown lint: `x5200` - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:151:10 - | -151 | #[forbid(x5200)] - | ^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:151:10 + | +LL | #[forbid(x5200)] + | ^^^^^ warning: unknown lint: `x5200` - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:154:27 - | -154 | mod inner { #![forbid(x5200)] } - | ^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:154:27 + | +LL | mod inner { #![forbid(x5200)] } + | ^^^^^ warning: unknown lint: `x5200` - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:157:14 - | -157 | #[forbid(x5200)] fn f() { } - | ^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:157:14 + | +LL | #[forbid(x5200)] fn f() { } + | ^^^^^ warning: unknown lint: `x5200` - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:160:14 - | -160 | #[forbid(x5200)] struct S; - | ^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:160:14 + | +LL | #[forbid(x5200)] struct S; + | ^^^^^ warning: unknown lint: `x5200` - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:163:14 - | -163 | #[forbid(x5200)] type T = S; - | ^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:163:14 + | +LL | #[forbid(x5200)] type T = S; + | ^^^^^ warning: unknown lint: `x5200` - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:166:14 - | -166 | #[forbid(x5200)] impl S { } - | ^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:166:14 + | +LL | #[forbid(x5200)] impl S { } + | ^^^^^ warning: unknown lint: `x5100` - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:170:8 - | -170 | #[deny(x5100)] - | ^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:170:8 + | +LL | #[deny(x5100)] + | ^^^^^ warning: unknown lint: `x5100` - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:173:25 - | -173 | mod inner { #![deny(x5100)] } - | ^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:173:25 + | +LL | mod inner { #![deny(x5100)] } + | ^^^^^ warning: unknown lint: `x5100` - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:176:12 - | -176 | #[deny(x5100)] fn f() { } - | ^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:176:12 + | +LL | #[deny(x5100)] fn f() { } + | ^^^^^ warning: unknown lint: `x5100` - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:179:12 - | -179 | #[deny(x5100)] struct S; - | ^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:179:12 + | +LL | #[deny(x5100)] struct S; + | ^^^^^ warning: unknown lint: `x5100` - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:182:12 - | -182 | #[deny(x5100)] type T = S; - | ^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:182:12 + | +LL | #[deny(x5100)] type T = S; + | ^^^^^ warning: unknown lint: `x5100` - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:185:12 - | -185 | #[deny(x5100)] impl S { } - | ^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:185:12 + | +LL | #[deny(x5100)] impl S { } + | ^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:192:17 - | -192 | mod inner { #![macro_reexport="5000"] } - | ^^^^^^^^^^^^^^^^^^^^^^^^^ - | + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:192:17 + | +LL | mod inner { #![macro_reexport="5000"] } + | ^^^^^^^^^^^^^^^^^^^^^^^^^ + | note: lint level defined here - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:44:9 - | -44 | #![warn(unused_attributes, unknown_lints)] - | ^^^^^^^^^^^^^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:44:9 + | +LL | #![warn(unused_attributes, unknown_lints)] + | ^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:195:5 - | -195 | #[macro_reexport = "5000"] fn f() { } - | ^^^^^^^^^^^^^^^^^^^^^^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:195:5 + | +LL | #[macro_reexport = "5000"] fn f() { } + | ^^^^^^^^^^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:198:5 - | -198 | #[macro_reexport = "5000"] struct S; - | ^^^^^^^^^^^^^^^^^^^^^^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:198:5 + | +LL | #[macro_reexport = "5000"] struct S; + | ^^^^^^^^^^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:201:5 - | -201 | #[macro_reexport = "5000"] type T = S; - | ^^^^^^^^^^^^^^^^^^^^^^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:201:5 + | +LL | #[macro_reexport = "5000"] type T = S; + | ^^^^^^^^^^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:204:5 - | -204 | #[macro_reexport = "5000"] impl S { } - | ^^^^^^^^^^^^^^^^^^^^^^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:204:5 + | +LL | #[macro_reexport = "5000"] impl S { } + | ^^^^^^^^^^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:189:1 - | -189 | #[macro_reexport = "5000"] - | ^^^^^^^^^^^^^^^^^^^^^^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:189:1 + | +LL | #[macro_reexport = "5000"] + | ^^^^^^^^^^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:212:5 - | -212 | #[macro_use] fn f() { } - | ^^^^^^^^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:212:5 + | +LL | #[macro_use] fn f() { } + | ^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:215:5 - | -215 | #[macro_use] struct S; - | ^^^^^^^^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:215:5 + | +LL | #[macro_use] struct S; + | ^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:218:5 - | -218 | #[macro_use] type T = S; - | ^^^^^^^^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:218:5 + | +LL | #[macro_use] type T = S; + | ^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:221:5 - | -221 | #[macro_use] impl S { } - | ^^^^^^^^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:221:5 + | +LL | #[macro_use] impl S { } + | ^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:228:17 - | -228 | mod inner { #![macro_export="4800"] } - | ^^^^^^^^^^^^^^^^^^^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:228:17 + | +LL | mod inner { #![macro_export="4800"] } + | ^^^^^^^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:231:5 - | -231 | #[macro_export = "4800"] fn f() { } - | ^^^^^^^^^^^^^^^^^^^^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:231:5 + | +LL | #[macro_export = "4800"] fn f() { } + | ^^^^^^^^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:234:5 - | -234 | #[macro_export = "4800"] struct S; - | ^^^^^^^^^^^^^^^^^^^^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:234:5 + | +LL | #[macro_export = "4800"] struct S; + | ^^^^^^^^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:237:5 - | -237 | #[macro_export = "4800"] type T = S; - | ^^^^^^^^^^^^^^^^^^^^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:237:5 + | +LL | #[macro_export = "4800"] type T = S; + | ^^^^^^^^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:240:5 - | -240 | #[macro_export = "4800"] impl S { } - | ^^^^^^^^^^^^^^^^^^^^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:240:5 + | +LL | #[macro_export = "4800"] impl S { } + | ^^^^^^^^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:225:1 - | -225 | #[macro_export = "4800"] - | ^^^^^^^^^^^^^^^^^^^^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:225:1 + | +LL | #[macro_export = "4800"] + | ^^^^^^^^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:247:17 - | -247 | mod inner { #![plugin_registrar="4700"] } - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:247:17 + | +LL | mod inner { #![plugin_registrar="4700"] } + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:252:5 - | -252 | #[plugin_registrar = "4700"] struct S; - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:252:5 + | +LL | #[plugin_registrar = "4700"] struct S; + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:255:5 - | -255 | #[plugin_registrar = "4700"] type T = S; - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:255:5 + | +LL | #[plugin_registrar = "4700"] type T = S; + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:258:5 - | -258 | #[plugin_registrar = "4700"] impl S { } - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:258:5 + | +LL | #[plugin_registrar = "4700"] impl S { } + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:244:1 - | -244 | #[plugin_registrar = "4700"] - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:244:1 + | +LL | #[plugin_registrar = "4700"] + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:265:17 - | -265 | mod inner { #![main="4300"] } - | ^^^^^^^^^^^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:265:17 + | +LL | mod inner { #![main="4300"] } + | ^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:270:5 - | -270 | #[main = "4400"] struct S; - | ^^^^^^^^^^^^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:270:5 + | +LL | #[main = "4400"] struct S; + | ^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:273:5 - | -273 | #[main = "4400"] type T = S; - | ^^^^^^^^^^^^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:273:5 + | +LL | #[main = "4400"] type T = S; + | ^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:276:5 - | -276 | #[main = "4400"] impl S { } - | ^^^^^^^^^^^^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:276:5 + | +LL | #[main = "4400"] impl S { } + | ^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:262:1 - | -262 | #[main = "4400"] - | ^^^^^^^^^^^^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:262:1 + | +LL | #[main = "4400"] + | ^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:283:17 - | -283 | mod inner { #![start="4300"] } - | ^^^^^^^^^^^^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:283:17 + | +LL | mod inner { #![start="4300"] } + | ^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:288:5 - | -288 | #[start = "4300"] struct S; - | ^^^^^^^^^^^^^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:288:5 + | +LL | #[start = "4300"] struct S; + | ^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:291:5 - | -291 | #[start = "4300"] type T = S; - | ^^^^^^^^^^^^^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:291:5 + | +LL | #[start = "4300"] type T = S; + | ^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:294:5 - | -294 | #[start = "4300"] impl S { } - | ^^^^^^^^^^^^^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:294:5 + | +LL | #[start = "4300"] impl S { } + | ^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:280:1 - | -280 | #[start = "4300"] - | ^^^^^^^^^^^^^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:280:1 + | +LL | #[start = "4300"] + | ^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:333:17 - | -333 | mod inner { #![repr="3900"] } - | ^^^^^^^^^^^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:333:17 + | +LL | mod inner { #![repr="3900"] } + | ^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:336:5 - | -336 | #[repr = "3900"] fn f() { } - | ^^^^^^^^^^^^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:336:5 + | +LL | #[repr = "3900"] fn f() { } + | ^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:341:5 - | -341 | #[repr = "3900"] type T = S; - | ^^^^^^^^^^^^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:341:5 + | +LL | #[repr = "3900"] type T = S; + | ^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:344:5 - | -344 | #[repr = "3900"] impl S { } - | ^^^^^^^^^^^^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:344:5 + | +LL | #[repr = "3900"] impl S { } + | ^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:330:1 - | -330 | #[repr = "3900"] - | ^^^^^^^^^^^^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:330:1 + | +LL | #[repr = "3900"] + | ^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:352:5 - | -352 | #[path = "3800"] fn f() { } - | ^^^^^^^^^^^^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:352:5 + | +LL | #[path = "3800"] fn f() { } + | ^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:355:5 - | -355 | #[path = "3800"] struct S; - | ^^^^^^^^^^^^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:355:5 + | +LL | #[path = "3800"] struct S; + | ^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:358:5 - | -358 | #[path = "3800"] type T = S; - | ^^^^^^^^^^^^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:358:5 + | +LL | #[path = "3800"] type T = S; + | ^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:361:5 - | -361 | #[path = "3800"] impl S { } - | ^^^^^^^^^^^^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:361:5 + | +LL | #[path = "3800"] impl S { } + | ^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:368:17 - | -368 | mod inner { #![abi="3700"] } - | ^^^^^^^^^^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:368:17 + | +LL | mod inner { #![abi="3700"] } + | ^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:371:5 - | -371 | #[abi = "3700"] fn f() { } - | ^^^^^^^^^^^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:371:5 + | +LL | #[abi = "3700"] fn f() { } + | ^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:374:5 - | -374 | #[abi = "3700"] struct S; - | ^^^^^^^^^^^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:374:5 + | +LL | #[abi = "3700"] struct S; + | ^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:377:5 - | -377 | #[abi = "3700"] type T = S; - | ^^^^^^^^^^^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:377:5 + | +LL | #[abi = "3700"] type T = S; + | ^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:380:5 - | -380 | #[abi = "3700"] impl S { } - | ^^^^^^^^^^^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:380:5 + | +LL | #[abi = "3700"] impl S { } + | ^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:365:1 - | -365 | #[abi = "3700"] - | ^^^^^^^^^^^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:365:1 + | +LL | #[abi = "3700"] + | ^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:387:17 - | -387 | mod inner { #![automatically_derived="3600"] } - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:387:17 + | +LL | mod inner { #![automatically_derived="3600"] } + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:390:5 - | -390 | #[automatically_derived = "3600"] fn f() { } - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:390:5 + | +LL | #[automatically_derived = "3600"] fn f() { } + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:393:5 - | -393 | #[automatically_derived = "3600"] struct S; - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:393:5 + | +LL | #[automatically_derived = "3600"] struct S; + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:396:5 - | -396 | #[automatically_derived = "3600"] type T = S; - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:396:5 + | +LL | #[automatically_derived = "3600"] type T = S; + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:399:5 - | -399 | #[automatically_derived = "3600"] impl S { } - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:399:5 + | +LL | #[automatically_derived = "3600"] impl S { } + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:384:1 - | -384 | #[automatically_derived = "3600"] - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:384:1 + | +LL | #[automatically_derived = "3600"] + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ warning: function is marked #[no_mangle], but not exported - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:407:27 - | -407 | #[no_mangle = "3500"] fn f() { } - | -^^^^^^^^^ - | | - | help: try making it public: `pub` - | - = note: #[warn(private_no_mangle_fns)] on by default + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:407:27 + | +LL | #[no_mangle = "3500"] fn f() { } + | -^^^^^^^^^ + | | + | help: try making it public: `pub` + | + = note: #[warn(private_no_mangle_fns)] on by default warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:420:17 - | -420 | mod inner { #![no_link="3400"] } - | ^^^^^^^^^^^^^^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:420:17 + | +LL | mod inner { #![no_link="3400"] } + | ^^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:423:5 - | -423 | #[no_link = "3400"] fn f() { } - | ^^^^^^^^^^^^^^^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:423:5 + | +LL | #[no_link = "3400"] fn f() { } + | ^^^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:426:5 - | -426 | #[no_link = "3400"] struct S; - | ^^^^^^^^^^^^^^^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:426:5 + | +LL | #[no_link = "3400"] struct S; + | ^^^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:429:5 - | -429 | #[no_link = "3400"]type T = S; - | ^^^^^^^^^^^^^^^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:429:5 + | +LL | #[no_link = "3400"]type T = S; + | ^^^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:432:5 - | -432 | #[no_link = "3400"] impl S { } - | ^^^^^^^^^^^^^^^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:432:5 + | +LL | #[no_link = "3400"] impl S { } + | ^^^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:417:1 - | -417 | #[no_link = "3400"] - | ^^^^^^^^^^^^^^^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:417:1 + | +LL | #[no_link = "3400"] + | ^^^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:439:17 - | -439 | mod inner { #![should_panic="3200"] } - | ^^^^^^^^^^^^^^^^^^^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:439:17 + | +LL | mod inner { #![should_panic="3200"] } + | ^^^^^^^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:442:5 - | -442 | #[should_panic = "3200"] fn f() { } - | ^^^^^^^^^^^^^^^^^^^^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:442:5 + | +LL | #[should_panic = "3200"] fn f() { } + | ^^^^^^^^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:445:5 - | -445 | #[should_panic = "3200"] struct S; - | ^^^^^^^^^^^^^^^^^^^^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:445:5 + | +LL | #[should_panic = "3200"] struct S; + | ^^^^^^^^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:448:5 - | -448 | #[should_panic = "3200"] type T = S; - | ^^^^^^^^^^^^^^^^^^^^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:448:5 + | +LL | #[should_panic = "3200"] type T = S; + | ^^^^^^^^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:451:5 - | -451 | #[should_panic = "3200"] impl S { } - | ^^^^^^^^^^^^^^^^^^^^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:451:5 + | +LL | #[should_panic = "3200"] impl S { } + | ^^^^^^^^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:436:1 - | -436 | #[should_panic = "3200"] - | ^^^^^^^^^^^^^^^^^^^^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:436:1 + | +LL | #[should_panic = "3200"] + | ^^^^^^^^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:458:17 - | -458 | mod inner { #![ignore="3100"] } - | ^^^^^^^^^^^^^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:458:17 + | +LL | mod inner { #![ignore="3100"] } + | ^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:461:5 - | -461 | #[ignore = "3100"] fn f() { } - | ^^^^^^^^^^^^^^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:461:5 + | +LL | #[ignore = "3100"] fn f() { } + | ^^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:464:5 - | -464 | #[ignore = "3100"] struct S; - | ^^^^^^^^^^^^^^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:464:5 + | +LL | #[ignore = "3100"] struct S; + | ^^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:467:5 - | -467 | #[ignore = "3100"] type T = S; - | ^^^^^^^^^^^^^^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:467:5 + | +LL | #[ignore = "3100"] type T = S; + | ^^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:470:5 - | -470 | #[ignore = "3100"] impl S { } - | ^^^^^^^^^^^^^^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:470:5 + | +LL | #[ignore = "3100"] impl S { } + | ^^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:455:1 - | -455 | #[ignore = "3100"] - | ^^^^^^^^^^^^^^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:455:1 + | +LL | #[ignore = "3100"] + | ^^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:477:17 - | -477 | mod inner { #![no_implicit_prelude="3000"] } - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:477:17 + | +LL | mod inner { #![no_implicit_prelude="3000"] } + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:480:5 - | -480 | #[no_implicit_prelude = "3000"] fn f() { } - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:480:5 + | +LL | #[no_implicit_prelude = "3000"] fn f() { } + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:483:5 - | -483 | #[no_implicit_prelude = "3000"] struct S; - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:483:5 + | +LL | #[no_implicit_prelude = "3000"] struct S; + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:486:5 - | -486 | #[no_implicit_prelude = "3000"] type T = S; - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:486:5 + | +LL | #[no_implicit_prelude = "3000"] type T = S; + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:489:5 - | -489 | #[no_implicit_prelude = "3000"] impl S { } - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:489:5 + | +LL | #[no_implicit_prelude = "3000"] impl S { } + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:474:1 - | -474 | #[no_implicit_prelude = "3000"] - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:474:1 + | +LL | #[no_implicit_prelude = "3000"] + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:496:17 - | -496 | mod inner { #![reexport_test_harness_main="2900"] } - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:496:17 + | +LL | mod inner { #![reexport_test_harness_main="2900"] } + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:499:5 - | -499 | #[reexport_test_harness_main = "2900"] fn f() { } - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:499:5 + | +LL | #[reexport_test_harness_main = "2900"] fn f() { } + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:502:5 - | -502 | #[reexport_test_harness_main = "2900"] struct S; - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:502:5 + | +LL | #[reexport_test_harness_main = "2900"] struct S; + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:505:5 - | -505 | #[reexport_test_harness_main = "2900"] type T = S; - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:505:5 + | +LL | #[reexport_test_harness_main = "2900"] type T = S; + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:508:5 - | -508 | #[reexport_test_harness_main = "2900"] impl S { } - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:508:5 + | +LL | #[reexport_test_harness_main = "2900"] impl S { } + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:493:1 - | -493 | #[reexport_test_harness_main = "2900"] - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:493:1 + | +LL | #[reexport_test_harness_main = "2900"] + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:519:5 - | -519 | #[macro_escape] fn f() { } - | ^^^^^^^^^^^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:519:5 + | +LL | #[macro_escape] fn f() { } + | ^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:522:5 - | -522 | #[macro_escape] struct S; - | ^^^^^^^^^^^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:522:5 + | +LL | #[macro_escape] struct S; + | ^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:525:5 - | -525 | #[macro_escape] type T = S; - | ^^^^^^^^^^^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:525:5 + | +LL | #[macro_escape] type T = S; + | ^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:528:5 - | -528 | #[macro_escape] impl S { } - | ^^^^^^^^^^^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:528:5 + | +LL | #[macro_escape] impl S { } + | ^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:536:17 - | -536 | mod inner { #![no_std="2600"] } - | ^^^^^^^^^^^^^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:536:17 + | +LL | mod inner { #![no_std="2600"] } + | ^^^^^^^^^^^^^^^^^ warning: crate-level attribute should be in the root module - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:536:17 - | -536 | mod inner { #![no_std="2600"] } - | ^^^^^^^^^^^^^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:536:17 + | +LL | mod inner { #![no_std="2600"] } + | ^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:540:5 - | -540 | #[no_std = "2600"] fn f() { } - | ^^^^^^^^^^^^^^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:540:5 + | +LL | #[no_std = "2600"] fn f() { } + | ^^^^^^^^^^^^^^^^^^ warning: crate-level attribute should be an inner attribute: add an exclamation mark: #![foo] - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:540:5 - | -540 | #[no_std = "2600"] fn f() { } - | ^^^^^^^^^^^^^^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:540:5 + | +LL | #[no_std = "2600"] fn f() { } + | ^^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:544:5 - | -544 | #[no_std = "2600"] struct S; - | ^^^^^^^^^^^^^^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:544:5 + | +LL | #[no_std = "2600"] struct S; + | ^^^^^^^^^^^^^^^^^^ warning: crate-level attribute should be an inner attribute: add an exclamation mark: #![foo] - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:544:5 - | -544 | #[no_std = "2600"] struct S; - | ^^^^^^^^^^^^^^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:544:5 + | +LL | #[no_std = "2600"] struct S; + | ^^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:548:5 - | -548 | #[no_std = "2600"] type T = S; - | ^^^^^^^^^^^^^^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:548:5 + | +LL | #[no_std = "2600"] type T = S; + | ^^^^^^^^^^^^^^^^^^ warning: crate-level attribute should be an inner attribute: add an exclamation mark: #![foo] - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:548:5 - | -548 | #[no_std = "2600"] type T = S; - | ^^^^^^^^^^^^^^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:548:5 + | +LL | #[no_std = "2600"] type T = S; + | ^^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:552:5 - | -552 | #[no_std = "2600"] impl S { } - | ^^^^^^^^^^^^^^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:552:5 + | +LL | #[no_std = "2600"] impl S { } + | ^^^^^^^^^^^^^^^^^^ warning: crate-level attribute should be an inner attribute: add an exclamation mark: #![foo] - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:552:5 - | -552 | #[no_std = "2600"] impl S { } - | ^^^^^^^^^^^^^^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:552:5 + | +LL | #[no_std = "2600"] impl S { } + | ^^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:532:1 - | -532 | #[no_std = "2600"] - | ^^^^^^^^^^^^^^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:532:1 + | +LL | #[no_std = "2600"] + | ^^^^^^^^^^^^^^^^^^ warning: crate-level attribute should be an inner attribute: add an exclamation mark: #![foo] - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:532:1 - | -532 | #[no_std = "2600"] - | ^^^^^^^^^^^^^^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:532:1 + | +LL | #[no_std = "2600"] + | ^^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:692:17 - | -692 | mod inner { #![crate_name="0900"] } - | ^^^^^^^^^^^^^^^^^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:692:17 + | +LL | mod inner { #![crate_name="0900"] } + | ^^^^^^^^^^^^^^^^^^^^^ warning: crate-level attribute should be in the root module - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:692:17 - | -692 | mod inner { #![crate_name="0900"] } - | ^^^^^^^^^^^^^^^^^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:692:17 + | +LL | mod inner { #![crate_name="0900"] } + | ^^^^^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:696:5 - | -696 | #[crate_name = "0900"] fn f() { } - | ^^^^^^^^^^^^^^^^^^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:696:5 + | +LL | #[crate_name = "0900"] fn f() { } + | ^^^^^^^^^^^^^^^^^^^^^^ warning: crate-level attribute should be an inner attribute: add an exclamation mark: #![foo] - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:696:5 - | -696 | #[crate_name = "0900"] fn f() { } - | ^^^^^^^^^^^^^^^^^^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:696:5 + | +LL | #[crate_name = "0900"] fn f() { } + | ^^^^^^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:700:5 - | -700 | #[crate_name = "0900"] struct S; - | ^^^^^^^^^^^^^^^^^^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:700:5 + | +LL | #[crate_name = "0900"] struct S; + | ^^^^^^^^^^^^^^^^^^^^^^ warning: crate-level attribute should be an inner attribute: add an exclamation mark: #![foo] - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:700:5 - | -700 | #[crate_name = "0900"] struct S; - | ^^^^^^^^^^^^^^^^^^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:700:5 + | +LL | #[crate_name = "0900"] struct S; + | ^^^^^^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:704:5 - | -704 | #[crate_name = "0900"] type T = S; - | ^^^^^^^^^^^^^^^^^^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:704:5 + | +LL | #[crate_name = "0900"] type T = S; + | ^^^^^^^^^^^^^^^^^^^^^^ warning: crate-level attribute should be an inner attribute: add an exclamation mark: #![foo] - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:704:5 - | -704 | #[crate_name = "0900"] type T = S; - | ^^^^^^^^^^^^^^^^^^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:704:5 + | +LL | #[crate_name = "0900"] type T = S; + | ^^^^^^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:708:5 - | -708 | #[crate_name = "0900"] impl S { } - | ^^^^^^^^^^^^^^^^^^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:708:5 + | +LL | #[crate_name = "0900"] impl S { } + | ^^^^^^^^^^^^^^^^^^^^^^ warning: crate-level attribute should be an inner attribute: add an exclamation mark: #![foo] - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:708:5 - | -708 | #[crate_name = "0900"] impl S { } - | ^^^^^^^^^^^^^^^^^^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:708:5 + | +LL | #[crate_name = "0900"] impl S { } + | ^^^^^^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:688:1 - | -688 | #[crate_name = "0900"] - | ^^^^^^^^^^^^^^^^^^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:688:1 + | +LL | #[crate_name = "0900"] + | ^^^^^^^^^^^^^^^^^^^^^^ warning: crate-level attribute should be an inner attribute: add an exclamation mark: #![foo] - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:688:1 - | -688 | #[crate_name = "0900"] - | ^^^^^^^^^^^^^^^^^^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:688:1 + | +LL | #[crate_name = "0900"] + | ^^^^^^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:717:17 - | -717 | mod inner { #![crate_type="0800"] } - | ^^^^^^^^^^^^^^^^^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:717:17 + | +LL | mod inner { #![crate_type="0800"] } + | ^^^^^^^^^^^^^^^^^^^^^ warning: crate-level attribute should be in the root module - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:717:17 - | -717 | mod inner { #![crate_type="0800"] } - | ^^^^^^^^^^^^^^^^^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:717:17 + | +LL | mod inner { #![crate_type="0800"] } + | ^^^^^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:721:5 - | -721 | #[crate_type = "0800"] fn f() { } - | ^^^^^^^^^^^^^^^^^^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:721:5 + | +LL | #[crate_type = "0800"] fn f() { } + | ^^^^^^^^^^^^^^^^^^^^^^ warning: crate-level attribute should be an inner attribute: add an exclamation mark: #![foo] - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:721:5 - | -721 | #[crate_type = "0800"] fn f() { } - | ^^^^^^^^^^^^^^^^^^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:721:5 + | +LL | #[crate_type = "0800"] fn f() { } + | ^^^^^^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:725:5 - | -725 | #[crate_type = "0800"] struct S; - | ^^^^^^^^^^^^^^^^^^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:725:5 + | +LL | #[crate_type = "0800"] struct S; + | ^^^^^^^^^^^^^^^^^^^^^^ warning: crate-level attribute should be an inner attribute: add an exclamation mark: #![foo] - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:725:5 - | -725 | #[crate_type = "0800"] struct S; - | ^^^^^^^^^^^^^^^^^^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:725:5 + | +LL | #[crate_type = "0800"] struct S; + | ^^^^^^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:729:5 - | -729 | #[crate_type = "0800"] type T = S; - | ^^^^^^^^^^^^^^^^^^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:729:5 + | +LL | #[crate_type = "0800"] type T = S; + | ^^^^^^^^^^^^^^^^^^^^^^ warning: crate-level attribute should be an inner attribute: add an exclamation mark: #![foo] - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:729:5 - | -729 | #[crate_type = "0800"] type T = S; - | ^^^^^^^^^^^^^^^^^^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:729:5 + | +LL | #[crate_type = "0800"] type T = S; + | ^^^^^^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:733:5 - | -733 | #[crate_type = "0800"] impl S { } - | ^^^^^^^^^^^^^^^^^^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:733:5 + | +LL | #[crate_type = "0800"] impl S { } + | ^^^^^^^^^^^^^^^^^^^^^^ warning: crate-level attribute should be an inner attribute: add an exclamation mark: #![foo] - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:733:5 - | -733 | #[crate_type = "0800"] impl S { } - | ^^^^^^^^^^^^^^^^^^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:733:5 + | +LL | #[crate_type = "0800"] impl S { } + | ^^^^^^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:713:1 - | -713 | #[crate_type = "0800"] - | ^^^^^^^^^^^^^^^^^^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:713:1 + | +LL | #[crate_type = "0800"] + | ^^^^^^^^^^^^^^^^^^^^^^ warning: crate-level attribute should be an inner attribute: add an exclamation mark: #![foo] - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:713:1 - | -713 | #[crate_type = "0800"] - | ^^^^^^^^^^^^^^^^^^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:713:1 + | +LL | #[crate_type = "0800"] + | ^^^^^^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:742:17 - | -742 | mod inner { #![feature(x0600)] } - | ^^^^^^^^^^^^^^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:742:17 + | +LL | mod inner { #![feature(x0600)] } + | ^^^^^^^^^^^^^^^^^^ warning: crate-level attribute should be in the root module - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:742:17 - | -742 | mod inner { #![feature(x0600)] } - | ^^^^^^^^^^^^^^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:742:17 + | +LL | mod inner { #![feature(x0600)] } + | ^^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:746:5 - | -746 | #[feature(x0600)] fn f() { } - | ^^^^^^^^^^^^^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:746:5 + | +LL | #[feature(x0600)] fn f() { } + | ^^^^^^^^^^^^^^^^^ warning: crate-level attribute should be an inner attribute: add an exclamation mark: #![foo] - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:746:5 - | -746 | #[feature(x0600)] fn f() { } - | ^^^^^^^^^^^^^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:746:5 + | +LL | #[feature(x0600)] fn f() { } + | ^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:750:5 - | -750 | #[feature(x0600)] struct S; - | ^^^^^^^^^^^^^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:750:5 + | +LL | #[feature(x0600)] struct S; + | ^^^^^^^^^^^^^^^^^ warning: crate-level attribute should be an inner attribute: add an exclamation mark: #![foo] - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:750:5 - | -750 | #[feature(x0600)] struct S; - | ^^^^^^^^^^^^^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:750:5 + | +LL | #[feature(x0600)] struct S; + | ^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:754:5 - | -754 | #[feature(x0600)] type T = S; - | ^^^^^^^^^^^^^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:754:5 + | +LL | #[feature(x0600)] type T = S; + | ^^^^^^^^^^^^^^^^^ warning: crate-level attribute should be an inner attribute: add an exclamation mark: #![foo] - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:754:5 - | -754 | #[feature(x0600)] type T = S; - | ^^^^^^^^^^^^^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:754:5 + | +LL | #[feature(x0600)] type T = S; + | ^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:758:5 - | -758 | #[feature(x0600)] impl S { } - | ^^^^^^^^^^^^^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:758:5 + | +LL | #[feature(x0600)] impl S { } + | ^^^^^^^^^^^^^^^^^ warning: crate-level attribute should be an inner attribute: add an exclamation mark: #![foo] - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:758:5 - | -758 | #[feature(x0600)] impl S { } - | ^^^^^^^^^^^^^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:758:5 + | +LL | #[feature(x0600)] impl S { } + | ^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:738:1 - | -738 | #[feature(x0600)] - | ^^^^^^^^^^^^^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:738:1 + | +LL | #[feature(x0600)] + | ^^^^^^^^^^^^^^^^^ warning: crate-level attribute should be an inner attribute: add an exclamation mark: #![foo] - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:738:1 - | -738 | #[feature(x0600)] - | ^^^^^^^^^^^^^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:738:1 + | +LL | #[feature(x0600)] + | ^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:768:17 - | -768 | mod inner { #![no_main="0400"] } - | ^^^^^^^^^^^^^^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:768:17 + | +LL | mod inner { #![no_main="0400"] } + | ^^^^^^^^^^^^^^^^^^ warning: crate-level attribute should be in the root module - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:768:17 - | -768 | mod inner { #![no_main="0400"] } - | ^^^^^^^^^^^^^^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:768:17 + | +LL | mod inner { #![no_main="0400"] } + | ^^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:772:5 - | -772 | #[no_main = "0400"] fn f() { } - | ^^^^^^^^^^^^^^^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:772:5 + | +LL | #[no_main = "0400"] fn f() { } + | ^^^^^^^^^^^^^^^^^^^ warning: crate-level attribute should be an inner attribute: add an exclamation mark: #![foo] - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:772:5 - | -772 | #[no_main = "0400"] fn f() { } - | ^^^^^^^^^^^^^^^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:772:5 + | +LL | #[no_main = "0400"] fn f() { } + | ^^^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:776:5 - | -776 | #[no_main = "0400"] struct S; - | ^^^^^^^^^^^^^^^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:776:5 + | +LL | #[no_main = "0400"] struct S; + | ^^^^^^^^^^^^^^^^^^^ warning: crate-level attribute should be an inner attribute: add an exclamation mark: #![foo] - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:776:5 - | -776 | #[no_main = "0400"] struct S; - | ^^^^^^^^^^^^^^^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:776:5 + | +LL | #[no_main = "0400"] struct S; + | ^^^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:780:5 - | -780 | #[no_main = "0400"] type T = S; - | ^^^^^^^^^^^^^^^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:780:5 + | +LL | #[no_main = "0400"] type T = S; + | ^^^^^^^^^^^^^^^^^^^ warning: crate-level attribute should be an inner attribute: add an exclamation mark: #![foo] - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:780:5 - | -780 | #[no_main = "0400"] type T = S; - | ^^^^^^^^^^^^^^^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:780:5 + | +LL | #[no_main = "0400"] type T = S; + | ^^^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:784:5 - | -784 | #[no_main = "0400"] impl S { } - | ^^^^^^^^^^^^^^^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:784:5 + | +LL | #[no_main = "0400"] impl S { } + | ^^^^^^^^^^^^^^^^^^^ warning: crate-level attribute should be an inner attribute: add an exclamation mark: #![foo] - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:784:5 - | -784 | #[no_main = "0400"] impl S { } - | ^^^^^^^^^^^^^^^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:784:5 + | +LL | #[no_main = "0400"] impl S { } + | ^^^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:764:1 - | -764 | #[no_main = "0400"] - | ^^^^^^^^^^^^^^^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:764:1 + | +LL | #[no_main = "0400"] + | ^^^^^^^^^^^^^^^^^^^ warning: crate-level attribute should be an inner attribute: add an exclamation mark: #![foo] - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:764:1 - | -764 | #[no_main = "0400"] - | ^^^^^^^^^^^^^^^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:764:1 + | +LL | #[no_main = "0400"] + | ^^^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:806:17 - | -806 | mod inner { #![recursion_limit="0200"] } - | ^^^^^^^^^^^^^^^^^^^^^^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:806:17 + | +LL | mod inner { #![recursion_limit="0200"] } + | ^^^^^^^^^^^^^^^^^^^^^^^^^^ warning: crate-level attribute should be in the root module - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:806:17 - | -806 | mod inner { #![recursion_limit="0200"] } - | ^^^^^^^^^^^^^^^^^^^^^^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:806:17 + | +LL | mod inner { #![recursion_limit="0200"] } + | ^^^^^^^^^^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:810:5 - | -810 | #[recursion_limit="0200"] fn f() { } - | ^^^^^^^^^^^^^^^^^^^^^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:810:5 + | +LL | #[recursion_limit="0200"] fn f() { } + | ^^^^^^^^^^^^^^^^^^^^^^^^^ warning: crate-level attribute should be an inner attribute: add an exclamation mark: #![foo] - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:810:5 - | -810 | #[recursion_limit="0200"] fn f() { } - | ^^^^^^^^^^^^^^^^^^^^^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:810:5 + | +LL | #[recursion_limit="0200"] fn f() { } + | ^^^^^^^^^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:814:5 - | -814 | #[recursion_limit="0200"] struct S; - | ^^^^^^^^^^^^^^^^^^^^^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:814:5 + | +LL | #[recursion_limit="0200"] struct S; + | ^^^^^^^^^^^^^^^^^^^^^^^^^ warning: crate-level attribute should be an inner attribute: add an exclamation mark: #![foo] - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:814:5 - | -814 | #[recursion_limit="0200"] struct S; - | ^^^^^^^^^^^^^^^^^^^^^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:814:5 + | +LL | #[recursion_limit="0200"] struct S; + | ^^^^^^^^^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:818:5 - | -818 | #[recursion_limit="0200"] type T = S; - | ^^^^^^^^^^^^^^^^^^^^^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:818:5 + | +LL | #[recursion_limit="0200"] type T = S; + | ^^^^^^^^^^^^^^^^^^^^^^^^^ warning: crate-level attribute should be an inner attribute: add an exclamation mark: #![foo] - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:818:5 - | -818 | #[recursion_limit="0200"] type T = S; - | ^^^^^^^^^^^^^^^^^^^^^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:818:5 + | +LL | #[recursion_limit="0200"] type T = S; + | ^^^^^^^^^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:822:5 - | -822 | #[recursion_limit="0200"] impl S { } - | ^^^^^^^^^^^^^^^^^^^^^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:822:5 + | +LL | #[recursion_limit="0200"] impl S { } + | ^^^^^^^^^^^^^^^^^^^^^^^^^ warning: crate-level attribute should be an inner attribute: add an exclamation mark: #![foo] - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:822:5 - | -822 | #[recursion_limit="0200"] impl S { } - | ^^^^^^^^^^^^^^^^^^^^^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:822:5 + | +LL | #[recursion_limit="0200"] impl S { } + | ^^^^^^^^^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:802:1 - | -802 | #[recursion_limit="0200"] - | ^^^^^^^^^^^^^^^^^^^^^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:802:1 + | +LL | #[recursion_limit="0200"] + | ^^^^^^^^^^^^^^^^^^^^^^^^^ warning: crate-level attribute should be an inner attribute: add an exclamation mark: #![foo] - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:802:1 - | -802 | #[recursion_limit="0200"] - | ^^^^^^^^^^^^^^^^^^^^^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:802:1 + | +LL | #[recursion_limit="0200"] + | ^^^^^^^^^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:831:17 - | -831 | mod inner { #![type_length_limit="0100"] } - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:831:17 + | +LL | mod inner { #![type_length_limit="0100"] } + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ warning: crate-level attribute should be in the root module - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:831:17 - | -831 | mod inner { #![type_length_limit="0100"] } - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:831:17 + | +LL | mod inner { #![type_length_limit="0100"] } + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:835:5 - | -835 | #[type_length_limit="0100"] fn f() { } - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:835:5 + | +LL | #[type_length_limit="0100"] fn f() { } + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ warning: crate-level attribute should be an inner attribute: add an exclamation mark: #![foo] - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:835:5 - | -835 | #[type_length_limit="0100"] fn f() { } - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:835:5 + | +LL | #[type_length_limit="0100"] fn f() { } + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:839:5 - | -839 | #[type_length_limit="0100"] struct S; - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:839:5 + | +LL | #[type_length_limit="0100"] struct S; + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ warning: crate-level attribute should be an inner attribute: add an exclamation mark: #![foo] - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:839:5 - | -839 | #[type_length_limit="0100"] struct S; - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:839:5 + | +LL | #[type_length_limit="0100"] struct S; + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:843:5 - | -843 | #[type_length_limit="0100"] type T = S; - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:843:5 + | +LL | #[type_length_limit="0100"] type T = S; + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ warning: crate-level attribute should be an inner attribute: add an exclamation mark: #![foo] - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:843:5 - | -843 | #[type_length_limit="0100"] type T = S; - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:843:5 + | +LL | #[type_length_limit="0100"] type T = S; + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:847:5 - | -847 | #[type_length_limit="0100"] impl S { } - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:847:5 + | +LL | #[type_length_limit="0100"] impl S { } + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ warning: crate-level attribute should be an inner attribute: add an exclamation mark: #![foo] - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:847:5 - | -847 | #[type_length_limit="0100"] impl S { } - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:847:5 + | +LL | #[type_length_limit="0100"] impl S { } + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:827:1 - | -827 | #[type_length_limit="0100"] - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:827:1 + | +LL | #[type_length_limit="0100"] + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ warning: crate-level attribute should be an inner attribute: add an exclamation mark: #![foo] - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:827:1 - | -827 | #[type_length_limit="0100"] - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:827:1 + | +LL | #[type_length_limit="0100"] + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ warning: unused attribute --> $DIR/issue-43106-gating-of-builtin-attrs.rs:53:1 | -53 | #![macro_reexport = "5000"] //~ WARN unused attribute +LL | #![macro_reexport = "5000"] //~ WARN unused attribute | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ warning: unused attribute --> $DIR/issue-43106-gating-of-builtin-attrs.rs:55:1 | -55 | #![macro_export = "4800"] //~ WARN unused attribute +LL | #![macro_export = "4800"] //~ WARN unused attribute | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ warning: unused attribute --> $DIR/issue-43106-gating-of-builtin-attrs.rs:56:1 | -56 | #![plugin_registrar = "4700"] //~ WARN unused attribute +LL | #![plugin_registrar = "4700"] //~ WARN unused attribute | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ warning: unused attribute --> $DIR/issue-43106-gating-of-builtin-attrs.rs:59:1 | -59 | #![main = "x4400"] //~ WARN unused attribute +LL | #![main = "x4400"] //~ WARN unused attribute | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ warning: unused attribute --> $DIR/issue-43106-gating-of-builtin-attrs.rs:60:1 | -60 | #![start = "x4300"] //~ WARN unused attribute +LL | #![start = "x4300"] //~ WARN unused attribute | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ warning: unused attribute --> $DIR/issue-43106-gating-of-builtin-attrs.rs:63:1 | -63 | #![repr = "3900"] //~ WARN unused attribute +LL | #![repr = "3900"] //~ WARN unused attribute | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ warning: unused attribute --> $DIR/issue-43106-gating-of-builtin-attrs.rs:64:1 | -64 | #![path = "3800"] //~ WARN unused attribute +LL | #![path = "3800"] //~ WARN unused attribute | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ warning: unused attribute --> $DIR/issue-43106-gating-of-builtin-attrs.rs:65:1 | -65 | #![abi = "3700"] //~ WARN unused attribute +LL | #![abi = "3700"] //~ WARN unused attribute | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ warning: unused attribute --> $DIR/issue-43106-gating-of-builtin-attrs.rs:66:1 | -66 | #![automatically_derived = "3600"] //~ WARN unused attribute +LL | #![automatically_derived = "3600"] //~ WARN unused attribute | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ warning: unused attribute --> $DIR/issue-43106-gating-of-builtin-attrs.rs:68:1 | -68 | #![no_link = "3400"] //~ WARN unused attribute +LL | #![no_link = "3400"] //~ WARN unused attribute | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ warning: unused attribute --> $DIR/issue-43106-gating-of-builtin-attrs.rs:70:1 | -70 | #![should_panic = "3200"] //~ WARN unused attribute +LL | #![should_panic = "3200"] //~ WARN unused attribute | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ warning: unused attribute --> $DIR/issue-43106-gating-of-builtin-attrs.rs:71:1 | -71 | #![ignore = "3100"] //~ WARN unused attribute +LL | #![ignore = "3100"] //~ WARN unused attribute | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ warning: unused attribute --> $DIR/issue-43106-gating-of-builtin-attrs.rs:77:1 | -77 | #![proc_macro_derive = "2500"] //~ WARN unused attribute +LL | #![proc_macro_derive = "2500"] //~ WARN unused attribute | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: compilation successful - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:858:1 - | -858 | / fn main() { //~ ERROR compilation successful -859 | | println!("Hello World"); -860 | | } - | |_^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:858:1 + | +LL | / fn main() { //~ ERROR compilation successful +LL | | println!("Hello World"); +LL | | } + | |_^ diff --git a/src/test/ui/feature-gate/issue-43106-gating-of-deprecated.stderr b/src/test/ui/feature-gate/issue-43106-gating-of-deprecated.stderr index a413fcc56a015..83f6e016370bb 100644 --- a/src/test/ui/feature-gate/issue-43106-gating-of-deprecated.stderr +++ b/src/test/ui/feature-gate/issue-43106-gating-of-deprecated.stderr @@ -1,8 +1,8 @@ error: compilation successful --> $DIR/issue-43106-gating-of-deprecated.rs:29:1 | -29 | / fn main() { //~ ERROR compilation successful -30 | | println!("Hello World"); -31 | | } +LL | / fn main() { //~ ERROR compilation successful +LL | | println!("Hello World"); +LL | | } | |_^ diff --git a/src/test/ui/feature-gate/issue-43106-gating-of-derive-2.stderr b/src/test/ui/feature-gate/issue-43106-gating-of-derive-2.stderr index c5b33384b917a..8f63b16b0cf02 100644 --- a/src/test/ui/feature-gate/issue-43106-gating-of-derive-2.stderr +++ b/src/test/ui/feature-gate/issue-43106-gating-of-derive-2.stderr @@ -1,19 +1,19 @@ error: cannot find derive macro `x3300` in this scope --> $DIR/issue-43106-gating-of-derive-2.rs:14:14 | -14 | #[derive(x3300)] +LL | #[derive(x3300)] | ^^^^^ error: cannot find derive macro `x3300` in this scope --> $DIR/issue-43106-gating-of-derive-2.rs:18:14 | -18 | #[derive(x3300)] +LL | #[derive(x3300)] | ^^^^^ error: cannot find derive macro `x3300` in this scope --> $DIR/issue-43106-gating-of-derive-2.rs:22:14 | -22 | #[derive(x3300)] +LL | #[derive(x3300)] | ^^^^^ error: aborting due to 3 previous errors diff --git a/src/test/ui/feature-gate/issue-43106-gating-of-derive.stderr b/src/test/ui/feature-gate/issue-43106-gating-of-derive.stderr index a0b12585f3c48..6f5df6beba383 100644 --- a/src/test/ui/feature-gate/issue-43106-gating-of-derive.stderr +++ b/src/test/ui/feature-gate/issue-43106-gating-of-derive.stderr @@ -1,37 +1,37 @@ error: `derive` may only be applied to structs, enums and unions --> $DIR/issue-43106-gating-of-derive.rs:14:1 | -14 | #![derive(Debug)] +LL | #![derive(Debug)] | ^^^^^^^^^^^^^^^^^ help: try an outer attribute: `#[derive(Debug)]` error: `derive` may only be applied to structs, enums and unions --> $DIR/issue-43106-gating-of-derive.rs:17:1 | -17 | #[derive(Debug)] +LL | #[derive(Debug)] | ^^^^^^^^^^^^^^^^ error: `derive` may only be applied to structs, enums and unions --> $DIR/issue-43106-gating-of-derive.rs:20:17 | -20 | mod inner { #![derive(Debug)] } +LL | mod inner { #![derive(Debug)] } | ^^^^^^^^^^^^^^^^^ help: try an outer attribute: `#[derive(Debug)]` error: `derive` may only be applied to structs, enums and unions --> $DIR/issue-43106-gating-of-derive.rs:23:5 | -23 | #[derive(Debug)] +LL | #[derive(Debug)] | ^^^^^^^^^^^^^^^^ error: `derive` may only be applied to structs, enums and unions --> $DIR/issue-43106-gating-of-derive.rs:36:5 | -36 | #[derive(Debug)] +LL | #[derive(Debug)] | ^^^^^^^^^^^^^^^^ error: `derive` may only be applied to structs, enums and unions --> $DIR/issue-43106-gating-of-derive.rs:40:5 | -40 | #[derive(Debug)] +LL | #[derive(Debug)] | ^^^^^^^^^^^^^^^^ error: aborting due to 6 previous errors diff --git a/src/test/ui/feature-gate/issue-43106-gating-of-inline.stderr b/src/test/ui/feature-gate/issue-43106-gating-of-inline.stderr index 444c4176994c5..c8f833c977407 100644 --- a/src/test/ui/feature-gate/issue-43106-gating-of-inline.stderr +++ b/src/test/ui/feature-gate/issue-43106-gating-of-inline.stderr @@ -3,40 +3,40 @@ error[E0601]: main function not found error[E0518]: attribute should be applied to function --> $DIR/issue-43106-gating-of-inline.rs:21:1 | -21 | #[inline = "2100"] +LL | #[inline = "2100"] | ^^^^^^^^^^^^^^^^^^ -22 | //~^ ERROR attribute should be applied to function -23 | / mod inline { -24 | | mod inner { #![inline="2100"] } -25 | | //~^ ERROR attribute should be applied to function -26 | | +LL | //~^ ERROR attribute should be applied to function +LL | / mod inline { +LL | | mod inner { #![inline="2100"] } +LL | | //~^ ERROR attribute should be applied to function +LL | | ... | -36 | | //~^ ERROR attribute should be applied to function -37 | | } +LL | | //~^ ERROR attribute should be applied to function +LL | | } | |_- not a function error[E0518]: attribute should be applied to function --> $DIR/issue-43106-gating-of-inline.rs:24:17 | -24 | mod inner { #![inline="2100"] } +LL | mod inner { #![inline="2100"] } | ------------^^^^^^^^^^^^^^^^^-- not a function error[E0518]: attribute should be applied to function --> $DIR/issue-43106-gating-of-inline.rs:29:5 | -29 | #[inline = "2100"] struct S; +LL | #[inline = "2100"] struct S; | ^^^^^^^^^^^^^^^^^^ --------- not a function error[E0518]: attribute should be applied to function --> $DIR/issue-43106-gating-of-inline.rs:32:5 | -32 | #[inline = "2100"] type T = S; +LL | #[inline = "2100"] type T = S; | ^^^^^^^^^^^^^^^^^^ ----------- not a function error[E0518]: attribute should be applied to function --> $DIR/issue-43106-gating-of-inline.rs:35:5 | -35 | #[inline = "2100"] impl S { } +LL | #[inline = "2100"] impl S { } | ^^^^^^^^^^^^^^^^^^ ---------- not a function error: aborting due to 6 previous errors diff --git a/src/test/ui/feature-gate/issue-43106-gating-of-macro_escape.stderr b/src/test/ui/feature-gate/issue-43106-gating-of-macro_escape.stderr index 60a9382bdb8b1..7927559e50110 100644 --- a/src/test/ui/feature-gate/issue-43106-gating-of-macro_escape.stderr +++ b/src/test/ui/feature-gate/issue-43106-gating-of-macro_escape.stderr @@ -1,7 +1,7 @@ warning: macro_escape is a deprecated synonym for macro_use --> $DIR/issue-43106-gating-of-macro_escape.rs:16:1 | -16 | #![macro_escape] +LL | #![macro_escape] | ^^^^^^^^^^^^^^^^ | = help: consider an outer attribute, #[macro_use] mod ... diff --git a/src/test/ui/feature-gate/issue-43106-gating-of-macro_use.stderr b/src/test/ui/feature-gate/issue-43106-gating-of-macro_use.stderr index 2977384f62db6..0a491cd3b56c2 100644 --- a/src/test/ui/feature-gate/issue-43106-gating-of-macro_use.stderr +++ b/src/test/ui/feature-gate/issue-43106-gating-of-macro_use.stderr @@ -1,19 +1,19 @@ error: arguments to macro_use are not allowed here --> $DIR/issue-43106-gating-of-macro_use.rs:16:1 | -16 | #![macro_use = "4900"] //~ ERROR arguments to macro_use are not allowed here +LL | #![macro_use = "4900"] //~ ERROR arguments to macro_use are not allowed here | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: arguments to macro_use are not allowed here --> $DIR/issue-43106-gating-of-macro_use.rs:18:1 | -18 | #[macro_use = "2700"] +LL | #[macro_use = "2700"] | ^^^^^^^^^^^^^^^^^^^^^ error: arguments to macro_use are not allowed here --> $DIR/issue-43106-gating-of-macro_use.rs:21:17 | -21 | mod inner { #![macro_use="2700"] } +LL | mod inner { #![macro_use="2700"] } | ^^^^^^^^^^^^^^^^^^^^ error: aborting due to 3 previous errors diff --git a/src/test/ui/feature-gate/issue-43106-gating-of-proc_macro_derive.stderr b/src/test/ui/feature-gate/issue-43106-gating-of-proc_macro_derive.stderr index a76f0219f7a81..c1d8fe51f78e2 100644 --- a/src/test/ui/feature-gate/issue-43106-gating-of-proc_macro_derive.stderr +++ b/src/test/ui/feature-gate/issue-43106-gating-of-proc_macro_derive.stderr @@ -1,37 +1,37 @@ error: the `#[proc_macro_derive]` attribute may only be used on bare functions --> $DIR/issue-43106-gating-of-proc_macro_derive.rs:20:1 | -20 | #[proc_macro_derive = "2500"] +LL | #[proc_macro_derive = "2500"] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: the `#[proc_macro_derive]` attribute may only be used on bare functions --> $DIR/issue-43106-gating-of-proc_macro_derive.rs:28:17 | -28 | mod inner { #![proc_macro_derive="2500"] } +LL | mod inner { #![proc_macro_derive="2500"] } | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: the `#[proc_macro_derive]` attribute is only usable with crates of the `proc-macro` crate type --> $DIR/issue-43106-gating-of-proc_macro_derive.rs:31:5 | -31 | #[proc_macro_derive = "2500"] fn f() { } +LL | #[proc_macro_derive = "2500"] fn f() { } | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: the `#[proc_macro_derive]` attribute may only be used on bare functions --> $DIR/issue-43106-gating-of-proc_macro_derive.rs:34:5 | -34 | #[proc_macro_derive = "2500"] struct S; +LL | #[proc_macro_derive = "2500"] struct S; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: the `#[proc_macro_derive]` attribute may only be used on bare functions --> $DIR/issue-43106-gating-of-proc_macro_derive.rs:37:5 | -37 | #[proc_macro_derive = "2500"] type T = S; +LL | #[proc_macro_derive = "2500"] type T = S; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: the `#[proc_macro_derive]` attribute may only be used on bare functions --> $DIR/issue-43106-gating-of-proc_macro_derive.rs:40:5 | -40 | #[proc_macro_derive = "2500"] impl S { } +LL | #[proc_macro_derive = "2500"] impl S { } | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error[E0601]: main function not found diff --git a/src/test/ui/feature-gate/issue-43106-gating-of-rustc_deprecated.stderr b/src/test/ui/feature-gate/issue-43106-gating-of-rustc_deprecated.stderr index 5de3204f93182..0a9445349ae1a 100644 --- a/src/test/ui/feature-gate/issue-43106-gating-of-rustc_deprecated.stderr +++ b/src/test/ui/feature-gate/issue-43106-gating-of-rustc_deprecated.stderr @@ -3,43 +3,43 @@ error[E0601]: main function not found error: stability attributes may not be used outside of the standard library --> $DIR/issue-43106-gating-of-rustc_deprecated.rs:17:1 | -17 | #![rustc_deprecated = "1500"] +LL | #![rustc_deprecated = "1500"] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: stability attributes may not be used outside of the standard library --> $DIR/issue-43106-gating-of-rustc_deprecated.rs:20:1 | -20 | #[rustc_deprecated = "1500"] +LL | #[rustc_deprecated = "1500"] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: stability attributes may not be used outside of the standard library --> $DIR/issue-43106-gating-of-rustc_deprecated.rs:23:17 | -23 | mod inner { #![rustc_deprecated="1500"] } +LL | mod inner { #![rustc_deprecated="1500"] } | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: stability attributes may not be used outside of the standard library --> $DIR/issue-43106-gating-of-rustc_deprecated.rs:26:5 | -26 | #[rustc_deprecated = "1500"] fn f() { } +LL | #[rustc_deprecated = "1500"] fn f() { } | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: stability attributes may not be used outside of the standard library --> $DIR/issue-43106-gating-of-rustc_deprecated.rs:29:5 | -29 | #[rustc_deprecated = "1500"] struct S; +LL | #[rustc_deprecated = "1500"] struct S; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: stability attributes may not be used outside of the standard library --> $DIR/issue-43106-gating-of-rustc_deprecated.rs:32:5 | -32 | #[rustc_deprecated = "1500"] type T = S; +LL | #[rustc_deprecated = "1500"] type T = S; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: stability attributes may not be used outside of the standard library --> $DIR/issue-43106-gating-of-rustc_deprecated.rs:35:5 | -35 | #[rustc_deprecated = "1500"] impl S { } +LL | #[rustc_deprecated = "1500"] impl S { } | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: aborting due to 8 previous errors diff --git a/src/test/ui/feature-gate/issue-43106-gating-of-stable.stderr b/src/test/ui/feature-gate/issue-43106-gating-of-stable.stderr index eace1dc413a6b..9ce20b5b99ec4 100644 --- a/src/test/ui/feature-gate/issue-43106-gating-of-stable.stderr +++ b/src/test/ui/feature-gate/issue-43106-gating-of-stable.stderr @@ -3,43 +3,43 @@ error[E0601]: main function not found error: stability attributes may not be used outside of the standard library --> $DIR/issue-43106-gating-of-stable.rs:17:1 | -17 | #![stable = "1300"] +LL | #![stable = "1300"] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: stability attributes may not be used outside of the standard library --> $DIR/issue-43106-gating-of-stable.rs:20:1 | -20 | #[stable = "1300"] +LL | #[stable = "1300"] | ^^^^^^^^^^^^^^^^^^ error: stability attributes may not be used outside of the standard library --> $DIR/issue-43106-gating-of-stable.rs:23:17 | -23 | mod inner { #![stable="1300"] } +LL | mod inner { #![stable="1300"] } | ^^^^^^^^^^^^^^^^^ error: stability attributes may not be used outside of the standard library --> $DIR/issue-43106-gating-of-stable.rs:26:5 | -26 | #[stable = "1300"] fn f() { } +LL | #[stable = "1300"] fn f() { } | ^^^^^^^^^^^^^^^^^^ error: stability attributes may not be used outside of the standard library --> $DIR/issue-43106-gating-of-stable.rs:29:5 | -29 | #[stable = "1300"] struct S; +LL | #[stable = "1300"] struct S; | ^^^^^^^^^^^^^^^^^^ error: stability attributes may not be used outside of the standard library --> $DIR/issue-43106-gating-of-stable.rs:32:5 | -32 | #[stable = "1300"] type T = S; +LL | #[stable = "1300"] type T = S; | ^^^^^^^^^^^^^^^^^^ error: stability attributes may not be used outside of the standard library --> $DIR/issue-43106-gating-of-stable.rs:35:5 | -35 | #[stable = "1300"] impl S { } +LL | #[stable = "1300"] impl S { } | ^^^^^^^^^^^^^^^^^^ error: aborting due to 8 previous errors diff --git a/src/test/ui/feature-gate/issue-43106-gating-of-unstable.stderr b/src/test/ui/feature-gate/issue-43106-gating-of-unstable.stderr index 59068279fde19..2a440a40ac5ea 100644 --- a/src/test/ui/feature-gate/issue-43106-gating-of-unstable.stderr +++ b/src/test/ui/feature-gate/issue-43106-gating-of-unstable.stderr @@ -3,43 +3,43 @@ error[E0601]: main function not found error: stability attributes may not be used outside of the standard library --> $DIR/issue-43106-gating-of-unstable.rs:17:1 | -17 | #![unstable = "1200"] +LL | #![unstable = "1200"] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: stability attributes may not be used outside of the standard library --> $DIR/issue-43106-gating-of-unstable.rs:20:1 | -20 | #[unstable = "1200"] +LL | #[unstable = "1200"] | ^^^^^^^^^^^^^^^^^^^^ error: stability attributes may not be used outside of the standard library --> $DIR/issue-43106-gating-of-unstable.rs:23:17 | -23 | mod inner { #![unstable="1200"] } +LL | mod inner { #![unstable="1200"] } | ^^^^^^^^^^^^^^^^^^^ error: stability attributes may not be used outside of the standard library --> $DIR/issue-43106-gating-of-unstable.rs:26:5 | -26 | #[unstable = "1200"] fn f() { } +LL | #[unstable = "1200"] fn f() { } | ^^^^^^^^^^^^^^^^^^^^ error: stability attributes may not be used outside of the standard library --> $DIR/issue-43106-gating-of-unstable.rs:29:5 | -29 | #[unstable = "1200"] struct S; +LL | #[unstable = "1200"] struct S; | ^^^^^^^^^^^^^^^^^^^^ error: stability attributes may not be used outside of the standard library --> $DIR/issue-43106-gating-of-unstable.rs:32:5 | -32 | #[unstable = "1200"] type T = S; +LL | #[unstable = "1200"] type T = S; | ^^^^^^^^^^^^^^^^^^^^ error: stability attributes may not be used outside of the standard library --> $DIR/issue-43106-gating-of-unstable.rs:35:5 | -35 | #[unstable = "1200"] impl S { } +LL | #[unstable = "1200"] impl S { } | ^^^^^^^^^^^^^^^^^^^^ error: aborting due to 8 previous errors diff --git a/src/test/ui/fmt/format-string-error.stderr b/src/test/ui/fmt/format-string-error.stderr index 1c775929cf452..a7a66722e527f 100644 --- a/src/test/ui/fmt/format-string-error.stderr +++ b/src/test/ui/fmt/format-string-error.stderr @@ -1,7 +1,7 @@ error: invalid format string: expected `'}'` but string was terminated --> $DIR/format-string-error.rs:12:5 | -12 | println!("{"); +LL | println!("{"); | ^^^^^^^^^^^^^^ | = note: if you intended to print `{`, you can escape it using `{{` @@ -10,7 +10,7 @@ error: invalid format string: expected `'}'` but string was terminated error: invalid format string: unmatched `}` found --> $DIR/format-string-error.rs:14:5 | -14 | println!("}"); +LL | println!("}"); | ^^^^^^^^^^^^^^ | = note: if you intended to print `}`, you can escape it using `}}` diff --git a/src/test/ui/fmt/send-sync.stderr b/src/test/ui/fmt/send-sync.stderr index 4ec5c9ebd2712..d8d32111099f2 100644 --- a/src/test/ui/fmt/send-sync.stderr +++ b/src/test/ui/fmt/send-sync.stderr @@ -1,7 +1,7 @@ error[E0277]: the trait bound `*mut std::ops::Fn() + 'static: std::marker::Sync` is not satisfied in `[std::fmt::ArgumentV1<'_>]` --> $DIR/send-sync.rs:18:5 | -18 | send(format_args!("{:?}", c)); //~ ERROR Sync` is not satisfied +LL | send(format_args!("{:?}", c)); //~ ERROR Sync` is not satisfied | ^^^^ `*mut std::ops::Fn() + 'static` cannot be shared between threads safely | = help: within `[std::fmt::ArgumentV1<'_>]`, the trait `std::marker::Sync` is not implemented for `*mut std::ops::Fn() + 'static` @@ -15,13 +15,13 @@ error[E0277]: the trait bound `*mut std::ops::Fn() + 'static: std::marker::Sync` note: required by `send` --> $DIR/send-sync.rs:11:1 | -11 | fn send(_: T) {} +LL | fn send(_: T) {} | ^^^^^^^^^^^^^^^^^^^^^^ error[E0277]: the trait bound `*mut std::ops::Fn() + 'static: std::marker::Sync` is not satisfied in `std::fmt::Arguments<'_>` --> $DIR/send-sync.rs:19:5 | -19 | sync(format_args!("{:?}", c)); //~ ERROR Sync` is not satisfied +LL | sync(format_args!("{:?}", c)); //~ ERROR Sync` is not satisfied | ^^^^ `*mut std::ops::Fn() + 'static` cannot be shared between threads safely | = help: within `std::fmt::Arguments<'_>`, the trait `std::marker::Sync` is not implemented for `*mut std::ops::Fn() + 'static` @@ -35,7 +35,7 @@ error[E0277]: the trait bound `*mut std::ops::Fn() + 'static: std::marker::Sync` note: required by `sync` --> $DIR/send-sync.rs:12:1 | -12 | fn sync(_: T) {} +LL | fn sync(_: T) {} | ^^^^^^^^^^^^^^^^^^^^^^ error: aborting due to 2 previous errors diff --git a/src/test/ui/generator/auto-trait-regions.stderr b/src/test/ui/generator/auto-trait-regions.stderr index 37241e615101d..165cc4c4b8c11 100644 --- a/src/test/ui/generator/auto-trait-regions.stderr +++ b/src/test/ui/generator/auto-trait-regions.stderr @@ -1,7 +1,7 @@ error[E0277]: the trait bound `No: Foo` is not satisfied in `[generator@$DIR/auto-trait-regions.rs:35:15: 39:6 x:&&'static OnlyFooIfStaticRef for<'r> {&'r OnlyFooIfStaticRef, ()}]` --> $DIR/auto-trait-regions.rs:40:5 | -40 | assert_foo(gen); //~ ERROR the trait bound `No: Foo` is not satisfied +LL | assert_foo(gen); //~ ERROR the trait bound `No: Foo` is not satisfied | ^^^^^^^^^^ within `[generator@$DIR/auto-trait-regions.rs:35:15: 39:6 x:&&'static OnlyFooIfStaticRef for<'r> {&'r OnlyFooIfStaticRef, ()}]`, the trait `Foo` is not implemented for `No` | = help: the following implementations were found: @@ -13,13 +13,13 @@ error[E0277]: the trait bound `No: Foo` is not satisfied in `[generator@$DIR/aut note: required by `assert_foo` --> $DIR/auto-trait-regions.rs:30:1 | -30 | fn assert_foo(f: T) {} +LL | fn assert_foo(f: T) {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ error[E0279]: the requirement `for<'r, 's> 'r : 's` is not satisfied (`expected bound lifetime parameter, found concrete lifetime`) --> $DIR/auto-trait-regions.rs:57:5 | -57 | assert_foo(gen); //~ ERROR the requirement `for<'r, 's> 'r : 's` is not satisfied +LL | assert_foo(gen); //~ ERROR the requirement `for<'r, 's> 'r : 's` is not satisfied | ^^^^^^^^^^ | = note: required because of the requirements on the impl of `for<'r, 's> Foo` for `A<'_, '_>` @@ -28,7 +28,7 @@ error[E0279]: the requirement `for<'r, 's> 'r : 's` is not satisfied (`expected note: required by `assert_foo` --> $DIR/auto-trait-regions.rs:30:1 | -30 | fn assert_foo(f: T) {} +LL | fn assert_foo(f: T) {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: aborting due to 2 previous errors diff --git a/src/test/ui/generator/borrowing.stderr b/src/test/ui/generator/borrowing.stderr index cb84eaedb3354..2354db7bc95e1 100644 --- a/src/test/ui/generator/borrowing.stderr +++ b/src/test/ui/generator/borrowing.stderr @@ -1,28 +1,28 @@ error[E0597]: `a` does not live long enough --> $DIR/borrowing.rs:18:20 | -18 | (|| yield &a).resume() +LL | (|| yield &a).resume() | -- ^ borrowed value does not live long enough | | | capture occurs here -19 | //~^ ERROR: `a` does not live long enough -20 | }; +LL | //~^ ERROR: `a` does not live long enough +LL | }; | - borrowed value only lives until here ... -29 | } +LL | } | - borrowed value needs to live until here error[E0597]: `a` does not live long enough --> $DIR/borrowing.rs:25:20 | -24 | || { +LL | || { | -- capture occurs here -25 | yield &a +LL | yield &a | ^ borrowed value does not live long enough ... -28 | }; +LL | }; | - borrowed value only lives until here -29 | } +LL | } | - borrowed value needs to live until here error: aborting due to 2 previous errors diff --git a/src/test/ui/generator/dropck.stderr b/src/test/ui/generator/dropck.stderr index deaf00fff071e..4ce42b62cd321 100644 --- a/src/test/ui/generator/dropck.stderr +++ b/src/test/ui/generator/dropck.stderr @@ -1,13 +1,13 @@ error[E0597]: `ref_` does not live long enough --> $DIR/dropck.rs:23:18 | -21 | gen = || { +LL | gen = || { | -- capture occurs here -22 | // but the generator can use it to drop a `Ref<'a, i32>`. -23 | let _d = ref_.take(); //~ ERROR `ref_` does not live long enough +LL | // but the generator can use it to drop a `Ref<'a, i32>`. +LL | let _d = ref_.take(); //~ ERROR `ref_` does not live long enough | ^^^^ borrowed value does not live long enough ... -28 | } +LL | } | - borrowed value dropped before borrower | = note: values in a scope are dropped in the opposite order they are created diff --git a/src/test/ui/generator/generator-with-nll.stderr b/src/test/ui/generator/generator-with-nll.stderr index 0f7d2e540d80a..4b063406adbc3 100644 --- a/src/test/ui/generator/generator-with-nll.stderr +++ b/src/test/ui/generator/generator-with-nll.stderr @@ -1,28 +1,28 @@ error[E0626]: borrow may still be in use when generator yields (Ast) --> $DIR/generator-with-nll.rs:19:23 | -19 | let _a = &mut true; //~ ERROR borrow may still be in use when generator yields (Ast) +LL | let _a = &mut true; //~ ERROR borrow may still be in use when generator yields (Ast) | ^^^^ ... -22 | yield (); +LL | yield (); | -------- possible yield occurs here error[E0626]: borrow may still be in use when generator yields (Ast) --> $DIR/generator-with-nll.rs:20:22 | -20 | let b = &mut true; //~ ERROR borrow may still be in use when generator yields (Ast) +LL | let b = &mut true; //~ ERROR borrow may still be in use when generator yields (Ast) | ^^^^ -21 | //~^ borrow may still be in use when generator yields (Mir) -22 | yield (); +LL | //~^ borrow may still be in use when generator yields (Mir) +LL | yield (); | -------- possible yield occurs here error[E0626]: borrow may still be in use when generator yields (Mir) --> $DIR/generator-with-nll.rs:20:17 | -20 | let b = &mut true; //~ ERROR borrow may still be in use when generator yields (Ast) +LL | let b = &mut true; //~ ERROR borrow may still be in use when generator yields (Ast) | ^^^^^^^^^ -21 | //~^ borrow may still be in use when generator yields (Mir) -22 | yield (); +LL | //~^ borrow may still be in use when generator yields (Mir) +LL | yield (); | -------- possible yield occurs here error: aborting due to 3 previous errors diff --git a/src/test/ui/generator/issue-48048.stderr b/src/test/ui/generator/issue-48048.stderr index fd1667128ab60..3397412ad7f00 100644 --- a/src/test/ui/generator/issue-48048.stderr +++ b/src/test/ui/generator/issue-48048.stderr @@ -1,9 +1,9 @@ error[E0626]: borrow may still be in use when generator yields --> $DIR/issue-48048.rs:19:9 | -19 | x.0({ //~ ERROR borrow may still be in use when generator yields +LL | x.0({ //~ ERROR borrow may still be in use when generator yields | ^^^ -20 | yield; +LL | yield; | ----- possible yield occurs here error: aborting due to previous error diff --git a/src/test/ui/generator/no-arguments-on-generators.stderr b/src/test/ui/generator/no-arguments-on-generators.stderr index 4d2e228685ae3..c02dfdf0c55f8 100644 --- a/src/test/ui/generator/no-arguments-on-generators.stderr +++ b/src/test/ui/generator/no-arguments-on-generators.stderr @@ -1,7 +1,7 @@ error[E0628]: generators cannot have explicit arguments --> $DIR/no-arguments-on-generators.rs:14:15 | -14 | let gen = |start| { //~ ERROR generators cannot have explicit arguments +LL | let gen = |start| { //~ ERROR generators cannot have explicit arguments | ^^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/generator/not-send-sync.stderr b/src/test/ui/generator/not-send-sync.stderr index e65c8f1546e82..92c4701325cb1 100644 --- a/src/test/ui/generator/not-send-sync.stderr +++ b/src/test/ui/generator/not-send-sync.stderr @@ -1,7 +1,7 @@ error[E0277]: the trait bound `std::cell::Cell: std::marker::Sync` is not satisfied --> $DIR/not-send-sync.rs:26:5 | -26 | assert_send(|| { +LL | assert_send(|| { | ^^^^^^^^^^^ `std::cell::Cell` cannot be shared between threads safely | = help: the trait `std::marker::Sync` is not implemented for `std::cell::Cell` @@ -10,13 +10,13 @@ error[E0277]: the trait bound `std::cell::Cell: std::marker::Sync` is not s note: required by `main::assert_send` --> $DIR/not-send-sync.rs:17:5 | -17 | fn assert_send(_: T) {} +LL | fn assert_send(_: T) {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error[E0277]: the trait bound `std::cell::Cell: std::marker::Sync` is not satisfied in `[generator@$DIR/not-send-sync.rs:19:17: 23:6 {std::cell::Cell, ()}]` --> $DIR/not-send-sync.rs:19:5 | -19 | assert_sync(|| { +LL | assert_sync(|| { | ^^^^^^^^^^^ `std::cell::Cell` cannot be shared between threads safely | = help: within `[generator@$DIR/not-send-sync.rs:19:17: 23:6 {std::cell::Cell, ()}]`, the trait `std::marker::Sync` is not implemented for `std::cell::Cell` @@ -25,7 +25,7 @@ error[E0277]: the trait bound `std::cell::Cell: std::marker::Sync` is not s note: required by `main::assert_sync` --> $DIR/not-send-sync.rs:16:5 | -16 | fn assert_sync(_: T) {} +LL | fn assert_sync(_: T) {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: aborting due to 2 previous errors diff --git a/src/test/ui/generator/pattern-borrow.stderr b/src/test/ui/generator/pattern-borrow.stderr index 6b39b272d0e42..42fe73b9eafaa 100644 --- a/src/test/ui/generator/pattern-borrow.stderr +++ b/src/test/ui/generator/pattern-borrow.stderr @@ -1,9 +1,9 @@ error[E0626]: borrow may still be in use when generator yields --> $DIR/pattern-borrow.rs:19:24 | -19 | if let Test::A(ref _a) = test { //~ ERROR borrow may still be in use when generator yields +LL | if let Test::A(ref _a) = test { //~ ERROR borrow may still be in use when generator yields | ^^^^^^ -20 | yield (); +LL | yield (); | -------- possible yield occurs here error: aborting due to previous error diff --git a/src/test/ui/generator/ref-escapes-but-not-over-yield.stderr b/src/test/ui/generator/ref-escapes-but-not-over-yield.stderr index fbb72884156ba..ec376a5d25ae7 100644 --- a/src/test/ui/generator/ref-escapes-but-not-over-yield.stderr +++ b/src/test/ui/generator/ref-escapes-but-not-over-yield.stderr @@ -1,12 +1,12 @@ error[E0597]: `b` does not live long enough --> $DIR/ref-escapes-but-not-over-yield.rs:24:14 | -24 | a = &b; +LL | a = &b; | ^ borrowed value does not live long enough -25 | //~^ ERROR `b` does not live long enough -26 | }; +LL | //~^ ERROR `b` does not live long enough +LL | }; | - `b` dropped here while still borrowed -27 | } +LL | } | - borrowed value needs to live until here error: aborting due to previous error diff --git a/src/test/ui/generator/sized-yield.stderr b/src/test/ui/generator/sized-yield.stderr index 7adb2cc5598dc..2f8f37b1b9eda 100644 --- a/src/test/ui/generator/sized-yield.stderr +++ b/src/test/ui/generator/sized-yield.stderr @@ -1,10 +1,10 @@ error[E0277]: the trait bound `str: std::marker::Sized` is not satisfied --> $DIR/sized-yield.rs:17:26 | -17 | let mut gen = move || { //~ ERROR the trait bound `str: std::marker::Sized` is not satisfied +LL | let mut gen = move || { //~ ERROR the trait bound `str: std::marker::Sized` is not satisfied | __________________________^ -18 | | yield s[..]; -19 | | }; +LL | | yield s[..]; +LL | | }; | |____^ `str` does not have a constant size known at compile-time | = help: the trait `std::marker::Sized` is not implemented for `str` @@ -13,7 +13,7 @@ error[E0277]: the trait bound `str: std::marker::Sized` is not satisfied error[E0277]: the trait bound `str: std::marker::Sized` is not satisfied --> $DIR/sized-yield.rs:20:8 | -20 | gen.resume(); //~ ERROR the trait bound `str: std::marker::Sized` is not satisfied +LL | gen.resume(); //~ ERROR the trait bound `str: std::marker::Sized` is not satisfied | ^^^^^^ `str` does not have a constant size known at compile-time | = help: the trait `std::marker::Sized` is not implemented for `str` diff --git a/src/test/ui/generator/unsafe-immovable.stderr b/src/test/ui/generator/unsafe-immovable.stderr index 06e43bf35e1fa..0121b3eeb4ef6 100644 --- a/src/test/ui/generator/unsafe-immovable.stderr +++ b/src/test/ui/generator/unsafe-immovable.stderr @@ -1,9 +1,9 @@ error[E0133]: construction of immovable generator requires unsafe function or block --> $DIR/unsafe-immovable.rs:14:5 | -14 | / static || { //~ ERROR: construction of immovable generator requires unsafe -15 | | yield; -16 | | }; +LL | / static || { //~ ERROR: construction of immovable generator requires unsafe +LL | | yield; +LL | | }; | |_____^ construction of immovable generator error: aborting due to previous error diff --git a/src/test/ui/generator/yield-in-args.stderr b/src/test/ui/generator/yield-in-args.stderr index 06561853dee8c..cc6e9823d8117 100644 --- a/src/test/ui/generator/yield-in-args.stderr +++ b/src/test/ui/generator/yield-in-args.stderr @@ -1,7 +1,7 @@ error[E0626]: borrow may still be in use when generator yields --> $DIR/yield-in-args.rs:18:14 | -18 | foo(&b, yield); //~ ERROR +LL | foo(&b, yield); //~ ERROR | ^ ----- possible yield occurs here error: aborting due to previous error diff --git a/src/test/ui/generator/yield-in-const.stderr b/src/test/ui/generator/yield-in-const.stderr index 8a265c065b988..f33ec3c3e9d52 100644 --- a/src/test/ui/generator/yield-in-const.stderr +++ b/src/test/ui/generator/yield-in-const.stderr @@ -3,7 +3,7 @@ error[E0601]: main function not found error[E0627]: yield statement outside of generator literal --> $DIR/yield-in-const.rs:13:17 | -13 | const A: u8 = { yield 3u8; 3u8}; +LL | const A: u8 = { yield 3u8; 3u8}; | ^^^^^^^^^ error: aborting due to 2 previous errors diff --git a/src/test/ui/generator/yield-in-function.stderr b/src/test/ui/generator/yield-in-function.stderr index c6ee3b8e9e7e1..834622f9466fa 100644 --- a/src/test/ui/generator/yield-in-function.stderr +++ b/src/test/ui/generator/yield-in-function.stderr @@ -1,7 +1,7 @@ error[E0627]: yield statement outside of generator literal --> $DIR/yield-in-function.rs:13:13 | -13 | fn main() { yield; } +LL | fn main() { yield; } | ^^^^^ error: aborting due to previous error diff --git a/src/test/ui/generator/yield-in-static.stderr b/src/test/ui/generator/yield-in-static.stderr index d0575a0e47b3a..ea17de30f04e0 100644 --- a/src/test/ui/generator/yield-in-static.stderr +++ b/src/test/ui/generator/yield-in-static.stderr @@ -3,7 +3,7 @@ error[E0601]: main function not found error[E0627]: yield statement outside of generator literal --> $DIR/yield-in-static.rs:13:18 | -13 | static B: u8 = { yield 3u8; 3u8}; +LL | static B: u8 = { yield 3u8; 3u8}; | ^^^^^^^^^ error: aborting due to 2 previous errors diff --git a/src/test/ui/generator/yield-while-iterating.stderr b/src/test/ui/generator/yield-while-iterating.stderr index ea55e032e4761..65c5c0f294209 100644 --- a/src/test/ui/generator/yield-while-iterating.stderr +++ b/src/test/ui/generator/yield-while-iterating.stderr @@ -1,23 +1,23 @@ error[E0626]: borrow may still be in use when generator yields --> $DIR/yield-while-iterating.rs:22:19 | -22 | for p in &x { //~ ERROR +LL | for p in &x { //~ ERROR | ^ -23 | yield(); +LL | yield(); | ------- possible yield occurs here error[E0502]: cannot borrow `x` as immutable because it is also borrowed as mutable --> $DIR/yield-while-iterating.rs:67:20 | -62 | let mut b = || { +LL | let mut b = || { | -- mutable borrow occurs here -63 | for p in &mut x { +LL | for p in &mut x { | - previous borrow occurs due to use of `x` in closure ... -67 | println!("{}", x[0]); //~ ERROR +LL | println!("{}", x[0]); //~ ERROR | ^ immutable borrow occurs here -68 | b.resume(); -69 | } +LL | b.resume(); +LL | } | - mutable borrow ends here error: aborting due to 2 previous errors diff --git a/src/test/ui/generator/yield-while-local-borrowed.stderr b/src/test/ui/generator/yield-while-local-borrowed.stderr index 114fe8ffcab0e..c234103de8a95 100644 --- a/src/test/ui/generator/yield-while-local-borrowed.stderr +++ b/src/test/ui/generator/yield-while-local-borrowed.stderr @@ -1,37 +1,37 @@ error[E0626]: borrow may still be in use when generator yields (Ast) --> $DIR/yield-while-local-borrowed.rs:24:22 | -24 | let a = &mut 3; +LL | let a = &mut 3; | ^ ... -27 | yield(); +LL | yield(); | ------- possible yield occurs here error[E0626]: borrow may still be in use when generator yields (Ast) --> $DIR/yield-while-local-borrowed.rs:52:22 | -52 | let b = &a; +LL | let b = &a; | ^ ... -55 | yield(); +LL | yield(); | ------- possible yield occurs here error[E0626]: borrow may still be in use when generator yields (Mir) --> $DIR/yield-while-local-borrowed.rs:24:17 | -24 | let a = &mut 3; +LL | let a = &mut 3; | ^^^^^^ ... -27 | yield(); +LL | yield(); | ------- possible yield occurs here error[E0626]: borrow may still be in use when generator yields (Mir) --> $DIR/yield-while-local-borrowed.rs:52:21 | -52 | let b = &a; +LL | let b = &a; | ^^ ... -55 | yield(); +LL | yield(); | ------- possible yield occurs here error: aborting due to 4 previous errors diff --git a/src/test/ui/generator/yield-while-ref-reborrowed.stderr b/src/test/ui/generator/yield-while-ref-reborrowed.stderr index 7269f72973701..2deebb87cca42 100644 --- a/src/test/ui/generator/yield-while-ref-reborrowed.stderr +++ b/src/test/ui/generator/yield-while-ref-reborrowed.stderr @@ -1,15 +1,15 @@ error[E0501]: cannot borrow `x` as immutable because previous closure requires unique access --> $DIR/yield-while-ref-reborrowed.rs:45:20 | -40 | let mut b = || { +LL | let mut b = || { | -- closure construction occurs here -41 | let a = &mut *x; +LL | let a = &mut *x; | - previous borrow occurs due to use of `x` in closure ... -45 | println!("{}", x); //~ ERROR +LL | println!("{}", x); //~ ERROR | ^ borrow occurs here -46 | b.resume(); -47 | } +LL | b.resume(); +LL | } | - borrow from closure ends here error: aborting due to previous error diff --git a/src/test/ui/generic-type-less-params-with-defaults.stderr b/src/test/ui/generic-type-less-params-with-defaults.stderr index 0351923eff651..7b54804e99120 100644 --- a/src/test/ui/generic-type-less-params-with-defaults.stderr +++ b/src/test/ui/generic-type-less-params-with-defaults.stderr @@ -1,7 +1,7 @@ error[E0243]: wrong number of type arguments: expected at least 1, found 0 --> $DIR/generic-type-less-params-with-defaults.rs:19:12 | -19 | let _: Vec; +LL | let _: Vec; | ^^^ expected at least 1 type argument error: aborting due to previous error diff --git a/src/test/ui/generic-type-more-params-with-defaults.stderr b/src/test/ui/generic-type-more-params-with-defaults.stderr index 11ce6b1656ded..60eb0c905ccfb 100644 --- a/src/test/ui/generic-type-more-params-with-defaults.stderr +++ b/src/test/ui/generic-type-more-params-with-defaults.stderr @@ -1,7 +1,7 @@ error[E0244]: wrong number of type arguments: expected at most 2, found 3 --> $DIR/generic-type-more-params-with-defaults.rs:19:12 | -19 | let _: Vec; +LL | let _: Vec; | ^^^^^^^^^^^^^^^^^^^^^^ expected at most 2 type arguments error: aborting due to previous error diff --git a/src/test/ui/if-let-arm-types.stderr b/src/test/ui/if-let-arm-types.stderr index fb8e00bfa94ea..aadc8d270dc53 100644 --- a/src/test/ui/if-let-arm-types.stderr +++ b/src/test/ui/if-let-arm-types.stderr @@ -1,13 +1,13 @@ error[E0308]: `if let` arms have incompatible types --> $DIR/if-let-arm-types.rs:12:5 | -12 | / if let Some(b) = None { //~ ERROR: `if let` arms have incompatible types -13 | | //~^ expected (), found integral variable -14 | | //~| expected type `()` -15 | | //~| found type `{integer}` +LL | / if let Some(b) = None { //~ ERROR: `if let` arms have incompatible types +LL | | //~^ expected (), found integral variable +LL | | //~| expected type `()` +LL | | //~| found type `{integer}` ... | -18 | | 1 -19 | | }; +LL | | 1 +LL | | }; | |_____^ expected (), found integral variable | = note: expected type `()` @@ -15,10 +15,10 @@ error[E0308]: `if let` arms have incompatible types note: `if let` arm with an incompatible type --> $DIR/if-let-arm-types.rs:17:12 | -17 | } else { +LL | } else { | ____________^ -18 | | 1 -19 | | }; +LL | | 1 +LL | | }; | |_____^ error: aborting due to previous error diff --git a/src/test/ui/impl-duplicate-methods.stderr b/src/test/ui/impl-duplicate-methods.stderr index 73d470cc29e56..72d58e98ba311 100644 --- a/src/test/ui/impl-duplicate-methods.stderr +++ b/src/test/ui/impl-duplicate-methods.stderr @@ -1,9 +1,9 @@ error[E0201]: duplicate definitions with name `orange`: --> $DIR/impl-duplicate-methods.rs:15:5 | -14 | fn orange(&self) {} +LL | fn orange(&self) {} | ------------------- previous definition of `orange` here -15 | fn orange(&self) {} +LL | fn orange(&self) {} | ^^^^^^^^^^^^^^^^^^^ duplicate definition error: aborting due to previous error diff --git a/src/test/ui/impl-trait/auto-trait-leak.stderr b/src/test/ui/impl-trait/auto-trait-leak.stderr index d6e31ba1e1f9c..823dd9fc479a9 100644 --- a/src/test/ui/impl-trait/auto-trait-leak.stderr +++ b/src/test/ui/impl-trait/auto-trait-leak.stderr @@ -1,7 +1,7 @@ error[E0277]: the trait bound `std::rc::Rc>: std::marker::Send` is not satisfied in `impl std::ops::Fn<(i32,)>` --> $DIR/auto-trait-leak.rs:27:5 | -27 | send(before()); +LL | send(before()); | ^^^^ `std::rc::Rc>` cannot be sent between threads safely | = help: within `impl std::ops::Fn<(i32,)>`, the trait `std::marker::Send` is not implemented for `std::rc::Rc>` @@ -10,13 +10,13 @@ error[E0277]: the trait bound `std::rc::Rc>: std::marker::S note: required by `send` --> $DIR/auto-trait-leak.rs:24:1 | -24 | fn send(_: T) {} +LL | fn send(_: T) {} | ^^^^^^^^^^^^^^^^^^^^^^ error[E0277]: the trait bound `std::rc::Rc>: std::marker::Send` is not satisfied in `impl std::ops::Fn<(i32,)>` --> $DIR/auto-trait-leak.rs:30:5 | -30 | send(after()); +LL | send(after()); | ^^^^ `std::rc::Rc>` cannot be sent between threads safely | = help: within `impl std::ops::Fn<(i32,)>`, the trait `std::marker::Send` is not implemented for `std::rc::Rc>` @@ -25,34 +25,34 @@ error[E0277]: the trait bound `std::rc::Rc>: std::marker::S note: required by `send` --> $DIR/auto-trait-leak.rs:24:1 | -24 | fn send(_: T) {} +LL | fn send(_: T) {} | ^^^^^^^^^^^^^^^^^^^^^^ error[E0391]: cyclic dependency detected --> $DIR/auto-trait-leak.rs:44:1 | -44 | fn cycle1() -> impl Clone { +LL | fn cycle1() -> impl Clone { | ^^^^^^^^^^^^^^^^^^^^^^^^^ cyclic reference | note: the cycle begins when processing `cycle1`... --> $DIR/auto-trait-leak.rs:44:1 | -44 | fn cycle1() -> impl Clone { +LL | fn cycle1() -> impl Clone { | ^^^^^^^^^^^^^^^^^^^^^^^^^ note: ...which then requires processing `cycle2::{{impl-Trait}}`... --> $DIR/auto-trait-leak.rs:52:16 | -52 | fn cycle2() -> impl Clone { +LL | fn cycle2() -> impl Clone { | ^^^^^^^^^^ note: ...which then requires processing `cycle2`... --> $DIR/auto-trait-leak.rs:52:1 | -52 | fn cycle2() -> impl Clone { +LL | fn cycle2() -> impl Clone { | ^^^^^^^^^^^^^^^^^^^^^^^^^ note: ...which then requires processing `cycle1::{{impl-Trait}}`... --> $DIR/auto-trait-leak.rs:44:16 | -44 | fn cycle1() -> impl Clone { +LL | fn cycle1() -> impl Clone { | ^^^^^^^^^^ = note: ...which then again requires processing `cycle1`, completing the cycle. diff --git a/src/test/ui/impl-trait/equality.stderr b/src/test/ui/impl-trait/equality.stderr index 8ec819038031b..ce84f8bbb5d87 100644 --- a/src/test/ui/impl-trait/equality.stderr +++ b/src/test/ui/impl-trait/equality.stderr @@ -1,7 +1,7 @@ error[E0308]: mismatched types --> $DIR/equality.rs:25:5 | -25 | 0_u32 +LL | 0_u32 | ^^^^^ expected i32, found u32 | = note: expected type `i32` @@ -10,7 +10,7 @@ error[E0308]: mismatched types error[E0277]: cannot add `impl Foo` to `u32` --> $DIR/equality.rs:34:11 | -34 | n + sum_to(n - 1) +LL | n + sum_to(n - 1) | ^ no implementation for `u32 + impl Foo` | = help: the trait `std::ops::Add` is not implemented for `u32` @@ -18,7 +18,7 @@ error[E0277]: cannot add `impl Foo` to `u32` error[E0308]: mismatched types --> $DIR/equality.rs:53:18 | -53 | let _: u32 = hide(0_u32); +LL | let _: u32 = hide(0_u32); | ^^^^^^^^^^^ expected u32, found anonymized type | = note: expected type `u32` @@ -27,7 +27,7 @@ error[E0308]: mismatched types error[E0308]: mismatched types --> $DIR/equality.rs:59:18 | -59 | let _: i32 = Leak::leak(hide(0_i32)); +LL | let _: i32 = Leak::leak(hide(0_i32)); | ^^^^^^^^^^^^^^^^^^^^^^^ expected i32, found associated type | = note: expected type `i32` @@ -36,7 +36,7 @@ error[E0308]: mismatched types error[E0308]: mismatched types --> $DIR/equality.rs:66:10 | -66 | x = (x.1, +LL | x = (x.1, | ^^^ expected u32, found i32 | = note: expected type `impl Foo` (u32) @@ -45,7 +45,7 @@ error[E0308]: mismatched types error[E0308]: mismatched types --> $DIR/equality.rs:69:10 | -69 | x.0); +LL | x.0); | ^^^ expected i32, found u32 | = note: expected type `impl Foo` (i32) diff --git a/src/test/ui/impl-trait/impl-trait-plus-priority.stderr b/src/test/ui/impl-trait/impl-trait-plus-priority.stderr index 885c3941971bd..0670c36439395 100644 --- a/src/test/ui/impl-trait/impl-trait-plus-priority.stderr +++ b/src/test/ui/impl-trait/impl-trait-plus-priority.stderr @@ -1,67 +1,67 @@ error: ambiguous `+` in a type --> $DIR/impl-trait-plus-priority.rs:33:18 | -33 | type A = fn() -> impl A +; +LL | type A = fn() -> impl A +; | ^^^^^^^^ help: use parentheses to disambiguate: `(impl A)` error: ambiguous `+` in a type --> $DIR/impl-trait-plus-priority.rs:35:18 | -35 | type A = fn() -> impl A + B; +LL | type A = fn() -> impl A + B; | ^^^^^^^^^^ help: use parentheses to disambiguate: `(impl A + B)` error: ambiguous `+` in a type --> $DIR/impl-trait-plus-priority.rs:37:18 | -37 | type A = fn() -> dyn A + B; +LL | type A = fn() -> dyn A + B; | ^^^^^^^^^ help: use parentheses to disambiguate: `(dyn A + B)` error[E0178]: expected a path on the left-hand side of `+`, not `fn() -> A` --> $DIR/impl-trait-plus-priority.rs:39:10 | -39 | type A = fn() -> A + B; +LL | type A = fn() -> A + B; | ^^^^^^^^^^^^^ perhaps you forgot parentheses? error: ambiguous `+` in a type --> $DIR/impl-trait-plus-priority.rs:42:18 | -42 | type A = Fn() -> impl A +; +LL | type A = Fn() -> impl A +; | ^^^^^^^^ help: use parentheses to disambiguate: `(impl A)` error: ambiguous `+` in a type --> $DIR/impl-trait-plus-priority.rs:44:18 | -44 | type A = Fn() -> impl A + B; +LL | type A = Fn() -> impl A + B; | ^^^^^^^^^^ help: use parentheses to disambiguate: `(impl A + B)` error: ambiguous `+` in a type --> $DIR/impl-trait-plus-priority.rs:46:18 | -46 | type A = Fn() -> dyn A + B; +LL | type A = Fn() -> dyn A + B; | ^^^^^^^^^ help: use parentheses to disambiguate: `(dyn A + B)` error: ambiguous `+` in a type --> $DIR/impl-trait-plus-priority.rs:50:11 | -50 | type A = &impl A +; +LL | type A = &impl A +; | ^^^^^^^^ help: use parentheses to disambiguate: `(impl A)` error: ambiguous `+` in a type --> $DIR/impl-trait-plus-priority.rs:52:11 | -52 | type A = &impl A + B; +LL | type A = &impl A + B; | ^^^^^^^^^^ help: use parentheses to disambiguate: `(impl A + B)` error: ambiguous `+` in a type --> $DIR/impl-trait-plus-priority.rs:54:11 | -54 | type A = &dyn A + B; +LL | type A = &dyn A + B; | ^^^^^^^^^ help: use parentheses to disambiguate: `(dyn A + B)` error[E0178]: expected a path on the left-hand side of `+`, not `&A` --> $DIR/impl-trait-plus-priority.rs:56:10 | -56 | type A = &A + B; +LL | type A = &A + B; | ^^^^^^ help: try adding parentheses: `&(A + B)` error: aborting due to 11 previous errors diff --git a/src/test/ui/impl-trait/issue-21659-show-relevant-trait-impls-3.stderr b/src/test/ui/impl-trait/issue-21659-show-relevant-trait-impls-3.stderr index 297694568493d..237fbb352e868 100644 --- a/src/test/ui/impl-trait/issue-21659-show-relevant-trait-impls-3.stderr +++ b/src/test/ui/impl-trait/issue-21659-show-relevant-trait-impls-3.stderr @@ -1,10 +1,10 @@ error[E0599]: no method named `foo` found for type `Bar` in the current scope --> $DIR/issue-21659-show-relevant-trait-impls-3.rs:30:8 | -23 | struct Bar; +LL | struct Bar; | ----------- method `foo` not found for this ... -30 | f1.foo(1usize); +LL | f1.foo(1usize); | ^^^ | = help: items from traits can only be used if the trait is implemented and in scope diff --git a/src/test/ui/impl-trait/method-suggestion-no-duplication.stderr b/src/test/ui/impl-trait/method-suggestion-no-duplication.stderr index 52d3931011a77..dcb52987a687a 100644 --- a/src/test/ui/impl-trait/method-suggestion-no-duplication.stderr +++ b/src/test/ui/impl-trait/method-suggestion-no-duplication.stderr @@ -1,10 +1,10 @@ error[E0599]: no method named `is_empty` found for type `Foo` in the current scope --> $DIR/method-suggestion-no-duplication.rs:19:15 | -14 | struct Foo; +LL | struct Foo; | ----------- method `is_empty` not found for this ... -19 | foo(|s| s.is_empty()); +LL | foo(|s| s.is_empty()); | ^^^^^^^^ | = help: items from traits can only be used if the trait is implemented and in scope diff --git a/src/test/ui/impl-trait/no-method-suggested-traits.stderr b/src/test/ui/impl-trait/no-method-suggested-traits.stderr index 882113b8176ea..6ca895a74b64c 100644 --- a/src/test/ui/impl-trait/no-method-suggested-traits.stderr +++ b/src/test/ui/impl-trait/no-method-suggested-traits.stderr @@ -1,94 +1,94 @@ error[E0599]: no method named `method` found for type `u32` in the current scope --> $DIR/no-method-suggested-traits.rs:33:10 | -33 | 1u32.method(); +LL | 1u32.method(); | ^^^^^^ | = help: items from traits can only be used if the trait is in scope help: the following traits are implemented but not in scope, perhaps add a `use` for one of them: | -14 | use foo::Bar; +LL | use foo::Bar; | -14 | use no_method_suggested_traits::foo::PubPub; +LL | use no_method_suggested_traits::foo::PubPub; | -14 | use no_method_suggested_traits::qux::PrivPub; +LL | use no_method_suggested_traits::qux::PrivPub; | -14 | use no_method_suggested_traits::Reexported; +LL | use no_method_suggested_traits::Reexported; | error[E0599]: no method named `method` found for type `std::rc::Rc<&mut std::boxed::Box<&u32>>` in the current scope --> $DIR/no-method-suggested-traits.rs:36:44 | -36 | std::rc::Rc::new(&mut Box::new(&1u32)).method(); +LL | std::rc::Rc::new(&mut Box::new(&1u32)).method(); | ^^^^^^ | = help: items from traits can only be used if the trait is in scope help: the following traits are implemented but not in scope, perhaps add a `use` for one of them: | -14 | use foo::Bar; +LL | use foo::Bar; | -14 | use no_method_suggested_traits::foo::PubPub; +LL | use no_method_suggested_traits::foo::PubPub; | -14 | use no_method_suggested_traits::qux::PrivPub; +LL | use no_method_suggested_traits::qux::PrivPub; | -14 | use no_method_suggested_traits::Reexported; +LL | use no_method_suggested_traits::Reexported; | error[E0599]: no method named `method` found for type `char` in the current scope --> $DIR/no-method-suggested-traits.rs:40:9 | -40 | 'a'.method(); +LL | 'a'.method(); | ^^^^^^ | = help: items from traits can only be used if the trait is in scope help: the following trait is implemented but not in scope, perhaps add a `use` for it: | -14 | use foo::Bar; +LL | use foo::Bar; | error[E0599]: no method named `method` found for type `std::rc::Rc<&mut std::boxed::Box<&char>>` in the current scope --> $DIR/no-method-suggested-traits.rs:42:43 | -42 | std::rc::Rc::new(&mut Box::new(&'a')).method(); +LL | std::rc::Rc::new(&mut Box::new(&'a')).method(); | ^^^^^^ | = help: items from traits can only be used if the trait is in scope help: the following trait is implemented but not in scope, perhaps add a `use` for it: | -14 | use foo::Bar; +LL | use foo::Bar; | error[E0599]: no method named `method` found for type `i32` in the current scope --> $DIR/no-method-suggested-traits.rs:45:10 | -45 | 1i32.method(); +LL | 1i32.method(); | ^^^^^^ | = help: items from traits can only be used if the trait is in scope help: the following trait is implemented but not in scope, perhaps add a `use` for it: | -14 | use no_method_suggested_traits::foo::PubPub; +LL | use no_method_suggested_traits::foo::PubPub; | error[E0599]: no method named `method` found for type `std::rc::Rc<&mut std::boxed::Box<&i32>>` in the current scope --> $DIR/no-method-suggested-traits.rs:47:44 | -47 | std::rc::Rc::new(&mut Box::new(&1i32)).method(); +LL | std::rc::Rc::new(&mut Box::new(&1i32)).method(); | ^^^^^^ | = help: items from traits can only be used if the trait is in scope help: the following trait is implemented but not in scope, perhaps add a `use` for it: | -14 | use no_method_suggested_traits::foo::PubPub; +LL | use no_method_suggested_traits::foo::PubPub; | error[E0599]: no method named `method` found for type `Foo` in the current scope --> $DIR/no-method-suggested-traits.rs:50:9 | -14 | struct Foo; +LL | struct Foo; | ----------- method `method` not found for this ... -50 | Foo.method(); +LL | Foo.method(); | ^^^^^^ | = help: items from traits can only be used if the trait is implemented and in scope @@ -101,7 +101,7 @@ error[E0599]: no method named `method` found for type `Foo` in the current scope error[E0599]: no method named `method` found for type `std::rc::Rc<&mut std::boxed::Box<&Foo>>` in the current scope --> $DIR/no-method-suggested-traits.rs:52:43 | -52 | std::rc::Rc::new(&mut Box::new(&Foo)).method(); +LL | std::rc::Rc::new(&mut Box::new(&Foo)).method(); | ^^^^^^ | = help: items from traits can only be used if the trait is implemented and in scope @@ -114,7 +114,7 @@ error[E0599]: no method named `method` found for type `std::rc::Rc<&mut std::box error[E0599]: no method named `method2` found for type `u64` in the current scope --> $DIR/no-method-suggested-traits.rs:55:10 | -55 | 1u64.method2(); +LL | 1u64.method2(); | ^^^^^^^ | = help: items from traits can only be used if the trait is implemented and in scope @@ -124,7 +124,7 @@ error[E0599]: no method named `method2` found for type `u64` in the current scop error[E0599]: no method named `method2` found for type `std::rc::Rc<&mut std::boxed::Box<&u64>>` in the current scope --> $DIR/no-method-suggested-traits.rs:57:44 | -57 | std::rc::Rc::new(&mut Box::new(&1u64)).method2(); +LL | std::rc::Rc::new(&mut Box::new(&1u64)).method2(); | ^^^^^^^ | = help: items from traits can only be used if the trait is implemented and in scope @@ -134,7 +134,7 @@ error[E0599]: no method named `method2` found for type `std::rc::Rc<&mut std::bo error[E0599]: no method named `method2` found for type `no_method_suggested_traits::Foo` in the current scope --> $DIR/no-method-suggested-traits.rs:60:37 | -60 | no_method_suggested_traits::Foo.method2(); +LL | no_method_suggested_traits::Foo.method2(); | ^^^^^^^ | = help: items from traits can only be used if the trait is implemented and in scope @@ -144,7 +144,7 @@ error[E0599]: no method named `method2` found for type `no_method_suggested_trai error[E0599]: no method named `method2` found for type `std::rc::Rc<&mut std::boxed::Box<&no_method_suggested_traits::Foo>>` in the current scope --> $DIR/no-method-suggested-traits.rs:62:71 | -62 | std::rc::Rc::new(&mut Box::new(&no_method_suggested_traits::Foo)).method2(); +LL | std::rc::Rc::new(&mut Box::new(&no_method_suggested_traits::Foo)).method2(); | ^^^^^^^ | = help: items from traits can only be used if the trait is implemented and in scope @@ -154,7 +154,7 @@ error[E0599]: no method named `method2` found for type `std::rc::Rc<&mut std::bo error[E0599]: no method named `method2` found for type `no_method_suggested_traits::Bar` in the current scope --> $DIR/no-method-suggested-traits.rs:64:40 | -64 | no_method_suggested_traits::Bar::X.method2(); +LL | no_method_suggested_traits::Bar::X.method2(); | ^^^^^^^ | = help: items from traits can only be used if the trait is implemented and in scope @@ -164,7 +164,7 @@ error[E0599]: no method named `method2` found for type `no_method_suggested_trai error[E0599]: no method named `method2` found for type `std::rc::Rc<&mut std::boxed::Box<&no_method_suggested_traits::Bar>>` in the current scope --> $DIR/no-method-suggested-traits.rs:66:74 | -66 | std::rc::Rc::new(&mut Box::new(&no_method_suggested_traits::Bar::X)).method2(); +LL | std::rc::Rc::new(&mut Box::new(&no_method_suggested_traits::Bar::X)).method2(); | ^^^^^^^ | = help: items from traits can only be used if the trait is implemented and in scope @@ -174,10 +174,10 @@ error[E0599]: no method named `method2` found for type `std::rc::Rc<&mut std::bo error[E0599]: no method named `method3` found for type `Foo` in the current scope --> $DIR/no-method-suggested-traits.rs:69:9 | -14 | struct Foo; +LL | struct Foo; | ----------- method `method3` not found for this ... -69 | Foo.method3(); +LL | Foo.method3(); | ^^^^^^^ | = help: items from traits can only be used if the trait is implemented and in scope @@ -187,7 +187,7 @@ error[E0599]: no method named `method3` found for type `Foo` in the current scop error[E0599]: no method named `method3` found for type `std::rc::Rc<&mut std::boxed::Box<&Foo>>` in the current scope --> $DIR/no-method-suggested-traits.rs:71:43 | -71 | std::rc::Rc::new(&mut Box::new(&Foo)).method3(); +LL | std::rc::Rc::new(&mut Box::new(&Foo)).method3(); | ^^^^^^^ | = help: items from traits can only be used if the trait is implemented and in scope @@ -197,10 +197,10 @@ error[E0599]: no method named `method3` found for type `std::rc::Rc<&mut std::bo error[E0599]: no method named `method3` found for type `Bar` in the current scope --> $DIR/no-method-suggested-traits.rs:73:12 | -15 | enum Bar { X } +LL | enum Bar { X } | -------- method `method3` not found for this ... -73 | Bar::X.method3(); +LL | Bar::X.method3(); | ^^^^^^^ | = help: items from traits can only be used if the trait is implemented and in scope @@ -210,7 +210,7 @@ error[E0599]: no method named `method3` found for type `Bar` in the current scop error[E0599]: no method named `method3` found for type `std::rc::Rc<&mut std::boxed::Box<&Bar>>` in the current scope --> $DIR/no-method-suggested-traits.rs:75:46 | -75 | std::rc::Rc::new(&mut Box::new(&Bar::X)).method3(); +LL | std::rc::Rc::new(&mut Box::new(&Bar::X)).method3(); | ^^^^^^^ | = help: items from traits can only be used if the trait is implemented and in scope @@ -220,37 +220,37 @@ error[E0599]: no method named `method3` found for type `std::rc::Rc<&mut std::bo error[E0599]: no method named `method3` found for type `usize` in the current scope --> $DIR/no-method-suggested-traits.rs:79:13 | -79 | 1_usize.method3(); //~ ERROR no method named +LL | 1_usize.method3(); //~ ERROR no method named | ^^^^^^^ error[E0599]: no method named `method3` found for type `std::rc::Rc<&mut std::boxed::Box<&usize>>` in the current scope --> $DIR/no-method-suggested-traits.rs:80:47 | -80 | std::rc::Rc::new(&mut Box::new(&1_usize)).method3(); //~ ERROR no method named +LL | std::rc::Rc::new(&mut Box::new(&1_usize)).method3(); //~ ERROR no method named | ^^^^^^^ error[E0599]: no method named `method3` found for type `no_method_suggested_traits::Foo` in the current scope --> $DIR/no-method-suggested-traits.rs:81:37 | -81 | no_method_suggested_traits::Foo.method3(); //~ ERROR no method named +LL | no_method_suggested_traits::Foo.method3(); //~ ERROR no method named | ^^^^^^^ error[E0599]: no method named `method3` found for type `std::rc::Rc<&mut std::boxed::Box<&no_method_suggested_traits::Foo>>` in the current scope --> $DIR/no-method-suggested-traits.rs:82:71 | -82 | std::rc::Rc::new(&mut Box::new(&no_method_suggested_traits::Foo)).method3(); +LL | std::rc::Rc::new(&mut Box::new(&no_method_suggested_traits::Foo)).method3(); | ^^^^^^^ error[E0599]: no method named `method3` found for type `no_method_suggested_traits::Bar` in the current scope --> $DIR/no-method-suggested-traits.rs:84:40 | -84 | no_method_suggested_traits::Bar::X.method3(); //~ ERROR no method named +LL | no_method_suggested_traits::Bar::X.method3(); //~ ERROR no method named | ^^^^^^^ error[E0599]: no method named `method3` found for type `std::rc::Rc<&mut std::boxed::Box<&no_method_suggested_traits::Bar>>` in the current scope --> $DIR/no-method-suggested-traits.rs:85:74 | -85 | std::rc::Rc::new(&mut Box::new(&no_method_suggested_traits::Bar::X)).method3(); +LL | std::rc::Rc::new(&mut Box::new(&no_method_suggested_traits::Bar::X)).method3(); | ^^^^^^^ error: aborting due to 24 previous errors diff --git a/src/test/ui/impl-trait/trait_type.stderr b/src/test/ui/impl-trait/trait_type.stderr index 1417c71ca1244..507d5493ad191 100644 --- a/src/test/ui/impl-trait/trait_type.stderr +++ b/src/test/ui/impl-trait/trait_type.stderr @@ -1,7 +1,7 @@ error[E0053]: method `fmt` has an incompatible type for trait --> $DIR/trait_type.rs:17:4 | -17 | fn fmt(&self, x: &str) -> () { } +LL | fn fmt(&self, x: &str) -> () { } | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ types differ in mutability | = note: expected type `fn(&MyType, &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error>` @@ -10,7 +10,7 @@ error[E0053]: method `fmt` has an incompatible type for trait error[E0050]: method `fmt` has 1 parameter but the declaration in trait `std::fmt::Display::fmt` has 2 --> $DIR/trait_type.rs:22:11 | -22 | fn fmt(&self) -> () { } +LL | fn fmt(&self) -> () { } | ^^^^^ expected 2 parameters, found 1 | = note: `fmt` from trait: `fn(&Self, &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error>` @@ -18,7 +18,7 @@ error[E0050]: method `fmt` has 1 parameter but the declaration in trait `std::fm error[E0186]: method `fmt` has a `&self` declaration in the trait, but not in the impl --> $DIR/trait_type.rs:27:4 | -27 | fn fmt() -> () { } +LL | fn fmt() -> () { } | ^^^^^^^^^^^^^^ expected `&self` in impl | = note: `fmt` from trait: `fn(&Self, &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error>` @@ -26,7 +26,7 @@ error[E0186]: method `fmt` has a `&self` declaration in the trait, but not in th error[E0046]: not all trait items implemented, missing: `fmt` --> $DIR/trait_type.rs:31:1 | -31 | impl std::fmt::Display for MyType4 {} +LL | impl std::fmt::Display for MyType4 {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ missing `fmt` in implementation | = note: `fmt` from trait: `fn(&Self, &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error>` diff --git a/src/test/ui/impl-trait/universal-mismatched-type.stderr b/src/test/ui/impl-trait/universal-mismatched-type.stderr index b4dd6c8446c59..9a42b224f5547 100644 --- a/src/test/ui/impl-trait/universal-mismatched-type.stderr +++ b/src/test/ui/impl-trait/universal-mismatched-type.stderr @@ -1,9 +1,9 @@ error[E0308]: mismatched types --> $DIR/universal-mismatched-type.rs:16:5 | -15 | fn foo(x: impl Debug) -> String { +LL | fn foo(x: impl Debug) -> String { | ------ expected `std::string::String` because of return type -16 | x //~ ERROR mismatched types +LL | x //~ ERROR mismatched types | ^ expected struct `std::string::String`, found type parameter | = note: expected type `std::string::String` diff --git a/src/test/ui/impl-trait/universal-two-impl-traits.stderr b/src/test/ui/impl-trait/universal-two-impl-traits.stderr index 9903e26bbbd0b..c6e8eb27075e8 100644 --- a/src/test/ui/impl-trait/universal-two-impl-traits.stderr +++ b/src/test/ui/impl-trait/universal-two-impl-traits.stderr @@ -1,7 +1,7 @@ error[E0308]: mismatched types --> $DIR/universal-two-impl-traits.rs:17:9 | -17 | a = y; //~ ERROR mismatched +LL | a = y; //~ ERROR mismatched | ^ expected type parameter, found a different type parameter | = note: expected type `impl Debug` (type parameter) diff --git a/src/test/ui/impl-trait/universal_wrong_bounds.stderr b/src/test/ui/impl-trait/universal_wrong_bounds.stderr index b457e025c29ff..a02fc1f748faa 100644 --- a/src/test/ui/impl-trait/universal_wrong_bounds.stderr +++ b/src/test/ui/impl-trait/universal_wrong_bounds.stderr @@ -1,27 +1,27 @@ error[E0425]: cannot find function `wants_clone` in this scope --> $DIR/universal_wrong_bounds.rs:18:5 | -18 | wants_clone(f); //~ ERROR cannot find +LL | wants_clone(f); //~ ERROR cannot find | ^^^^^^^^^^^ did you mean `wants_cone`? error[E0405]: cannot find trait `Debug` in this scope --> $DIR/universal_wrong_bounds.rs:21:24 | -21 | fn wants_debug(g: impl Debug) { } //~ ERROR cannot find +LL | fn wants_debug(g: impl Debug) { } //~ ERROR cannot find | ^^^^^ not found in this scope help: possible candidate is found in another module, you can import it into scope | -13 | use std::fmt::Debug; +LL | use std::fmt::Debug; | error[E0405]: cannot find trait `Debug` in this scope --> $DIR/universal_wrong_bounds.rs:22:26 | -22 | fn wants_display(g: impl Debug) { } //~ ERROR cannot find +LL | fn wants_display(g: impl Debug) { } //~ ERROR cannot find | ^^^^^ not found in this scope help: possible candidate is found in another module, you can import it into scope | -13 | use std::fmt::Debug; +LL | use std::fmt::Debug; | error: cannot continue compilation due to previous error diff --git a/src/test/ui/impl-unused-rps-in-assoc-type.stderr b/src/test/ui/impl-unused-rps-in-assoc-type.stderr index ec261ed63b1e8..fc6666d4291bd 100644 --- a/src/test/ui/impl-unused-rps-in-assoc-type.stderr +++ b/src/test/ui/impl-unused-rps-in-assoc-type.stderr @@ -1,7 +1,7 @@ error[E0207]: the lifetime parameter `'a` is not constrained by the impl trait, self type, or predicates --> $DIR/impl-unused-rps-in-assoc-type.rs:21:6 | -21 | impl<'a> Fun for Holder { //~ ERROR E0207 +LL | impl<'a> Fun for Holder { //~ ERROR E0207 | ^^ unconstrained lifetime parameter error: aborting due to previous error diff --git a/src/test/ui/impl_trait_projections.stderr b/src/test/ui/impl_trait_projections.stderr index 08de0eb99a307..db41ef1d48a23 100644 --- a/src/test/ui/impl_trait_projections.stderr +++ b/src/test/ui/impl_trait_projections.stderr @@ -1,31 +1,31 @@ error[E0667]: `impl Trait` is not allowed in path parameters --> $DIR/impl_trait_projections.rs:23:51 | -23 | fn projection_is_disallowed(x: impl Iterator) -> ::Item { +LL | fn projection_is_disallowed(x: impl Iterator) -> ::Item { | ^^^^^^^^^^^^^ error[E0667]: `impl Trait` is not allowed in path parameters --> $DIR/impl_trait_projections.rs:30:9 | -30 | -> ::Item +LL | -> ::Item | ^^^^^^^^^^^^^ error[E0667]: `impl Trait` is not allowed in path parameters --> $DIR/impl_trait_projections.rs:37:27 | -37 | -> <::std::ops::Range as Iterator>::Item +LL | -> <::std::ops::Range as Iterator>::Item | ^^^^^^^^^^ error[E0667]: `impl Trait` is not allowed in path parameters --> $DIR/impl_trait_projections.rs:44:29 | -44 | -> as Iterator>::Item +LL | -> as Iterator>::Item | ^^^^^^^^^^ error[E0223]: ambiguous associated type --> $DIR/impl_trait_projections.rs:23:50 | -23 | fn projection_is_disallowed(x: impl Iterator) -> ::Item { +LL | fn projection_is_disallowed(x: impl Iterator) -> ::Item { | ^^^^^^^^^^^^^^^^^^^^^ ambiguous associated type | = note: specify the type using the syntax `::Item` diff --git a/src/test/ui/imports/duplicate.stderr b/src/test/ui/imports/duplicate.stderr index 6e5b91a11c900..954f4e6c7a73e 100644 --- a/src/test/ui/imports/duplicate.stderr +++ b/src/test/ui/imports/duplicate.stderr @@ -1,86 +1,86 @@ error[E0252]: the name `foo` is defined multiple times --> $DIR/duplicate.rs:25:9 | -24 | use a::foo; +LL | use a::foo; | ------ previous import of the value `foo` here -25 | use a::foo; //~ ERROR the name `foo` is defined multiple times +LL | use a::foo; //~ ERROR the name `foo` is defined multiple times | ^^^^^^ `foo` reimported here | = note: `foo` must be defined only once in the value namespace of this module help: You can use `as` to change the binding name of the import | -25 | use a::foo as other_foo; //~ ERROR the name `foo` is defined multiple times +LL | use a::foo as other_foo; //~ ERROR the name `foo` is defined multiple times | ^^^^^^^^^^^^^^^^^^^ error[E0659]: `foo` is ambiguous --> $DIR/duplicate.rs:56:9 | -56 | use self::foo::bar; //~ ERROR `foo` is ambiguous +LL | use self::foo::bar; //~ ERROR `foo` is ambiguous | ^^^^^^^^^^^^^^ | note: `foo` could refer to the name imported here --> $DIR/duplicate.rs:53:9 | -53 | use self::m1::*; +LL | use self::m1::*; | ^^^^^^^^^^^ note: `foo` could also refer to the name imported here --> $DIR/duplicate.rs:54:9 | -54 | use self::m2::*; +LL | use self::m2::*; | ^^^^^^^^^^^ = note: consider adding an explicit import of `foo` to disambiguate error[E0659]: `foo` is ambiguous --> $DIR/duplicate.rs:45:5 | -45 | f::foo(); //~ ERROR `foo` is ambiguous +LL | f::foo(); //~ ERROR `foo` is ambiguous | ^^^^^^ | note: `foo` could refer to the name imported here --> $DIR/duplicate.rs:34:13 | -34 | pub use a::*; +LL | pub use a::*; | ^^^^ note: `foo` could also refer to the name imported here --> $DIR/duplicate.rs:35:13 | -35 | pub use b::*; +LL | pub use b::*; | ^^^^ = note: consider adding an explicit import of `foo` to disambiguate error[E0659]: `foo` is ambiguous --> $DIR/duplicate.rs:46:5 | -46 | g::foo(); //~ ERROR `foo` is ambiguous +LL | g::foo(); //~ ERROR `foo` is ambiguous | ^^^^^^ | note: `foo` could refer to the name imported here --> $DIR/duplicate.rs:39:13 | -39 | pub use a::*; +LL | pub use a::*; | ^^^^ note: `foo` could also refer to the name imported here --> $DIR/duplicate.rs:40:13 | -40 | pub use f::*; +LL | pub use f::*; | ^^^^ = note: consider adding an explicit import of `foo` to disambiguate error[E0659]: `foo` is ambiguous --> $DIR/duplicate.rs:59:9 | -59 | foo::bar(); //~ ERROR `foo` is ambiguous +LL | foo::bar(); //~ ERROR `foo` is ambiguous | ^^^^^^^^ | note: `foo` could refer to the name imported here --> $DIR/duplicate.rs:53:9 | -53 | use self::m1::*; +LL | use self::m1::*; | ^^^^^^^^^^^ note: `foo` could also refer to the name imported here --> $DIR/duplicate.rs:54:9 | -54 | use self::m2::*; +LL | use self::m2::*; | ^^^^^^^^^^^ = note: consider adding an explicit import of `foo` to disambiguate diff --git a/src/test/ui/imports/macro-paths.stderr b/src/test/ui/imports/macro-paths.stderr index 32d78666004c4..74abef6afd7cf 100644 --- a/src/test/ui/imports/macro-paths.stderr +++ b/src/test/ui/imports/macro-paths.stderr @@ -1,38 +1,38 @@ error[E0659]: `bar` is ambiguous --> $DIR/macro-paths.rs:25:5 | -25 | bar::m! { //~ ERROR ambiguous +LL | bar::m! { //~ ERROR ambiguous | ^^^^^^ | note: `bar` could refer to the name defined here --> $DIR/macro-paths.rs:26:9 | -26 | mod bar { pub use two_macros::m; } +LL | mod bar { pub use two_macros::m; } | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ note: `bar` could also refer to the name imported here --> $DIR/macro-paths.rs:24:9 | -24 | use foo::*; +LL | use foo::*; | ^^^^^^ = note: macro-expanded items do not shadow when used in a macro invocation path error[E0659]: `baz` is ambiguous --> $DIR/macro-paths.rs:35:5 | -35 | baz::m! { //~ ERROR ambiguous +LL | baz::m! { //~ ERROR ambiguous | ^^^^^^ | note: `baz` could refer to the name defined here --> $DIR/macro-paths.rs:36:9 | -36 | mod baz { pub use two_macros::m; } +LL | mod baz { pub use two_macros::m; } | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ note: `baz` could also refer to the name defined here --> $DIR/macro-paths.rs:30:1 | -30 | / pub mod baz { -31 | | pub use two_macros::m; -32 | | } +LL | / pub mod baz { +LL | | pub use two_macros::m; +LL | | } | |_^ = note: macro-expanded items do not shadow when used in a macro invocation path diff --git a/src/test/ui/imports/macros.stderr b/src/test/ui/imports/macros.stderr index 75294f7bf1256..e7020b76245a6 100644 --- a/src/test/ui/imports/macros.stderr +++ b/src/test/ui/imports/macros.stderr @@ -1,53 +1,53 @@ error: `m` is ambiguous --> $DIR/macros.rs:50:5 | -50 | m!(); //~ ERROR ambiguous +LL | m!(); //~ ERROR ambiguous | ^ | note: `m` could refer to the macro defined here --> $DIR/macros.rs:48:5 | -48 | macro_rules! m { () => {} } +LL | macro_rules! m { () => {} } | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ note: `m` could also refer to the macro imported here --> $DIR/macros.rs:49:9 | -49 | use two_macros::m; +LL | use two_macros::m; | ^^^^^^^^^^^^^ error[E0659]: `m` is ambiguous --> $DIR/macros.rs:28:5 | -28 | m! { //~ ERROR ambiguous +LL | m! { //~ ERROR ambiguous | ^ | note: `m` could refer to the name imported here --> $DIR/macros.rs:29:13 | -29 | use foo::m; +LL | use foo::m; | ^^^^^^ note: `m` could also refer to the name imported here --> $DIR/macros.rs:27:9 | -27 | use two_macros::*; +LL | use two_macros::*; | ^^^^^^^^^^^^^ = note: macro-expanded macro imports do not shadow error[E0659]: `m` is ambiguous --> $DIR/macros.rs:41:9 | -41 | m! { //~ ERROR ambiguous +LL | m! { //~ ERROR ambiguous | ^ | note: `m` could refer to the name imported here --> $DIR/macros.rs:42:17 | -42 | use two_macros::n as m; +LL | use two_macros::n as m; | ^^^^^^^^^^^^^^^^^^ note: `m` could also refer to the name imported here --> $DIR/macros.rs:34:9 | -34 | use two_macros::m; +LL | use two_macros::m; | ^^^^^^^^^^^^^ = note: macro-expanded macro imports do not shadow diff --git a/src/test/ui/imports/rfc-1560-warning-cycle.stderr b/src/test/ui/imports/rfc-1560-warning-cycle.stderr index 1fec73112721d..452fcc4c1a919 100644 --- a/src/test/ui/imports/rfc-1560-warning-cycle.stderr +++ b/src/test/ui/imports/rfc-1560-warning-cycle.stderr @@ -1,11 +1,11 @@ error: `Foo` is ambiguous --> $DIR/rfc-1560-warning-cycle.rs:21:17 | -19 | use *; +LL | use *; | - `Foo` could refer to the name imported here -20 | use bar::*; +LL | use bar::*; | ------ `Foo` could also refer to the name imported here -21 | fn f(_: Foo) {} +LL | fn f(_: Foo) {} | ^^^ | = note: #[deny(legacy_imports)] on by default diff --git a/src/test/ui/imports/shadow_builtin_macros.stderr b/src/test/ui/imports/shadow_builtin_macros.stderr index 8f4325fa12c72..10e89d9e15065 100644 --- a/src/test/ui/imports/shadow_builtin_macros.stderr +++ b/src/test/ui/imports/shadow_builtin_macros.stderr @@ -1,10 +1,10 @@ error: `panic` is already in scope --> $DIR/shadow_builtin_macros.rs:42:9 | -42 | macro_rules! panic { () => {} } //~ ERROR `panic` is already in scope +LL | macro_rules! panic { () => {} } //~ ERROR `panic` is already in scope | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -43 | } } -44 | m!(); +LL | } } +LL | m!(); | ----- in this macro invocation | = note: macro-expanded `macro_rules!`s may not shadow existing macros (see RFC 1560) @@ -12,13 +12,13 @@ error: `panic` is already in scope error[E0659]: `panic` is ambiguous --> $DIR/shadow_builtin_macros.rs:27:14 | -27 | fn f() { panic!(); } //~ ERROR ambiguous +LL | fn f() { panic!(); } //~ ERROR ambiguous | ^^^^^ | note: `panic` could refer to the name imported here --> $DIR/shadow_builtin_macros.rs:26:9 | -26 | use foo::*; +LL | use foo::*; | ^^^^^^ = note: `panic` is also a builtin macro = note: consider adding an explicit import of `panic` to disambiguate @@ -26,13 +26,13 @@ note: `panic` could refer to the name imported here error[E0659]: `panic` is ambiguous --> $DIR/shadow_builtin_macros.rs:32:14 | -32 | fn f() { panic!(); } //~ ERROR ambiguous +LL | fn f() { panic!(); } //~ ERROR ambiguous | ^^^^^ | note: `panic` could refer to the name imported here --> $DIR/shadow_builtin_macros.rs:31:26 | -31 | ::two_macros::m!(use foo::panic;); +LL | ::two_macros::m!(use foo::panic;); | ^^^^^^^^^^ = note: `panic` is also a builtin macro = note: macro-expanded macro imports do not shadow @@ -40,18 +40,18 @@ note: `panic` could refer to the name imported here error[E0659]: `n` is ambiguous --> $DIR/shadow_builtin_macros.rs:61:5 | -61 | n!(); //~ ERROR ambiguous +LL | n!(); //~ ERROR ambiguous | ^ | note: `n` could refer to the name imported here --> $DIR/shadow_builtin_macros.rs:60:9 | -60 | use bar::*; +LL | use bar::*; | ^^^^^^ note: `n` could also refer to the name imported here --> $DIR/shadow_builtin_macros.rs:48:13 | -48 | #[macro_use(n)] +LL | #[macro_use(n)] | ^ = note: consider adding an explicit import of `n` to disambiguate diff --git a/src/test/ui/impossible_range.stderr b/src/test/ui/impossible_range.stderr index e0e26bc4db040..1b345b43f2db1 100644 --- a/src/test/ui/impossible_range.stderr +++ b/src/test/ui/impossible_range.stderr @@ -1,7 +1,7 @@ error[E0586]: inclusive range with no end --> $DIR/impossible_range.rs:20:8 | -20 | ..=; //~ERROR inclusive range with no end +LL | ..=; //~ERROR inclusive range with no end | ^ | = help: inclusive ranges must be bounded at the end (`..=b` or `a..=b`) @@ -9,7 +9,7 @@ error[E0586]: inclusive range with no end error[E0586]: inclusive range with no end --> $DIR/impossible_range.rs:27:9 | -27 | 0..=; //~ERROR inclusive range with no end +LL | 0..=; //~ERROR inclusive range with no end | ^ | = help: inclusive ranges must be bounded at the end (`..=b` or `a..=b`) diff --git a/src/test/ui/in-band-lifetimes/E0687.stderr b/src/test/ui/in-band-lifetimes/E0687.stderr index 42714f21685f9..996866ed7ccbc 100644 --- a/src/test/ui/in-band-lifetimes/E0687.stderr +++ b/src/test/ui/in-band-lifetimes/E0687.stderr @@ -1,25 +1,25 @@ error[E0687]: lifetimes used in `fn` or `Fn` syntax must be explicitly declared using `<...>` binders --> $DIR/E0687.rs:14:15 | -14 | fn foo(x: fn(&'a u32)) {} //~ ERROR must be explicitly +LL | fn foo(x: fn(&'a u32)) {} //~ ERROR must be explicitly | ^^ in-band lifetime definition error[E0687]: lifetimes used in `fn` or `Fn` syntax must be explicitly declared using `<...>` binders --> $DIR/E0687.rs:16:16 | -16 | fn bar(x: &Fn(&'a u32)) {} //~ ERROR must be explicitly +LL | fn bar(x: &Fn(&'a u32)) {} //~ ERROR must be explicitly | ^^ in-band lifetime definition error[E0687]: lifetimes used in `fn` or `Fn` syntax must be explicitly declared using `<...>` binders --> $DIR/E0687.rs:18:15 | -18 | fn baz(x: fn(&'a u32), y: &'a u32) {} //~ ERROR must be explicitly +LL | fn baz(x: fn(&'a u32), y: &'a u32) {} //~ ERROR must be explicitly | ^^ in-band lifetime definition error[E0687]: lifetimes used in `fn` or `Fn` syntax must be explicitly declared using `<...>` binders --> $DIR/E0687.rs:23:26 | -23 | fn bar(&self, x: fn(&'a u32)) {} //~ ERROR must be explicitly +LL | fn bar(&self, x: fn(&'a u32)) {} //~ ERROR must be explicitly | ^^ in-band lifetime definition error: aborting due to 4 previous errors diff --git a/src/test/ui/in-band-lifetimes/E0687_where.stderr b/src/test/ui/in-band-lifetimes/E0687_where.stderr index a9913f6b64464..f3a32dc3d7bef 100644 --- a/src/test/ui/in-band-lifetimes/E0687_where.stderr +++ b/src/test/ui/in-band-lifetimes/E0687_where.stderr @@ -1,13 +1,13 @@ error[E0687]: lifetimes used in `fn` or `Fn` syntax must be explicitly declared using `<...>` binders --> $DIR/E0687_where.rs:14:31 | -14 | fn bar(x: &F) where F: Fn(&'a u32) {} //~ ERROR must be explicitly +LL | fn bar(x: &F) where F: Fn(&'a u32) {} //~ ERROR must be explicitly | ^^ in-band lifetime definition error[E0687]: lifetimes used in `fn` or `Fn` syntax must be explicitly declared using `<...>` binders --> $DIR/E0687_where.rs:16:21 | -16 | fn baz(x: &impl Fn(&'a u32)) {} //~ ERROR must be explicitly +LL | fn baz(x: &impl Fn(&'a u32)) {} //~ ERROR must be explicitly | ^^ in-band lifetime definition error: aborting due to 2 previous errors diff --git a/src/test/ui/in-band-lifetimes/E0688.stderr b/src/test/ui/in-band-lifetimes/E0688.stderr index c33b088f0faab..a47e449543665 100644 --- a/src/test/ui/in-band-lifetimes/E0688.stderr +++ b/src/test/ui/in-band-lifetimes/E0688.stderr @@ -1,7 +1,7 @@ error[E0688]: cannot mix in-band and explicit lifetime definitions --> $DIR/E0688.rs:14:28 | -14 | fn foo<'a>(x: &'a u32, y: &'b u32) {} //~ ERROR cannot mix +LL | fn foo<'a>(x: &'a u32, y: &'b u32) {} //~ ERROR cannot mix | -- ^^ in-band lifetime definition here | | | explicit lifetime definition here @@ -9,7 +9,7 @@ error[E0688]: cannot mix in-band and explicit lifetime definitions error[E0688]: cannot mix in-band and explicit lifetime definitions --> $DIR/E0688.rs:19:44 | -19 | fn bar<'b>(x: &'a u32, y: &'b u32, z: &'c u32) {} //~ ERROR cannot mix +LL | fn bar<'b>(x: &'a u32, y: &'b u32, z: &'c u32) {} //~ ERROR cannot mix | -- ^^ in-band lifetime definition here | | | explicit lifetime definition here @@ -17,7 +17,7 @@ error[E0688]: cannot mix in-band and explicit lifetime definitions error[E0688]: cannot mix in-band and explicit lifetime definitions --> $DIR/E0688.rs:22:14 | -22 | impl<'b> Foo<'a> { //~ ERROR cannot mix +LL | impl<'b> Foo<'a> { //~ ERROR cannot mix | -- ^^ in-band lifetime definition here | | | explicit lifetime definition here diff --git a/src/test/ui/in-band-lifetimes/ellided-lifetimes.stderr b/src/test/ui/in-band-lifetimes/ellided-lifetimes.stderr index 613a7be6ed2c1..ba58ca1ed9597 100644 --- a/src/test/ui/in-band-lifetimes/ellided-lifetimes.stderr +++ b/src/test/ui/in-band-lifetimes/ellided-lifetimes.stderr @@ -1,13 +1,13 @@ error: hidden lifetime parameters are deprecated, try `Foo<'_>` --> $DIR/ellided-lifetimes.rs:15:12 | -15 | fn foo(x: &Foo) { +LL | fn foo(x: &Foo) { | ^^^ | note: lint level defined here --> $DIR/ellided-lifetimes.rs:12:9 | -12 | #![deny(elided_lifetime_in_path)] +LL | #![deny(elided_lifetime_in_path)] | ^^^^^^^^^^^^^^^^^^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/in-band-lifetimes/mismatched.stderr b/src/test/ui/in-band-lifetimes/mismatched.stderr index 0c1231e01de6e..da5f60afe1d36 100644 --- a/src/test/ui/in-band-lifetimes/mismatched.stderr +++ b/src/test/ui/in-band-lifetimes/mismatched.stderr @@ -1,7 +1,7 @@ error[E0621]: explicit lifetime required in the type of `y` --> $DIR/mismatched.rs:14:42 | -14 | fn foo(x: &'a u32, y: &u32) -> &'a u32 { y } //~ ERROR explicit lifetime required +LL | fn foo(x: &'a u32, y: &u32) -> &'a u32 { y } //~ ERROR explicit lifetime required | - ^ lifetime `'a` required | | | consider changing the type of `y` to `&'a u32` @@ -9,7 +9,7 @@ error[E0621]: explicit lifetime required in the type of `y` error[E0623]: lifetime mismatch --> $DIR/mismatched.rs:16:46 | -16 | fn foo2(x: &'a u32, y: &'b u32) -> &'a u32 { y } //~ ERROR lifetime mismatch +LL | fn foo2(x: &'a u32, y: &'b u32) -> &'a u32 { y } //~ ERROR lifetime mismatch | ------- ------- ^ ...but data from `y` is returned here | | | this parameter and the return type are declared with different lifetimes... diff --git a/src/test/ui/in-band-lifetimes/mismatched_trait.stderr b/src/test/ui/in-band-lifetimes/mismatched_trait.stderr index 58ff1694fb74c..1fe31d0ff304f 100644 --- a/src/test/ui/in-band-lifetimes/mismatched_trait.stderr +++ b/src/test/ui/in-band-lifetimes/mismatched_trait.stderr @@ -1,9 +1,9 @@ error[E0621]: explicit lifetime required in the type of `y` --> $DIR/mismatched_trait.rs:16:9 | -15 | fn baz(&self, x: &'a u32, y: &u32) -> &'a u32 { +LL | fn baz(&self, x: &'a u32, y: &u32) -> &'a u32 { | - consider changing the type of `y` to `&'a u32` -16 | y //~ ERROR explicit lifetime required +LL | y //~ ERROR explicit lifetime required | ^ lifetime `'a` required error: aborting due to previous error diff --git a/src/test/ui/in-band-lifetimes/mismatched_trait_impl-2.stderr b/src/test/ui/in-band-lifetimes/mismatched_trait_impl-2.stderr index 7aab31eb909d0..d84e290b1fa9e 100644 --- a/src/test/ui/in-band-lifetimes/mismatched_trait_impl-2.stderr +++ b/src/test/ui/in-band-lifetimes/mismatched_trait_impl-2.stderr @@ -3,15 +3,15 @@ error[E0601]: main function not found error[E0495]: cannot infer an appropriate lifetime for lifetime parameter in generic type due to conflicting requirements --> $DIR/mismatched_trait_impl-2.rs:18:5 | -18 | fn deref(&self) -> &Trait { +LL | fn deref(&self) -> &Trait { | ^^^^^^^^^^^^^^^^^^^^^^^^^ | note: first, the lifetime cannot outlive the anonymous lifetime #1 defined on the method body at 18:5... --> $DIR/mismatched_trait_impl-2.rs:18:5 | -18 | / fn deref(&self) -> &Trait { -19 | | unimplemented!(); -20 | | } +LL | / fn deref(&self) -> &Trait { +LL | | unimplemented!(); +LL | | } | |_____^ = note: ...but the lifetime must also be valid for the static lifetime... = note: ...so that the method type is compatible with trait: diff --git a/src/test/ui/in-band-lifetimes/mismatched_trait_impl.stderr b/src/test/ui/in-band-lifetimes/mismatched_trait_impl.stderr index fd6be01da9f46..dca2f9bf9ff8c 100644 --- a/src/test/ui/in-band-lifetimes/mismatched_trait_impl.stderr +++ b/src/test/ui/in-band-lifetimes/mismatched_trait_impl.stderr @@ -1,20 +1,20 @@ error[E0495]: cannot infer an appropriate lifetime for lifetime parameter 'a in generic type due to conflicting requirements --> $DIR/mismatched_trait_impl.rs:19:5 | -19 | fn foo(&self, x: &u32, y: &'a u32) -> &'a u32 { //~ ERROR cannot infer +LL | fn foo(&self, x: &u32, y: &'a u32) -> &'a u32 { //~ ERROR cannot infer | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | note: first, the lifetime cannot outlive the anonymous lifetime #2 defined on the method body at 19:5... --> $DIR/mismatched_trait_impl.rs:19:5 | -19 | / fn foo(&self, x: &u32, y: &'a u32) -> &'a u32 { //~ ERROR cannot infer -20 | | x -21 | | } +LL | / fn foo(&self, x: &u32, y: &'a u32) -> &'a u32 { //~ ERROR cannot infer +LL | | x +LL | | } | |_____^ note: ...but the lifetime must also be valid for the lifetime 'a as defined on the method body at 19:5... --> $DIR/mismatched_trait_impl.rs:19:5 | -19 | fn foo(&self, x: &u32, y: &'a u32) -> &'a u32 { //~ ERROR cannot infer +LL | fn foo(&self, x: &u32, y: &'a u32) -> &'a u32 { //~ ERROR cannot infer | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ = note: ...so that the method type is compatible with trait: expected fn(&i32, &'a u32, &u32) -> &'a u32 diff --git a/src/test/ui/in-band-lifetimes/mut_while_borrow.stderr b/src/test/ui/in-band-lifetimes/mut_while_borrow.stderr index 14f9098c6c2f6..d97490cc480b4 100644 --- a/src/test/ui/in-band-lifetimes/mut_while_borrow.stderr +++ b/src/test/ui/in-band-lifetimes/mut_while_borrow.stderr @@ -1,9 +1,9 @@ error[E0506]: cannot assign to `p` because it is borrowed --> $DIR/mut_while_borrow.rs:19:5 | -18 | let r = foo(&p); +LL | let r = foo(&p); | - borrow of `p` occurs here -19 | p += 1; //~ ERROR cannot assign to `p` because it is borrowed +LL | p += 1; //~ ERROR cannot assign to `p` because it is borrowed | ^^^^^^ assignment to borrowed `p` occurs here error: aborting due to previous error diff --git a/src/test/ui/in-band-lifetimes/no_in_band_in_struct.stderr b/src/test/ui/in-band-lifetimes/no_in_band_in_struct.stderr index a8df6dbca0a11..b608ed0d9bb80 100644 --- a/src/test/ui/in-band-lifetimes/no_in_band_in_struct.stderr +++ b/src/test/ui/in-band-lifetimes/no_in_band_in_struct.stderr @@ -1,13 +1,13 @@ error[E0261]: use of undeclared lifetime name `'test` --> $DIR/no_in_band_in_struct.rs:15:9 | -15 | x: &'test u32, //~ ERROR undeclared lifetime +LL | x: &'test u32, //~ ERROR undeclared lifetime | ^^^^^ undeclared lifetime error[E0261]: use of undeclared lifetime name `'test` --> $DIR/no_in_band_in_struct.rs:19:10 | -19 | Baz(&'test u32), //~ ERROR undeclared lifetime +LL | Baz(&'test u32), //~ ERROR undeclared lifetime | ^^^^^ undeclared lifetime error: aborting due to 2 previous errors diff --git a/src/test/ui/in-band-lifetimes/no_introducing_in_band_in_locals.stderr b/src/test/ui/in-band-lifetimes/no_introducing_in_band_in_locals.stderr index e2340dbba23e1..8fec73a7837f9 100644 --- a/src/test/ui/in-band-lifetimes/no_introducing_in_band_in_locals.stderr +++ b/src/test/ui/in-band-lifetimes/no_introducing_in_band_in_locals.stderr @@ -1,13 +1,13 @@ error[E0261]: use of undeclared lifetime name `'test` --> $DIR/no_introducing_in_band_in_locals.rs:15:13 | -15 | let y: &'test u32 = x; //~ ERROR use of undeclared lifetime +LL | let y: &'test u32 = x; //~ ERROR use of undeclared lifetime | ^^^^^ undeclared lifetime error[E0261]: use of undeclared lifetime name `'test` --> $DIR/no_introducing_in_band_in_locals.rs:20:16 | -20 | let y: fn(&'test u32) = foo2; //~ ERROR use of undeclared lifetime +LL | let y: fn(&'test u32) = foo2; //~ ERROR use of undeclared lifetime | ^^^^^ undeclared lifetime error: aborting due to 2 previous errors diff --git a/src/test/ui/in-band-lifetimes/shadow.stderr b/src/test/ui/in-band-lifetimes/shadow.stderr index 49b82fa495a05..798a423d98aed 100644 --- a/src/test/ui/in-band-lifetimes/shadow.stderr +++ b/src/test/ui/in-band-lifetimes/shadow.stderr @@ -1,18 +1,18 @@ error[E0496]: lifetime name `'s` shadows a lifetime name that is already in scope --> $DIR/shadow.rs:17:12 | -16 | impl Foo<&'s u8> { +LL | impl Foo<&'s u8> { | -- first declared here -17 | fn bar<'s>(&self, x: &'s u8) {} //~ ERROR shadows a lifetime name +LL | fn bar<'s>(&self, x: &'s u8) {} //~ ERROR shadows a lifetime name | ^^ lifetime 's already in scope error[E0496]: lifetime name `'s` shadows a lifetime name that is already in scope --> $DIR/shadow.rs:18:19 | -16 | impl Foo<&'s u8> { +LL | impl Foo<&'s u8> { | -- first declared here -17 | fn bar<'s>(&self, x: &'s u8) {} //~ ERROR shadows a lifetime name -18 | fn baz(x: for<'s> fn(&'s u32)) {} //~ ERROR shadows a lifetime name +LL | fn bar<'s>(&self, x: &'s u8) {} //~ ERROR shadows a lifetime name +LL | fn baz(x: for<'s> fn(&'s u32)) {} //~ ERROR shadows a lifetime name | ^^ lifetime 's already in scope error: aborting due to 2 previous errors diff --git a/src/test/ui/in-band-lifetimes/single_use_lifetimes-2.stderr b/src/test/ui/in-band-lifetimes/single_use_lifetimes-2.stderr index a90add79b76aa..38d05369fb845 100644 --- a/src/test/ui/in-band-lifetimes/single_use_lifetimes-2.stderr +++ b/src/test/ui/in-band-lifetimes/single_use_lifetimes-2.stderr @@ -1,13 +1,13 @@ error: lifetime name `'x` only used once --> $DIR/single_use_lifetimes-2.rs:12:10 | -12 | fn deref<'x>() -> &'x u32 { //~ ERROR lifetime name `'x` only used once +LL | fn deref<'x>() -> &'x u32 { //~ ERROR lifetime name `'x` only used once | ^^ | note: lint level defined here --> $DIR/single_use_lifetimes-2.rs:10:9 | -10 | #![deny(single_use_lifetime)] +LL | #![deny(single_use_lifetime)] | ^^^^^^^^^^^^^^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/in-band-lifetimes/single_use_lifetimes-3.stderr b/src/test/ui/in-band-lifetimes/single_use_lifetimes-3.stderr index 8595ce5effb78..49c06aafbe550 100644 --- a/src/test/ui/in-band-lifetimes/single_use_lifetimes-3.stderr +++ b/src/test/ui/in-band-lifetimes/single_use_lifetimes-3.stderr @@ -1,19 +1,19 @@ error: lifetime name `'x` only used once --> $DIR/single_use_lifetimes-3.rs:11:12 | -11 | struct Foo<'x> { //~ ERROR lifetime name `'x` only used once +LL | struct Foo<'x> { //~ ERROR lifetime name `'x` only used once | ^^ | note: lint level defined here --> $DIR/single_use_lifetimes-3.rs:10:9 | -10 | #![deny(single_use_lifetime)] +LL | #![deny(single_use_lifetime)] | ^^^^^^^^^^^^^^^^^^^ error: lifetime name `'y` only used once --> $DIR/single_use_lifetimes-3.rs:16:6 | -16 | impl<'y> Foo<'y> { //~ ERROR lifetime name `'y` only used once +LL | impl<'y> Foo<'y> { //~ ERROR lifetime name `'y` only used once | ^^ error: aborting due to 2 previous errors diff --git a/src/test/ui/in-band-lifetimes/single_use_lifetimes-4.stderr b/src/test/ui/in-band-lifetimes/single_use_lifetimes-4.stderr index 1b952c8db09d7..2df370f5d0221 100644 --- a/src/test/ui/in-band-lifetimes/single_use_lifetimes-4.stderr +++ b/src/test/ui/in-band-lifetimes/single_use_lifetimes-4.stderr @@ -1,19 +1,19 @@ error: lifetime name `'x` only used once --> $DIR/single_use_lifetimes-4.rs:12:12 | -12 | struct Foo<'x> { //~ ERROR lifetime name `'x` only used once +LL | struct Foo<'x> { //~ ERROR lifetime name `'x` only used once | ^^ | note: lint level defined here --> $DIR/single_use_lifetimes-4.rs:10:9 | -10 | #![deny(single_use_lifetime)] +LL | #![deny(single_use_lifetime)] | ^^^^^^^^^^^^^^^^^^^ error: lifetime name `'x` only used once --> $DIR/single_use_lifetimes-4.rs:16:10 | -16 | enum Bar<'x> { //~ ERROR lifetime name `'x` only used once +LL | enum Bar<'x> { //~ ERROR lifetime name `'x` only used once | ^^ error: aborting due to 2 previous errors diff --git a/src/test/ui/in-band-lifetimes/single_use_lifetimes-5.stderr b/src/test/ui/in-band-lifetimes/single_use_lifetimes-5.stderr index 59e1254836ba9..eec426e4e63ab 100644 --- a/src/test/ui/in-band-lifetimes/single_use_lifetimes-5.stderr +++ b/src/test/ui/in-band-lifetimes/single_use_lifetimes-5.stderr @@ -1,13 +1,13 @@ error: lifetime name `'x` only used once --> $DIR/single_use_lifetimes-5.rs:12:11 | -12 | trait Foo<'x> { //~ ERROR lifetime name `'x` only used once +LL | trait Foo<'x> { //~ ERROR lifetime name `'x` only used once | ^^ | note: lint level defined here --> $DIR/single_use_lifetimes-5.rs:10:9 | -10 | #![deny(single_use_lifetime)] +LL | #![deny(single_use_lifetime)] | ^^^^^^^^^^^^^^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/in-band-lifetimes/single_use_lifetimes.stderr b/src/test/ui/in-band-lifetimes/single_use_lifetimes.stderr index bdcce1f22ecee..15917d3c08562 100644 --- a/src/test/ui/in-band-lifetimes/single_use_lifetimes.stderr +++ b/src/test/ui/in-band-lifetimes/single_use_lifetimes.stderr @@ -1,13 +1,13 @@ error: lifetime name `'x` only used once --> $DIR/single_use_lifetimes.rs:12:10 | -12 | fn deref<'x>(v: &'x u32) -> u32 { //~ ERROR lifetime name `'x` only used once +LL | fn deref<'x>(v: &'x u32) -> u32 { //~ ERROR lifetime name `'x` only used once | ^^ | note: lint level defined here --> $DIR/single_use_lifetimes.rs:10:9 | -10 | #![deny(single_use_lifetime)] +LL | #![deny(single_use_lifetime)] | ^^^^^^^^^^^^^^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/index-help.stderr b/src/test/ui/index-help.stderr index e1652b6c262c7..8904ace733b75 100644 --- a/src/test/ui/index-help.stderr +++ b/src/test/ui/index-help.stderr @@ -1,7 +1,7 @@ error[E0277]: the trait bound `std::vec::Vec<{integer}>: std::ops::Index` is not satisfied --> $DIR/index-help.rs:13:5 | -13 | x[0i32]; //~ ERROR E0277 +LL | x[0i32]; //~ ERROR E0277 | ^^^^^^^ vector indices are of type `usize` or ranges of `usize` | = help: the trait `std::ops::Index` is not implemented for `std::vec::Vec<{integer}>` diff --git a/src/test/ui/inference-variable-behind-raw-pointer.stderr b/src/test/ui/inference-variable-behind-raw-pointer.stderr index bb1d921f1c61c..e1d4df85c2fa2 100644 --- a/src/test/ui/inference-variable-behind-raw-pointer.stderr +++ b/src/test/ui/inference-variable-behind-raw-pointer.stderr @@ -1,7 +1,7 @@ warning: type annotations needed --> $DIR/inference-variable-behind-raw-pointer.rs:18:13 | -18 | if data.is_null() {} +LL | if data.is_null() {} | ^^^^^^^ | = note: #[warn(tyvar_behind_raw_pointer)] on by default diff --git a/src/test/ui/interior-mutability/interior-mutability.stderr b/src/test/ui/interior-mutability/interior-mutability.stderr index f4beb44b82dc7..d9bdc1b7288e0 100644 --- a/src/test/ui/interior-mutability/interior-mutability.stderr +++ b/src/test/ui/interior-mutability/interior-mutability.stderr @@ -1,7 +1,7 @@ error[E0277]: the trait bound `std::cell::UnsafeCell: std::panic::RefUnwindSafe` is not satisfied in `std::cell::Cell` --> $DIR/interior-mutability.rs:15:5 | -15 | catch_unwind(|| { x.set(23); }); //~ ERROR the trait bound +LL | catch_unwind(|| { x.set(23); }); //~ ERROR the trait bound | ^^^^^^^^^^^^ the type std::cell::UnsafeCell may contain interior mutability and a reference may not be safely transferrable across a catch_unwind boundary | = help: within `std::cell::Cell`, the trait `std::panic::RefUnwindSafe` is not implemented for `std::cell::UnsafeCell` diff --git a/src/test/ui/invalid-module-declaration/invalid-module-declaration.stderr b/src/test/ui/invalid-module-declaration/invalid-module-declaration.stderr index 58df416030c54..4e2312bbb32c4 100644 --- a/src/test/ui/invalid-module-declaration/invalid-module-declaration.stderr +++ b/src/test/ui/invalid-module-declaration/invalid-module-declaration.stderr @@ -1,7 +1,7 @@ error[E0583]: file not found for module `baz` --> $DIR/auxiliary/foo/bar.rs:11:9 | -11 | pub mod baz; +LL | pub mod baz; | ^^^ | = help: name the file either bar/baz.rs or bar/baz/mod.rs inside the directory "$DIR/auxiliary/foo" diff --git a/src/test/ui/invalid-path-in-const.stderr b/src/test/ui/invalid-path-in-const.stderr index be1de60bca559..a35ccd02a33e2 100644 --- a/src/test/ui/invalid-path-in-const.stderr +++ b/src/test/ui/invalid-path-in-const.stderr @@ -1,7 +1,7 @@ error[E0599]: no associated item named `DOESNOTEXIST` found for type `u32` in the current scope --> $DIR/invalid-path-in-const.rs:12:18 | -12 | fn f(a: [u8; u32::DOESNOTEXIST]) {} +LL | fn f(a: [u8; u32::DOESNOTEXIST]) {} | ^^^^^^^^^^^^^^^^^ associated item not found in `u32` error: aborting due to previous error diff --git a/src/test/ui/invalid-variadic-function.stderr b/src/test/ui/invalid-variadic-function.stderr index 15a908b3f00f2..13678d10ef517 100644 --- a/src/test/ui/invalid-variadic-function.stderr +++ b/src/test/ui/invalid-variadic-function.stderr @@ -1,13 +1,13 @@ error: only foreign functions are allowed to be variadic --> $DIR/invalid-variadic-function.rs:11:26 | -11 | extern "C" fn foo(x: u8, ...); +LL | extern "C" fn foo(x: u8, ...); | ^^^ error: expected one of `->`, `where`, or `{`, found `;` --> $DIR/invalid-variadic-function.rs:11:30 | -11 | extern "C" fn foo(x: u8, ...); +LL | extern "C" fn foo(x: u8, ...); | ^ expected one of `->`, `where`, or `{` here error: aborting due to 2 previous errors diff --git a/src/test/ui/issue-10969.stderr b/src/test/ui/issue-10969.stderr index 68127b282ed54..6f919cab1813f 100644 --- a/src/test/ui/issue-10969.stderr +++ b/src/test/ui/issue-10969.stderr @@ -1,17 +1,17 @@ error[E0618]: expected function, found `i32` --> $DIR/issue-10969.rs:12:5 | -11 | fn func(i: i32) { +LL | fn func(i: i32) { | - `i32` defined here -12 | i(); //~ERROR expected function, found `i32` +LL | i(); //~ERROR expected function, found `i32` | ^^^ not a function error[E0618]: expected function, found `i32` --> $DIR/issue-10969.rs:16:5 | -15 | let i = 0i32; +LL | let i = 0i32; | - `i32` defined here -16 | i(); //~ERROR expected function, found `i32` +LL | i(); //~ERROR expected function, found `i32` | ^^^ not a function error: aborting due to 2 previous errors diff --git a/src/test/ui/issue-11004.stderr b/src/test/ui/issue-11004.stderr index 9b8c3df7d59c4..9d516c041ea32 100644 --- a/src/test/ui/issue-11004.stderr +++ b/src/test/ui/issue-11004.stderr @@ -1,7 +1,7 @@ error[E0609]: no field `x` on type `*mut A` --> $DIR/issue-11004.rs:17:21 | -17 | let x : i32 = n.x; //~ no field `x` on type `*mut A` +LL | let x : i32 = n.x; //~ no field `x` on type `*mut A` | ^ | = note: `n` is a native pointer; perhaps you need to deref with `(*n).x` @@ -9,7 +9,7 @@ error[E0609]: no field `x` on type `*mut A` error[E0609]: no field `y` on type `*mut A` --> $DIR/issue-11004.rs:18:21 | -18 | let y : f64 = n.y; //~ no field `y` on type `*mut A` +LL | let y : f64 = n.y; //~ no field `y` on type `*mut A` | ^ | = note: `n` is a native pointer; perhaps you need to deref with `(*n).y` diff --git a/src/test/ui/issue-11319.stderr b/src/test/ui/issue-11319.stderr index 20103d389ffb0..dc702e26b7025 100644 --- a/src/test/ui/issue-11319.stderr +++ b/src/test/ui/issue-11319.stderr @@ -1,15 +1,15 @@ error[E0308]: match arms have incompatible types --> $DIR/issue-11319.rs:12:5 | -12 | / match Some(10) { -13 | | //~^ ERROR match arms have incompatible types -14 | | //~| expected type `bool` -15 | | //~| found type `()` +LL | / match Some(10) { +LL | | //~^ ERROR match arms have incompatible types +LL | | //~| expected type `bool` +LL | | //~| found type `()` ... | -19 | | None => (), +LL | | None => (), | | -- match arm with an incompatible type -20 | | _ => true -21 | | } +LL | | _ => true +LL | | } | |_____^ expected bool, found () | = note: expected type `bool` diff --git a/src/test/ui/issue-12187-1.stderr b/src/test/ui/issue-12187-1.stderr index e36c278df6e41..56fd20d3a03d9 100644 --- a/src/test/ui/issue-12187-1.stderr +++ b/src/test/ui/issue-12187-1.stderr @@ -1,7 +1,7 @@ error[E0282]: type annotations needed --> $DIR/issue-12187-1.rs:16:10 | -16 | let &v = new(); +LL | let &v = new(); | -^ | || | |cannot infer type for `_` diff --git a/src/test/ui/issue-12187-2.stderr b/src/test/ui/issue-12187-2.stderr index b72c23987ec3c..789f945e283ea 100644 --- a/src/test/ui/issue-12187-2.stderr +++ b/src/test/ui/issue-12187-2.stderr @@ -1,7 +1,7 @@ error[E0282]: type annotations needed --> $DIR/issue-12187-2.rs:16:10 | -16 | let &v = new(); +LL | let &v = new(); | -^ | || | |cannot infer type for `_` diff --git a/src/test/ui/issue-12511.stderr b/src/test/ui/issue-12511.stderr index aec828a90d1a7..f6bc2bff83dfe 100644 --- a/src/test/ui/issue-12511.stderr +++ b/src/test/ui/issue-12511.stderr @@ -1,18 +1,18 @@ error[E0391]: cyclic dependency detected --> $DIR/issue-12511.rs:14:1 | -14 | trait t2 : t1 { +LL | trait t2 : t1 { | ^^^^^^^^^^^^^ cyclic reference | note: the cycle begins when computing the supertraits of `t1`... --> $DIR/issue-12511.rs:11:1 | -11 | trait t1 : t2 { +LL | trait t1 : t2 { | ^^^^^^^^^^^^^ note: ...which then requires computing the supertraits of `t2`... --> $DIR/issue-12511.rs:11:1 | -11 | trait t1 : t2 { +LL | trait t1 : t2 { | ^^^^^^^^^^^^^ = note: ...which then again requires computing the supertraits of `t1`, completing the cycle. diff --git a/src/test/ui/issue-13058.stderr b/src/test/ui/issue-13058.stderr index fb8fb058daa26..5f4e5c609d6f4 100644 --- a/src/test/ui/issue-13058.stderr +++ b/src/test/ui/issue-13058.stderr @@ -1,16 +1,16 @@ error[E0621]: explicit lifetime required in the type of `cont` --> $DIR/issue-13058.rs:24:26 | -22 | fn check<'r, I: Iterator, T: Itble<'r, usize, I>>(cont: &T) -> bool +LL | fn check<'r, I: Iterator, T: Itble<'r, usize, I>>(cont: &T) -> bool | ---- consider changing the type of `cont` to `&'r T` -23 | { -24 | let cont_iter = cont.iter(); +LL | { +LL | let cont_iter = cont.iter(); | ^^^^ lifetime `'r` required error[E0308]: mismatched types --> $DIR/issue-13058.rs:36:11 | -36 | check((3, 5)); +LL | check((3, 5)); | ^^^^^^ | | | expected reference, found tuple diff --git a/src/test/ui/issue-13483.stderr b/src/test/ui/issue-13483.stderr index 344e179695369..afcb8b8da17b6 100644 --- a/src/test/ui/issue-13483.stderr +++ b/src/test/ui/issue-13483.stderr @@ -1,13 +1,13 @@ error: missing condition for `if` statemement --> $DIR/issue-13483.rs:13:14 | -13 | } else if { //~ ERROR missing condition +LL | } else if { //~ ERROR missing condition | ^ expected if condition here error: missing condition for `if` statemement --> $DIR/issue-13483.rs:20:14 | -20 | } else if { //~ ERROR missing condition +LL | } else if { //~ ERROR missing condition | ^ expected if condition here error: aborting due to 2 previous errors diff --git a/src/test/ui/issue-14092.stderr b/src/test/ui/issue-14092.stderr index e0b5bdb93d80e..a13e3fb4271a9 100644 --- a/src/test/ui/issue-14092.stderr +++ b/src/test/ui/issue-14092.stderr @@ -1,7 +1,7 @@ error[E0243]: wrong number of type arguments: expected 1, found 0 --> $DIR/issue-14092.rs:11:11 | -11 | fn fn1(0: Box) {} +LL | fn fn1(0: Box) {} | ^^^ expected 1 type argument error: aborting due to previous error diff --git a/src/test/ui/issue-15260.stderr b/src/test/ui/issue-15260.stderr index aca2fa5ed0413..ba77d5946b35b 100644 --- a/src/test/ui/issue-15260.stderr +++ b/src/test/ui/issue-15260.stderr @@ -1,34 +1,34 @@ error[E0025]: field `a` bound multiple times in the pattern --> $DIR/issue-15260.rs:18:9 | -17 | a: _, +LL | a: _, | ---- first use of `a` -18 | a: _ +LL | a: _ | ^^^^ multiple uses of `a` in pattern error[E0025]: field `a` bound multiple times in the pattern --> $DIR/issue-15260.rs:24:9 | -23 | a, +LL | a, | - first use of `a` -24 | a: _ +LL | a: _ | ^^^^ multiple uses of `a` in pattern error[E0025]: field `a` bound multiple times in the pattern --> $DIR/issue-15260.rs:30:9 | -29 | a, +LL | a, | - first use of `a` -30 | a: _, +LL | a: _, | ^^^^ multiple uses of `a` in pattern error[E0025]: field `a` bound multiple times in the pattern --> $DIR/issue-15260.rs:32:9 | -29 | a, +LL | a, | - first use of `a` ... -32 | a: x +LL | a: x | ^^^^ multiple uses of `a` in pattern error: aborting due to 4 previous errors diff --git a/src/test/ui/issue-15524.stderr b/src/test/ui/issue-15524.stderr index 9c77752be2022..e542dd5df6ac7 100644 --- a/src/test/ui/issue-15524.stderr +++ b/src/test/ui/issue-15524.stderr @@ -1,27 +1,27 @@ error[E0081]: discriminant value `1isize` already exists --> $DIR/issue-15524.rs:15:9 | -14 | A = 1, +LL | A = 1, | - first use of `1isize` -15 | B = 1, +LL | B = 1, | ^ enum already has `1isize` error[E0081]: discriminant value `1isize` already exists --> $DIR/issue-15524.rs:18:5 | -14 | A = 1, +LL | A = 1, | - first use of `1isize` ... -18 | D, +LL | D, | ^ enum already has `1isize` error[E0081]: discriminant value `1isize` already exists --> $DIR/issue-15524.rs:21:9 | -14 | A = 1, +LL | A = 1, | - first use of `1isize` ... -21 | E = N, +LL | E = N, | ^ enum already has `1isize` error: aborting due to 3 previous errors diff --git a/src/test/ui/issue-17263.stderr b/src/test/ui/issue-17263.stderr index a762c0876b55a..a289ad4faccf9 100644 --- a/src/test/ui/issue-17263.stderr +++ b/src/test/ui/issue-17263.stderr @@ -1,23 +1,23 @@ error[E0499]: cannot borrow `x` (via `x.b`) as mutable more than once at a time --> $DIR/issue-17263.rs:17:34 | -17 | let (a, b) = (&mut x.a, &mut x.b); +LL | let (a, b) = (&mut x.a, &mut x.b); | --- ^^^ second mutable borrow occurs here (via `x.b`) | | | first mutable borrow occurs here (via `x.a`) ... -23 | } +LL | } | - first borrow ends here error[E0502]: cannot borrow `foo` (via `foo.b`) as immutable because `foo` is also borrowed as mutable (via `foo.a`) --> $DIR/issue-17263.rs:21:32 | -21 | let (c, d) = (&mut foo.a, &foo.b); +LL | let (c, d) = (&mut foo.a, &foo.b); | ----- ^^^^^ immutable borrow occurs here (via `foo.b`) | | | mutable borrow occurs here (via `foo.a`) -22 | //~^ ERROR cannot borrow `foo` (via `foo.b`) as immutable -23 | } +LL | //~^ ERROR cannot borrow `foo` (via `foo.b`) as immutable +LL | } | - mutable borrow ends here error: aborting due to 2 previous errors diff --git a/src/test/ui/issue-17441.stderr b/src/test/ui/issue-17441.stderr index 593507a5d4510..42da3809d59fb 100644 --- a/src/test/ui/issue-17441.stderr +++ b/src/test/ui/issue-17441.stderr @@ -1,19 +1,19 @@ error[E0620]: cast to unsized type: `&[usize; 2]` as `[usize]` --> $DIR/issue-17441.rs:12:16 | -12 | let _foo = &[1_usize, 2] as [usize]; +LL | let _foo = &[1_usize, 2] as [usize]; | ^^^^^^^^^^^^^^^^^^^^^^^^ | help: consider using an implicit coercion to `&[usize]` instead --> $DIR/issue-17441.rs:12:16 | -12 | let _foo = &[1_usize, 2] as [usize]; +LL | let _foo = &[1_usize, 2] as [usize]; | ^^^^^^^^^^^^^^^^^^^^^^^^ error[E0620]: cast to unsized type: `std::boxed::Box` as `std::fmt::Debug` --> $DIR/issue-17441.rs:15:16 | -15 | let _bar = Box::new(1_usize) as std::fmt::Debug; +LL | let _bar = Box::new(1_usize) as std::fmt::Debug; | ^^^^^^^^^^^^^^^^^^^^^--------------- | | | help: try casting to a `Box` instead: `Box` @@ -21,25 +21,25 @@ error[E0620]: cast to unsized type: `std::boxed::Box` as `std::fmt::Debug error[E0620]: cast to unsized type: `usize` as `std::fmt::Debug` --> $DIR/issue-17441.rs:18:16 | -18 | let _baz = 1_usize as std::fmt::Debug; +LL | let _baz = 1_usize as std::fmt::Debug; | ^^^^^^^^^^^^^^^^^^^^^^^^^^ | help: consider using a box or reference as appropriate --> $DIR/issue-17441.rs:18:16 | -18 | let _baz = 1_usize as std::fmt::Debug; +LL | let _baz = 1_usize as std::fmt::Debug; | ^^^^^^^ error[E0620]: cast to unsized type: `[usize; 2]` as `[usize]` --> $DIR/issue-17441.rs:21:17 | -21 | let _quux = [1_usize, 2] as [usize]; +LL | let _quux = [1_usize, 2] as [usize]; | ^^^^^^^^^^^^^^^^^^^^^^^ | help: consider using a box or reference as appropriate --> $DIR/issue-17441.rs:21:17 | -21 | let _quux = [1_usize, 2] as [usize]; +LL | let _quux = [1_usize, 2] as [usize]; | ^^^^^^^^^^^^ error: aborting due to 4 previous errors diff --git a/src/test/ui/issue-18183.stderr b/src/test/ui/issue-18183.stderr index 3105080226110..68fb14b1aee3b 100644 --- a/src/test/ui/issue-18183.stderr +++ b/src/test/ui/issue-18183.stderr @@ -1,7 +1,7 @@ error[E0128]: type parameters with a default cannot use forward declared identifiers --> $DIR/issue-18183.rs:11:20 | -11 | pub struct Foo(Bar); //~ ERROR E0128 +LL | pub struct Foo(Bar); //~ ERROR E0128 | ^^^ defaulted type parameters cannot be forward declared error: aborting due to previous error diff --git a/src/test/ui/issue-18819.stderr b/src/test/ui/issue-18819.stderr index 1cd899925caa5..0b996dd0bcfa2 100644 --- a/src/test/ui/issue-18819.stderr +++ b/src/test/ui/issue-18819.stderr @@ -1,10 +1,10 @@ error[E0061]: this function takes 2 parameters but 1 parameter was supplied --> $DIR/issue-18819.rs:26:5 | -21 | fn print_x(_: &Foo, extra: &str) { +LL | fn print_x(_: &Foo, extra: &str) { | ------------------------------------------- defined here ... -26 | print_x(X); +LL | print_x(X); | ^^^^^^^^^^ expected 2 parameters error: aborting due to previous error diff --git a/src/test/ui/issue-19100.stderr b/src/test/ui/issue-19100.stderr index a567e86cfdb86..96835f69b78c7 100644 --- a/src/test/ui/issue-19100.stderr +++ b/src/test/ui/issue-19100.stderr @@ -1,7 +1,7 @@ warning[E0170]: pattern binding `Bar` is named the same as one of the variants of the type `Foo` --> $DIR/issue-19100.rs:27:1 | -27 | Bar if true +LL | Bar if true | ^^^ | = help: if you meant to match on a variant, consider making the path in the pattern qualified: `Foo::Bar` @@ -9,7 +9,7 @@ warning[E0170]: pattern binding `Bar` is named the same as one of the variants o warning[E0170]: pattern binding `Baz` is named the same as one of the variants of the type `Foo` --> $DIR/issue-19100.rs:31:1 | -31 | Baz if false +LL | Baz if false | ^^^ | = help: if you meant to match on a variant, consider making the path in the pattern qualified: `Foo::Baz` diff --git a/src/test/ui/issue-19498.stderr b/src/test/ui/issue-19498.stderr index 489abf715ded9..dbd2472135c2c 100644 --- a/src/test/ui/issue-19498.stderr +++ b/src/test/ui/issue-19498.stderr @@ -1,45 +1,45 @@ error[E0255]: the name `A` is defined multiple times --> $DIR/issue-19498.rs:13:1 | -11 | use self::A; +LL | use self::A; | ------- previous import of the module `A` here -12 | use self::B; -13 | mod A {} //~ ERROR the name `A` is defined multiple times +LL | use self::B; +LL | mod A {} //~ ERROR the name `A` is defined multiple times | ^^^^^ `A` redefined here | = note: `A` must be defined only once in the type namespace of this module help: You can use `as` to change the binding name of the import | -11 | use self::A as OtherA; +LL | use self::A as OtherA; | ^^^^^^^^^^^^^^^^^ error[E0255]: the name `B` is defined multiple times --> $DIR/issue-19498.rs:15:1 | -12 | use self::B; +LL | use self::B; | ------- previous import of the module `B` here ... -15 | pub mod B {} //~ ERROR the name `B` is defined multiple times +LL | pub mod B {} //~ ERROR the name `B` is defined multiple times | ^^^^^^^^^ `B` redefined here | = note: `B` must be defined only once in the type namespace of this module help: You can use `as` to change the binding name of the import | -12 | use self::B as OtherB; +LL | use self::B as OtherB; | ^^^^^^^^^^^^^^^^^ error[E0255]: the name `D` is defined multiple times --> $DIR/issue-19498.rs:19:5 | -18 | use C::D; +LL | use C::D; | ---- previous import of the module `D` here -19 | mod D {} //~ ERROR the name `D` is defined multiple times +LL | mod D {} //~ ERROR the name `D` is defined multiple times | ^^^^^ `D` redefined here | = note: `D` must be defined only once in the type namespace of this module help: You can use `as` to change the binding name of the import | -18 | use C::D as OtherD; +LL | use C::D as OtherD; | ^^^^^^^^^^^^^^ error: aborting due to 3 previous errors diff --git a/src/test/ui/issue-1962.stderr b/src/test/ui/issue-1962.stderr index 5f920316b5ca1..b7c2bd844811d 100644 --- a/src/test/ui/issue-1962.stderr +++ b/src/test/ui/issue-1962.stderr @@ -1,7 +1,7 @@ error: denote infinite loops with `loop { ... }` --> $DIR/issue-1962.rs:14:3 | -14 | while true { //~ ERROR denote infinite loops with `loop +LL | while true { //~ ERROR denote infinite loops with `loop | ^^^^^^^^^^ help: use `loop` | = note: requested on the command line with `-D while-true` diff --git a/src/test/ui/issue-19707.stderr b/src/test/ui/issue-19707.stderr index b4d4f6f1bbf8b..0b5408bf40164 100644 --- a/src/test/ui/issue-19707.stderr +++ b/src/test/ui/issue-19707.stderr @@ -1,7 +1,7 @@ error[E0106]: missing lifetime specifier --> $DIR/issue-19707.rs:13:28 | -13 | type foo = fn(&u8, &u8) -> &u8; //~ ERROR missing lifetime specifier +LL | type foo = fn(&u8, &u8) -> &u8; //~ ERROR missing lifetime specifier | ^ expected lifetime parameter | = help: this function's return type contains a borrowed value, but the signature does not say whether it is borrowed from argument 1 or argument 2 @@ -9,7 +9,7 @@ error[E0106]: missing lifetime specifier error[E0106]: missing lifetime specifier --> $DIR/issue-19707.rs:15:27 | -15 | fn bar &u8>(f: &F) {} //~ ERROR missing lifetime specifier +LL | fn bar &u8>(f: &F) {} //~ ERROR missing lifetime specifier | ^ expected lifetime parameter | = help: this function's return type contains a borrowed value, but the signature does not say whether it is borrowed from argument 1 or argument 2 diff --git a/src/test/ui/issue-19922.stderr b/src/test/ui/issue-19922.stderr index f96392441967f..f8ffc92f6cbb2 100644 --- a/src/test/ui/issue-19922.stderr +++ b/src/test/ui/issue-19922.stderr @@ -1,7 +1,7 @@ error[E0559]: variant `Homura::Akemi` has no field named `kaname` --> $DIR/issue-19922.rs:16:34 | -16 | let homura = Homura::Akemi { kaname: () }; +LL | let homura = Homura::Akemi { kaname: () }; | ^^^^^^^ `Homura::Akemi` does not have this field | = note: available fields are: `madoka` diff --git a/src/test/ui/issue-20692.stderr b/src/test/ui/issue-20692.stderr index 2a5ddd1b6118f..08672687c07ea 100644 --- a/src/test/ui/issue-20692.stderr +++ b/src/test/ui/issue-20692.stderr @@ -1,7 +1,7 @@ error[E0038]: the trait `Array` cannot be made into an object --> $DIR/issue-20692.rs:17:5 | -17 | &Array; +LL | &Array; | ^^^^^^ the trait `Array` cannot be made into an object | = note: the trait cannot require that `Self : Sized` @@ -9,7 +9,7 @@ error[E0038]: the trait `Array` cannot be made into an object error[E0038]: the trait `Array` cannot be made into an object --> $DIR/issue-20692.rs:14:13 | -14 | let _ = x +LL | let _ = x | ^ the trait `Array` cannot be made into an object | = note: the trait cannot require that `Self : Sized` diff --git a/src/test/ui/issue-21546.stderr b/src/test/ui/issue-21546.stderr index ec953103a1c57..2f6da0eb8e89b 100644 --- a/src/test/ui/issue-21546.stderr +++ b/src/test/ui/issue-21546.stderr @@ -1,10 +1,10 @@ error[E0428]: the name `Foo` is defined multiple times --> $DIR/issue-21546.rs:17:1 | -14 | mod Foo { } +LL | mod Foo { } | ------- previous definition of the module `Foo` here ... -17 | struct Foo; +LL | struct Foo; | ^^^^^^^^^^^ `Foo` redefined here | = note: `Foo` must be defined only once in the type namespace of this module @@ -12,10 +12,10 @@ error[E0428]: the name `Foo` is defined multiple times error[E0428]: the name `Bar` is defined multiple times --> $DIR/issue-21546.rs:24:1 | -21 | mod Bar { } +LL | mod Bar { } | ------- previous definition of the module `Bar` here ... -24 | struct Bar(i32); +LL | struct Bar(i32); | ^^^^^^^^^^^^^^^^ `Bar` redefined here | = note: `Bar` must be defined only once in the type namespace of this module @@ -23,10 +23,10 @@ error[E0428]: the name `Bar` is defined multiple times error[E0428]: the name `Baz` is defined multiple times --> $DIR/issue-21546.rs:32:1 | -29 | struct Baz(i32); +LL | struct Baz(i32); | ---------------- previous definition of the type `Baz` here ... -32 | mod Baz { } +LL | mod Baz { } | ^^^^^^^ `Baz` redefined here | = note: `Baz` must be defined only once in the type namespace of this module @@ -34,10 +34,10 @@ error[E0428]: the name `Baz` is defined multiple times error[E0428]: the name `Qux` is defined multiple times --> $DIR/issue-21546.rs:40:1 | -37 | struct Qux { x: bool } +LL | struct Qux { x: bool } | ---------- previous definition of the type `Qux` here ... -40 | mod Qux { } +LL | mod Qux { } | ^^^^^^^ `Qux` redefined here | = note: `Qux` must be defined only once in the type namespace of this module @@ -45,10 +45,10 @@ error[E0428]: the name `Qux` is defined multiple times error[E0428]: the name `Quux` is defined multiple times --> $DIR/issue-21546.rs:48:1 | -45 | struct Quux; +LL | struct Quux; | ------------ previous definition of the type `Quux` here ... -48 | mod Quux { } +LL | mod Quux { } | ^^^^^^^^ `Quux` redefined here | = note: `Quux` must be defined only once in the type namespace of this module @@ -56,10 +56,10 @@ error[E0428]: the name `Quux` is defined multiple times error[E0428]: the name `Corge` is defined multiple times --> $DIR/issue-21546.rs:56:1 | -53 | enum Corge { A, B } +LL | enum Corge { A, B } | ---------- previous definition of the type `Corge` here ... -56 | mod Corge { } +LL | mod Corge { } | ^^^^^^^^^ `Corge` redefined here | = note: `Corge` must be defined only once in the type namespace of this module diff --git a/src/test/ui/issue-21600.stderr b/src/test/ui/issue-21600.stderr index e177e8ede6263..570c4be7e2d71 100644 --- a/src/test/ui/issue-21600.stderr +++ b/src/test/ui/issue-21600.stderr @@ -1,30 +1,30 @@ error[E0387]: cannot borrow data mutably in a captured outer variable in an `Fn` closure --> $DIR/issue-21600.rs:24:17 | -24 | call_it(|| x.gen_mut()); //~ ERROR cannot borrow data mutably in a captured outer +LL | call_it(|| x.gen_mut()); //~ ERROR cannot borrow data mutably in a captured outer | ^^ | help: consider changing this to accept closures that implement `FnMut` --> $DIR/issue-21600.rs:22:13 | -22 | call_it(|| { +LL | call_it(|| { | _____________^ -23 | | call_it(|| x.gen()); -24 | | call_it(|| x.gen_mut()); //~ ERROR cannot borrow data mutably in a captured outer -25 | | //~^ ERROR cannot borrow data mutably in a captured outer -26 | | }); +LL | | call_it(|| x.gen()); +LL | | call_it(|| x.gen_mut()); //~ ERROR cannot borrow data mutably in a captured outer +LL | | //~^ ERROR cannot borrow data mutably in a captured outer +LL | | }); | |_____^ error[E0387]: cannot borrow data mutably in a captured outer variable in an `Fn` closure --> $DIR/issue-21600.rs:24:20 | -24 | call_it(|| x.gen_mut()); //~ ERROR cannot borrow data mutably in a captured outer +LL | call_it(|| x.gen_mut()); //~ ERROR cannot borrow data mutably in a captured outer | ^ | help: consider changing this closure to take self by mutable reference --> $DIR/issue-21600.rs:24:17 | -24 | call_it(|| x.gen_mut()); //~ ERROR cannot borrow data mutably in a captured outer +LL | call_it(|| x.gen_mut()); //~ ERROR cannot borrow data mutably in a captured outer | ^^^^^^^^^^^^^^ error: aborting due to 2 previous errors diff --git a/src/test/ui/issue-21950.stderr b/src/test/ui/issue-21950.stderr index 123d61a261db1..5621ab701db29 100644 --- a/src/test/ui/issue-21950.stderr +++ b/src/test/ui/issue-21950.stderr @@ -1,7 +1,7 @@ error[E0393]: the type parameter `RHS` must be explicitly specified --> $DIR/issue-21950.rs:17:14 | -17 | &Add; +LL | &Add; | ^^^ missing reference to `RHS` | = note: because of the default `Self` reference, type parameters must be specified on object types @@ -9,7 +9,7 @@ error[E0393]: the type parameter `RHS` must be explicitly specified error[E0191]: the value of the associated type `Output` (from the trait `std::ops::Add`) must be specified --> $DIR/issue-21950.rs:17:14 | -17 | &Add; +LL | &Add; | ^^^ missing associated type `Output` value error: aborting due to 2 previous errors diff --git a/src/test/ui/issue-22370.stderr b/src/test/ui/issue-22370.stderr index 9498000ca56eb..c7eeb9792fc83 100644 --- a/src/test/ui/issue-22370.stderr +++ b/src/test/ui/issue-22370.stderr @@ -1,7 +1,7 @@ error[E0393]: the type parameter `T` must be explicitly specified --> $DIR/issue-22370.rs:15:10 | -15 | fn f(a: &A) {} +LL | fn f(a: &A) {} | ^ missing reference to `T` | = note: because of the default `Self` reference, type parameters must be specified on object types diff --git a/src/test/ui/issue-22560.stderr b/src/test/ui/issue-22560.stderr index 1c594cb6cb858..634a3b1a96406 100644 --- a/src/test/ui/issue-22560.stderr +++ b/src/test/ui/issue-22560.stderr @@ -1,7 +1,7 @@ error[E0393]: the type parameter `RHS` must be explicitly specified --> $DIR/issue-22560.rs:15:13 | -15 | type Test = Add + +LL | type Test = Add + | ^^^ missing reference to `RHS` | = note: because of the default `Self` reference, type parameters must be specified on object types @@ -9,7 +9,7 @@ error[E0393]: the type parameter `RHS` must be explicitly specified error[E0393]: the type parameter `RHS` must be explicitly specified --> $DIR/issue-22560.rs:18:13 | -18 | Sub; +LL | Sub; | ^^^ missing reference to `RHS` | = note: because of the default `Self` reference, type parameters must be specified on object types @@ -17,17 +17,17 @@ error[E0393]: the type parameter `RHS` must be explicitly specified error[E0225]: only auto traits can be used as additional traits in a trait object --> $DIR/issue-22560.rs:18:13 | -18 | Sub; +LL | Sub; | ^^^ non-auto additional trait error[E0191]: the value of the associated type `Output` (from the trait `std::ops::Add`) must be specified --> $DIR/issue-22560.rs:15:13 | -15 | type Test = Add + +LL | type Test = Add + | _____________^ -16 | | //~^ ERROR E0393 -17 | | //~| ERROR E0191 -18 | | Sub; +LL | | //~^ ERROR E0393 +LL | | //~| ERROR E0191 +LL | | Sub; | |_______________^ missing associated type `Output` value error: aborting due to 4 previous errors diff --git a/src/test/ui/issue-22644.stderr b/src/test/ui/issue-22644.stderr index 91107fbe35610..d5e87f894178a 100644 --- a/src/test/ui/issue-22644.stderr +++ b/src/test/ui/issue-22644.stderr @@ -1,7 +1,7 @@ error: `<` is interpreted as a start of generic arguments for `usize`, not a comparison --> $DIR/issue-22644.rs:16:31 | -16 | println!("{}", a as usize < long_name); //~ ERROR `<` is interpreted as a start of generic +LL | println!("{}", a as usize < long_name); //~ ERROR `<` is interpreted as a start of generic | ---------- ^ --------- interpreted as generic arguments | | | | | not interpreted as comparison @@ -10,7 +10,7 @@ error: `<` is interpreted as a start of generic arguments for `usize`, not a com error: `<` is interpreted as a start of generic arguments for `usize`, not a comparison --> $DIR/issue-22644.rs:17:33 | -17 | println!("{}{}", a as usize < long_name, long_name); +LL | println!("{}{}", a as usize < long_name, long_name); | ---------- ^ -------------------- interpreted as generic arguments | | | | | not interpreted as comparison @@ -19,7 +19,7 @@ error: `<` is interpreted as a start of generic arguments for `usize`, not a com error: `<` is interpreted as a start of generic arguments for `usize`, not a comparison --> $DIR/issue-22644.rs:19:31 | -19 | println!("{}", a as usize < 4); //~ ERROR `<` is interpreted as a start of generic +LL | println!("{}", a as usize < 4); //~ ERROR `<` is interpreted as a start of generic | ---------- ^ - interpreted as generic arguments | | | | | not interpreted as comparison @@ -28,7 +28,7 @@ error: `<` is interpreted as a start of generic arguments for `usize`, not a com error: `<` is interpreted as a start of generic arguments for `usize`, not a comparison --> $DIR/issue-22644.rs:21:31 | -21 | println!("{}{}", a: usize < long_name, long_name); +LL | println!("{}{}", a: usize < long_name, long_name); | -------- ^ -------------------- interpreted as generic arguments | | | | | not interpreted as comparison @@ -37,7 +37,7 @@ error: `<` is interpreted as a start of generic arguments for `usize`, not a com error: `<` is interpreted as a start of generic arguments for `usize`, not a comparison --> $DIR/issue-22644.rs:23:29 | -23 | println!("{}", a: usize < 4); //~ ERROR `<` is interpreted as a start of generic +LL | println!("{}", a: usize < 4); //~ ERROR `<` is interpreted as a start of generic | -------- ^ - interpreted as generic arguments | | | | | not interpreted as comparison @@ -46,38 +46,38 @@ error: `<` is interpreted as a start of generic arguments for `usize`, not a com error: `<` is interpreted as a start of generic arguments for `usize`, not a comparison --> $DIR/issue-22644.rs:28:20 | -28 | < //~ ERROR `<` is interpreted as a start of generic +LL | < //~ ERROR `<` is interpreted as a start of generic | ^ not interpreted as comparison -29 | 4); +LL | 4); | - interpreted as generic arguments help: try comparing the casted value | -25 | println!("{}", (a -26 | as -27 | usize) +LL | println!("{}", (a +LL | as +LL | usize) | error: `<` is interpreted as a start of generic arguments for `usize`, not a comparison --> $DIR/issue-22644.rs:37:20 | -37 | < //~ ERROR `<` is interpreted as a start of generic +LL | < //~ ERROR `<` is interpreted as a start of generic | ^ not interpreted as comparison -38 | 5); +LL | 5); | - interpreted as generic arguments help: try comparing the casted value | -30 | println!("{}", (a -31 | -32 | -33 | as -34 | -35 | +LL | println!("{}", (a +LL | +LL | +LL | as +LL | +LL | ... error: `<` is interpreted as a start of generic arguments for `usize`, not a shift --> $DIR/issue-22644.rs:40:31 | -40 | println!("{}", a as usize << long_name); //~ ERROR `<` is interpreted as a start of generic +LL | println!("{}", a as usize << long_name); //~ ERROR `<` is interpreted as a start of generic | ---------- ^^ --------- interpreted as generic arguments | | | | | not interpreted as shift @@ -86,6 +86,6 @@ error: `<` is interpreted as a start of generic arguments for `usize`, not a shi error: expected type, found `4` --> $DIR/issue-22644.rs:42:28 | -42 | println!("{}", a: &mut 4); //~ ERROR expected type, found `4` +LL | println!("{}", a: &mut 4); //~ ERROR expected type, found `4` | ^ expecting a type here because of type ascription diff --git a/src/test/ui/issue-22886.stderr b/src/test/ui/issue-22886.stderr index 23d05edc919b3..d42fe35fd117b 100644 --- a/src/test/ui/issue-22886.stderr +++ b/src/test/ui/issue-22886.stderr @@ -1,7 +1,7 @@ error[E0207]: the lifetime parameter `'a` is not constrained by the impl trait, self type, or predicates --> $DIR/issue-22886.rs:23:6 | -23 | impl<'a> Iterator for Newtype { //~ ERROR E0207 +LL | impl<'a> Iterator for Newtype { //~ ERROR E0207 | ^^ unconstrained lifetime parameter error: aborting due to previous error diff --git a/src/test/ui/issue-22933-2.stderr b/src/test/ui/issue-22933-2.stderr index 8853d43408c00..c1e6da73a5a0c 100644 --- a/src/test/ui/issue-22933-2.stderr +++ b/src/test/ui/issue-22933-2.stderr @@ -1,10 +1,10 @@ error[E0599]: no variant named `PIE` found for type `Delicious` in the current scope --> $DIR/issue-22933-2.rs:14:44 | -11 | enum Delicious { +LL | enum Delicious { | -------------- variant `PIE` not found here ... -14 | ApplePie = Delicious::Apple as isize | Delicious::PIE as isize, +LL | ApplePie = Delicious::Apple as isize | Delicious::PIE as isize, | ^^^^^^^^^^^^^^ variant not found in `Delicious` error: aborting due to previous error diff --git a/src/test/ui/issue-23041.stderr b/src/test/ui/issue-23041.stderr index 048ae5834e3c4..64a99926f2479 100644 --- a/src/test/ui/issue-23041.stderr +++ b/src/test/ui/issue-23041.stderr @@ -1,7 +1,7 @@ error[E0282]: type annotations needed --> $DIR/issue-23041.rs:16:22 | -16 | b.downcast_ref::_>(); //~ ERROR E0282 +LL | b.downcast_ref::_>(); //~ ERROR E0282 | ^^^^^^^^ cannot infer type for `_` error: aborting due to previous error diff --git a/src/test/ui/issue-23173.stderr b/src/test/ui/issue-23173.stderr index 38a22257ff843..ba95ff296f82c 100644 --- a/src/test/ui/issue-23173.stderr +++ b/src/test/ui/issue-23173.stderr @@ -1,37 +1,37 @@ error[E0599]: no variant named `Homura` found for type `Token` in the current scope --> $DIR/issue-23173.rs:19:16 | -11 | enum Token { LeftParen, RightParen, Plus, Minus, /* etc */ } +LL | enum Token { LeftParen, RightParen, Plus, Minus, /* etc */ } | ---------- variant `Homura` not found here ... -19 | use_token(&Token::Homura); +LL | use_token(&Token::Homura); | ^^^^^^^^^^^^^ variant not found in `Token` error[E0599]: no function or associated item named `method` found for type `Struct` in the current scope --> $DIR/issue-23173.rs:21:5 | -12 | struct Struct { +LL | struct Struct { | ------------- function or associated item `method` not found for this ... -21 | Struct::method(); +LL | Struct::method(); | ^^^^^^^^^^^^^^ function or associated item not found in `Struct` error[E0599]: no function or associated item named `method` found for type `Struct` in the current scope --> $DIR/issue-23173.rs:23:5 | -12 | struct Struct { +LL | struct Struct { | ------------- function or associated item `method` not found for this ... -23 | Struct::method; +LL | Struct::method; | ^^^^^^^^^^^^^^ function or associated item not found in `Struct` error[E0599]: no associated item named `Assoc` found for type `Struct` in the current scope --> $DIR/issue-23173.rs:25:5 | -12 | struct Struct { +LL | struct Struct { | ------------- associated item `Assoc` not found for this ... -25 | Struct::Assoc; +LL | Struct::Assoc; | ^^^^^^^^^^^^^ associated item not found in `Struct` error: aborting due to 4 previous errors diff --git a/src/test/ui/issue-23217.stderr b/src/test/ui/issue-23217.stderr index eae6c2de9c565..451f508c0580a 100644 --- a/src/test/ui/issue-23217.stderr +++ b/src/test/ui/issue-23217.stderr @@ -1,9 +1,9 @@ error[E0599]: no variant named `A` found for type `SomeEnum` in the current scope --> $DIR/issue-23217.rs:12:9 | -11 | pub enum SomeEnum { +LL | pub enum SomeEnum { | ----------------- variant `A` not found here -12 | B = SomeEnum::A, +LL | B = SomeEnum::A, | ^^^^^^^^^^^ variant not found in `SomeEnum` error: aborting due to previous error diff --git a/src/test/ui/issue-23302-1.stderr b/src/test/ui/issue-23302-1.stderr index 0658c07fb1dbe..139f4d616a523 100644 --- a/src/test/ui/issue-23302-1.stderr +++ b/src/test/ui/issue-23302-1.stderr @@ -1,13 +1,13 @@ error[E0391]: cyclic dependency detected --> $DIR/issue-23302-1.rs:14:9 | -14 | A = X::A as isize, //~ ERROR E0391 +LL | A = X::A as isize, //~ ERROR E0391 | ^^^^^^^^^^^^^ cyclic reference | note: the cycle begins when const-evaluating `X::A::{{initializer}}`... --> $DIR/issue-23302-1.rs:14:5 | -14 | A = X::A as isize, //~ ERROR E0391 +LL | A = X::A as isize, //~ ERROR E0391 | ^^^^^^^^^^^^^^^^^ = note: ...which then again requires const-evaluating `X::A::{{initializer}}`, completing the cycle. diff --git a/src/test/ui/issue-23302-2.stderr b/src/test/ui/issue-23302-2.stderr index c4a1c4f80c82c..65315c5d7cba6 100644 --- a/src/test/ui/issue-23302-2.stderr +++ b/src/test/ui/issue-23302-2.stderr @@ -1,13 +1,13 @@ error[E0391]: cyclic dependency detected --> $DIR/issue-23302-2.rs:14:9 | -14 | A = Y::B as isize, //~ ERROR E0391 +LL | A = Y::B as isize, //~ ERROR E0391 | ^^^^^^^^^^^^^ cyclic reference | note: the cycle begins when const-evaluating `Y::A::{{initializer}}`... --> $DIR/issue-23302-2.rs:14:5 | -14 | A = Y::B as isize, //~ ERROR E0391 +LL | A = Y::B as isize, //~ ERROR E0391 | ^^^^^^^^^^^^^^^^^ = note: ...which then again requires const-evaluating `Y::A::{{initializer}}`, completing the cycle. diff --git a/src/test/ui/issue-23302-3.stderr b/src/test/ui/issue-23302-3.stderr index 76f543cff7913..1d1e463fc9b3d 100644 --- a/src/test/ui/issue-23302-3.stderr +++ b/src/test/ui/issue-23302-3.stderr @@ -1,18 +1,18 @@ error[E0391]: cyclic dependency detected --> $DIR/issue-23302-3.rs:11:16 | -11 | const A: i32 = B; //~ ERROR E0391 +LL | const A: i32 = B; //~ ERROR E0391 | ^ cyclic reference | note: the cycle begins when processing `B`... --> $DIR/issue-23302-3.rs:13:1 | -13 | const B: i32 = A; +LL | const B: i32 = A; | ^^^^^^^^^^^^^^^^^ note: ...which then requires processing `A`... --> $DIR/issue-23302-3.rs:13:16 | -13 | const B: i32 = A; +LL | const B: i32 = A; | ^ = note: ...which then again requires processing `B`, completing the cycle. diff --git a/src/test/ui/issue-23543.stderr b/src/test/ui/issue-23543.stderr index e5181960753bd..22bda8f553879 100644 --- a/src/test/ui/issue-23543.stderr +++ b/src/test/ui/issue-23543.stderr @@ -1,7 +1,7 @@ error[E0229]: associated type bindings are not allowed here --> $DIR/issue-23543.rs:17:17 | -17 | where T: A; +LL | where T: A; | ^^^^^^^^^^^ associated type not allowed here error: aborting due to previous error diff --git a/src/test/ui/issue-23544.stderr b/src/test/ui/issue-23544.stderr index 496a7aff7b731..455a43156b01c 100644 --- a/src/test/ui/issue-23544.stderr +++ b/src/test/ui/issue-23544.stderr @@ -1,7 +1,7 @@ error[E0229]: associated type bindings are not allowed here --> $DIR/issue-23544.rs:15:17 | -15 | where T: A; +LL | where T: A; | ^^^^^^^^^^^^^^^^^^^^^^^ associated type not allowed here error: aborting due to previous error diff --git a/src/test/ui/issue-23716.stderr b/src/test/ui/issue-23716.stderr index 2db67c7ec00dd..caf97ca35eb2c 100644 --- a/src/test/ui/issue-23716.stderr +++ b/src/test/ui/issue-23716.stderr @@ -1,19 +1,19 @@ error[E0530]: function parameters cannot shadow statics --> $DIR/issue-23716.rs:13:8 | -11 | static foo: i32 = 0; +LL | static foo: i32 = 0; | -------------------- a static `foo` is defined here -12 | -13 | fn bar(foo: i32) {} +LL | +LL | fn bar(foo: i32) {} | ^^^ cannot be named the same as a static error[E0530]: function parameters cannot shadow statics --> $DIR/issue-23716.rs:23:13 | -21 | use self::submod::answer; +LL | use self::submod::answer; | -------------------- a static `answer` is imported here -22 | -23 | fn question(answer: i32) {} +LL | +LL | fn question(answer: i32) {} | ^^^^^^ cannot be named the same as a static error: aborting due to 2 previous errors diff --git a/src/test/ui/issue-24036.stderr b/src/test/ui/issue-24036.stderr index c89f7241f5b5a..89d1733421a8c 100644 --- a/src/test/ui/issue-24036.stderr +++ b/src/test/ui/issue-24036.stderr @@ -1,7 +1,7 @@ error[E0308]: mismatched types --> $DIR/issue-24036.rs:13:9 | -13 | x = |c| c + 1; +LL | x = |c| c + 1; | ^^^^^^^^^ expected closure, found a different closure | = note: expected type `[closure@$DIR/issue-24036.rs:12:17: 12:26]` @@ -12,14 +12,14 @@ error[E0308]: mismatched types error[E0308]: match arms have incompatible types --> $DIR/issue-24036.rs:18:13 | -18 | let x = match 1usize { +LL | let x = match 1usize { | _____________^ -19 | | //~^ ERROR match arms have incompatible types -20 | | 1 => |c| c + 1, -21 | | 2 => |c| c - 1, +LL | | //~^ ERROR match arms have incompatible types +LL | | 1 => |c| c + 1, +LL | | 2 => |c| c - 1, | | --------- match arm with an incompatible type -22 | | _ => |c| c - 1 -23 | | }; +LL | | _ => |c| c - 1 +LL | | }; | |_____^ expected closure, found a different closure | = note: expected type `[closure@$DIR/issue-24036.rs:20:14: 20:23]` diff --git a/src/test/ui/issue-24081.stderr b/src/test/ui/issue-24081.stderr index 969cf3577fbc2..0f07e610fcdf6 100644 --- a/src/test/ui/issue-24081.stderr +++ b/src/test/ui/issue-24081.stderr @@ -1,76 +1,76 @@ error[E0255]: the name `Add` is defined multiple times --> $DIR/issue-24081.rs:17:1 | -11 | use std::ops::Add; +LL | use std::ops::Add; | ------------- previous import of the trait `Add` here ... -17 | type Add = bool; //~ ERROR the name `Add` is defined multiple times +LL | type Add = bool; //~ ERROR the name `Add` is defined multiple times | ^^^^^^^^^^^^^^^^ `Add` redefined here | = note: `Add` must be defined only once in the type namespace of this module help: You can use `as` to change the binding name of the import | -11 | use std::ops::Add as OtherAdd; +LL | use std::ops::Add as OtherAdd; | ^^^^^^^^^^^^^^^^^^^^^^^^^ error[E0255]: the name `Sub` is defined multiple times --> $DIR/issue-24081.rs:19:1 | -12 | use std::ops::Sub; +LL | use std::ops::Sub; | ------------- previous import of the trait `Sub` here ... -19 | struct Sub { x: f32 } //~ ERROR the name `Sub` is defined multiple times +LL | struct Sub { x: f32 } //~ ERROR the name `Sub` is defined multiple times | ^^^^^^^^^^ `Sub` redefined here | = note: `Sub` must be defined only once in the type namespace of this module help: You can use `as` to change the binding name of the import | -12 | use std::ops::Sub as OtherSub; +LL | use std::ops::Sub as OtherSub; | ^^^^^^^^^^^^^^^^^^^^^^^^^ error[E0255]: the name `Mul` is defined multiple times --> $DIR/issue-24081.rs:21:1 | -13 | use std::ops::Mul; +LL | use std::ops::Mul; | ------------- previous import of the trait `Mul` here ... -21 | enum Mul { A, B } //~ ERROR the name `Mul` is defined multiple times +LL | enum Mul { A, B } //~ ERROR the name `Mul` is defined multiple times | ^^^^^^^^ `Mul` redefined here | = note: `Mul` must be defined only once in the type namespace of this module help: You can use `as` to change the binding name of the import | -13 | use std::ops::Mul as OtherMul; +LL | use std::ops::Mul as OtherMul; | ^^^^^^^^^^^^^^^^^^^^^^^^^ error[E0255]: the name `Div` is defined multiple times --> $DIR/issue-24081.rs:23:1 | -14 | use std::ops::Div; +LL | use std::ops::Div; | ------------- previous import of the trait `Div` here ... -23 | mod Div { } //~ ERROR the name `Div` is defined multiple times +LL | mod Div { } //~ ERROR the name `Div` is defined multiple times | ^^^^^^^ `Div` redefined here | = note: `Div` must be defined only once in the type namespace of this module help: You can use `as` to change the binding name of the import | -14 | use std::ops::Div as OtherDiv; +LL | use std::ops::Div as OtherDiv; | ^^^^^^^^^^^^^^^^^^^^^^^^^ error[E0255]: the name `Rem` is defined multiple times --> $DIR/issue-24081.rs:25:1 | -15 | use std::ops::Rem; +LL | use std::ops::Rem; | ------------- previous import of the trait `Rem` here ... -25 | trait Rem { } //~ ERROR the name `Rem` is defined multiple times +LL | trait Rem { } //~ ERROR the name `Rem` is defined multiple times | ^^^^^^^^^ `Rem` redefined here | = note: `Rem` must be defined only once in the type namespace of this module help: You can use `as` to change the binding name of the import | -15 | use std::ops::Rem as OtherRem; +LL | use std::ops::Rem as OtherRem; | ^^^^^^^^^^^^^^^^^^^^^^^^^ error: aborting due to 5 previous errors diff --git a/src/test/ui/issue-24424.stderr b/src/test/ui/issue-24424.stderr index 55af26dd91ea3..28019e54613e4 100644 --- a/src/test/ui/issue-24424.stderr +++ b/src/test/ui/issue-24424.stderr @@ -1,13 +1,13 @@ error[E0283]: type annotations required: cannot resolve `T0: Trait0<'l0>` --> $DIR/issue-24424.rs:14:1 | -14 | impl <'l0, 'l1, T0> Trait1<'l0, T0> for bool where T0 : Trait0<'l0>, T0 : Trait0<'l1> {} +LL | impl <'l0, 'l1, T0> Trait1<'l0, T0> for bool where T0 : Trait0<'l0>, T0 : Trait0<'l1> {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | note: required by `Trait0` --> $DIR/issue-24424.rs:12:1 | -12 | trait Trait0<'l0> {} +LL | trait Trait0<'l0> {} | ^^^^^^^^^^^^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/issue-25385.stderr b/src/test/ui/issue-25385.stderr index 467cfc53388bc..6391c5fe0bfd9 100644 --- a/src/test/ui/issue-25385.stderr +++ b/src/test/ui/issue-25385.stderr @@ -1,16 +1,16 @@ error[E0599]: no method named `foo` found for type `i32` in the current scope --> $DIR/issue-25385.rs:13:23 | -13 | ($e:expr) => { $e.foo() } +LL | ($e:expr) => { $e.foo() } | ^^^ ... -19 | foo!(a); +LL | foo!(a); | -------- in this macro invocation error[E0599]: no method named `foo` found for type `i32` in the current scope --> $DIR/issue-25385.rs:21:15 | -21 | foo!(1i32.foo()); +LL | foo!(1i32.foo()); | ^^^ error: aborting due to 2 previous errors diff --git a/src/test/ui/issue-25793.stderr b/src/test/ui/issue-25793.stderr index 914cc6fc42677..c9701c9133da5 100644 --- a/src/test/ui/issue-25793.stderr +++ b/src/test/ui/issue-25793.stderr @@ -1,10 +1,10 @@ error[E0503]: cannot use `self.width` because it was mutably borrowed --> $DIR/issue-25793.rs:13:9 | -13 | $this.width.unwrap() +LL | $this.width.unwrap() | ^^^^^^^^^^^ use of borrowed `*self` ... -28 | self.get_size(width!(self)) +LL | self.get_size(width!(self)) | ---- ------------ in this macro invocation | | | borrow of `*self` occurs here diff --git a/src/test/ui/issue-25826.stderr b/src/test/ui/issue-25826.stderr index 3b6599ccbd6da..b3b2ec522f106 100644 --- a/src/test/ui/issue-25826.stderr +++ b/src/test/ui/issue-25826.stderr @@ -1,7 +1,7 @@ error[E0395]: raw pointers cannot be compared in constants --> $DIR/issue-25826.rs:13:21 | -13 | const A: bool = id:: as *const () < id:: as *const (); +LL | const A: bool = id:: as *const () < id:: as *const (); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ comparing raw pointers in static error: aborting due to previous error diff --git a/src/test/ui/issue-26056.stderr b/src/test/ui/issue-26056.stderr index b95438314c398..d802ac5401112 100644 --- a/src/test/ui/issue-26056.stderr +++ b/src/test/ui/issue-26056.stderr @@ -1,7 +1,7 @@ error[E0038]: the trait `Map` cannot be made into an object --> $DIR/issue-26056.rs:30:13 | -30 | as &Map; +LL | as &Map; | ^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Map` cannot be made into an object | = note: the trait cannot use `Self` as a type parameter in the supertraits or where-clauses diff --git a/src/test/ui/issue-26093.stderr b/src/test/ui/issue-26093.stderr index b850852623fd8..ef6ea77e13953 100644 --- a/src/test/ui/issue-26093.stderr +++ b/src/test/ui/issue-26093.stderr @@ -1,10 +1,10 @@ error[E0070]: invalid left-hand side expression --> $DIR/issue-26093.rs:13:9 | -13 | $thing = 42; +LL | $thing = 42; | ^^^^^^^^^^^ left-hand of expression not valid ... -19 | not_a_place!(99); +LL | not_a_place!(99); | ----------------- in this macro invocation error: aborting due to previous error diff --git a/src/test/ui/issue-26472.stderr b/src/test/ui/issue-26472.stderr index 5b61aa98c3f97..6b54f5069b2b9 100644 --- a/src/test/ui/issue-26472.stderr +++ b/src/test/ui/issue-26472.stderr @@ -1,7 +1,7 @@ error[E0616]: field `len` of struct `sub::S` is private --> $DIR/issue-26472.rs:21:13 | -21 | let v = s.len; +LL | let v = s.len; | ^^^^^ | = note: a method `len` also exists, perhaps you wish to call it diff --git a/src/test/ui/issue-26638.stderr b/src/test/ui/issue-26638.stderr index 3b124ff406350..09b2187fdf656 100644 --- a/src/test/ui/issue-26638.stderr +++ b/src/test/ui/issue-26638.stderr @@ -1,7 +1,7 @@ error[E0106]: missing lifetime specifier --> $DIR/issue-26638.rs:11:58 | -11 | fn parse_type(iter: Box+'static>) -> &str { iter.next() } +LL | fn parse_type(iter: Box+'static>) -> &str { iter.next() } | ^ expected lifetime parameter | = help: this function's return type contains a borrowed value, but the signature does not say which one of `iter`'s 2 lifetimes it is borrowed from @@ -9,7 +9,7 @@ error[E0106]: missing lifetime specifier error[E0106]: missing lifetime specifier --> $DIR/issue-26638.rs:14:40 | -14 | fn parse_type_2(iter: fn(&u8)->&u8) -> &str { iter() } +LL | fn parse_type_2(iter: fn(&u8)->&u8) -> &str { iter() } | ^ expected lifetime parameter | = help: this function's return type contains a borrowed value with an elided lifetime, but the lifetime cannot be derived from the arguments @@ -18,7 +18,7 @@ error[E0106]: missing lifetime specifier error[E0106]: missing lifetime specifier --> $DIR/issue-26638.rs:17:22 | -17 | fn parse_type_3() -> &str { unimplemented!() } +LL | fn parse_type_3() -> &str { unimplemented!() } | ^ expected lifetime parameter | = help: this function's return type contains a borrowed value, but there is no value for it to be borrowed from diff --git a/src/test/ui/issue-26886.stderr b/src/test/ui/issue-26886.stderr index e6424e535ee32..428cf6c0a7deb 100644 --- a/src/test/ui/issue-26886.stderr +++ b/src/test/ui/issue-26886.stderr @@ -1,30 +1,30 @@ error[E0252]: the name `Arc` is defined multiple times --> $DIR/issue-26886.rs:12:5 | -11 | use std::sync::{self, Arc}; +LL | use std::sync::{self, Arc}; | --- previous import of the type `Arc` here -12 | use std::sync::Arc; //~ ERROR the name `Arc` is defined multiple times +LL | use std::sync::Arc; //~ ERROR the name `Arc` is defined multiple times | ^^^^^^^^^^^^^^ `Arc` reimported here | = note: `Arc` must be defined only once in the type namespace of this module help: You can use `as` to change the binding name of the import | -12 | use std::sync::Arc as OtherArc; //~ ERROR the name `Arc` is defined multiple times +LL | use std::sync::Arc as OtherArc; //~ ERROR the name `Arc` is defined multiple times | ^^^^^^^^^^^^^^^^^^^^^^^^^^ error[E0252]: the name `sync` is defined multiple times --> $DIR/issue-26886.rs:14:5 | -11 | use std::sync::{self, Arc}; +LL | use std::sync::{self, Arc}; | ---- previous import of the module `sync` here ... -14 | use std::sync; //~ ERROR the name `sync` is defined multiple times +LL | use std::sync; //~ ERROR the name `sync` is defined multiple times | ^^^^^^^^^ `sync` reimported here | = note: `sync` must be defined only once in the type namespace of this module help: You can use `as` to change the binding name of the import | -14 | use std::sync as other_sync; //~ ERROR the name `sync` is defined multiple times +LL | use std::sync as other_sync; //~ ERROR the name `sync` is defined multiple times | ^^^^^^^^^^^^^^^^^^^^^^^ error: aborting due to 2 previous errors diff --git a/src/test/ui/issue-27842.stderr b/src/test/ui/issue-27842.stderr index 2e3b20e43ff04..93f99b896114e 100644 --- a/src/test/ui/issue-27842.stderr +++ b/src/test/ui/issue-27842.stderr @@ -1,13 +1,13 @@ error[E0608]: cannot index into a value of type `({integer}, {integer}, {integer})` --> $DIR/issue-27842.rs:14:13 | -14 | let _ = tup[0]; +LL | let _ = tup[0]; | ^^^^^^ help: to access tuple elements, use: `tup.0` error[E0608]: cannot index into a value of type `({integer}, {integer}, {integer})` --> $DIR/issue-27842.rs:19:13 | -19 | let _ = tup[i]; +LL | let _ = tup[i]; | ^^^^^^ | = help: to access tuple elements, use tuple indexing syntax (e.g. `tuple.0`) diff --git a/src/test/ui/issue-27942.stderr b/src/test/ui/issue-27942.stderr index b24544743d87d..2287619ac48e3 100644 --- a/src/test/ui/issue-27942.stderr +++ b/src/test/ui/issue-27942.stderr @@ -1,7 +1,7 @@ error[E0308]: mismatched types --> $DIR/issue-27942.rs:15:5 | -15 | fn select(&self) -> BufferViewHandle; +LL | fn select(&self) -> BufferViewHandle; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ lifetime mismatch | = note: expected type `Resources<'_>` @@ -9,18 +9,18 @@ error[E0308]: mismatched types note: the anonymous lifetime #1 defined on the method body at 15:5... --> $DIR/issue-27942.rs:15:5 | -15 | fn select(&self) -> BufferViewHandle; +LL | fn select(&self) -> BufferViewHandle; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ note: ...does not necessarily outlive the lifetime 'a as defined on the trait at 13:1 --> $DIR/issue-27942.rs:13:1 | -13 | pub trait Buffer<'a, R: Resources<'a>> { +LL | pub trait Buffer<'a, R: Resources<'a>> { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error[E0308]: mismatched types --> $DIR/issue-27942.rs:15:5 | -15 | fn select(&self) -> BufferViewHandle; +LL | fn select(&self) -> BufferViewHandle; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ lifetime mismatch | = note: expected type `Resources<'_>` @@ -28,12 +28,12 @@ error[E0308]: mismatched types note: the lifetime 'a as defined on the trait at 13:1... --> $DIR/issue-27942.rs:13:1 | -13 | pub trait Buffer<'a, R: Resources<'a>> { +LL | pub trait Buffer<'a, R: Resources<'a>> { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ note: ...does not necessarily outlive the anonymous lifetime #1 defined on the method body at 15:5 --> $DIR/issue-27942.rs:15:5 | -15 | fn select(&self) -> BufferViewHandle; +LL | fn select(&self) -> BufferViewHandle; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: aborting due to 2 previous errors diff --git a/src/test/ui/issue-2848.stderr b/src/test/ui/issue-2848.stderr index 6d4ed9c01111f..e756eec56c018 100644 --- a/src/test/ui/issue-2848.stderr +++ b/src/test/ui/issue-2848.stderr @@ -1,7 +1,7 @@ error[E0408]: variable `beta` is not bound in all patterns --> $DIR/issue-2848.rs:22:7 | -22 | alpha | beta => {} //~ ERROR variable `beta` is not bound in all patterns +LL | alpha | beta => {} //~ ERROR variable `beta` is not bound in all patterns | ^^^^^ ---- variable not in all patterns | | | pattern doesn't bind `beta` diff --git a/src/test/ui/issue-28568.stderr b/src/test/ui/issue-28568.stderr index 61717ee60ff30..82c5897927822 100644 --- a/src/test/ui/issue-28568.stderr +++ b/src/test/ui/issue-28568.stderr @@ -1,10 +1,10 @@ error[E0119]: conflicting implementations of trait `std::ops::Drop` for type `MyStruct`: --> $DIR/issue-28568.rs:17:1 | -13 | impl Drop for MyStruct { +LL | impl Drop for MyStruct { | ---------------------- first implementation here ... -17 | impl Drop for MyStruct { +LL | impl Drop for MyStruct { | ^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `MyStruct` error: aborting due to previous error diff --git a/src/test/ui/issue-28776.stderr b/src/test/ui/issue-28776.stderr index cf24a8312af9b..920d2679d64ad 100644 --- a/src/test/ui/issue-28776.stderr +++ b/src/test/ui/issue-28776.stderr @@ -1,7 +1,7 @@ error[E0133]: call to unsafe function requires unsafe function or block --> $DIR/issue-28776.rs:14:5 | -14 | (&ptr::write)(1 as *mut _, 42); +LL | (&ptr::write)(1 as *mut _, 42); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function error: aborting due to previous error diff --git a/src/test/ui/issue-28837.stderr b/src/test/ui/issue-28837.stderr index 8d9afb5be792a..1dcf9094df596 100644 --- a/src/test/ui/issue-28837.stderr +++ b/src/test/ui/issue-28837.stderr @@ -1,7 +1,7 @@ error[E0369]: binary operation `+` cannot be applied to type `A` --> $DIR/issue-28837.rs:16:5 | -16 | a + a; //~ ERROR binary operation `+` cannot be applied to type `A` +LL | a + a; //~ ERROR binary operation `+` cannot be applied to type `A` | ^^^^^ | = note: an implementation of `std::ops::Add` might be missing for `A` @@ -9,7 +9,7 @@ error[E0369]: binary operation `+` cannot be applied to type `A` error[E0369]: binary operation `-` cannot be applied to type `A` --> $DIR/issue-28837.rs:18:5 | -18 | a - a; //~ ERROR binary operation `-` cannot be applied to type `A` +LL | a - a; //~ ERROR binary operation `-` cannot be applied to type `A` | ^^^^^ | = note: an implementation of `std::ops::Sub` might be missing for `A` @@ -17,7 +17,7 @@ error[E0369]: binary operation `-` cannot be applied to type `A` error[E0369]: binary operation `*` cannot be applied to type `A` --> $DIR/issue-28837.rs:20:5 | -20 | a * a; //~ ERROR binary operation `*` cannot be applied to type `A` +LL | a * a; //~ ERROR binary operation `*` cannot be applied to type `A` | ^^^^^ | = note: an implementation of `std::ops::Mul` might be missing for `A` @@ -25,7 +25,7 @@ error[E0369]: binary operation `*` cannot be applied to type `A` error[E0369]: binary operation `/` cannot be applied to type `A` --> $DIR/issue-28837.rs:22:5 | -22 | a / a; //~ ERROR binary operation `/` cannot be applied to type `A` +LL | a / a; //~ ERROR binary operation `/` cannot be applied to type `A` | ^^^^^ | = note: an implementation of `std::ops::Div` might be missing for `A` @@ -33,7 +33,7 @@ error[E0369]: binary operation `/` cannot be applied to type `A` error[E0369]: binary operation `%` cannot be applied to type `A` --> $DIR/issue-28837.rs:24:5 | -24 | a % a; //~ ERROR binary operation `%` cannot be applied to type `A` +LL | a % a; //~ ERROR binary operation `%` cannot be applied to type `A` | ^^^^^ | = note: an implementation of `std::ops::Rem` might be missing for `A` @@ -41,7 +41,7 @@ error[E0369]: binary operation `%` cannot be applied to type `A` error[E0369]: binary operation `&` cannot be applied to type `A` --> $DIR/issue-28837.rs:26:5 | -26 | a & a; //~ ERROR binary operation `&` cannot be applied to type `A` +LL | a & a; //~ ERROR binary operation `&` cannot be applied to type `A` | ^^^^^ | = note: an implementation of `std::ops::BitAnd` might be missing for `A` @@ -49,7 +49,7 @@ error[E0369]: binary operation `&` cannot be applied to type `A` error[E0369]: binary operation `|` cannot be applied to type `A` --> $DIR/issue-28837.rs:28:5 | -28 | a | a; //~ ERROR binary operation `|` cannot be applied to type `A` +LL | a | a; //~ ERROR binary operation `|` cannot be applied to type `A` | ^^^^^ | = note: an implementation of `std::ops::BitOr` might be missing for `A` @@ -57,7 +57,7 @@ error[E0369]: binary operation `|` cannot be applied to type `A` error[E0369]: binary operation `<<` cannot be applied to type `A` --> $DIR/issue-28837.rs:30:5 | -30 | a << a; //~ ERROR binary operation `<<` cannot be applied to type `A` +LL | a << a; //~ ERROR binary operation `<<` cannot be applied to type `A` | ^^^^^^ | = note: an implementation of `std::ops::Shl` might be missing for `A` @@ -65,7 +65,7 @@ error[E0369]: binary operation `<<` cannot be applied to type `A` error[E0369]: binary operation `>>` cannot be applied to type `A` --> $DIR/issue-28837.rs:32:5 | -32 | a >> a; //~ ERROR binary operation `>>` cannot be applied to type `A` +LL | a >> a; //~ ERROR binary operation `>>` cannot be applied to type `A` | ^^^^^^ | = note: an implementation of `std::ops::Shr` might be missing for `A` @@ -73,7 +73,7 @@ error[E0369]: binary operation `>>` cannot be applied to type `A` error[E0369]: binary operation `==` cannot be applied to type `A` --> $DIR/issue-28837.rs:34:5 | -34 | a == a; //~ ERROR binary operation `==` cannot be applied to type `A` +LL | a == a; //~ ERROR binary operation `==` cannot be applied to type `A` | ^^^^^^ | = note: an implementation of `std::cmp::PartialEq` might be missing for `A` @@ -81,7 +81,7 @@ error[E0369]: binary operation `==` cannot be applied to type `A` error[E0369]: binary operation `!=` cannot be applied to type `A` --> $DIR/issue-28837.rs:36:5 | -36 | a != a; //~ ERROR binary operation `!=` cannot be applied to type `A` +LL | a != a; //~ ERROR binary operation `!=` cannot be applied to type `A` | ^^^^^^ | = note: an implementation of `std::cmp::PartialEq` might be missing for `A` @@ -89,7 +89,7 @@ error[E0369]: binary operation `!=` cannot be applied to type `A` error[E0369]: binary operation `<` cannot be applied to type `A` --> $DIR/issue-28837.rs:38:5 | -38 | a < a; //~ ERROR binary operation `<` cannot be applied to type `A` +LL | a < a; //~ ERROR binary operation `<` cannot be applied to type `A` | ^^^^^ | = note: an implementation of `std::cmp::PartialOrd` might be missing for `A` @@ -97,7 +97,7 @@ error[E0369]: binary operation `<` cannot be applied to type `A` error[E0369]: binary operation `<=` cannot be applied to type `A` --> $DIR/issue-28837.rs:40:5 | -40 | a <= a; //~ ERROR binary operation `<=` cannot be applied to type `A` +LL | a <= a; //~ ERROR binary operation `<=` cannot be applied to type `A` | ^^^^^^ | = note: an implementation of `std::cmp::PartialOrd` might be missing for `A` @@ -105,7 +105,7 @@ error[E0369]: binary operation `<=` cannot be applied to type `A` error[E0369]: binary operation `>` cannot be applied to type `A` --> $DIR/issue-28837.rs:42:5 | -42 | a > a; //~ ERROR binary operation `>` cannot be applied to type `A` +LL | a > a; //~ ERROR binary operation `>` cannot be applied to type `A` | ^^^^^ | = note: an implementation of `std::cmp::PartialOrd` might be missing for `A` @@ -113,7 +113,7 @@ error[E0369]: binary operation `>` cannot be applied to type `A` error[E0369]: binary operation `>=` cannot be applied to type `A` --> $DIR/issue-28837.rs:44:5 | -44 | a >= a; //~ ERROR binary operation `>=` cannot be applied to type `A` +LL | a >= a; //~ ERROR binary operation `>=` cannot be applied to type `A` | ^^^^^^ | = note: an implementation of `std::cmp::PartialOrd` might be missing for `A` diff --git a/src/test/ui/issue-28971.stderr b/src/test/ui/issue-28971.stderr index 6237aae67be60..ea97ae5b47f67 100644 --- a/src/test/ui/issue-28971.stderr +++ b/src/test/ui/issue-28971.stderr @@ -1,10 +1,10 @@ error[E0599]: no variant named `Baz` found for type `Foo` in the current scope --> $DIR/issue-28971.rs:19:13 | -13 | enum Foo { +LL | enum Foo { | -------- variant `Baz` not found here ... -19 | Foo::Baz(..) => (), +LL | Foo::Baz(..) => (), | ^^^^^^^^^^^^ variant not found in `Foo` error: aborting due to previous error diff --git a/src/test/ui/issue-29124.stderr b/src/test/ui/issue-29124.stderr index 0b81526d655e0..efad1c8809b03 100644 --- a/src/test/ui/issue-29124.stderr +++ b/src/test/ui/issue-29124.stderr @@ -1,7 +1,7 @@ error[E0599]: no method named `x` found for type `fn() -> ret {obj::func}` in the current scope --> $DIR/issue-29124.rs:25:15 | -25 | obj::func.x(); +LL | obj::func.x(); | ^ | = note: obj::func is a function, perhaps you wish to call it @@ -9,7 +9,7 @@ error[E0599]: no method named `x` found for type `fn() -> ret {obj::func}` in th error[E0599]: no method named `x` found for type `fn() -> ret {func}` in the current scope --> $DIR/issue-29124.rs:27:10 | -27 | func.x(); +LL | func.x(); | ^ | = note: func is a function, perhaps you wish to call it diff --git a/src/test/ui/issue-29723.stderr b/src/test/ui/issue-29723.stderr index 061c3d493238b..a626db471a1f2 100644 --- a/src/test/ui/issue-29723.stderr +++ b/src/test/ui/issue-29723.stderr @@ -1,10 +1,10 @@ error[E0382]: use of moved value: `s` --> $DIR/issue-29723.rs:22:13 | -18 | 0 if { drop(s); false } => String::from("oops"), +LL | 0 if { drop(s); false } => String::from("oops"), | - value moved here ... -22 | s +LL | s | ^ value used here after move | = note: move occurs because `s` has type `std::string::String`, which does not implement the `Copy` trait diff --git a/src/test/ui/issue-30007.stderr b/src/test/ui/issue-30007.stderr index 24458ef44c4ee..a467ff6dd0a1a 100644 --- a/src/test/ui/issue-30007.stderr +++ b/src/test/ui/issue-30007.stderr @@ -1,13 +1,13 @@ error: macro expansion ignores token `;` and any following --> $DIR/issue-30007.rs:12:20 | -12 | () => ( String ; ); //~ ERROR macro expansion ignores token `;` +LL | () => ( String ; ); //~ ERROR macro expansion ignores token `;` | ^ | note: caused by the macro expansion here; the usage of `t!` is likely invalid in type context --> $DIR/issue-30007.rs:16:16 | -16 | let i: Vec; +LL | let i: Vec; | ^^^^ error: aborting due to previous error diff --git a/src/test/ui/issue-3008-1.stderr b/src/test/ui/issue-3008-1.stderr index 7d8e10a760620..56a5a3ce05a7e 100644 --- a/src/test/ui/issue-3008-1.stderr +++ b/src/test/ui/issue-3008-1.stderr @@ -1,10 +1,10 @@ error[E0072]: recursive type `Bar` has infinite size --> $DIR/issue-3008-1.rs:15:1 | -15 | enum Bar { +LL | enum Bar { | ^^^^^^^^ recursive type has infinite size ... -18 | BarSome(Bar) +LL | BarSome(Bar) | ---- recursive without indirection | = help: insert indirection (e.g., a `Box`, `Rc`, or `&`) at some point to make `Bar` representable diff --git a/src/test/ui/issue-3008-2.stderr b/src/test/ui/issue-3008-2.stderr index 2d5e2966df9c6..7f6d3a531b2d7 100644 --- a/src/test/ui/issue-3008-2.stderr +++ b/src/test/ui/issue-3008-2.stderr @@ -1,7 +1,7 @@ error[E0072]: recursive type `bar` has infinite size --> $DIR/issue-3008-2.rs:12:1 | -12 | struct bar { x: bar } +LL | struct bar { x: bar } | ^^^^^^^^^^ ------ recursive without indirection | | | recursive type has infinite size diff --git a/src/test/ui/issue-30255.stderr b/src/test/ui/issue-30255.stderr index b0c314912cca6..4e95b6992850f 100644 --- a/src/test/ui/issue-30255.stderr +++ b/src/test/ui/issue-30255.stderr @@ -1,7 +1,7 @@ error[E0106]: missing lifetime specifier --> $DIR/issue-30255.rs:18:24 | -18 | fn f(a: &S, b: i32) -> &i32 { +LL | fn f(a: &S, b: i32) -> &i32 { | ^ expected lifetime parameter | = help: this function's return type contains a borrowed value, but the signature does not say which one of `a`'s 2 lifetimes it is borrowed from @@ -9,7 +9,7 @@ error[E0106]: missing lifetime specifier error[E0106]: missing lifetime specifier --> $DIR/issue-30255.rs:23:34 | -23 | fn g(a: &S, b: bool, c: &i32) -> &i32 { +LL | fn g(a: &S, b: bool, c: &i32) -> &i32 { | ^ expected lifetime parameter | = help: this function's return type contains a borrowed value, but the signature does not say whether it is borrowed from one of `a`'s 2 lifetimes or `c` @@ -17,7 +17,7 @@ error[E0106]: missing lifetime specifier error[E0106]: missing lifetime specifier --> $DIR/issue-30255.rs:28:44 | -28 | fn h(a: &bool, b: bool, c: &S, d: &i32) -> &i32 { +LL | fn h(a: &bool, b: bool, c: &S, d: &i32) -> &i32 { | ^ expected lifetime parameter | = help: this function's return type contains a borrowed value, but the signature does not say whether it is borrowed from `a`, one of `c`'s 2 lifetimes, or `d` diff --git a/src/test/ui/issue-30302.stderr b/src/test/ui/issue-30302.stderr index 66e43d0859f46..6528058428a43 100644 --- a/src/test/ui/issue-30302.stderr +++ b/src/test/ui/issue-30302.stderr @@ -1,7 +1,7 @@ warning[E0170]: pattern binding `Nil` is named the same as one of the variants of the type `Stack` --> $DIR/issue-30302.rs:23:9 | -23 | Nil => true, +LL | Nil => true, | ^^^ | = help: if you meant to match on a variant, consider making the path in the pattern qualified: `Stack::Nil` @@ -9,16 +9,16 @@ warning[E0170]: pattern binding `Nil` is named the same as one of the variants o error: unreachable pattern --> $DIR/issue-30302.rs:25:9 | -23 | Nil => true, +LL | Nil => true, | --- matches any value -24 | //~^ WARN pattern binding `Nil` is named the same as one of the variants of the type `Stack` -25 | _ => false +LL | //~^ WARN pattern binding `Nil` is named the same as one of the variants of the type `Stack` +LL | _ => false | ^ unreachable pattern | note: lint level defined here --> $DIR/issue-30302.rs:14:9 | -14 | #![deny(unreachable_patterns)] +LL | #![deny(unreachable_patterns)] | ^^^^^^^^^^^^^^^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/issue-3044.stderr b/src/test/ui/issue-3044.stderr index 14f2d5195d60c..3f83b7ea1cafd 100644 --- a/src/test/ui/issue-3044.stderr +++ b/src/test/ui/issue-3044.stderr @@ -1,7 +1,7 @@ error[E0061]: this function takes 2 parameters but 1 parameter was supplied --> $DIR/issue-3044.rs:14:23 | -14 | needlesArr.iter().fold(|x, y| { +LL | needlesArr.iter().fold(|x, y| { | ^^^^ expected 2 parameters error: aborting due to previous error diff --git a/src/test/ui/issue-30730.stderr b/src/test/ui/issue-30730.stderr index 192c1f542de5f..696c3acce72fc 100644 --- a/src/test/ui/issue-30730.stderr +++ b/src/test/ui/issue-30730.stderr @@ -1,13 +1,13 @@ error: unused import: `std::thread` --> $DIR/issue-30730.rs:13:5 | -13 | use std::thread; +LL | use std::thread; | ^^^^^^^^^^^ | note: lint level defined here --> $DIR/issue-30730.rs:12:9 | -12 | #![deny(warnings)] +LL | #![deny(warnings)] | ^^^^^^^^ = note: #[deny(unused_imports)] implied by #[deny(warnings)] diff --git a/src/test/ui/issue-31221.stderr b/src/test/ui/issue-31221.stderr index 1db48346c6e44..56c7b8ab6e757 100644 --- a/src/test/ui/issue-31221.stderr +++ b/src/test/ui/issue-31221.stderr @@ -1,31 +1,31 @@ error: unreachable pattern --> $DIR/issue-31221.rs:28:9 | -27 | Var3 => (), +LL | Var3 => (), | ---- matches any value -28 | Var2 => (), +LL | Var2 => (), | ^^^^ unreachable pattern | note: lint level defined here --> $DIR/issue-31221.rs:14:9 | -14 | #![deny(unreachable_patterns)] +LL | #![deny(unreachable_patterns)] | ^^^^^^^^^^^^^^^^^^^^ error: unreachable pattern --> $DIR/issue-31221.rs:34:9 | -33 | &Var3 => (), +LL | &Var3 => (), | ----- matches any value -34 | &Var2 => (), +LL | &Var2 => (), | ^^^^^ unreachable pattern error: unreachable pattern --> $DIR/issue-31221.rs:41:9 | -40 | (c, d) => (), +LL | (c, d) => (), | ------ matches any value -41 | anything => () +LL | anything => () | ^^^^^^^^ unreachable pattern error: aborting due to 3 previous errors diff --git a/src/test/ui/issue-32326.stderr b/src/test/ui/issue-32326.stderr index f907e3adaf180..5143cfcc1558d 100644 --- a/src/test/ui/issue-32326.stderr +++ b/src/test/ui/issue-32326.stderr @@ -1,9 +1,9 @@ error[E0072]: recursive type `Expr` has infinite size --> $DIR/issue-32326.rs:15:1 | -15 | enum Expr { //~ ERROR E0072 +LL | enum Expr { //~ ERROR E0072 | ^^^^^^^^^ recursive type has infinite size -16 | Plus(Expr, Expr), +LL | Plus(Expr, Expr), | ----- ----- recursive without indirection | | | recursive without indirection diff --git a/src/test/ui/issue-32950.stderr b/src/test/ui/issue-32950.stderr index abfa03f4d581a..0363bf05f0080 100644 --- a/src/test/ui/issue-32950.stderr +++ b/src/test/ui/issue-32950.stderr @@ -1,7 +1,7 @@ error: `derive` cannot be used on items with type macros --> $DIR/issue-32950.rs:15:5 | -15 | concat_idents!(Foo, Bar) //~ ERROR `derive` cannot be used on items with type macros +LL | concat_idents!(Foo, Bar) //~ ERROR `derive` cannot be used on items with type macros | ^^^^^^^^^^^^^^^^^^^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/issue-33525.stderr b/src/test/ui/issue-33525.stderr index 4909340fa4c35..b0d2983b3a2d8 100644 --- a/src/test/ui/issue-33525.stderr +++ b/src/test/ui/issue-33525.stderr @@ -1,19 +1,19 @@ error[E0425]: cannot find value `a` in this scope --> $DIR/issue-33525.rs:12:5 | -12 | a; //~ ERROR cannot find value `a` +LL | a; //~ ERROR cannot find value `a` | ^ not found in this scope error[E0609]: no field `lorem` on type `&'static str` --> $DIR/issue-33525.rs:13:8 | -13 | "".lorem; //~ ERROR no field +LL | "".lorem; //~ ERROR no field | ^^^^^ error[E0609]: no field `ipsum` on type `&'static str` --> $DIR/issue-33525.rs:14:8 | -14 | "".ipsum; //~ ERROR no field +LL | "".ipsum; //~ ERROR no field | ^^^^^ error: aborting due to 3 previous errors diff --git a/src/test/ui/issue-33941.stderr b/src/test/ui/issue-33941.stderr index 78c9ce9a1b12a..eb723da7ad87f 100644 --- a/src/test/ui/issue-33941.stderr +++ b/src/test/ui/issue-33941.stderr @@ -1,7 +1,7 @@ error[E0271]: type mismatch resolving ` as std::iter::Iterator>::Item == &_` --> $DIR/issue-33941.rs:14:36 | -14 | for _ in HashMap::new().iter().cloned() {} //~ ERROR type mismatch +LL | for _ in HashMap::new().iter().cloned() {} //~ ERROR type mismatch | ^^^^^^ expected tuple, found reference | = note: expected type `(&_, &_)` @@ -10,7 +10,7 @@ error[E0271]: type mismatch resolving ` as std::iter::Iterator>::Item == &_` --> $DIR/issue-33941.rs:14:14 | -14 | for _ in HashMap::new().iter().cloned() {} //~ ERROR type mismatch +LL | for _ in HashMap::new().iter().cloned() {} //~ ERROR type mismatch | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected tuple, found reference | = note: expected type `(&_, &_)` diff --git a/src/test/ui/issue-34047.stderr b/src/test/ui/issue-34047.stderr index 0c109bffb247c..0cc57de0ed5bd 100644 --- a/src/test/ui/issue-34047.stderr +++ b/src/test/ui/issue-34047.stderr @@ -1,10 +1,10 @@ error[E0530]: match bindings cannot shadow constants --> $DIR/issue-34047.rs:15:13 | -11 | const C: u8 = 0; +LL | const C: u8 = 0; | ---------------- a constant `C` is defined here ... -15 | mut C => {} //~ ERROR match bindings cannot shadow constants +LL | mut C => {} //~ ERROR match bindings cannot shadow constants | ^ cannot be named the same as a constant error: aborting due to previous error diff --git a/src/test/ui/issue-34209.stderr b/src/test/ui/issue-34209.stderr index a832aab4c2653..8c50293d74841 100644 --- a/src/test/ui/issue-34209.stderr +++ b/src/test/ui/issue-34209.stderr @@ -1,7 +1,7 @@ error[E0223]: ambiguous associated type --> $DIR/issue-34209.rs:17:9 | -17 | S::B{ } => { }, +LL | S::B{ } => { }, | ^^^^ ambiguous associated type | = note: specify the type using the syntax `::B` diff --git a/src/test/ui/issue-35139.stderr b/src/test/ui/issue-35139.stderr index 19356cad31797..94e3a8adbc3a2 100644 --- a/src/test/ui/issue-35139.stderr +++ b/src/test/ui/issue-35139.stderr @@ -1,7 +1,7 @@ error[E0207]: the lifetime parameter `'a` is not constrained by the impl trait, self type, or predicates --> $DIR/issue-35139.rs:19:6 | -19 | impl<'a> MethodType for MTFn { //~ ERROR E0207 +LL | impl<'a> MethodType for MTFn { //~ ERROR E0207 | ^^ unconstrained lifetime parameter error: aborting due to previous error diff --git a/src/test/ui/issue-35241.stderr b/src/test/ui/issue-35241.stderr index 25cef7388977d..b59f09b214002 100644 --- a/src/test/ui/issue-35241.stderr +++ b/src/test/ui/issue-35241.stderr @@ -1,7 +1,7 @@ error[E0308]: mismatched types --> $DIR/issue-35241.rs:13:20 | -13 | fn test() -> Foo { Foo } //~ ERROR mismatched types +LL | fn test() -> Foo { Foo } //~ ERROR mismatched types | --- ^^^ | | | | | expected struct `Foo`, found fn item diff --git a/src/test/ui/issue-35675.stderr b/src/test/ui/issue-35675.stderr index c4d0e51c07e07..55ab07424cdf5 100644 --- a/src/test/ui/issue-35675.stderr +++ b/src/test/ui/issue-35675.stderr @@ -1,7 +1,7 @@ error[E0412]: cannot find type `Apple` in this scope --> $DIR/issue-35675.rs:17:29 | -17 | fn should_return_fruit() -> Apple { +LL | fn should_return_fruit() -> Apple { | ^^^^^ | | | not found in this scope @@ -10,17 +10,17 @@ error[E0412]: cannot find type `Apple` in this scope error[E0425]: cannot find function `Apple` in this scope --> $DIR/issue-35675.rs:19:5 | -19 | Apple(5) +LL | Apple(5) | ^^^^^ not found in this scope help: possible candidate is found in another module, you can import it into scope | -12 | use Fruit::Apple; +LL | use Fruit::Apple; | error[E0573]: expected type, found variant `Fruit::Apple` --> $DIR/issue-35675.rs:23:33 | -23 | fn should_return_fruit_too() -> Fruit::Apple { +LL | fn should_return_fruit_too() -> Fruit::Apple { | ^^^^^^^^^^^^ | | | not a type @@ -29,17 +29,17 @@ error[E0573]: expected type, found variant `Fruit::Apple` error[E0425]: cannot find function `Apple` in this scope --> $DIR/issue-35675.rs:25:5 | -25 | Apple(5) +LL | Apple(5) | ^^^^^ not found in this scope help: possible candidate is found in another module, you can import it into scope | -12 | use Fruit::Apple; +LL | use Fruit::Apple; | error[E0573]: expected type, found variant `Ok` --> $DIR/issue-35675.rs:29:13 | -29 | fn foo() -> Ok { +LL | fn foo() -> Ok { | ^^ not a type | = help: there is an enum variant `std::prelude::v1::Ok`, try using `std::prelude::v1`? @@ -48,7 +48,7 @@ error[E0573]: expected type, found variant `Ok` error[E0412]: cannot find type `Variant3` in this scope --> $DIR/issue-35675.rs:34:13 | -34 | fn bar() -> Variant3 { +LL | fn bar() -> Variant3 { | ^^^^^^^^ | | | not found in this scope @@ -57,7 +57,7 @@ error[E0412]: cannot find type `Variant3` in this scope error[E0573]: expected type, found variant `Some` --> $DIR/issue-35675.rs:38:13 | -38 | fn qux() -> Some { +LL | fn qux() -> Some { | ^^^^ not a type | = help: there is an enum variant `std::prelude::v1::Option::Some`, try using `std::prelude::v1::Option`? diff --git a/src/test/ui/issue-35869.stderr b/src/test/ui/issue-35869.stderr index 5d2772b06a2ab..5124fb3a5fc4c 100644 --- a/src/test/ui/issue-35869.stderr +++ b/src/test/ui/issue-35869.stderr @@ -1,10 +1,10 @@ error[E0053]: method `foo` has an incompatible type for trait --> $DIR/issue-35869.rs:23:15 | -14 | fn foo(_: fn(u8) -> ()); +LL | fn foo(_: fn(u8) -> ()); | ------------ type in trait ... -23 | fn foo(_: fn(u16) -> ()) {} +LL | fn foo(_: fn(u16) -> ()) {} | ^^^^^^^^^^^^^ expected u8, found u16 | = note: expected type `fn(fn(u8))` @@ -13,10 +13,10 @@ error[E0053]: method `foo` has an incompatible type for trait error[E0053]: method `bar` has an incompatible type for trait --> $DIR/issue-35869.rs:25:15 | -15 | fn bar(_: Option); +LL | fn bar(_: Option); | ---------- type in trait ... -25 | fn bar(_: Option) {} +LL | fn bar(_: Option) {} | ^^^^^^^^^^^ expected u8, found u16 | = note: expected type `fn(std::option::Option)` @@ -25,10 +25,10 @@ error[E0053]: method `bar` has an incompatible type for trait error[E0053]: method `baz` has an incompatible type for trait --> $DIR/issue-35869.rs:27:15 | -16 | fn baz(_: (u8, u16)); +LL | fn baz(_: (u8, u16)); | --------- type in trait ... -27 | fn baz(_: (u16, u16)) {} +LL | fn baz(_: (u16, u16)) {} | ^^^^^^^^^^ expected u8, found u16 | = note: expected type `fn((u8, u16))` @@ -37,10 +37,10 @@ error[E0053]: method `baz` has an incompatible type for trait error[E0053]: method `qux` has an incompatible type for trait --> $DIR/issue-35869.rs:29:17 | -17 | fn qux() -> u8; +LL | fn qux() -> u8; | -- type in trait ... -29 | fn qux() -> u16 { 5u16 } +LL | fn qux() -> u16 { 5u16 } | ^^^ expected u8, found u16 | = note: expected type `fn() -> u8` diff --git a/src/test/ui/issue-35976.stderr b/src/test/ui/issue-35976.stderr index 146d0ff72d83f..f97ba33dfd32b 100644 --- a/src/test/ui/issue-35976.stderr +++ b/src/test/ui/issue-35976.stderr @@ -1,11 +1,11 @@ error: the `wait` method cannot be invoked on a trait object --> $DIR/issue-35976.rs:24:9 | -24 | arg.wait(); +LL | arg.wait(); | ^^^^ help: another candidate was found in the following trait, perhaps add a `use` for it: | -11 | use private::Future; +LL | use private::Future; | error: aborting due to previous error diff --git a/src/test/ui/issue-36163.stderr b/src/test/ui/issue-36163.stderr index d0337fc32b03e..b9c7067f75a64 100644 --- a/src/test/ui/issue-36163.stderr +++ b/src/test/ui/issue-36163.stderr @@ -1,18 +1,18 @@ error[E0391]: cyclic dependency detected --> $DIR/issue-36163.rs:14:9 | -14 | B = A, //~ ERROR E0391 +LL | B = A, //~ ERROR E0391 | ^ cyclic reference | note: the cycle begins when const-evaluating `Foo::B::{{initializer}}`... --> $DIR/issue-36163.rs:14:5 | -14 | B = A, //~ ERROR E0391 +LL | B = A, //~ ERROR E0391 | ^^^^^ note: ...which then requires const-evaluating `A`... --> $DIR/issue-36163.rs:14:9 | -14 | B = A, //~ ERROR E0391 +LL | B = A, //~ ERROR E0391 | ^ = note: ...which then again requires const-evaluating `Foo::B::{{initializer}}`, completing the cycle. diff --git a/src/test/ui/issue-36400.stderr b/src/test/ui/issue-36400.stderr index 84e6855e23b46..419902924e70b 100644 --- a/src/test/ui/issue-36400.stderr +++ b/src/test/ui/issue-36400.stderr @@ -1,9 +1,9 @@ error[E0596]: cannot borrow immutable `Box` content `*x` as mutable --> $DIR/issue-36400.rs:15:12 | -14 | let x = Box::new(3); +LL | let x = Box::new(3); | - consider changing this to `mut x` -15 | f(&mut *x); //~ ERROR cannot borrow immutable +LL | f(&mut *x); //~ ERROR cannot borrow immutable | ^^ cannot borrow as mutable error: aborting due to previous error diff --git a/src/test/ui/issue-36708.stderr b/src/test/ui/issue-36708.stderr index 016841de16902..7eb362815f64b 100644 --- a/src/test/ui/issue-36708.stderr +++ b/src/test/ui/issue-36708.stderr @@ -1,7 +1,7 @@ error[E0049]: method `foo` has 1 type parameter but its trait declaration has 0 type parameters --> $DIR/issue-36708.rs:18:11 | -18 | fn foo() {} +LL | fn foo() {} | ^^^ found 1 type parameter, expected 0 error: aborting due to previous error diff --git a/src/test/ui/issue-37311-type-length-limit/issue-37311.stderr b/src/test/ui/issue-37311-type-length-limit/issue-37311.stderr index fe173867da109..a563c84435906 100644 --- a/src/test/ui/issue-37311-type-length-limit/issue-37311.stderr +++ b/src/test/ui/issue-37311-type-length-limit/issue-37311.stderr @@ -1,9 +1,9 @@ error: reached the type-length limit while instantiating `<(&(&(&(&(&(&(&(&(&(&(&(&(&(&(&(&(&(&(&(), &()), &(&()...` --> $DIR/issue-37311.rs:23:5 | -23 | / fn recurse(&self) { //~ ERROR reached the type-length limit -24 | | (self, self).recurse(); -25 | | } +LL | / fn recurse(&self) { //~ ERROR reached the type-length limit +LL | | (self, self).recurse(); +LL | | } | |_____^ | = note: consider adding a `#![type_length_limit="2097152"]` attribute to your crate diff --git a/src/test/ui/issue-3779.stderr b/src/test/ui/issue-3779.stderr index 538304803b440..821f9d6d6d877 100644 --- a/src/test/ui/issue-3779.stderr +++ b/src/test/ui/issue-3779.stderr @@ -1,10 +1,10 @@ error[E0072]: recursive type `S` has infinite size --> $DIR/issue-3779.rs:11:1 | -11 | struct S { +LL | struct S { | ^^^^^^^^ recursive type has infinite size -12 | //~^ ERROR E0072 -13 | element: Option +LL | //~^ ERROR E0072 +LL | element: Option | ------------------ recursive without indirection | = help: insert indirection (e.g., a `Box`, `Rc`, or `&`) at some point to make `S` representable diff --git a/src/test/ui/issue-37884.stderr b/src/test/ui/issue-37884.stderr index c4ad232ae7eba..90181554bc128 100644 --- a/src/test/ui/issue-37884.stderr +++ b/src/test/ui/issue-37884.stderr @@ -1,12 +1,12 @@ error[E0308]: method not compatible with trait --> $DIR/issue-37884.rs:16:5 | -16 | / fn next(&'a mut self) -> Option -17 | | //~^ ERROR method not compatible with trait -18 | | //~| lifetime mismatch -19 | | { -20 | | Some(&mut self.0) -21 | | } +LL | / fn next(&'a mut self) -> Option +LL | | //~^ ERROR method not compatible with trait +LL | | //~| lifetime mismatch +LL | | { +LL | | Some(&mut self.0) +LL | | } | |_____^ lifetime mismatch | = note: expected type `fn(&mut RepeatMut<'a, T>) -> std::option::Option<&mut T>` @@ -14,17 +14,17 @@ error[E0308]: method not compatible with trait note: the anonymous lifetime #1 defined on the method body at 16:5... --> $DIR/issue-37884.rs:16:5 | -16 | / fn next(&'a mut self) -> Option -17 | | //~^ ERROR method not compatible with trait -18 | | //~| lifetime mismatch -19 | | { -20 | | Some(&mut self.0) -21 | | } +LL | / fn next(&'a mut self) -> Option +LL | | //~^ ERROR method not compatible with trait +LL | | //~| lifetime mismatch +LL | | { +LL | | Some(&mut self.0) +LL | | } | |_____^ note: ...does not necessarily outlive the lifetime 'a as defined on the impl at 13:1 --> $DIR/issue-37884.rs:13:1 | -13 | impl<'a, T: 'a> Iterator for RepeatMut<'a, T> { +LL | impl<'a, T: 'a> Iterator for RepeatMut<'a, T> { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/issue-38875/issue_38875.stderr b/src/test/ui/issue-38875/issue_38875.stderr index d49741f25b9f5..2970c3d7dbf71 100644 --- a/src/test/ui/issue-38875/issue_38875.stderr +++ b/src/test/ui/issue-38875/issue_38875.stderr @@ -1,13 +1,13 @@ error[E0080]: constant evaluation error --> $DIR/auxiliary/issue_38875_b.rs:11:24 | -11 | pub const FOO: usize = *&0; +LL | pub const FOO: usize = *&0; | ^^^ unimplemented constant expression: deref operation | note: for constant expression here --> $DIR/issue_38875.rs:16:22 | -16 | let test_x = [0; issue_38875_b::FOO]; +LL | let test_x = [0; issue_38875_b::FOO]; | ^^^^^^^^^^^^^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/issue-40402-ref-hints/issue-40402-1.stderr b/src/test/ui/issue-40402-ref-hints/issue-40402-1.stderr index 173a60b0f0885..b323e4fe8dc06 100644 --- a/src/test/ui/issue-40402-ref-hints/issue-40402-1.stderr +++ b/src/test/ui/issue-40402-ref-hints/issue-40402-1.stderr @@ -1,7 +1,7 @@ error[E0507]: cannot move out of indexed content --> $DIR/issue-40402-1.rs:19:13 | -19 | let e = f.v[0]; //~ ERROR cannot move out of indexed content +LL | let e = f.v[0]; //~ ERROR cannot move out of indexed content | ^^^^^^ | | | cannot move out of indexed content diff --git a/src/test/ui/issue-40402-ref-hints/issue-40402-2.stderr b/src/test/ui/issue-40402-ref-hints/issue-40402-2.stderr index 7b992e376dc74..45bdbf4d0fc6b 100644 --- a/src/test/ui/issue-40402-ref-hints/issue-40402-2.stderr +++ b/src/test/ui/issue-40402-ref-hints/issue-40402-2.stderr @@ -1,7 +1,7 @@ error[E0507]: cannot move out of indexed content --> $DIR/issue-40402-2.rs:15:18 | -15 | let (a, b) = x[0]; //~ ERROR cannot move out of indexed content +LL | let (a, b) = x[0]; //~ ERROR cannot move out of indexed content | - - ^^^^ cannot move out of indexed content | | | | | ...and here (use `ref b` or `ref mut b`) diff --git a/src/test/ui/issue-40782.stderr b/src/test/ui/issue-40782.stderr index 543233e0cc620..bd646d7ce8c3a 100644 --- a/src/test/ui/issue-40782.stderr +++ b/src/test/ui/issue-40782.stderr @@ -1,7 +1,7 @@ error: missing `in` in `for` loop --> $DIR/issue-40782.rs:12:10 | -12 | for i 0..2 { //~ ERROR missing `in` +LL | for i 0..2 { //~ ERROR missing `in` | ^ help: try adding `in` here error: aborting due to previous error diff --git a/src/test/ui/issue-41652/issue_41652.stderr b/src/test/ui/issue-41652/issue_41652.stderr index 373dff27f2e41..9b3f14a47544a 100644 --- a/src/test/ui/issue-41652/issue_41652.stderr +++ b/src/test/ui/issue-41652/issue_41652.stderr @@ -1,11 +1,11 @@ error[E0689]: can't call method `f` on ambiguous numeric type `{integer}` --> $DIR/issue_41652.rs:19:11 | -19 | 3.f() +LL | 3.f() | ^ help: you must specify a concrete type for this numeric value, like `i32` | -19 | 3_i32.f() +LL | 3_i32.f() | ^^^^^ error: aborting due to previous error diff --git a/src/test/ui/issue-42106.stderr b/src/test/ui/issue-42106.stderr index 138f7693ebee1..251562dfe9442 100644 --- a/src/test/ui/issue-42106.stderr +++ b/src/test/ui/issue-42106.stderr @@ -1,11 +1,11 @@ error[E0502]: cannot borrow `*collection` as mutable because `collection` is also borrowed as immutable --> $DIR/issue-42106.rs:13:5 | -12 | let _a = &collection; +LL | let _a = &collection; | ---------- immutable borrow occurs here -13 | collection.swap(1, 2); //~ ERROR also borrowed as immutable +LL | collection.swap(1, 2); //~ ERROR also borrowed as immutable | ^^^^^^^^^^ mutable borrow occurs here -14 | } +LL | } | - immutable borrow ends here error: aborting due to previous error diff --git a/src/test/ui/issue-42954.stderr b/src/test/ui/issue-42954.stderr index d0fc410c474a4..1a3984181f6e6 100644 --- a/src/test/ui/issue-42954.stderr +++ b/src/test/ui/issue-42954.stderr @@ -1,13 +1,13 @@ error: `<` is interpreted as a start of generic arguments for `u32`, not a comparison --> $DIR/issue-42954.rs:13:19 | -13 | $i as u32 < 0 //~ `<` is interpreted as a start of generic arguments +LL | $i as u32 < 0 //~ `<` is interpreted as a start of generic arguments | --------- ^ - interpreted as generic arguments | | | | | not interpreted as comparison | help: try comparing the casted value: `($i as u32)` ... -19 | is_plainly_printable!(c); +LL | is_plainly_printable!(c); | ------------------------- in this macro invocation error: aborting due to previous error diff --git a/src/test/ui/issue-4335.stderr b/src/test/ui/issue-4335.stderr index 5840838b823d3..6c72b817b24d8 100644 --- a/src/test/ui/issue-4335.stderr +++ b/src/test/ui/issue-4335.stderr @@ -1,19 +1,19 @@ error[E0373]: closure may outlive the current function, but it borrows `v`, which is owned by the current function --> $DIR/issue-4335.rs:16:17 | -16 | id(Box::new(|| *v)) +LL | id(Box::new(|| *v)) | ^^ - `v` is borrowed here | | | may outlive borrowed value `v` help: to force the closure to take ownership of `v` (and any other referenced variables), use the `move` keyword | -16 | id(Box::new(move || *v)) +LL | id(Box::new(move || *v)) | ^^^^^^^ error[E0507]: cannot move out of borrowed content --> $DIR/issue-4335.rs:16:20 | -16 | id(Box::new(|| *v)) +LL | id(Box::new(|| *v)) | ^^ cannot move out of borrowed content error: aborting due to 2 previous errors diff --git a/src/test/ui/issue-44023.stderr b/src/test/ui/issue-44023.stderr index fc6363dc921a2..07e8f0c98259a 100644 --- a/src/test/ui/issue-44023.stderr +++ b/src/test/ui/issue-44023.stderr @@ -1,9 +1,9 @@ error[E0308]: mismatched types --> $DIR/issue-44023.rs:15:42 | -15 | fn საჭმელად_გემრიელი_სადილი ( ) -> isize { //~ ERROR mismatched types +LL | fn საჭმელად_გემრიელი_სადილი ( ) -> isize { //~ ERROR mismatched types | __________________________________________^ -16 | | } +LL | | } | |_^ expected isize, found () | = note: expected type `isize` diff --git a/src/test/ui/issue-44078.stderr b/src/test/ui/issue-44078.stderr index 49e461bd18d18..e8dce656f65b4 100644 --- a/src/test/ui/issue-44078.stderr +++ b/src/test/ui/issue-44078.stderr @@ -1,9 +1,9 @@ error: unterminated double quote string --> $DIR/issue-44078.rs:12:8 | -12 | "😊""; //~ ERROR unterminated double quote +LL | "😊""; //~ ERROR unterminated double quote | _________^ -13 | | } +LL | | } | |__^ error: aborting due to previous error diff --git a/src/test/ui/issue-44406.stderr b/src/test/ui/issue-44406.stderr index 32deabd0229d8..443b28cf09968 100644 --- a/src/test/ui/issue-44406.stderr +++ b/src/test/ui/issue-44406.stderr @@ -1,15 +1,15 @@ error: expected identifier, found keyword `true` --> $DIR/issue-44406.rs:18:10 | -18 | foo!(true); //~ ERROR expected type, found keyword +LL | foo!(true); //~ ERROR expected type, found keyword | ^^^^ expected identifier, found keyword error: expected type, found keyword `true` --> $DIR/issue-44406.rs:18:10 | -13 | bar(baz: $rest) +LL | bar(baz: $rest) | - help: did you mean to use `;` here? ... -18 | foo!(true); //~ ERROR expected type, found keyword +LL | foo!(true); //~ ERROR expected type, found keyword | ^^^^ expecting a type here because of type ascription diff --git a/src/test/ui/issue-45107-unnecessary-unsafe-in-closure.stderr b/src/test/ui/issue-45107-unnecessary-unsafe-in-closure.stderr index 8c34cc4b73cfb..eaf7569100ad3 100644 --- a/src/test/ui/issue-45107-unnecessary-unsafe-in-closure.stderr +++ b/src/test/ui/issue-45107-unnecessary-unsafe-in-closure.stderr @@ -1,34 +1,34 @@ error: unnecessary `unsafe` block --> $DIR/issue-45107-unnecessary-unsafe-in-closure.rs:17:13 | -15 | unsafe { +LL | unsafe { | ------ because it's nested under this `unsafe` block -16 | let f = |v: &mut Vec<_>| { -17 | unsafe { //~ ERROR unnecessary `unsafe` +LL | let f = |v: &mut Vec<_>| { +LL | unsafe { //~ ERROR unnecessary `unsafe` | ^^^^^^ unnecessary `unsafe` block | note: lint level defined here --> $DIR/issue-45107-unnecessary-unsafe-in-closure.rs:11:8 | -11 | #[deny(unused_unsafe)] +LL | #[deny(unused_unsafe)] | ^^^^^^^^^^^^^ error: unnecessary `unsafe` block --> $DIR/issue-45107-unnecessary-unsafe-in-closure.rs:19:38 | -15 | unsafe { +LL | unsafe { | ------ because it's nested under this `unsafe` block ... -19 | |w: &mut Vec| { unsafe { //~ ERROR unnecessary `unsafe` +LL | |w: &mut Vec| { unsafe { //~ ERROR unnecessary `unsafe` | ^^^^^^ unnecessary `unsafe` block error: unnecessary `unsafe` block --> $DIR/issue-45107-unnecessary-unsafe-in-closure.rs:23:34 | -15 | unsafe { +LL | unsafe { | ------ because it's nested under this `unsafe` block ... -23 | |x: &mut Vec| { unsafe { //~ ERROR unnecessary `unsafe` +LL | |x: &mut Vec| { unsafe { //~ ERROR unnecessary `unsafe` | ^^^^^^ unnecessary `unsafe` block error: aborting due to 3 previous errors diff --git a/src/test/ui/issue-45296.stderr b/src/test/ui/issue-45296.stderr index 45a80750de716..96ee3ccc89dae 100644 --- a/src/test/ui/issue-45296.stderr +++ b/src/test/ui/issue-45296.stderr @@ -1,7 +1,7 @@ error: an inner attribute is not permitted in this context --> $DIR/issue-45296.rs:14:7 | -14 | #![allow(unused_variables)] //~ ERROR not permitted in this context +LL | #![allow(unused_variables)] //~ ERROR not permitted in this context | ^ | = note: inner attributes, like `#![no_std]`, annotate the item enclosing them, and are usually found at the beginning of source files. Outer attributes, like `#[test]`, annotate the item following them. diff --git a/src/test/ui/issue-45697-1.stderr b/src/test/ui/issue-45697-1.stderr index 09f32b93acc1c..4da656f697912 100644 --- a/src/test/ui/issue-45697-1.stderr +++ b/src/test/ui/issue-45697-1.stderr @@ -1,17 +1,17 @@ error[E0506]: cannot assign to `*y.pointer` because it is borrowed (Ast) --> $DIR/issue-45697-1.rs:30:9 | -29 | let z = copy_borrowed_ptr(&mut y); +LL | let z = copy_borrowed_ptr(&mut y); | - borrow of `*y.pointer` occurs here -30 | *y.pointer += 1; +LL | *y.pointer += 1; | ^^^^^^^^^^^^^^^ assignment to borrowed `*y.pointer` occurs here error[E0503]: cannot use `*y.pointer` because it was mutably borrowed (Mir) --> $DIR/issue-45697-1.rs:30:9 | -29 | let z = copy_borrowed_ptr(&mut y); +LL | let z = copy_borrowed_ptr(&mut y); | ------ borrow of `y` occurs here -30 | *y.pointer += 1; +LL | *y.pointer += 1; | ^^^^^^^^^^^^^^^ use of borrowed `y` error: aborting due to 2 previous errors diff --git a/src/test/ui/issue-45697.stderr b/src/test/ui/issue-45697.stderr index e9b723d57b507..d3169ea470688 100644 --- a/src/test/ui/issue-45697.stderr +++ b/src/test/ui/issue-45697.stderr @@ -1,17 +1,17 @@ error[E0506]: cannot assign to `*y.pointer` because it is borrowed (Ast) --> $DIR/issue-45697.rs:30:9 | -29 | let z = copy_borrowed_ptr(&mut y); +LL | let z = copy_borrowed_ptr(&mut y); | - borrow of `*y.pointer` occurs here -30 | *y.pointer += 1; +LL | *y.pointer += 1; | ^^^^^^^^^^^^^^^ assignment to borrowed `*y.pointer` occurs here error[E0503]: cannot use `*y.pointer` because it was mutably borrowed (Mir) --> $DIR/issue-45697.rs:30:9 | -29 | let z = copy_borrowed_ptr(&mut y); +LL | let z = copy_borrowed_ptr(&mut y); | ------ borrow of `y` occurs here -30 | *y.pointer += 1; +LL | *y.pointer += 1; | ^^^^^^^^^^^^^^^ use of borrowed `y` error: aborting due to 2 previous errors diff --git a/src/test/ui/issue-45730.stderr b/src/test/ui/issue-45730.stderr index 94d39239117ad..0448d2efcd1e1 100644 --- a/src/test/ui/issue-45730.stderr +++ b/src/test/ui/issue-45730.stderr @@ -1,7 +1,7 @@ error[E0641]: cannot cast to a pointer of an unknown kind --> $DIR/issue-45730.rs:13:23 | -13 | let x: *const _ = 0 as _; //~ ERROR cannot cast +LL | let x: *const _ = 0 as _; //~ ERROR cannot cast | ^^^^^- | | | help: consider giving more type information @@ -11,7 +11,7 @@ error[E0641]: cannot cast to a pointer of an unknown kind error[E0641]: cannot cast to a pointer of an unknown kind --> $DIR/issue-45730.rs:15:23 | -15 | let x: *const _ = 0 as *const _; //~ ERROR cannot cast +LL | let x: *const _ = 0 as *const _; //~ ERROR cannot cast | ^^^^^-------- | | | help: consider giving more type information @@ -21,7 +21,7 @@ error[E0641]: cannot cast to a pointer of an unknown kind error[E0641]: cannot cast to a pointer of an unknown kind --> $DIR/issue-45730.rs:18:13 | -18 | let x = 0 as *const i32 as *const _ as *mut _; //~ ERROR cannot cast +LL | let x = 0 as *const i32 as *const _ as *mut _; //~ ERROR cannot cast | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^------ | | | help: consider giving more type information diff --git a/src/test/ui/issue-46112.stderr b/src/test/ui/issue-46112.stderr index b9b87a941fd27..ea3929ae61027 100644 --- a/src/test/ui/issue-46112.stderr +++ b/src/test/ui/issue-46112.stderr @@ -1,7 +1,7 @@ error[E0308]: mismatched types --> $DIR/issue-46112.rs:19:21 | -19 | fn main() { test(Ok(())); } +LL | fn main() { test(Ok(())); } | ^^ | | | expected enum `std::option::Option`, found () diff --git a/src/test/ui/issue-46186.stderr b/src/test/ui/issue-46186.stderr index 3cc9531bb5b86..f6847097dbe98 100644 --- a/src/test/ui/issue-46186.stderr +++ b/src/test/ui/issue-46186.stderr @@ -1,7 +1,7 @@ error: expected item, found `;` --> $DIR/issue-46186.rs:13:2 | -13 | }; //~ ERROR expected item, found `;` +LL | }; //~ ERROR expected item, found `;` | ^ help: consider removing this semicolon error: aborting due to previous error diff --git a/src/test/ui/issue-46332.stderr b/src/test/ui/issue-46332.stderr index 6aef84568353c..457cb641e1879 100644 --- a/src/test/ui/issue-46332.stderr +++ b/src/test/ui/issue-46332.stderr @@ -1,7 +1,7 @@ error[E0422]: cannot find struct, variant or union type `TyUInt` in this scope --> $DIR/issue-46332.rs:19:5 | -19 | TyUInt {}; +LL | TyUInt {}; | ^^^^^^ did you mean `TyUint`? error: aborting due to previous error diff --git a/src/test/ui/issue-46471-1.stderr b/src/test/ui/issue-46471-1.stderr index 97dfb458d2dfb..cad1c2b17767b 100644 --- a/src/test/ui/issue-46471-1.stderr +++ b/src/test/ui/issue-46471-1.stderr @@ -1,23 +1,23 @@ error[E0597]: `z` does not live long enough (Ast) --> $DIR/issue-46471-1.rs:16:14 | -16 | &mut z +LL | &mut z | ^ borrowed value does not live long enough -17 | }; +LL | }; | - `z` dropped here while still borrowed ... -21 | } +LL | } | - borrowed value needs to live until here error[E0597]: `z` does not live long enough (Mir) --> $DIR/issue-46471-1.rs:16:9 | -16 | &mut z +LL | &mut z | ^^^^^^ borrowed value does not live long enough -17 | }; +LL | }; | - `z` dropped here while still borrowed ... -21 | } +LL | } | - borrowed value needs to live until here error: aborting due to 2 previous errors diff --git a/src/test/ui/issue-46471.stderr b/src/test/ui/issue-46471.stderr index 4c196bba5a1f1..6f89c47e513f8 100644 --- a/src/test/ui/issue-46471.stderr +++ b/src/test/ui/issue-46471.stderr @@ -1,10 +1,10 @@ error[E0597]: `x` does not live long enough (Ast) --> $DIR/issue-46471.rs:15:6 | -15 | &x +LL | &x | ^ borrowed value does not live long enough ... -18 | } +LL | } | - borrowed value only lives until here | = note: borrowed value must be valid for the static lifetime... @@ -12,10 +12,10 @@ error[E0597]: `x` does not live long enough (Ast) error[E0597]: `x` does not live long enough (Mir) --> $DIR/issue-46471.rs:15:5 | -15 | &x +LL | &x | ^^ borrowed value does not live long enough ... -18 | } +LL | } | - borrowed value only lives until here | = note: borrowed value must be valid for the static lifetime... diff --git a/src/test/ui/issue-46472.stderr b/src/test/ui/issue-46472.stderr index 7b5cce218e9f2..4cdc08d46e525 100644 --- a/src/test/ui/issue-46472.stderr +++ b/src/test/ui/issue-46472.stderr @@ -1,31 +1,31 @@ error[E0597]: borrowed value does not live long enough (Ast) --> $DIR/issue-46472.rs:14:10 | -14 | &mut 4 +LL | &mut 4 | ^ temporary value does not live long enough ... -17 | } +LL | } | - temporary value only lives until here | note: borrowed value must be valid for the lifetime 'a as defined on the function body at 13:1... --> $DIR/issue-46472.rs:13:1 | -13 | fn bar<'a>() -> &'a mut u32 { +LL | fn bar<'a>() -> &'a mut u32 { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ error[E0597]: borrowed value does not live long enough (Mir) --> $DIR/issue-46472.rs:14:10 | -14 | &mut 4 +LL | &mut 4 | ^ temporary value does not live long enough ... -17 | } +LL | } | - temporary value only lives until here | note: borrowed value must be valid for the lifetime 'a as defined on the function body at 13:1... --> $DIR/issue-46472.rs:13:1 | -13 | fn bar<'a>() -> &'a mut u32 { +LL | fn bar<'a>() -> &'a mut u32 { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: aborting due to 2 previous errors diff --git a/src/test/ui/issue-46576.stderr b/src/test/ui/issue-46576.stderr index e0be6b4fdc2ce..0590de0bd359d 100644 --- a/src/test/ui/issue-46576.stderr +++ b/src/test/ui/issue-46576.stderr @@ -1,13 +1,13 @@ error: unused import: `BufRead` --> $DIR/issue-46576.rs:17:15 | -17 | use std::io::{BufRead, BufReader, Read}; +LL | use std::io::{BufRead, BufReader, Read}; | ^^^^^^^ | note: lint level defined here --> $DIR/issue-46576.rs:14:9 | -14 | #![deny(unused_imports)] +LL | #![deny(unused_imports)] | ^^^^^^^^^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/issue-46983.stderr b/src/test/ui/issue-46983.stderr index ac8417a7a2419..5b9651fbff2ea 100644 --- a/src/test/ui/issue-46983.stderr +++ b/src/test/ui/issue-46983.stderr @@ -1,9 +1,9 @@ error[E0621]: explicit lifetime required in the type of `x` --> $DIR/issue-46983.rs:14:5 | -13 | fn foo(x: &u32) -> &'static u32 { +LL | fn foo(x: &u32) -> &'static u32 { | - consider changing the type of `x` to `&'static u32` -14 | &*x +LL | &*x | ^^^ lifetime `'static` required error: aborting due to previous error diff --git a/src/test/ui/issue-47073-zero-padded-tuple-struct-indices.stderr b/src/test/ui/issue-47073-zero-padded-tuple-struct-indices.stderr index 24b3c263b6372..9603ac01fefb9 100644 --- a/src/test/ui/issue-47073-zero-padded-tuple-struct-indices.stderr +++ b/src/test/ui/issue-47073-zero-padded-tuple-struct-indices.stderr @@ -1,13 +1,13 @@ error: invalid tuple or struct index --> $DIR/issue-47073-zero-padded-tuple-struct-indices.rs:18:30 | -18 | let _condemned = justice.00; +LL | let _condemned = justice.00; | ^^ help: try simplifying the index: `0` error: invalid tuple or struct index --> $DIR/issue-47073-zero-padded-tuple-struct-indices.rs:20:31 | -20 | let _punishment = justice.001; +LL | let _punishment = justice.001; | ^^^ help: try simplifying the index: `1` error: aborting due to 2 previous errors diff --git a/src/test/ui/issue-47094.stderr b/src/test/ui/issue-47094.stderr index 5276b881e4c6b..f4b622a00fee6 100644 --- a/src/test/ui/issue-47094.stderr +++ b/src/test/ui/issue-47094.stderr @@ -1,14 +1,14 @@ warning[E0566]: conflicting representation hints --> $DIR/issue-47094.rs:13:8 | -13 | #[repr(C,u8)] +LL | #[repr(C,u8)] | ^ ^^ warning[E0566]: conflicting representation hints --> $DIR/issue-47094.rs:19:8 | -19 | #[repr(C)] +LL | #[repr(C)] | ^ -20 | #[repr(u8)] +LL | #[repr(u8)] | ^^ diff --git a/src/test/ui/issue-47377.stderr b/src/test/ui/issue-47377.stderr index 13b3ff5869783..0b317ec595154 100644 --- a/src/test/ui/issue-47377.stderr +++ b/src/test/ui/issue-47377.stderr @@ -1,11 +1,11 @@ error[E0369]: binary operation `+` cannot be applied to type `&str` --> $DIR/issue-47377.rs:13:12 | -13 | let _a = b + ", World!"; +LL | let _a = b + ", World!"; | ^^^^^^^^^^^^^^ `+` can't be used to concatenate two `&str` strings help: `to_owned()` can be used to create an owned `String` from a string reference. String concatenation appends the string on the right to the string on the left and may require reallocation. This requires ownership of the string on the left | -13 | let _a = b.to_owned() + ", World!"; +LL | let _a = b.to_owned() + ", World!"; | ^^^^^^^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/issue-47380.stderr b/src/test/ui/issue-47380.stderr index 6c9f79b5a9417..820678256faac 100644 --- a/src/test/ui/issue-47380.stderr +++ b/src/test/ui/issue-47380.stderr @@ -1,11 +1,11 @@ error[E0369]: binary operation `+` cannot be applied to type `&str` --> $DIR/issue-47380.rs:12:33 | -12 | println!("🦀🦀🦀🦀🦀"); let _a = b + ", World!"; +LL | println!("🦀🦀🦀🦀🦀"); let _a = b + ", World!"; | ^^^^^^^^^^^^^^ `+` can't be used to concatenate two `&str` strings help: `to_owned()` can be used to create an owned `String` from a string reference. String concatenation appends the string on the right to the string on the left and may require reallocation. This requires ownership of the string on the left | -12 | println!("🦀🦀🦀🦀🦀"); let _a = b.to_owned() + ", World!"; +LL | println!("🦀🦀🦀🦀🦀"); let _a = b.to_owned() + ", World!"; | ^^^^^^^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/issue-47511.stderr b/src/test/ui/issue-47511.stderr index fabd6b6c25396..0c97a22172244 100644 --- a/src/test/ui/issue-47511.stderr +++ b/src/test/ui/issue-47511.stderr @@ -1,7 +1,7 @@ error[E0581]: return type references an anonymous lifetime which is not constrained by the fn input types --> $DIR/issue-47511.rs:15:15 | -15 | fn f(_: X) -> X { +LL | fn f(_: X) -> X { | ^ | = note: lifetimes appearing in an associated type are not considered constrained @@ -9,7 +9,7 @@ error[E0581]: return type references an anonymous lifetime which is not constrai error[E0581]: return type references lifetime `'a`, which is not constrained by the fn input types --> $DIR/issue-47511.rs:20:23 | -20 | fn g<'a>(_: X<'a>) -> X<'a> { +LL | fn g<'a>(_: X<'a>) -> X<'a> { | ^^^^^ error: aborting due to 2 previous errors diff --git a/src/test/ui/issue-47623.stderr b/src/test/ui/issue-47623.stderr index c5a42d4d846e8..15d4a61cd6f57 100644 --- a/src/test/ui/issue-47623.stderr +++ b/src/test/ui/issue-47623.stderr @@ -1,7 +1,7 @@ error[E0429]: `self` imports are only allowed within a { } list --> $DIR/issue-47623.rs:11:5 | -11 | use self; //~ERROR `self` imports are only allowed within a { } list +LL | use self; //~ERROR `self` imports are only allowed within a { } list | ^^^^ error: aborting due to previous error diff --git a/src/test/ui/issue-47706-trait.stderr b/src/test/ui/issue-47706-trait.stderr index 320e98dee4acf..c4b790ee0c2fd 100644 --- a/src/test/ui/issue-47706-trait.stderr +++ b/src/test/ui/issue-47706-trait.stderr @@ -3,9 +3,9 @@ error[E0601]: main function not found error[E0593]: function is expected to take a single 0-tuple as argument, but it takes 2 distinct arguments --> $DIR/issue-47706-trait.rs:13:20 | -12 | fn f(&self, _: ()) { +LL | fn f(&self, _: ()) { | ------------------ takes 2 distinct arguments -13 | None::<()>.map(Self::f); +LL | None::<()>.map(Self::f); | ^^^ expected function that takes a single 0-tuple as argument error: aborting due to 2 previous errors diff --git a/src/test/ui/issue-47706.stderr b/src/test/ui/issue-47706.stderr index e197c09062d1c..5342c8fea4210 100644 --- a/src/test/ui/issue-47706.stderr +++ b/src/test/ui/issue-47706.stderr @@ -1,29 +1,29 @@ error[E0593]: function is expected to take 1 argument, but it takes 2 arguments --> $DIR/issue-47706.rs:21:18 | -16 | pub fn new(foo: Option, _: ()) -> Foo { +LL | pub fn new(foo: Option, _: ()) -> Foo { | ------------------------------------------ takes 2 arguments ... -21 | self.foo.map(Foo::new) +LL | self.foo.map(Foo::new) | ^^^ expected function that takes 1 argument error[E0593]: function is expected to take 0 arguments, but it takes 1 argument --> $DIR/issue-47706.rs:37:5 | -27 | Bar(i32), +LL | Bar(i32), | -------- takes 1 argument ... -37 | foo(Qux::Bar); +LL | foo(Qux::Bar); | ^^^ expected function that takes 0 arguments | note: required by `foo` --> $DIR/issue-47706.rs:30:1 | -30 | / fn foo(f: F) -31 | | where -32 | | F: Fn(), -33 | | { -34 | | } +LL | / fn foo(f: F) +LL | | where +LL | | F: Fn(), +LL | | { +LL | | } | |_^ error: aborting due to 2 previous errors diff --git a/src/test/ui/issue-4935.stderr b/src/test/ui/issue-4935.stderr index 654fe53c07f10..69818493e5136 100644 --- a/src/test/ui/issue-4935.stderr +++ b/src/test/ui/issue-4935.stderr @@ -1,10 +1,10 @@ error[E0061]: this function takes 1 parameter but 2 parameters were supplied --> $DIR/issue-4935.rs:15:13 | -13 | fn foo(a: usize) {} +LL | fn foo(a: usize) {} | ---------------- defined here -14 | //~^ defined here -15 | fn main() { foo(5, 6) } +LL | //~^ defined here +LL | fn main() { foo(5, 6) } | ^^^^^^^^^ expected 1 parameter error: aborting due to previous error diff --git a/src/test/ui/issue-5239-1.stderr b/src/test/ui/issue-5239-1.stderr index b97b58981de62..372248100630e 100644 --- a/src/test/ui/issue-5239-1.stderr +++ b/src/test/ui/issue-5239-1.stderr @@ -1,7 +1,7 @@ error[E0368]: binary assignment operation `+=` cannot be applied to type `&isize` --> $DIR/issue-5239-1.rs:14:30 | -14 | let x = |ref x: isize| { x += 1; }; +LL | let x = |ref x: isize| { x += 1; }; | -^^^^^ | | | cannot use `+=` on type `&isize` diff --git a/src/test/ui/issue-6458-3.stderr b/src/test/ui/issue-6458-3.stderr index 761a9b38f6f06..7e1f92802b8a5 100644 --- a/src/test/ui/issue-6458-3.stderr +++ b/src/test/ui/issue-6458-3.stderr @@ -1,7 +1,7 @@ error[E0282]: type annotations needed --> $DIR/issue-6458-3.rs:14:5 | -14 | mem::transmute(0); +LL | mem::transmute(0); | ^^^^^^^^^^^^^^ cannot infer type for `U` error: aborting due to previous error diff --git a/src/test/ui/issue-6458-4.stderr b/src/test/ui/issue-6458-4.stderr index 6cc1edcd9fa6c..d79fbacedfec1 100644 --- a/src/test/ui/issue-6458-4.stderr +++ b/src/test/ui/issue-6458-4.stderr @@ -1,11 +1,11 @@ error[E0308]: mismatched types --> $DIR/issue-6458-4.rs:11:40 | -11 | fn foo(b: bool) -> Result { //~ ERROR mismatched types +LL | fn foo(b: bool) -> Result { //~ ERROR mismatched types | ________________________________________^ -12 | | Err("bar".to_string()); +LL | | Err("bar".to_string()); | | - help: consider removing this semicolon -13 | | } +LL | | } | |_^ expected enum `std::result::Result`, found () | = note: expected type `std::result::Result` diff --git a/src/test/ui/issue-6458.stderr b/src/test/ui/issue-6458.stderr index b5d4ac831393f..073d204666b03 100644 --- a/src/test/ui/issue-6458.stderr +++ b/src/test/ui/issue-6458.stderr @@ -1,7 +1,7 @@ error[E0282]: type annotations needed --> $DIR/issue-6458.rs:19:4 | -19 | foo(TypeWithState(marker::PhantomData)); +LL | foo(TypeWithState(marker::PhantomData)); | ^^^ cannot infer type for `State` error: aborting due to previous error diff --git a/src/test/ui/issue-7813.stderr b/src/test/ui/issue-7813.stderr index 11f8e4d00fd1d..9ba1045180ebf 100644 --- a/src/test/ui/issue-7813.stderr +++ b/src/test/ui/issue-7813.stderr @@ -1,7 +1,7 @@ error[E0282]: type annotations needed --> $DIR/issue-7813.rs:12:13 | -12 | let v = &[]; //~ ERROR type annotations needed +LL | let v = &[]; //~ ERROR type annotations needed | - ^^^ cannot infer type for `_` | | | consider giving `v` a type diff --git a/src/test/ui/lifetime-elision-return-type-requires-explicit-lifetime.stderr b/src/test/ui/lifetime-elision-return-type-requires-explicit-lifetime.stderr index f91b286bc4ac8..75e76f04d9df1 100644 --- a/src/test/ui/lifetime-elision-return-type-requires-explicit-lifetime.stderr +++ b/src/test/ui/lifetime-elision-return-type-requires-explicit-lifetime.stderr @@ -1,7 +1,7 @@ error[E0106]: missing lifetime specifier --> $DIR/lifetime-elision-return-type-requires-explicit-lifetime.rs:12:11 | -12 | fn f() -> &isize { //~ ERROR missing lifetime specifier +LL | fn f() -> &isize { //~ ERROR missing lifetime specifier | ^ expected lifetime parameter | = help: this function's return type contains a borrowed value, but there is no value for it to be borrowed from @@ -10,7 +10,7 @@ error[E0106]: missing lifetime specifier error[E0106]: missing lifetime specifier --> $DIR/lifetime-elision-return-type-requires-explicit-lifetime.rs:17:33 | -17 | fn g(_x: &isize, _y: &isize) -> &isize { //~ ERROR missing lifetime specifier +LL | fn g(_x: &isize, _y: &isize) -> &isize { //~ ERROR missing lifetime specifier | ^ expected lifetime parameter | = help: this function's return type contains a borrowed value, but the signature does not say whether it is borrowed from `_x` or `_y` @@ -18,7 +18,7 @@ error[E0106]: missing lifetime specifier error[E0106]: missing lifetime specifier --> $DIR/lifetime-elision-return-type-requires-explicit-lifetime.rs:27:19 | -27 | fn h(_x: &Foo) -> &isize { //~ ERROR missing lifetime specifier +LL | fn h(_x: &Foo) -> &isize { //~ ERROR missing lifetime specifier | ^ expected lifetime parameter | = help: this function's return type contains a borrowed value, but the signature does not say which one of `_x`'s 2 lifetimes it is borrowed from @@ -26,7 +26,7 @@ error[E0106]: missing lifetime specifier error[E0106]: missing lifetime specifier --> $DIR/lifetime-elision-return-type-requires-explicit-lifetime.rs:31:20 | -31 | fn i(_x: isize) -> &isize { //~ ERROR missing lifetime specifier +LL | fn i(_x: isize) -> &isize { //~ ERROR missing lifetime specifier | ^ expected lifetime parameter | = help: this function's return type contains a borrowed value with an elided lifetime, but the lifetime cannot be derived from the arguments @@ -35,7 +35,7 @@ error[E0106]: missing lifetime specifier error[E0106]: missing lifetime specifier --> $DIR/lifetime-elision-return-type-requires-explicit-lifetime.rs:44:24 | -44 | fn j(_x: StaticStr) -> &isize { //~ ERROR missing lifetime specifier +LL | fn j(_x: StaticStr) -> &isize { //~ ERROR missing lifetime specifier | ^ expected lifetime parameter | = help: this function's return type contains a borrowed value with an elided lifetime, but the lifetime cannot be derived from the arguments @@ -44,7 +44,7 @@ error[E0106]: missing lifetime specifier error[E0106]: missing lifetime specifier --> $DIR/lifetime-elision-return-type-requires-explicit-lifetime.rs:50:49 | -50 | fn k<'a, T: WithLifetime<'a>>(_x: T::Output) -> &isize { +LL | fn k<'a, T: WithLifetime<'a>>(_x: T::Output) -> &isize { | ^ expected lifetime parameter | = help: this function's return type contains a borrowed value with an elided lifetime, but the lifetime cannot be derived from the arguments diff --git a/src/test/ui/lifetime-errors/42701_one_named_and_one_anonymous.stderr b/src/test/ui/lifetime-errors/42701_one_named_and_one_anonymous.stderr index 9bfa72c2f36ce..d5f2dde31d907 100644 --- a/src/test/ui/lifetime-errors/42701_one_named_and_one_anonymous.stderr +++ b/src/test/ui/lifetime-errors/42701_one_named_and_one_anonymous.stderr @@ -1,10 +1,10 @@ error[E0621]: explicit lifetime required in the type of `x` --> $DIR/42701_one_named_and_one_anonymous.rs:20:9 | -15 | fn foo2<'a>(a: &'a Foo, x: &i32) -> &'a i32 { +LL | fn foo2<'a>(a: &'a Foo, x: &i32) -> &'a i32 { | - consider changing the type of `x` to `&'a i32` ... -20 | &*x //~ ERROR explicit lifetime +LL | &*x //~ ERROR explicit lifetime | ^^^ lifetime `'a` required error: aborting due to previous error diff --git a/src/test/ui/lifetime-errors/ex1-return-one-existing-name-early-bound-in-struct.stderr b/src/test/ui/lifetime-errors/ex1-return-one-existing-name-early-bound-in-struct.stderr index 4c5e37b8f10fb..426442eee5b98 100644 --- a/src/test/ui/lifetime-errors/ex1-return-one-existing-name-early-bound-in-struct.stderr +++ b/src/test/ui/lifetime-errors/ex1-return-one-existing-name-early-bound-in-struct.stderr @@ -1,10 +1,10 @@ error[E0621]: explicit lifetime required in the type of `other` --> $DIR/ex1-return-one-existing-name-early-bound-in-struct.rs:21:21 | -17 | fn bar(&self, other: Foo) -> Foo<'a> { +LL | fn bar(&self, other: Foo) -> Foo<'a> { | ----- consider changing the type of `other` to `Foo<'a>` ... -21 | other //~ ERROR explicit lifetime +LL | other //~ ERROR explicit lifetime | ^^^^^ lifetime `'a` required error: aborting due to previous error diff --git a/src/test/ui/lifetime-errors/ex1-return-one-existing-name-if-else-2.stderr b/src/test/ui/lifetime-errors/ex1-return-one-existing-name-if-else-2.stderr index 457e347faaa4d..2b1806f5de64a 100644 --- a/src/test/ui/lifetime-errors/ex1-return-one-existing-name-if-else-2.stderr +++ b/src/test/ui/lifetime-errors/ex1-return-one-existing-name-if-else-2.stderr @@ -1,9 +1,9 @@ error[E0621]: explicit lifetime required in the type of `x` --> $DIR/ex1-return-one-existing-name-if-else-2.rs:12:16 | -11 | fn foo<'a>(x: &i32, y: &'a i32) -> &'a i32 { +LL | fn foo<'a>(x: &i32, y: &'a i32) -> &'a i32 { | - consider changing the type of `x` to `&'a i32` -12 | if x > y { x } else { y } //~ ERROR explicit lifetime +LL | if x > y { x } else { y } //~ ERROR explicit lifetime | ^ lifetime `'a` required error: aborting due to previous error diff --git a/src/test/ui/lifetime-errors/ex1-return-one-existing-name-if-else-3.stderr b/src/test/ui/lifetime-errors/ex1-return-one-existing-name-if-else-3.stderr index 8c3592379ef12..2edd681b6a101 100644 --- a/src/test/ui/lifetime-errors/ex1-return-one-existing-name-if-else-3.stderr +++ b/src/test/ui/lifetime-errors/ex1-return-one-existing-name-if-else-3.stderr @@ -1,9 +1,9 @@ error[E0621]: explicit lifetime required in parameter type --> $DIR/ex1-return-one-existing-name-if-else-3.rs:12:27 | -11 | fn foo<'a>((x, y): (&'a i32, &i32)) -> &'a i32 { +LL | fn foo<'a>((x, y): (&'a i32, &i32)) -> &'a i32 { | ------ consider changing type to `(&'a i32, &'a i32)` -12 | if x > y { x } else { y } //~ ERROR explicit lifetime +LL | if x > y { x } else { y } //~ ERROR explicit lifetime | ^ lifetime `'a` required error: aborting due to previous error diff --git a/src/test/ui/lifetime-errors/ex1-return-one-existing-name-if-else-using-impl-2.stderr b/src/test/ui/lifetime-errors/ex1-return-one-existing-name-if-else-using-impl-2.stderr index d5d1d16a4245f..f0230295cdbde 100644 --- a/src/test/ui/lifetime-errors/ex1-return-one-existing-name-if-else-using-impl-2.stderr +++ b/src/test/ui/lifetime-errors/ex1-return-one-existing-name-if-else-using-impl-2.stderr @@ -1,9 +1,9 @@ error[E0621]: explicit lifetime required in the type of `x` --> $DIR/ex1-return-one-existing-name-if-else-using-impl-2.rs:14:15 | -13 | fn foo<'a>(x: &i32, y: &'a i32) -> &'a i32 { +LL | fn foo<'a>(x: &i32, y: &'a i32) -> &'a i32 { | - consider changing the type of `x` to `&'a i32` -14 | if x > y { x } else { y } //~ ERROR explicit lifetime +LL | if x > y { x } else { y } //~ ERROR explicit lifetime | ^ lifetime `'a` required error: aborting due to previous error diff --git a/src/test/ui/lifetime-errors/ex1-return-one-existing-name-if-else-using-impl-3.stderr b/src/test/ui/lifetime-errors/ex1-return-one-existing-name-if-else-using-impl-3.stderr index 23b9c0cf2506f..4e6e8ee790d69 100644 --- a/src/test/ui/lifetime-errors/ex1-return-one-existing-name-if-else-using-impl-3.stderr +++ b/src/test/ui/lifetime-errors/ex1-return-one-existing-name-if-else-using-impl-3.stderr @@ -1,10 +1,10 @@ error[E0621]: explicit lifetime required in the type of `x` --> $DIR/ex1-return-one-existing-name-if-else-using-impl-3.rs:18:36 | -16 | fn foo<'a>(&'a self, x: &i32) -> &i32 { +LL | fn foo<'a>(&'a self, x: &i32) -> &i32 { | - consider changing the type of `x` to `&'a i32` -17 | -18 | if true { &self.field } else { x } //~ ERROR explicit lifetime +LL | +LL | if true { &self.field } else { x } //~ ERROR explicit lifetime | ^ lifetime `'a` required error: aborting due to previous error diff --git a/src/test/ui/lifetime-errors/ex1-return-one-existing-name-if-else-using-impl.stderr b/src/test/ui/lifetime-errors/ex1-return-one-existing-name-if-else-using-impl.stderr index f418e1c01f2ae..152276f30c5e4 100644 --- a/src/test/ui/lifetime-errors/ex1-return-one-existing-name-if-else-using-impl.stderr +++ b/src/test/ui/lifetime-errors/ex1-return-one-existing-name-if-else-using-impl.stderr @@ -1,12 +1,12 @@ error[E0623]: lifetime mismatch --> $DIR/ex1-return-one-existing-name-if-else-using-impl.rs:21:20 | -19 | fn foo<'a>(x: &i32, y: &'a i32) -> &'a i32 { +LL | fn foo<'a>(x: &i32, y: &'a i32) -> &'a i32 { | ---- ------- | | | this parameter and the return type are declared with different lifetimes... -20 | -21 | if x > y { x } else { y } //~ ERROR lifetime mismatch +LL | +LL | if x > y { x } else { y } //~ ERROR lifetime mismatch | ^ ...but data from `x` is returned here error: aborting due to previous error diff --git a/src/test/ui/lifetime-errors/ex1-return-one-existing-name-if-else.stderr b/src/test/ui/lifetime-errors/ex1-return-one-existing-name-if-else.stderr index b28f102cd5ac1..ce7f1b1551aea 100644 --- a/src/test/ui/lifetime-errors/ex1-return-one-existing-name-if-else.stderr +++ b/src/test/ui/lifetime-errors/ex1-return-one-existing-name-if-else.stderr @@ -1,9 +1,9 @@ error[E0621]: explicit lifetime required in the type of `y` --> $DIR/ex1-return-one-existing-name-if-else.rs:12:27 | -11 | fn foo<'a>(x: &'a i32, y: &i32) -> &'a i32 { +LL | fn foo<'a>(x: &'a i32, y: &i32) -> &'a i32 { | - consider changing the type of `y` to `&'a i32` -12 | if x > y { x } else { y } //~ ERROR explicit lifetime +LL | if x > y { x } else { y } //~ ERROR explicit lifetime | ^ lifetime `'a` required error: aborting due to previous error diff --git a/src/test/ui/lifetime-errors/ex1-return-one-existing-name-return-type-is-anon.stderr b/src/test/ui/lifetime-errors/ex1-return-one-existing-name-return-type-is-anon.stderr index d26cb6be709b1..bde720116a5b1 100644 --- a/src/test/ui/lifetime-errors/ex1-return-one-existing-name-return-type-is-anon.stderr +++ b/src/test/ui/lifetime-errors/ex1-return-one-existing-name-return-type-is-anon.stderr @@ -1,12 +1,12 @@ error[E0623]: lifetime mismatch --> $DIR/ex1-return-one-existing-name-return-type-is-anon.rs:18:5 | -16 | fn foo<'a>(&self, x: &'a i32) -> &i32 { +LL | fn foo<'a>(&self, x: &'a i32) -> &i32 { | ------- ---- | | | this parameter and the return type are declared with different lifetimes... -17 | -18 | x //~ ERROR lifetime mismatch +LL | +LL | x //~ ERROR lifetime mismatch | ^ ...but data from `x` is returned here error: aborting due to previous error diff --git a/src/test/ui/lifetime-errors/ex1-return-one-existing-name-self-is-anon.stderr b/src/test/ui/lifetime-errors/ex1-return-one-existing-name-self-is-anon.stderr index 0430e4c271507..41a0dee15e60d 100644 --- a/src/test/ui/lifetime-errors/ex1-return-one-existing-name-self-is-anon.stderr +++ b/src/test/ui/lifetime-errors/ex1-return-one-existing-name-self-is-anon.stderr @@ -1,12 +1,12 @@ error[E0623]: lifetime mismatch --> $DIR/ex1-return-one-existing-name-self-is-anon.rs:18:30 | -16 | fn foo<'a>(&self, x: &'a Foo) -> &'a Foo { +LL | fn foo<'a>(&self, x: &'a Foo) -> &'a Foo { | ----- ------- | | | this parameter and the return type are declared with different lifetimes... -17 | -18 | if true { x } else { self } //~ ERROR lifetime mismatch +LL | +LL | if true { x } else { self } //~ ERROR lifetime mismatch | ^^^^ ...but data from `self` is returned here error: aborting due to previous error diff --git a/src/test/ui/lifetime-errors/ex1b-return-no-names-if-else.stderr b/src/test/ui/lifetime-errors/ex1b-return-no-names-if-else.stderr index 7cd5ca65981b7..a45838782500b 100644 --- a/src/test/ui/lifetime-errors/ex1b-return-no-names-if-else.stderr +++ b/src/test/ui/lifetime-errors/ex1b-return-no-names-if-else.stderr @@ -1,7 +1,7 @@ error[E0106]: missing lifetime specifier --> $DIR/ex1b-return-no-names-if-else.rs:11:29 | -11 | fn foo(x: &i32, y: &i32) -> &i32 { //~ ERROR missing lifetime +LL | fn foo(x: &i32, y: &i32) -> &i32 { //~ ERROR missing lifetime | ^ expected lifetime parameter | = help: this function's return type contains a borrowed value, but the signature does not say whether it is borrowed from `x` or `y` diff --git a/src/test/ui/lifetime-errors/ex2a-push-one-existing-name-2.stderr b/src/test/ui/lifetime-errors/ex2a-push-one-existing-name-2.stderr index 7abc093512b46..a9ca5974f9c7e 100644 --- a/src/test/ui/lifetime-errors/ex2a-push-one-existing-name-2.stderr +++ b/src/test/ui/lifetime-errors/ex2a-push-one-existing-name-2.stderr @@ -1,9 +1,9 @@ error[E0621]: explicit lifetime required in the type of `x` --> $DIR/ex2a-push-one-existing-name-2.rs:16:12 | -15 | fn foo<'a>(x: Ref, y: &mut Vec>) { +LL | fn foo<'a>(x: Ref, y: &mut Vec>) { | - consider changing the type of `x` to `Ref<'a, i32>` -16 | y.push(x); //~ ERROR explicit lifetime +LL | y.push(x); //~ ERROR explicit lifetime | ^ lifetime `'a` required error: aborting due to previous error diff --git a/src/test/ui/lifetime-errors/ex2a-push-one-existing-name-early-bound.stderr b/src/test/ui/lifetime-errors/ex2a-push-one-existing-name-early-bound.stderr index ca522596fbff8..f8c98ca610f2b 100644 --- a/src/test/ui/lifetime-errors/ex2a-push-one-existing-name-early-bound.stderr +++ b/src/test/ui/lifetime-errors/ex2a-push-one-existing-name-early-bound.stderr @@ -1,10 +1,10 @@ error[E0621]: explicit lifetime required in the type of `y` --> $DIR/ex2a-push-one-existing-name-early-bound.rs:17:12 | -13 | fn baz<'a, 'b, T>(x: &mut Vec<&'a T>, y: &T) +LL | fn baz<'a, 'b, T>(x: &mut Vec<&'a T>, y: &T) | - consider changing the type of `y` to `&'a T` ... -17 | x.push(y); //~ ERROR explicit lifetime required +LL | x.push(y); //~ ERROR explicit lifetime required | ^ lifetime `'a` required error: aborting due to previous error diff --git a/src/test/ui/lifetime-errors/ex2a-push-one-existing-name.stderr b/src/test/ui/lifetime-errors/ex2a-push-one-existing-name.stderr index 5d8f2c1decb2c..4e9191e742603 100644 --- a/src/test/ui/lifetime-errors/ex2a-push-one-existing-name.stderr +++ b/src/test/ui/lifetime-errors/ex2a-push-one-existing-name.stderr @@ -1,9 +1,9 @@ error[E0621]: explicit lifetime required in the type of `y` --> $DIR/ex2a-push-one-existing-name.rs:16:12 | -15 | fn foo<'a>(x: &mut Vec>, y: Ref) { +LL | fn foo<'a>(x: &mut Vec>, y: Ref) { | - consider changing the type of `y` to `Ref<'a, i32>` -16 | x.push(y); //~ ERROR explicit lifetime +LL | x.push(y); //~ ERROR explicit lifetime | ^ lifetime `'a` required error: aborting due to previous error diff --git a/src/test/ui/lifetime-errors/ex2b-push-no-existing-names.stderr b/src/test/ui/lifetime-errors/ex2b-push-no-existing-names.stderr index 69ff29db3570a..41b86f8fdbae5 100644 --- a/src/test/ui/lifetime-errors/ex2b-push-no-existing-names.stderr +++ b/src/test/ui/lifetime-errors/ex2b-push-no-existing-names.stderr @@ -1,9 +1,9 @@ error[E0623]: lifetime mismatch --> $DIR/ex2b-push-no-existing-names.rs:16:12 | -15 | fn foo(x: &mut Vec>, y: Ref) { +LL | fn foo(x: &mut Vec>, y: Ref) { | -------- -------- these two types are declared with different lifetimes... -16 | x.push(y); //~ ERROR lifetime mismatch +LL | x.push(y); //~ ERROR lifetime mismatch | ^ ...but data from `y` flows into `x` here error: aborting due to previous error diff --git a/src/test/ui/lifetime-errors/ex2c-push-inference-variable.stderr b/src/test/ui/lifetime-errors/ex2c-push-inference-variable.stderr index dacb0708b0580..1c00c58b8c8c3 100644 --- a/src/test/ui/lifetime-errors/ex2c-push-inference-variable.stderr +++ b/src/test/ui/lifetime-errors/ex2c-push-inference-variable.stderr @@ -1,10 +1,10 @@ error[E0623]: lifetime mismatch --> $DIR/ex2c-push-inference-variable.rs:17:12 | -15 | fn foo<'a, 'b, 'c>(x: &'a mut Vec>, y: Ref<'c, i32>) { +LL | fn foo<'a, 'b, 'c>(x: &'a mut Vec>, y: Ref<'c, i32>) { | ------------ ------------ these two types are declared with different lifetimes... -16 | let z = Ref { data: y.data }; -17 | x.push(z); //~ ERROR lifetime mismatch +LL | let z = Ref { data: y.data }; +LL | x.push(z); //~ ERROR lifetime mismatch | ^ ...but data from `y` flows into `x` here error: aborting due to previous error diff --git a/src/test/ui/lifetime-errors/ex2d-push-inference-variable-2.stderr b/src/test/ui/lifetime-errors/ex2d-push-inference-variable-2.stderr index e30355891ee78..846a3d29d4b33 100644 --- a/src/test/ui/lifetime-errors/ex2d-push-inference-variable-2.stderr +++ b/src/test/ui/lifetime-errors/ex2d-push-inference-variable-2.stderr @@ -1,9 +1,9 @@ error[E0623]: lifetime mismatch --> $DIR/ex2d-push-inference-variable-2.rs:16:33 | -15 | fn foo<'a, 'b, 'c>(x: &'a mut Vec>, y: Ref<'c, i32>) { +LL | fn foo<'a, 'b, 'c>(x: &'a mut Vec>, y: Ref<'c, i32>) { | ------------ ------------ these two types are declared with different lifetimes... -16 | let a: &mut Vec> = x; //~ ERROR lifetime mismatch +LL | let a: &mut Vec> = x; //~ ERROR lifetime mismatch | ^ ...but data from `y` flows into `x` here error: aborting due to previous error diff --git a/src/test/ui/lifetime-errors/ex2e-push-inference-variable-3.stderr b/src/test/ui/lifetime-errors/ex2e-push-inference-variable-3.stderr index 841555c1fcb38..5e0d5a355cb56 100644 --- a/src/test/ui/lifetime-errors/ex2e-push-inference-variable-3.stderr +++ b/src/test/ui/lifetime-errors/ex2e-push-inference-variable-3.stderr @@ -1,9 +1,9 @@ error[E0623]: lifetime mismatch --> $DIR/ex2e-push-inference-variable-3.rs:16:33 | -15 | fn foo<'a, 'b, 'c>(x: &'a mut Vec>, y: Ref<'c, i32>) { +LL | fn foo<'a, 'b, 'c>(x: &'a mut Vec>, y: Ref<'c, i32>) { | ------------ ------------ these two types are declared with different lifetimes... -16 | let a: &mut Vec> = x; //~ ERROR lifetime mismatch +LL | let a: &mut Vec> = x; //~ ERROR lifetime mismatch | ^ ...but data from `y` flows into `x` here error: aborting due to previous error diff --git a/src/test/ui/lifetime-errors/ex3-both-anon-regions-2.stderr b/src/test/ui/lifetime-errors/ex3-both-anon-regions-2.stderr index 5e1a4593ae459..cfab8a0fbbc3e 100644 --- a/src/test/ui/lifetime-errors/ex3-both-anon-regions-2.stderr +++ b/src/test/ui/lifetime-errors/ex3-both-anon-regions-2.stderr @@ -1,9 +1,9 @@ error[E0623]: lifetime mismatch --> $DIR/ex3-both-anon-regions-2.rs:12:9 | -11 | fn foo((v, w): (&u8, &u8), x: &u8) { +LL | fn foo((v, w): (&u8, &u8), x: &u8) { | --- --- these two types are declared with different lifetimes... -12 | v = x; //~ ERROR lifetime mismatch +LL | v = x; //~ ERROR lifetime mismatch | ^ ...but data from `x` flows here error: aborting due to previous error diff --git a/src/test/ui/lifetime-errors/ex3-both-anon-regions-3.stderr b/src/test/ui/lifetime-errors/ex3-both-anon-regions-3.stderr index b5b90c077d064..ed3fbda654a97 100644 --- a/src/test/ui/lifetime-errors/ex3-both-anon-regions-3.stderr +++ b/src/test/ui/lifetime-errors/ex3-both-anon-regions-3.stderr @@ -1,17 +1,17 @@ error[E0623]: lifetime mismatch --> $DIR/ex3-both-anon-regions-3.rs:12:13 | -11 | fn foo(z: &mut Vec<(&u8,&u8)>, (x, y): (&u8, &u8)) { +LL | fn foo(z: &mut Vec<(&u8,&u8)>, (x, y): (&u8, &u8)) { | --- --- these two types are declared with different lifetimes... -12 | z.push((x,y)); //~ ERROR lifetime mismatch +LL | z.push((x,y)); //~ ERROR lifetime mismatch | ^ ...but data flows into `z` here error[E0623]: lifetime mismatch --> $DIR/ex3-both-anon-regions-3.rs:12:15 | -11 | fn foo(z: &mut Vec<(&u8,&u8)>, (x, y): (&u8, &u8)) { +LL | fn foo(z: &mut Vec<(&u8,&u8)>, (x, y): (&u8, &u8)) { | --- --- these two types are declared with different lifetimes... -12 | z.push((x,y)); //~ ERROR lifetime mismatch +LL | z.push((x,y)); //~ ERROR lifetime mismatch | ^ ...but data flows into `z` here error: aborting due to 2 previous errors diff --git a/src/test/ui/lifetime-errors/ex3-both-anon-regions-both-are-structs-2.stderr b/src/test/ui/lifetime-errors/ex3-both-anon-regions-both-are-structs-2.stderr index e7317e63ab472..1a3b44d630d5b 100644 --- a/src/test/ui/lifetime-errors/ex3-both-anon-regions-both-are-structs-2.stderr +++ b/src/test/ui/lifetime-errors/ex3-both-anon-regions-both-are-structs-2.stderr @@ -1,9 +1,9 @@ error[E0623]: lifetime mismatch --> $DIR/ex3-both-anon-regions-both-are-structs-2.rs:16:11 | -15 | fn foo(mut x: Ref, y: Ref) { +LL | fn foo(mut x: Ref, y: Ref) { | --- --- these two types are declared with different lifetimes... -16 | x.b = y.b; //~ ERROR lifetime mismatch +LL | x.b = y.b; //~ ERROR lifetime mismatch | ^^^ ...but data from `y` flows into `x` here error: aborting due to previous error diff --git a/src/test/ui/lifetime-errors/ex3-both-anon-regions-both-are-structs-3.stderr b/src/test/ui/lifetime-errors/ex3-both-anon-regions-both-are-structs-3.stderr index 71eef13a67db7..8078bd3397f89 100644 --- a/src/test/ui/lifetime-errors/ex3-both-anon-regions-both-are-structs-3.stderr +++ b/src/test/ui/lifetime-errors/ex3-both-anon-regions-both-are-structs-3.stderr @@ -1,11 +1,11 @@ error[E0623]: lifetime mismatch --> $DIR/ex3-both-anon-regions-both-are-structs-3.rs:16:11 | -15 | fn foo(mut x: Ref) { +LL | fn foo(mut x: Ref) { | --- | | | this type is declared with multiple lifetimes... -16 | x.a = x.b; //~ ERROR lifetime mismatch +LL | x.a = x.b; //~ ERROR lifetime mismatch | ^^^ ...but data with one lifetime flows into the other here error: aborting due to previous error diff --git a/src/test/ui/lifetime-errors/ex3-both-anon-regions-both-are-structs-4.stderr b/src/test/ui/lifetime-errors/ex3-both-anon-regions-both-are-structs-4.stderr index 61b59b8f121c1..c24650739de18 100644 --- a/src/test/ui/lifetime-errors/ex3-both-anon-regions-both-are-structs-4.stderr +++ b/src/test/ui/lifetime-errors/ex3-both-anon-regions-both-are-structs-4.stderr @@ -1,11 +1,11 @@ error[E0623]: lifetime mismatch --> $DIR/ex3-both-anon-regions-both-are-structs-4.rs:16:11 | -15 | fn foo(mut x: Ref) { +LL | fn foo(mut x: Ref) { | --- | | | this type is declared with multiple lifetimes... -16 | x.a = x.b; //~ ERROR lifetime mismatch +LL | x.a = x.b; //~ ERROR lifetime mismatch | ^^^ ...but data with one lifetime flows into the other here error: aborting due to previous error diff --git a/src/test/ui/lifetime-errors/ex3-both-anon-regions-both-are-structs-earlybound-regions.stderr b/src/test/ui/lifetime-errors/ex3-both-anon-regions-both-are-structs-earlybound-regions.stderr index 0b1b01d86b8ea..0b07cd78cfbc8 100644 --- a/src/test/ui/lifetime-errors/ex3-both-anon-regions-both-are-structs-earlybound-regions.stderr +++ b/src/test/ui/lifetime-errors/ex3-both-anon-regions-both-are-structs-earlybound-regions.stderr @@ -1,10 +1,10 @@ error[E0623]: lifetime mismatch --> $DIR/ex3-both-anon-regions-both-are-structs-earlybound-regions.rs:18:12 | -14 | fn foo<'a, 'b>(mut x: Vec>, y: Ref<'b>) +LL | fn foo<'a, 'b>(mut x: Vec>, y: Ref<'b>) | ------- ------- these two types are declared with different lifetimes... ... -18 | x.push(y); //~ ERROR lifetime mismatch +LL | x.push(y); //~ ERROR lifetime mismatch | ^ ...but data from `y` flows into `x` here error: aborting due to previous error diff --git a/src/test/ui/lifetime-errors/ex3-both-anon-regions-both-are-structs-latebound-regions.stderr b/src/test/ui/lifetime-errors/ex3-both-anon-regions-both-are-structs-latebound-regions.stderr index 36885b7e076e4..c442e314b0a03 100644 --- a/src/test/ui/lifetime-errors/ex3-both-anon-regions-both-are-structs-latebound-regions.stderr +++ b/src/test/ui/lifetime-errors/ex3-both-anon-regions-both-are-structs-latebound-regions.stderr @@ -1,9 +1,9 @@ error[E0623]: lifetime mismatch --> $DIR/ex3-both-anon-regions-both-are-structs-latebound-regions.rs:15:12 | -14 | fn foo<'a, 'b>(mut x: Vec>, y: Ref<'b>) { +LL | fn foo<'a, 'b>(mut x: Vec>, y: Ref<'b>) { | ------- ------- these two types are declared with different lifetimes... -15 | x.push(y); //~ ERROR lifetime mismatch +LL | x.push(y); //~ ERROR lifetime mismatch | ^ ...but data from `y` flows into `x` here error: aborting due to previous error diff --git a/src/test/ui/lifetime-errors/ex3-both-anon-regions-both-are-structs.stderr b/src/test/ui/lifetime-errors/ex3-both-anon-regions-both-are-structs.stderr index 961b8e310fe16..263dccb50b631 100644 --- a/src/test/ui/lifetime-errors/ex3-both-anon-regions-both-are-structs.stderr +++ b/src/test/ui/lifetime-errors/ex3-both-anon-regions-both-are-structs.stderr @@ -1,9 +1,9 @@ error[E0623]: lifetime mismatch --> $DIR/ex3-both-anon-regions-both-are-structs.rs:15:12 | -14 | fn foo(mut x: Vec, y: Ref) { +LL | fn foo(mut x: Vec, y: Ref) { | --- --- these two types are declared with different lifetimes... -15 | x.push(y); //~ ERROR lifetime mismatch +LL | x.push(y); //~ ERROR lifetime mismatch | ^ ...but data from `y` flows into `x` here error: aborting due to previous error diff --git a/src/test/ui/lifetime-errors/ex3-both-anon-regions-latebound-regions.stderr b/src/test/ui/lifetime-errors/ex3-both-anon-regions-latebound-regions.stderr index b70d26a99d732..f36e11696f83e 100644 --- a/src/test/ui/lifetime-errors/ex3-both-anon-regions-latebound-regions.stderr +++ b/src/test/ui/lifetime-errors/ex3-both-anon-regions-latebound-regions.stderr @@ -1,9 +1,9 @@ error[E0623]: lifetime mismatch --> $DIR/ex3-both-anon-regions-latebound-regions.rs:12:12 | -11 | fn foo<'a,'b>(x: &mut Vec<&'a u8>, y: &'b u8) { +LL | fn foo<'a,'b>(x: &mut Vec<&'a u8>, y: &'b u8) { | ------ ------ these two types are declared with different lifetimes... -12 | x.push(y); //~ ERROR lifetime mismatch +LL | x.push(y); //~ ERROR lifetime mismatch | ^ ...but data from `y` flows into `x` here error: aborting due to previous error diff --git a/src/test/ui/lifetime-errors/ex3-both-anon-regions-one-is-struct-2.stderr b/src/test/ui/lifetime-errors/ex3-both-anon-regions-one-is-struct-2.stderr index 7a50371306369..4e8e8ac23ca44 100644 --- a/src/test/ui/lifetime-errors/ex3-both-anon-regions-one-is-struct-2.stderr +++ b/src/test/ui/lifetime-errors/ex3-both-anon-regions-one-is-struct-2.stderr @@ -1,11 +1,11 @@ error[E0623]: lifetime mismatch --> $DIR/ex3-both-anon-regions-one-is-struct-2.rs:14:9 | -13 | fn foo(mut x: Ref, y: &u32) { +LL | fn foo(mut x: Ref, y: &u32) { | --- ---- | | | these two types are declared with different lifetimes... -14 | y = x.b; //~ ERROR lifetime mismatch +LL | y = x.b; //~ ERROR lifetime mismatch | ^^^ ...but data from `x` flows into `y` here error: aborting due to previous error diff --git a/src/test/ui/lifetime-errors/ex3-both-anon-regions-one-is-struct-3.stderr b/src/test/ui/lifetime-errors/ex3-both-anon-regions-one-is-struct-3.stderr index 66155bec0bb9a..b79aabef40503 100644 --- a/src/test/ui/lifetime-errors/ex3-both-anon-regions-one-is-struct-3.stderr +++ b/src/test/ui/lifetime-errors/ex3-both-anon-regions-one-is-struct-3.stderr @@ -1,9 +1,9 @@ error[E0623]: lifetime mismatch --> $DIR/ex3-both-anon-regions-one-is-struct-3.rs:14:11 | -13 | fn foo(mut y: Ref, x: &u32) { +LL | fn foo(mut y: Ref, x: &u32) { | --- ---- these two types are declared with different lifetimes... -14 | y.b = x; //~ ERROR lifetime mismatch +LL | y.b = x; //~ ERROR lifetime mismatch | ^ ...but data from `x` flows into `y` here error: aborting due to previous error diff --git a/src/test/ui/lifetime-errors/ex3-both-anon-regions-one-is-struct-4.stderr b/src/test/ui/lifetime-errors/ex3-both-anon-regions-one-is-struct-4.stderr index d47cffbc6222f..6269611251bab 100644 --- a/src/test/ui/lifetime-errors/ex3-both-anon-regions-one-is-struct-4.stderr +++ b/src/test/ui/lifetime-errors/ex3-both-anon-regions-one-is-struct-4.stderr @@ -1,9 +1,9 @@ error[E0623]: lifetime mismatch --> $DIR/ex3-both-anon-regions-one-is-struct-4.rs:14:11 | -13 | fn foo(mut y: Ref, x: &u32) { +LL | fn foo(mut y: Ref, x: &u32) { | --- ---- these two types are declared with different lifetimes... -14 | y.b = x; //~ ERROR lifetime mismatch +LL | y.b = x; //~ ERROR lifetime mismatch | ^ ...but data from `x` flows into `y` here error: aborting due to previous error diff --git a/src/test/ui/lifetime-errors/ex3-both-anon-regions-one-is-struct.stderr b/src/test/ui/lifetime-errors/ex3-both-anon-regions-one-is-struct.stderr index 43c85e43e7738..f36a469f9bcd2 100644 --- a/src/test/ui/lifetime-errors/ex3-both-anon-regions-one-is-struct.stderr +++ b/src/test/ui/lifetime-errors/ex3-both-anon-regions-one-is-struct.stderr @@ -1,9 +1,9 @@ error[E0623]: lifetime mismatch --> $DIR/ex3-both-anon-regions-one-is-struct.rs:17:11 | -16 | fn foo(mut x: Ref, y: &u32) { +LL | fn foo(mut x: Ref, y: &u32) { | --- ---- these two types are declared with different lifetimes... -17 | x.b = y; //~ ERROR lifetime mismatch +LL | x.b = y; //~ ERROR lifetime mismatch | ^ ...but data from `y` flows into `x` here error: aborting due to previous error diff --git a/src/test/ui/lifetime-errors/ex3-both-anon-regions-return-type-is-anon.stderr b/src/test/ui/lifetime-errors/ex3-both-anon-regions-return-type-is-anon.stderr index 73927f0c1d31f..c8de0b5cac7cb 100644 --- a/src/test/ui/lifetime-errors/ex3-both-anon-regions-return-type-is-anon.stderr +++ b/src/test/ui/lifetime-errors/ex3-both-anon-regions-return-type-is-anon.stderr @@ -1,11 +1,11 @@ error[E0623]: lifetime mismatch --> $DIR/ex3-both-anon-regions-return-type-is-anon.rs:17:5 | -16 | fn foo<'a>(&self, x: &i32) -> &i32 { +LL | fn foo<'a>(&self, x: &i32) -> &i32 { | ---- ---- | | | this parameter and the return type are declared with different lifetimes... -17 | x //~ ERROR lifetime mismatch +LL | x //~ ERROR lifetime mismatch | ^ ...but data from `x` is returned here error: aborting due to previous error diff --git a/src/test/ui/lifetime-errors/ex3-both-anon-regions-self-is-anon.stderr b/src/test/ui/lifetime-errors/ex3-both-anon-regions-self-is-anon.stderr index edb7ce2d6e9f7..0d9e2f1b35019 100644 --- a/src/test/ui/lifetime-errors/ex3-both-anon-regions-self-is-anon.stderr +++ b/src/test/ui/lifetime-errors/ex3-both-anon-regions-self-is-anon.stderr @@ -1,11 +1,11 @@ error[E0623]: lifetime mismatch --> $DIR/ex3-both-anon-regions-self-is-anon.rs:17:19 | -16 | fn foo<'a>(&self, x: &Foo) -> &Foo { +LL | fn foo<'a>(&self, x: &Foo) -> &Foo { | ---- ---- | | | this parameter and the return type are declared with different lifetimes... -17 | if true { x } else { self } //~ ERROR lifetime mismatch +LL | if true { x } else { self } //~ ERROR lifetime mismatch | ^ ...but data from `x` is returned here error: aborting due to previous error diff --git a/src/test/ui/lifetime-errors/ex3-both-anon-regions-using-fn-items.stderr b/src/test/ui/lifetime-errors/ex3-both-anon-regions-using-fn-items.stderr index 065b669e6929b..7ecf013c7b325 100644 --- a/src/test/ui/lifetime-errors/ex3-both-anon-regions-using-fn-items.stderr +++ b/src/test/ui/lifetime-errors/ex3-both-anon-regions-using-fn-items.stderr @@ -1,9 +1,9 @@ error[E0623]: lifetime mismatch --> $DIR/ex3-both-anon-regions-using-fn-items.rs:11:10 | -10 | fn foo(x:fn(&u8, &u8), y: Vec<&u8>, z: &u8) { +LL | fn foo(x:fn(&u8, &u8), y: Vec<&u8>, z: &u8) { | --- --- these two types are declared with different lifetimes... -11 | y.push(z); //~ ERROR lifetime mismatch +LL | y.push(z); //~ ERROR lifetime mismatch | ^ ...but data from `z` flows into `y` here error: aborting due to previous error diff --git a/src/test/ui/lifetime-errors/ex3-both-anon-regions-using-impl-items.stderr b/src/test/ui/lifetime-errors/ex3-both-anon-regions-using-impl-items.stderr index 20badfccd8e14..e332384f239fd 100644 --- a/src/test/ui/lifetime-errors/ex3-both-anon-regions-using-impl-items.stderr +++ b/src/test/ui/lifetime-errors/ex3-both-anon-regions-using-impl-items.stderr @@ -1,9 +1,9 @@ error[E0623]: lifetime mismatch --> $DIR/ex3-both-anon-regions-using-impl-items.rs:15:16 | -14 | fn foo(x: &mut Vec<&u8>, y: &u8) { +LL | fn foo(x: &mut Vec<&u8>, y: &u8) { | --- --- these two types are declared with different lifetimes... -15 | x.push(y); //~ ERROR lifetime mismatch +LL | x.push(y); //~ ERROR lifetime mismatch | ^ ...but data from `y` flows into `x` here error: aborting due to previous error diff --git a/src/test/ui/lifetime-errors/ex3-both-anon-regions-using-trait-objects.stderr b/src/test/ui/lifetime-errors/ex3-both-anon-regions-using-trait-objects.stderr index b8a4d9ed24ec9..9629c8d571742 100644 --- a/src/test/ui/lifetime-errors/ex3-both-anon-regions-using-trait-objects.stderr +++ b/src/test/ui/lifetime-errors/ex3-both-anon-regions-using-trait-objects.stderr @@ -1,9 +1,9 @@ error[E0623]: lifetime mismatch --> $DIR/ex3-both-anon-regions-using-trait-objects.rs:11:10 | -10 | fn foo(x:Box , y: Vec<&u8>, z: &u8) { +LL | fn foo(x:Box , y: Vec<&u8>, z: &u8) { | --- --- these two types are declared with different lifetimes... -11 | y.push(z); //~ ERROR lifetime mismatch +LL | y.push(z); //~ ERROR lifetime mismatch | ^ ...but data from `z` flows into `y` here error: aborting due to previous error diff --git a/src/test/ui/lifetime-errors/ex3-both-anon-regions.stderr b/src/test/ui/lifetime-errors/ex3-both-anon-regions.stderr index 2a30172c43a18..258bd8f08db44 100644 --- a/src/test/ui/lifetime-errors/ex3-both-anon-regions.stderr +++ b/src/test/ui/lifetime-errors/ex3-both-anon-regions.stderr @@ -1,9 +1,9 @@ error[E0623]: lifetime mismatch --> $DIR/ex3-both-anon-regions.rs:12:12 | -11 | fn foo(x: &mut Vec<&u8>, y: &u8) { +LL | fn foo(x: &mut Vec<&u8>, y: &u8) { | --- --- these two types are declared with different lifetimes... -12 | x.push(y); //~ ERROR lifetime mismatch +LL | x.push(y); //~ ERROR lifetime mismatch | ^ ...but data from `y` flows into `x` here error: aborting due to previous error diff --git a/src/test/ui/lifetime-errors/liveness-assign-imm-local-notes.stderr b/src/test/ui/lifetime-errors/liveness-assign-imm-local-notes.stderr index b8f738e445e06..fe9798ead19af 100644 --- a/src/test/ui/lifetime-errors/liveness-assign-imm-local-notes.stderr +++ b/src/test/ui/lifetime-errors/liveness-assign-imm-local-notes.stderr @@ -1,63 +1,63 @@ error[E0384]: cannot assign twice to immutable variable `x` (Ast) --> $DIR/liveness-assign-imm-local-notes.rs:23:9 | -22 | x = 2; +LL | x = 2; | ----- first assignment to `x` -23 | x = 3; //~ ERROR (Ast) [E0384] +LL | x = 3; //~ ERROR (Ast) [E0384] | ^^^^^ cannot assign twice to immutable variable error[E0384]: cannot assign twice to immutable variable `x` (Ast) --> $DIR/liveness-assign-imm-local-notes.rs:35:13 | -34 | x = 2; +LL | x = 2; | ----- first assignment to `x` -35 | x = 3; //~ ERROR (Ast) [E0384] +LL | x = 3; //~ ERROR (Ast) [E0384] | ^^^^^ cannot assign twice to immutable variable error[E0384]: cannot assign twice to immutable variable `x` (Ast) --> $DIR/liveness-assign-imm-local-notes.rs:45:13 | -45 | x = 1; //~ ERROR (Ast) [E0384] +LL | x = 1; //~ ERROR (Ast) [E0384] | ^^^^^ cannot assign twice to immutable variable error[E0384]: cannot assign twice to immutable variable `x` (Ast) --> $DIR/liveness-assign-imm-local-notes.rs:48:13 | -45 | x = 1; //~ ERROR (Ast) [E0384] +LL | x = 1; //~ ERROR (Ast) [E0384] | ----- first assignment to `x` ... -48 | x = 2; //~ ERROR (Ast) [E0384] +LL | x = 2; //~ ERROR (Ast) [E0384] | ^^^^^ cannot assign twice to immutable variable error[E0384]: cannot assign twice to immutable variable `x` (Mir) --> $DIR/liveness-assign-imm-local-notes.rs:23:9 | -22 | x = 2; +LL | x = 2; | ----- first assignment to `x` -23 | x = 3; //~ ERROR (Ast) [E0384] +LL | x = 3; //~ ERROR (Ast) [E0384] | ^^^^^ cannot assign twice to immutable variable error[E0384]: cannot assign twice to immutable variable `x` (Mir) --> $DIR/liveness-assign-imm-local-notes.rs:35:13 | -34 | x = 2; +LL | x = 2; | ----- first assignment to `x` -35 | x = 3; //~ ERROR (Ast) [E0384] +LL | x = 3; //~ ERROR (Ast) [E0384] | ^^^^^ cannot assign twice to immutable variable error[E0384]: cannot assign twice to immutable variable `x` (Mir) --> $DIR/liveness-assign-imm-local-notes.rs:45:13 | -45 | x = 1; //~ ERROR (Ast) [E0384] +LL | x = 1; //~ ERROR (Ast) [E0384] | ^^^^^ cannot assign twice to immutable variable error[E0384]: cannot assign twice to immutable variable `x` (Mir) --> $DIR/liveness-assign-imm-local-notes.rs:48:13 | -45 | x = 1; //~ ERROR (Ast) [E0384] +LL | x = 1; //~ ERROR (Ast) [E0384] | ----- first assignment to `x` ... -48 | x = 2; //~ ERROR (Ast) [E0384] +LL | x = 2; //~ ERROR (Ast) [E0384] | ^^^^^ cannot assign twice to immutable variable error: aborting due to 8 previous errors diff --git a/src/test/ui/lifetimes/borrowck-let-suggestion.stderr b/src/test/ui/lifetimes/borrowck-let-suggestion.stderr index 66be3f964ec5e..1535a00f3719b 100644 --- a/src/test/ui/lifetimes/borrowck-let-suggestion.stderr +++ b/src/test/ui/lifetimes/borrowck-let-suggestion.stderr @@ -1,11 +1,11 @@ error[E0597]: borrowed value does not live long enough --> $DIR/borrowck-let-suggestion.rs:12:13 | -12 | let x = vec![1].iter(); +LL | let x = vec![1].iter(); | ^^^^^^^ - temporary value dropped here while still borrowed | | | temporary value does not live long enough -13 | } +LL | } | - temporary value needs to live until here | = note: consider using a `let` binding to increase its lifetime diff --git a/src/test/ui/lifetimes/lifetime-doesnt-live-long-enough.stderr b/src/test/ui/lifetimes/lifetime-doesnt-live-long-enough.stderr index 05908606da77b..aa59aad4fbf37 100644 --- a/src/test/ui/lifetimes/lifetime-doesnt-live-long-enough.stderr +++ b/src/test/ui/lifetimes/lifetime-doesnt-live-long-enough.stderr @@ -1,112 +1,112 @@ error[E0309]: the parameter type `T` may not live long enough --> $DIR/lifetime-doesnt-live-long-enough.rs:18:5 | -17 | struct List<'a, T: ListItem<'a>> { +LL | struct List<'a, T: ListItem<'a>> { | -- help: consider adding an explicit lifetime bound `T: 'a`... -18 | slice: &'a [T] +LL | slice: &'a [T] | ^^^^^^^^^^^^^^ | note: ...so that the reference type `&'a [T]` does not outlive the data it points at --> $DIR/lifetime-doesnt-live-long-enough.rs:18:5 | -18 | slice: &'a [T] +LL | slice: &'a [T] | ^^^^^^^^^^^^^^ error[E0310]: the parameter type `T` may not live long enough --> $DIR/lifetime-doesnt-live-long-enough.rs:29:5 | -28 | struct Foo { +LL | struct Foo { | - help: consider adding an explicit lifetime bound `T: 'static`... -29 | foo: &'static T +LL | foo: &'static T | ^^^^^^^^^^^^^^^ | note: ...so that the reference type `&'static T` does not outlive the data it points at --> $DIR/lifetime-doesnt-live-long-enough.rs:29:5 | -29 | foo: &'static T +LL | foo: &'static T | ^^^^^^^^^^^^^^^ error[E0309]: the parameter type `K` may not live long enough --> $DIR/lifetime-doesnt-live-long-enough.rs:34:5 | -33 | trait X: Sized { +LL | trait X: Sized { | - help: consider adding an explicit lifetime bound `K: 'a`... -34 | fn foo<'a, L: X<&'a Nested>>(); +LL | fn foo<'a, L: X<&'a Nested>>(); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | note: ...so that the reference type `&'a Nested` does not outlive the data it points at --> $DIR/lifetime-doesnt-live-long-enough.rs:34:5 | -34 | fn foo<'a, L: X<&'a Nested>>(); +LL | fn foo<'a, L: X<&'a Nested>>(); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error[E0309]: the parameter type `Self` may not live long enough --> $DIR/lifetime-doesnt-live-long-enough.rs:38:5 | -38 | fn bar<'a, L: X<&'a Nested>>(); +LL | fn bar<'a, L: X<&'a Nested>>(); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: consider adding an explicit lifetime bound `Self: 'a`... note: ...so that the reference type `&'a Nested` does not outlive the data it points at --> $DIR/lifetime-doesnt-live-long-enough.rs:38:5 | -38 | fn bar<'a, L: X<&'a Nested>>(); +LL | fn bar<'a, L: X<&'a Nested>>(); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error[E0309]: the parameter type `L` may not live long enough --> $DIR/lifetime-doesnt-live-long-enough.rs:42:5 | -42 | fn baz<'a, L, M: X<&'a Nested>>() { +LL | fn baz<'a, L, M: X<&'a Nested>>() { | ^ - help: consider adding an explicit lifetime bound `L: 'a`... | _____| | | -43 | | //~^ ERROR may not live long enough -44 | | } +LL | | //~^ ERROR may not live long enough +LL | | } | |_____^ | note: ...so that the reference type `&'a Nested` does not outlive the data it points at --> $DIR/lifetime-doesnt-live-long-enough.rs:42:5 | -42 | / fn baz<'a, L, M: X<&'a Nested>>() { -43 | | //~^ ERROR may not live long enough -44 | | } +LL | / fn baz<'a, L, M: X<&'a Nested>>() { +LL | | //~^ ERROR may not live long enough +LL | | } | |_____^ error[E0309]: the parameter type `K` may not live long enough --> $DIR/lifetime-doesnt-live-long-enough.rs:51:5 | -50 | impl Nested { +LL | impl Nested { | - help: consider adding an explicit lifetime bound `K: 'a`... -51 | / fn generic_in_parent<'a, L: X<&'a Nested>>() { -52 | | //~^ ERROR may not live long enough -53 | | } +LL | / fn generic_in_parent<'a, L: X<&'a Nested>>() { +LL | | //~^ ERROR may not live long enough +LL | | } | |_____^ | note: ...so that the reference type `&'a Nested` does not outlive the data it points at --> $DIR/lifetime-doesnt-live-long-enough.rs:51:5 | -51 | / fn generic_in_parent<'a, L: X<&'a Nested>>() { -52 | | //~^ ERROR may not live long enough -53 | | } +LL | / fn generic_in_parent<'a, L: X<&'a Nested>>() { +LL | | //~^ ERROR may not live long enough +LL | | } | |_____^ error[E0309]: the parameter type `M` may not live long enough --> $DIR/lifetime-doesnt-live-long-enough.rs:54:5 | -54 | fn generic_in_child<'a, 'b, L: X<&'a Nested>, M: 'b>() { +LL | fn generic_in_child<'a, 'b, L: X<&'a Nested>, M: 'b>() { | ^ -- help: consider adding an explicit lifetime bound `M: 'a`... | _____| | | -55 | | //~^ ERROR may not live long enough -56 | | } +LL | | //~^ ERROR may not live long enough +LL | | } | |_____^ | note: ...so that the reference type `&'a Nested` does not outlive the data it points at --> $DIR/lifetime-doesnt-live-long-enough.rs:54:5 | -54 | / fn generic_in_child<'a, 'b, L: X<&'a Nested>, M: 'b>() { -55 | | //~^ ERROR may not live long enough -56 | | } +LL | / fn generic_in_child<'a, 'b, L: X<&'a Nested>, M: 'b>() { +LL | | //~^ ERROR may not live long enough +LL | | } | |_____^ error: aborting due to 7 previous errors diff --git a/src/test/ui/lint-ctypes.stderr b/src/test/ui/lint-ctypes.stderr index 748c311055fa9..76b500e7d23bf 100644 --- a/src/test/ui/lint-ctypes.stderr +++ b/src/test/ui/lint-ctypes.stderr @@ -1,38 +1,38 @@ error: `extern` block uses type `Foo` which is not FFI-safe: this struct has unspecified layout --> $DIR/lint-ctypes.rs:54:28 | -54 | pub fn ptr_type1(size: *const Foo); //~ ERROR: uses type `Foo` +LL | pub fn ptr_type1(size: *const Foo); //~ ERROR: uses type `Foo` | ^^^^^^^^^^ | note: lint level defined here --> $DIR/lint-ctypes.rs:11:9 | -11 | #![deny(improper_ctypes)] +LL | #![deny(improper_ctypes)] | ^^^^^^^^^^^^^^^ = help: consider adding a #[repr(C)] or #[repr(transparent)] attribute to this struct note: type defined here --> $DIR/lint-ctypes.rs:32:1 | -32 | pub struct Foo; +LL | pub struct Foo; | ^^^^^^^^^^^^^^^ error: `extern` block uses type `Foo` which is not FFI-safe: this struct has unspecified layout --> $DIR/lint-ctypes.rs:55:28 | -55 | pub fn ptr_type2(size: *const Foo); //~ ERROR: uses type `Foo` +LL | pub fn ptr_type2(size: *const Foo); //~ ERROR: uses type `Foo` | ^^^^^^^^^^ | = help: consider adding a #[repr(C)] or #[repr(transparent)] attribute to this struct note: type defined here --> $DIR/lint-ctypes.rs:32:1 | -32 | pub struct Foo; +LL | pub struct Foo; | ^^^^^^^^^^^^^^^ error: `extern` block uses type `[u32]` which is not FFI-safe: slices have no C equivalent --> $DIR/lint-ctypes.rs:56:26 | -56 | pub fn slice_type(p: &[u32]); //~ ERROR: uses type `[u32]` +LL | pub fn slice_type(p: &[u32]); //~ ERROR: uses type `[u32]` | ^^^^^^ | = help: consider using a raw pointer instead @@ -40,7 +40,7 @@ error: `extern` block uses type `[u32]` which is not FFI-safe: slices have no C error: `extern` block uses type `str` which is not FFI-safe: string slices have no C equivalent --> $DIR/lint-ctypes.rs:57:24 | -57 | pub fn str_type(p: &str); //~ ERROR: uses type `str` +LL | pub fn str_type(p: &str); //~ ERROR: uses type `str` | ^^^^ | = help: consider using `*const u8` and a length instead @@ -48,7 +48,7 @@ error: `extern` block uses type `str` which is not FFI-safe: string slices have error: `extern` block uses type `std::boxed::Box` which is not FFI-safe: this struct has unspecified layout --> $DIR/lint-ctypes.rs:58:24 | -58 | pub fn box_type(p: Box); //~ ERROR uses type `std::boxed::Box` +LL | pub fn box_type(p: Box); //~ ERROR uses type `std::boxed::Box` | ^^^^^^^^ | = help: consider adding a #[repr(C)] or #[repr(transparent)] attribute to this struct @@ -56,7 +56,7 @@ error: `extern` block uses type `std::boxed::Box` which is not FFI-safe: th error: `extern` block uses type `char` which is not FFI-safe: the `char` type has no C equivalent --> $DIR/lint-ctypes.rs:59:25 | -59 | pub fn char_type(p: char); //~ ERROR uses type `char` +LL | pub fn char_type(p: char); //~ ERROR uses type `char` | ^^^^ | = help: consider using `u32` or `libc::wchar_t` instead @@ -64,25 +64,25 @@ error: `extern` block uses type `char` which is not FFI-safe: the `char` type ha error: `extern` block uses type `i128` which is not FFI-safe: 128-bit integers don't currently have a known stable ABI --> $DIR/lint-ctypes.rs:60:25 | -60 | pub fn i128_type(p: i128); //~ ERROR uses type `i128` +LL | pub fn i128_type(p: i128); //~ ERROR uses type `i128` | ^^^^ error: `extern` block uses type `u128` which is not FFI-safe: 128-bit integers don't currently have a known stable ABI --> $DIR/lint-ctypes.rs:61:25 | -61 | pub fn u128_type(p: u128); //~ ERROR uses type `u128` +LL | pub fn u128_type(p: u128); //~ ERROR uses type `u128` | ^^^^ error: `extern` block uses type `std::clone::Clone` which is not FFI-safe: trait objects have no C equivalent --> $DIR/lint-ctypes.rs:62:26 | -62 | pub fn trait_type(p: &Clone); //~ ERROR uses type `std::clone::Clone` +LL | pub fn trait_type(p: &Clone); //~ ERROR uses type `std::clone::Clone` | ^^^^^^ error: `extern` block uses type `(i32, i32)` which is not FFI-safe: tuples have unspecified layout --> $DIR/lint-ctypes.rs:63:26 | -63 | pub fn tuple_type(p: (i32, i32)); //~ ERROR uses type `(i32, i32)` +LL | pub fn tuple_type(p: (i32, i32)); //~ ERROR uses type `(i32, i32)` | ^^^^^^^^^^ | = help: consider using a struct instead @@ -90,7 +90,7 @@ error: `extern` block uses type `(i32, i32)` which is not FFI-safe: tuples have error: `extern` block uses type `(i32, i32)` which is not FFI-safe: tuples have unspecified layout --> $DIR/lint-ctypes.rs:64:27 | -64 | pub fn tuple_type2(p: I32Pair); //~ ERROR uses type `(i32, i32)` +LL | pub fn tuple_type2(p: I32Pair); //~ ERROR uses type `(i32, i32)` | ^^^^^^^ | = help: consider using a struct instead @@ -98,32 +98,32 @@ error: `extern` block uses type `(i32, i32)` which is not FFI-safe: tuples have error: `extern` block uses type `ZeroSize` which is not FFI-safe: this struct has no fields --> $DIR/lint-ctypes.rs:65:25 | -65 | pub fn zero_size(p: ZeroSize); //~ ERROR struct has no fields +LL | pub fn zero_size(p: ZeroSize); //~ ERROR struct has no fields | ^^^^^^^^ | = help: consider adding a member to this struct note: type defined here --> $DIR/lint-ctypes.rs:28:1 | -28 | pub struct ZeroSize; +LL | pub struct ZeroSize; | ^^^^^^^^^^^^^^^^^^^^ error: `extern` block uses type `ZeroSizeWithPhantomData` which is not FFI-safe: composed only of PhantomData --> $DIR/lint-ctypes.rs:66:33 | -66 | pub fn zero_size_phantom(p: ZeroSizeWithPhantomData); //~ ERROR composed only of PhantomData +LL | pub fn zero_size_phantom(p: ZeroSizeWithPhantomData); //~ ERROR composed only of PhantomData | ^^^^^^^^^^^^^^^^^^^^^^^ error: `extern` block uses type `std::marker::PhantomData` which is not FFI-safe: composed only of PhantomData --> $DIR/lint-ctypes.rs:68:12 | -68 | -> ::std::marker::PhantomData; //~ ERROR: composed only of PhantomData +LL | -> ::std::marker::PhantomData; //~ ERROR: composed only of PhantomData | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: `extern` block uses type `fn()` which is not FFI-safe: this function pointer has Rust-specific calling convention --> $DIR/lint-ctypes.rs:69:23 | -69 | pub fn fn_type(p: RustFn); //~ ERROR function pointer has Rust-specific +LL | pub fn fn_type(p: RustFn); //~ ERROR function pointer has Rust-specific | ^^^^^^ | = help: consider using an `fn "extern"(...) -> ...` function pointer instead @@ -131,7 +131,7 @@ error: `extern` block uses type `fn()` which is not FFI-safe: this function poin error: `extern` block uses type `fn()` which is not FFI-safe: this function pointer has Rust-specific calling convention --> $DIR/lint-ctypes.rs:70:24 | -70 | pub fn fn_type2(p: fn()); //~ ERROR function pointer has Rust-specific +LL | pub fn fn_type2(p: fn()); //~ ERROR function pointer has Rust-specific | ^^^^ | = help: consider using an `fn "extern"(...) -> ...` function pointer instead @@ -139,7 +139,7 @@ error: `extern` block uses type `fn()` which is not FFI-safe: this function poin error: `extern` block uses type `std::boxed::Box` which is not FFI-safe: this struct has unspecified layout --> $DIR/lint-ctypes.rs:71:28 | -71 | pub fn fn_contained(p: RustBadRet); //~ ERROR: uses type `std::boxed::Box` +LL | pub fn fn_contained(p: RustBadRet); //~ ERROR: uses type `std::boxed::Box` | ^^^^^^^^^^ | = help: consider adding a #[repr(C)] or #[repr(transparent)] attribute to this struct @@ -147,13 +147,13 @@ error: `extern` block uses type `std::boxed::Box` which is not FFI-safe: th error: `extern` block uses type `i128` which is not FFI-safe: 128-bit integers don't currently have a known stable ABI --> $DIR/lint-ctypes.rs:72:32 | -72 | pub fn transparent_i128(p: TransparentI128); //~ ERROR: uses type `i128` +LL | pub fn transparent_i128(p: TransparentI128); //~ ERROR: uses type `i128` | ^^^^^^^^^^^^^^^ error: `extern` block uses type `str` which is not FFI-safe: string slices have no C equivalent --> $DIR/lint-ctypes.rs:73:31 | -73 | pub fn transparent_str(p: TransparentStr); //~ ERROR: uses type `str` +LL | pub fn transparent_str(p: TransparentStr); //~ ERROR: uses type `str` | ^^^^^^^^^^^^^^ | = help: consider using `*const u8` and a length instead @@ -161,7 +161,7 @@ error: `extern` block uses type `str` which is not FFI-safe: string slices have error: `extern` block uses type `std::boxed::Box` which is not FFI-safe: this struct has unspecified layout --> $DIR/lint-ctypes.rs:74:30 | -74 | pub fn transparent_fn(p: TransparentBadFn); //~ ERROR: uses type `std::boxed::Box` +LL | pub fn transparent_fn(p: TransparentBadFn); //~ ERROR: uses type `std::boxed::Box` | ^^^^^^^^^^^^^^^^ | = help: consider adding a #[repr(C)] or #[repr(transparent)] attribute to this struct diff --git a/src/test/ui/lint-forbid-attr.stderr b/src/test/ui/lint-forbid-attr.stderr index dcef7fb9ac038..6a985d50f3802 100644 --- a/src/test/ui/lint-forbid-attr.stderr +++ b/src/test/ui/lint-forbid-attr.stderr @@ -1,10 +1,10 @@ error[E0453]: allow(deprecated) overruled by outer forbid(deprecated) --> $DIR/lint-forbid-attr.rs:13:9 | -11 | #![forbid(deprecated)] +LL | #![forbid(deprecated)] | ---------- `forbid` level set here -12 | -13 | #[allow(deprecated)] +LL | +LL | #[allow(deprecated)] | ^^^^^^^^^^ overruled by previous forbid error: aborting due to previous error diff --git a/src/test/ui/lint-output-format-2.stderr b/src/test/ui/lint-output-format-2.stderr index 75e7e1f42ffe6..b2d1e1ac05822 100644 --- a/src/test/ui/lint-output-format-2.stderr +++ b/src/test/ui/lint-output-format-2.stderr @@ -1,7 +1,7 @@ warning: use of deprecated item 'lint_output_format::foo': text --> $DIR/lint-output-format-2.rs:20:26 | -20 | use lint_output_format::{foo, bar}; +LL | use lint_output_format::{foo, bar}; | ^^^ | = note: #[warn(deprecated)] on by default @@ -9,16 +9,16 @@ warning: use of deprecated item 'lint_output_format::foo': text warning: use of deprecated item 'lint_output_format::foo': text --> $DIR/lint-output-format-2.rs:25:14 | -25 | let _x = foo(); +LL | let _x = foo(); | ^^^ error: compilation successful --> $DIR/lint-output-format-2.rs:24:1 | -24 | / fn main() { //~ ERROR: compilation successful -25 | | let _x = foo(); -26 | | //~^ WARNING use of deprecated item 'lint_output_format::foo': text -27 | | let _y = bar(); -28 | | } +LL | / fn main() { //~ ERROR: compilation successful +LL | | let _x = foo(); +LL | | //~^ WARNING use of deprecated item 'lint_output_format::foo': text +LL | | let _y = bar(); +LL | | } | |_^ diff --git a/src/test/ui/lint-unconditional-recursion.stderr b/src/test/ui/lint-unconditional-recursion.stderr index f6f97654b57fd..933c191551dac 100644 --- a/src/test/ui/lint-unconditional-recursion.stderr +++ b/src/test/ui/lint-unconditional-recursion.stderr @@ -1,28 +1,28 @@ error: function cannot return without recurring --> $DIR/lint-unconditional-recursion.rs:14:1 | -14 | fn foo() { //~ ERROR function cannot return without recurring +LL | fn foo() { //~ ERROR function cannot return without recurring | ^^^^^^^^ cannot return without recurring -15 | foo(); +LL | foo(); | ----- recursive call site | note: lint level defined here --> $DIR/lint-unconditional-recursion.rs:11:9 | -11 | #![deny(unconditional_recursion)] +LL | #![deny(unconditional_recursion)] | ^^^^^^^^^^^^^^^^^^^^^^^ = help: a `loop` may express intention better if this is on purpose error: function cannot return without recurring --> $DIR/lint-unconditional-recursion.rs:24:1 | -24 | fn baz() { //~ ERROR function cannot return without recurring +LL | fn baz() { //~ ERROR function cannot return without recurring | ^^^^^^^^ cannot return without recurring -25 | if true { -26 | baz() +LL | if true { +LL | baz() | ----- recursive call site -27 | } else { -28 | baz() +LL | } else { +LL | baz() | ----- recursive call site | = help: a `loop` may express intention better if this is on purpose @@ -30,13 +30,13 @@ error: function cannot return without recurring error: function cannot return without recurring --> $DIR/lint-unconditional-recursion.rs:36:1 | -36 | fn quz() -> bool { //~ ERROR function cannot return without recurring +LL | fn quz() -> bool { //~ ERROR function cannot return without recurring | ^^^^^^^^^^^^^^^^ cannot return without recurring -37 | if true { -38 | while quz() {} +LL | if true { +LL | while quz() {} | ----- recursive call site ... -41 | loop { quz(); } +LL | loop { quz(); } | ----- recursive call site | = help: a `loop` may express intention better if this is on purpose @@ -44,9 +44,9 @@ error: function cannot return without recurring error: function cannot return without recurring --> $DIR/lint-unconditional-recursion.rs:47:5 | -47 | fn bar(&self) { //~ ERROR function cannot return without recurring +LL | fn bar(&self) { //~ ERROR function cannot return without recurring | ^^^^^^^^^^^^^ cannot return without recurring -48 | self.bar() +LL | self.bar() | ---------- recursive call site | = help: a `loop` may express intention better if this is on purpose @@ -54,10 +54,10 @@ error: function cannot return without recurring error: function cannot return without recurring --> $DIR/lint-unconditional-recursion.rs:53:5 | -53 | fn bar(&self) { //~ ERROR function cannot return without recurring +LL | fn bar(&self) { //~ ERROR function cannot return without recurring | ^^^^^^^^^^^^^ cannot return without recurring -54 | loop { -55 | self.bar() +LL | loop { +LL | self.bar() | ---------- recursive call site | = help: a `loop` may express intention better if this is on purpose @@ -65,9 +65,9 @@ error: function cannot return without recurring error: function cannot return without recurring --> $DIR/lint-unconditional-recursion.rs:62:5 | -62 | fn bar(&self) { //~ ERROR function cannot return without recurring +LL | fn bar(&self) { //~ ERROR function cannot return without recurring | ^^^^^^^^^^^^^ cannot return without recurring -63 | 0.bar() +LL | 0.bar() | ------- recursive call site | = help: a `loop` may express intention better if this is on purpose @@ -75,9 +75,9 @@ error: function cannot return without recurring error: function cannot return without recurring --> $DIR/lint-unconditional-recursion.rs:75:5 | -75 | fn bar(&self) { //~ ERROR function cannot return without recurring +LL | fn bar(&self) { //~ ERROR function cannot return without recurring | ^^^^^^^^^^^^^ cannot return without recurring -76 | Foo2::bar(self) +LL | Foo2::bar(self) | --------------- recursive call site | = help: a `loop` may express intention better if this is on purpose @@ -85,10 +85,10 @@ error: function cannot return without recurring error: function cannot return without recurring --> $DIR/lint-unconditional-recursion.rs:81:5 | -81 | fn bar(&self) { //~ ERROR function cannot return without recurring +LL | fn bar(&self) { //~ ERROR function cannot return without recurring | ^^^^^^^^^^^^^ cannot return without recurring -82 | loop { -83 | Foo2::bar(self) +LL | loop { +LL | Foo2::bar(self) | --------------- recursive call site | = help: a `loop` may express intention better if this is on purpose @@ -96,9 +96,9 @@ error: function cannot return without recurring error: function cannot return without recurring --> $DIR/lint-unconditional-recursion.rs:91:5 | -91 | fn qux(&self) { //~ ERROR function cannot return without recurring +LL | fn qux(&self) { //~ ERROR function cannot return without recurring | ^^^^^^^^^^^^^ cannot return without recurring -92 | self.qux(); +LL | self.qux(); | ---------- recursive call site | = help: a `loop` may express intention better if this is on purpose @@ -106,52 +106,52 @@ error: function cannot return without recurring error: function cannot return without recurring --> $DIR/lint-unconditional-recursion.rs:96:5 | -96 | fn as_ref(&self) -> &Self { //~ ERROR function cannot return without recurring +LL | fn as_ref(&self) -> &Self { //~ ERROR function cannot return without recurring | ^^^^^^^^^^^^^^^^^^^^^^^^^ cannot return without recurring -97 | Baz::as_ref(self) +LL | Baz::as_ref(self) | ----------------- recursive call site | = help: a `loop` may express intention better if this is on purpose error: function cannot return without recurring - --> $DIR/lint-unconditional-recursion.rs:103:5 - | -103 | fn default() -> Baz { //~ ERROR function cannot return without recurring - | ^^^^^^^^^^^^^^^^^^^ cannot return without recurring -104 | let x = Default::default(); - | ------------------ recursive call site - | - = help: a `loop` may express intention better if this is on purpose + --> $DIR/lint-unconditional-recursion.rs:103:5 + | +LL | fn default() -> Baz { //~ ERROR function cannot return without recurring + | ^^^^^^^^^^^^^^^^^^^ cannot return without recurring +LL | let x = Default::default(); + | ------------------ recursive call site + | + = help: a `loop` may express intention better if this is on purpose error: function cannot return without recurring - --> $DIR/lint-unconditional-recursion.rs:112:5 - | -112 | fn deref(&self) -> &() { //~ ERROR function cannot return without recurring - | ^^^^^^^^^^^^^^^^^^^^^^ cannot return without recurring -113 | &**self - | ------ recursive call site - | - = help: a `loop` may express intention better if this is on purpose + --> $DIR/lint-unconditional-recursion.rs:112:5 + | +LL | fn deref(&self) -> &() { //~ ERROR function cannot return without recurring + | ^^^^^^^^^^^^^^^^^^^^^^ cannot return without recurring +LL | &**self + | ------ recursive call site + | + = help: a `loop` may express intention better if this is on purpose error: function cannot return without recurring - --> $DIR/lint-unconditional-recursion.rs:119:5 - | -119 | fn index(&self, x: usize) -> &Baz { //~ ERROR function cannot return without recurring - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ cannot return without recurring -120 | &self[x] - | ------- recursive call site - | - = help: a `loop` may express intention better if this is on purpose + --> $DIR/lint-unconditional-recursion.rs:119:5 + | +LL | fn index(&self, x: usize) -> &Baz { //~ ERROR function cannot return without recurring + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ cannot return without recurring +LL | &self[x] + | ------- recursive call site + | + = help: a `loop` may express intention better if this is on purpose error: function cannot return without recurring - --> $DIR/lint-unconditional-recursion.rs:128:5 - | -128 | fn deref(&self) -> &Baz { //~ ERROR function cannot return without recurring - | ^^^^^^^^^^^^^^^^^^^^^^^ cannot return without recurring -129 | self.as_ref() - | ---- recursive call site - | - = help: a `loop` may express intention better if this is on purpose + --> $DIR/lint-unconditional-recursion.rs:128:5 + | +LL | fn deref(&self) -> &Baz { //~ ERROR function cannot return without recurring + | ^^^^^^^^^^^^^^^^^^^^^^^ cannot return without recurring +LL | self.as_ref() + | ---- recursive call site + | + = help: a `loop` may express intention better if this is on purpose error: aborting due to 14 previous errors diff --git a/src/test/ui/lint/command-line-lint-group-deny.stderr b/src/test/ui/lint/command-line-lint-group-deny.stderr index a6182de0a7587..45a20434dd255 100644 --- a/src/test/ui/lint/command-line-lint-group-deny.stderr +++ b/src/test/ui/lint/command-line-lint-group-deny.stderr @@ -1,7 +1,7 @@ error: variable `_InappropriateCamelCasing` should have a snake case name such as `_inappropriate_camel_casing` --> $DIR/command-line-lint-group-deny.rs:14:9 | -14 | let _InappropriateCamelCasing = true; //~ ERROR should have a snake +LL | let _InappropriateCamelCasing = true; //~ ERROR should have a snake | ^^^^^^^^^^^^^^^^^^^^^^^^^ | = note: `-D non-snake-case` implied by `-D bad-style` diff --git a/src/test/ui/lint/command-line-lint-group-forbid.stderr b/src/test/ui/lint/command-line-lint-group-forbid.stderr index 7ae6734c8a397..1fe51c6278637 100644 --- a/src/test/ui/lint/command-line-lint-group-forbid.stderr +++ b/src/test/ui/lint/command-line-lint-group-forbid.stderr @@ -1,7 +1,7 @@ error: variable `_InappropriateCamelCasing` should have a snake case name such as `_inappropriate_camel_casing` --> $DIR/command-line-lint-group-forbid.rs:14:9 | -14 | let _InappropriateCamelCasing = true; //~ ERROR should have a snake +LL | let _InappropriateCamelCasing = true; //~ ERROR should have a snake | ^^^^^^^^^^^^^^^^^^^^^^^^^ | = note: `-F non-snake-case` implied by `-F bad-style` diff --git a/src/test/ui/lint/command-line-lint-group-warn.stderr b/src/test/ui/lint/command-line-lint-group-warn.stderr index 6562e16a45d8f..e46285096357f 100644 --- a/src/test/ui/lint/command-line-lint-group-warn.stderr +++ b/src/test/ui/lint/command-line-lint-group-warn.stderr @@ -1,7 +1,7 @@ warning: variable `_InappropriateCamelCasing` should have a snake case name such as `_inappropriate_camel_casing` --> $DIR/command-line-lint-group-warn.rs:15:9 | -15 | let _InappropriateCamelCasing = true; +LL | let _InappropriateCamelCasing = true; | ^^^^^^^^^^^^^^^^^^^^^^^^^ | = note: `-W non-snake-case` implied by `-W bad-style` diff --git a/src/test/ui/lint/issue-47390-unused-variable-in-struct-pattern.stderr b/src/test/ui/lint/issue-47390-unused-variable-in-struct-pattern.stderr index 694fe69e01648..35fe5479406df 100644 --- a/src/test/ui/lint/issue-47390-unused-variable-in-struct-pattern.stderr +++ b/src/test/ui/lint/issue-47390-unused-variable-in-struct-pattern.stderr @@ -1,26 +1,26 @@ warning: unused variable: `i_think_continually` --> $DIR/issue-47390-unused-variable-in-struct-pattern.rs:22:9 | -22 | let i_think_continually = 2; +LL | let i_think_continually = 2; | ^^^^^^^^^^^^^^^^^^^ help: consider using `_i_think_continually` instead | note: lint level defined here --> $DIR/issue-47390-unused-variable-in-struct-pattern.rs:13:9 | -13 | #![warn(unused)] // UI tests pass `-A unused` (#43896) +LL | #![warn(unused)] // UI tests pass `-A unused` (#43896) | ^^^^^^ = note: #[warn(unused_variables)] implied by #[warn(unused)] warning: unused variable: `corridors_of_light` --> $DIR/issue-47390-unused-variable-in-struct-pattern.rs:29:26 | -29 | if let SoulHistory { corridors_of_light, +LL | if let SoulHistory { corridors_of_light, | ^^^^^^^^^^^^^^^^^^ help: try ignoring the field: `corridors_of_light: _` warning: variable `hours_are_suns` is assigned to, but never used --> $DIR/issue-47390-unused-variable-in-struct-pattern.rs:30:26 | -30 | mut hours_are_suns, +LL | mut hours_are_suns, | ^^^^^^^^^^^^^^^^^^ | = note: consider using `_hours_are_suns` instead @@ -28,13 +28,13 @@ warning: variable `hours_are_suns` is assigned to, but never used warning: value assigned to `hours_are_suns` is never read --> $DIR/issue-47390-unused-variable-in-struct-pattern.rs:32:9 | -32 | hours_are_suns = false; +LL | hours_are_suns = false; | ^^^^^^^^^^^^^^ | note: lint level defined here --> $DIR/issue-47390-unused-variable-in-struct-pattern.rs:13:9 | -13 | #![warn(unused)] // UI tests pass `-A unused` (#43896) +LL | #![warn(unused)] // UI tests pass `-A unused` (#43896) | ^^^^^^ = note: #[warn(unused_assignments)] implied by #[warn(unused)] diff --git a/src/test/ui/lint/issue-47775-nested-macro-unnecessary-parens-arg.stderr b/src/test/ui/lint/issue-47775-nested-macro-unnecessary-parens-arg.stderr index 097ec1b1c8010..ac5df471c5558 100644 --- a/src/test/ui/lint/issue-47775-nested-macro-unnecessary-parens-arg.stderr +++ b/src/test/ui/lint/issue-47775-nested-macro-unnecessary-parens-arg.stderr @@ -1,15 +1,15 @@ warning: unnecessary parentheses around function argument --> $DIR/issue-47775-nested-macro-unnecessary-parens-arg.rs:32:83 | -32 | #[allow(dead_code)] fn the_night_for_the_morrow() -> Option { Some((2)) } +LL | #[allow(dead_code)] fn the_night_for_the_morrow() -> Option { Some((2)) } | ^^^ help: remove these parentheses ... -38 | and_the_heavens_reject_not!(); +LL | and_the_heavens_reject_not!(); | ------------------------------ in this macro invocation | note: lint level defined here --> $DIR/issue-47775-nested-macro-unnecessary-parens-arg.rs:13:9 | -13 | #![warn(unused_parens)] +LL | #![warn(unused_parens)] | ^^^^^^^^^^^^^ diff --git a/src/test/ui/lint/lint-group-style.stderr b/src/test/ui/lint/lint-group-style.stderr index 3dfe2cee991a0..c1b15160bc501 100644 --- a/src/test/ui/lint/lint-group-style.stderr +++ b/src/test/ui/lint/lint-group-style.stderr @@ -1,65 +1,65 @@ error: function `CamelCase` should have a snake case name such as `camel_case` --> $DIR/lint-group-style.rs:14:1 | -14 | fn CamelCase() {} //~ ERROR should have a snake +LL | fn CamelCase() {} //~ ERROR should have a snake | ^^^^^^^^^^^^^^^^^ | note: lint level defined here --> $DIR/lint-group-style.rs:11:9 | -11 | #![deny(bad_style)] +LL | #![deny(bad_style)] | ^^^^^^^^^ = note: #[deny(non_snake_case)] implied by #[deny(bad_style)] error: function `CamelCase` should have a snake case name such as `camel_case` --> $DIR/lint-group-style.rs:22:9 | -22 | fn CamelCase() {} //~ ERROR should have a snake +LL | fn CamelCase() {} //~ ERROR should have a snake | ^^^^^^^^^^^^^^^^^ | note: lint level defined here --> $DIR/lint-group-style.rs:20:14 | -20 | #[forbid(bad_style)] +LL | #[forbid(bad_style)] | ^^^^^^^^^ = note: #[forbid(non_snake_case)] implied by #[forbid(bad_style)] error: static variable `bad` should have an upper case name such as `BAD` --> $DIR/lint-group-style.rs:24:9 | -24 | static bad: isize = 1; //~ ERROR should have an upper +LL | static bad: isize = 1; //~ ERROR should have an upper | ^^^^^^^^^^^^^^^^^^^^^^ | note: lint level defined here --> $DIR/lint-group-style.rs:20:14 | -20 | #[forbid(bad_style)] +LL | #[forbid(bad_style)] | ^^^^^^^^^ = note: #[forbid(non_upper_case_globals)] implied by #[forbid(bad_style)] warning: function `CamelCase` should have a snake case name such as `camel_case` --> $DIR/lint-group-style.rs:30:9 | -30 | fn CamelCase() {} //~ WARN should have a snake +LL | fn CamelCase() {} //~ WARN should have a snake | ^^^^^^^^^^^^^^^^^ | note: lint level defined here --> $DIR/lint-group-style.rs:28:17 | -28 | #![warn(bad_style)] +LL | #![warn(bad_style)] | ^^^^^^^^^ = note: #[warn(non_snake_case)] implied by #[warn(bad_style)] warning: type `snake_case` should have a camel case name such as `SnakeCase` --> $DIR/lint-group-style.rs:32:9 | -32 | struct snake_case; //~ WARN should have a camel +LL | struct snake_case; //~ WARN should have a camel | ^^^^^^^^^^^^^^^^^^ | note: lint level defined here --> $DIR/lint-group-style.rs:28:17 | -28 | #![warn(bad_style)] +LL | #![warn(bad_style)] | ^^^^^^^^^ = note: #[warn(non_camel_case_types)] implied by #[warn(bad_style)] diff --git a/src/test/ui/lint/not_found.stderr b/src/test/ui/lint/not_found.stderr index 16daceecb988c..603b5410444cd 100644 --- a/src/test/ui/lint/not_found.stderr +++ b/src/test/ui/lint/not_found.stderr @@ -1,7 +1,7 @@ warning: unknown lint: `FOO_BAR` --> $DIR/not_found.rs:16:9 | -16 | #[allow(FOO_BAR)] +LL | #[allow(FOO_BAR)] | ^^^^^^^ | = note: #[warn(unknown_lints)] on by default @@ -9,12 +9,12 @@ warning: unknown lint: `FOO_BAR` warning: unknown lint: `DEAD_CODE` --> $DIR/not_found.rs:18:8 | -18 | #[warn(DEAD_CODE)] +LL | #[warn(DEAD_CODE)] | ^^^^^^^^^ help: lowercase the lint name: `dead_code` warning: unknown lint: `Warnings` --> $DIR/not_found.rs:20:8 | -20 | #[deny(Warnings)] +LL | #[deny(Warnings)] | ^^^^^^^^ help: lowercase the lint name: `warnings` diff --git a/src/test/ui/lint/outer-forbid.stderr b/src/test/ui/lint/outer-forbid.stderr index 0bc4e4dcf5fd6..d5db4732cacb6 100644 --- a/src/test/ui/lint/outer-forbid.stderr +++ b/src/test/ui/lint/outer-forbid.stderr @@ -1,28 +1,28 @@ error[E0453]: allow(unused_variables) overruled by outer forbid(unused) --> $DIR/outer-forbid.rs:19:9 | -17 | #![forbid(unused, non_snake_case)] +LL | #![forbid(unused, non_snake_case)] | ------ `forbid` level set here -18 | -19 | #[allow(unused_variables)] //~ ERROR overruled +LL | +LL | #[allow(unused_variables)] //~ ERROR overruled | ^^^^^^^^^^^^^^^^ overruled by previous forbid error[E0453]: allow(unused) overruled by outer forbid(unused) --> $DIR/outer-forbid.rs:22:9 | -17 | #![forbid(unused, non_snake_case)] +LL | #![forbid(unused, non_snake_case)] | ------ `forbid` level set here ... -22 | #[allow(unused)] //~ ERROR overruled +LL | #[allow(unused)] //~ ERROR overruled | ^^^^^^ overruled by previous forbid error[E0453]: allow(bad_style) overruled by outer forbid(non_snake_case) --> $DIR/outer-forbid.rs:25:9 | -17 | #![forbid(unused, non_snake_case)] +LL | #![forbid(unused, non_snake_case)] | -------------- `forbid` level set here ... -25 | #[allow(bad_style)] //~ ERROR overruled +LL | #[allow(bad_style)] //~ ERROR overruled | ^^^^^^^^^ overruled by previous forbid error: aborting due to 3 previous errors diff --git a/src/test/ui/lint/suggestions.stderr b/src/test/ui/lint/suggestions.stderr index 90d6bd312e419..84a2e4a91eccf 100644 --- a/src/test/ui/lint/suggestions.stderr +++ b/src/test/ui/lint/suggestions.stderr @@ -1,19 +1,19 @@ warning: unnecessary parentheses around assigned value --> $DIR/suggestions.rs:48:21 | -48 | let mut a = (1); // should suggest no `mut`, no parens +LL | let mut a = (1); // should suggest no `mut`, no parens | ^^^ help: remove these parentheses | note: lint level defined here --> $DIR/suggestions.rs:13:21 | -13 | #![warn(unused_mut, unused_parens)] // UI tests pass `-A unused`—see Issue #43896 +LL | #![warn(unused_mut, unused_parens)] // UI tests pass `-A unused`—see Issue #43896 | ^^^^^^^^^^^^^ warning: use of deprecated attribute `no_debug`: the `#[no_debug]` attribute was an experimental feature that has been deprecated due to lack of demand. See https://github.com/rust-lang/rust/issues/29721 --> $DIR/suggestions.rs:43:1 | -43 | #[no_debug] // should suggest removal of deprecated attribute +LL | #[no_debug] // should suggest removal of deprecated attribute | ^^^^^^^^^^^ help: remove this attribute | = note: #[warn(deprecated)] on by default @@ -21,7 +21,7 @@ warning: use of deprecated attribute `no_debug`: the `#[no_debug]` attribute was warning: variable does not need to be mutable --> $DIR/suggestions.rs:48:13 | -48 | let mut a = (1); // should suggest no `mut`, no parens +LL | let mut a = (1); // should suggest no `mut`, no parens | ----^ | | | help: remove this `mut` @@ -29,17 +29,17 @@ warning: variable does not need to be mutable note: lint level defined here --> $DIR/suggestions.rs:13:9 | -13 | #![warn(unused_mut, unused_parens)] // UI tests pass `-A unused`—see Issue #43896 +LL | #![warn(unused_mut, unused_parens)] // UI tests pass `-A unused`—see Issue #43896 | ^^^^^^^^^^ warning: variable does not need to be mutable --> $DIR/suggestions.rs:52:13 | -52 | let mut +LL | let mut | _____________^ | |_____________| | || -53 | || b = 1; +LL | || b = 1; | ||____________-^ | |____________| | help: remove this `mut` @@ -47,7 +47,7 @@ warning: variable does not need to be mutable warning: static is marked #[no_mangle], but not exported --> $DIR/suggestions.rs:16:14 | -16 | #[no_mangle] static SHENZHOU: usize = 1; // should suggest `pub` +LL | #[no_mangle] static SHENZHOU: usize = 1; // should suggest `pub` | -^^^^^^^^^^^^^^^^^^^^^^^^^^ | | | help: try making it public: `pub` @@ -57,7 +57,7 @@ warning: static is marked #[no_mangle], but not exported error: const items should never be #[no_mangle] --> $DIR/suggestions.rs:18:14 | -18 | #[no_mangle] const DISCOVERY: usize = 1; // should suggest `pub static` rather than `const` +LL | #[no_mangle] const DISCOVERY: usize = 1; // should suggest `pub static` rather than `const` | -----^^^^^^^^^^^^^^^^^^^^^^ | | | help: try a static value: `pub static` @@ -67,9 +67,9 @@ error: const items should never be #[no_mangle] warning: functions generic over types must be mangled --> $DIR/suggestions.rs:22:1 | -21 | #[no_mangle] // should suggest removal (generics can't be no-mangle) +LL | #[no_mangle] // should suggest removal (generics can't be no-mangle) | ------------ help: remove this attribute -22 | pub fn defiant(_t: T) {} +LL | pub fn defiant(_t: T) {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = note: #[warn(no_mangle_generic_items)] on by default @@ -77,7 +77,7 @@ warning: functions generic over types must be mangled warning: function is marked #[no_mangle], but not exported --> $DIR/suggestions.rs:26:1 | -26 | fn rio_grande() {} // should suggest `pub` +LL | fn rio_grande() {} // should suggest `pub` | -^^^^^^^^^^^^^^^^^ | | | help: try making it public: `pub` @@ -87,19 +87,19 @@ warning: function is marked #[no_mangle], but not exported warning: static is marked #[no_mangle], but not exported --> $DIR/suggestions.rs:33:18 | -33 | #[no_mangle] pub static DAUNTLESS: bool = true; +LL | #[no_mangle] pub static DAUNTLESS: bool = true; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ warning: function is marked #[no_mangle], but not exported --> $DIR/suggestions.rs:35:18 | -35 | #[no_mangle] pub fn val_jean() {} +LL | #[no_mangle] pub fn val_jean() {} | ^^^^^^^^^^^^^^^^^^^^ warning: denote infinite loops with `loop { ... }` --> $DIR/suggestions.rs:46:5 | -46 | while true { // should suggest `loop` +LL | while true { // should suggest `loop` | ^^^^^^^^^^ help: use `loop` | = note: #[warn(while_true)] on by default @@ -107,7 +107,7 @@ warning: denote infinite loops with `loop { ... }` warning: the `warp_factor:` in this pattern is redundant --> $DIR/suggestions.rs:57:23 | -57 | Equinox { warp_factor: warp_factor } => {} // should suggest shorthand +LL | Equinox { warp_factor: warp_factor } => {} // should suggest shorthand | ------------^^^^^^^^^^^^ | | | help: remove this diff --git a/src/test/ui/lint/unreachable_pub-pub_crate.stderr b/src/test/ui/lint/unreachable_pub-pub_crate.stderr index 0c2841a9e15d5..d1711be456bcc 100644 --- a/src/test/ui/lint/unreachable_pub-pub_crate.stderr +++ b/src/test/ui/lint/unreachable_pub-pub_crate.stderr @@ -1,7 +1,7 @@ warning: unreachable `pub` item --> $DIR/unreachable_pub-pub_crate.rs:26:5 | -26 | pub use std::fmt; +LL | pub use std::fmt; | ---^^^^^^^^^^^^^^ | | | help: consider restricting its visibility: `pub(crate)` @@ -9,14 +9,14 @@ warning: unreachable `pub` item note: lint level defined here --> $DIR/unreachable_pub-pub_crate.rs:22:9 | -22 | #![warn(unreachable_pub)] +LL | #![warn(unreachable_pub)] | ^^^^^^^^^^^^^^^ = help: or consider exporting it for use by other crates warning: unreachable `pub` item --> $DIR/unreachable_pub-pub_crate.rs:28:5 | -28 | pub struct Hydrogen { +LL | pub struct Hydrogen { | ---^^^^^^^^^^^^^^^^ | | | help: consider restricting its visibility: `pub(crate)` @@ -26,7 +26,7 @@ warning: unreachable `pub` item warning: unreachable `pub` field --> $DIR/unreachable_pub-pub_crate.rs:30:9 | -30 | pub neutrons: usize, +LL | pub neutrons: usize, | ---^^^^^^^^^^^^^^^^ | | | help: consider restricting its visibility: `pub(crate)` @@ -34,7 +34,7 @@ warning: unreachable `pub` field warning: unreachable `pub` item --> $DIR/unreachable_pub-pub_crate.rs:36:9 | -36 | pub fn count_neutrons(&self) -> usize { self.neutrons } +LL | pub fn count_neutrons(&self) -> usize { self.neutrons } | ---^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | | | help: consider restricting its visibility: `pub(crate)` @@ -42,7 +42,7 @@ warning: unreachable `pub` item warning: unreachable `pub` item --> $DIR/unreachable_pub-pub_crate.rs:40:5 | -40 | pub enum Helium {} +LL | pub enum Helium {} | ---^^^^^^^^^^^^ | | | help: consider restricting its visibility: `pub(crate)` @@ -52,7 +52,7 @@ warning: unreachable `pub` item warning: unreachable `pub` item --> $DIR/unreachable_pub-pub_crate.rs:41:5 | -41 | pub union Lithium { c1: usize, c2: u8 } +LL | pub union Lithium { c1: usize, c2: u8 } | ---^^^^^^^^^^^^^^ | | | help: consider restricting its visibility: `pub(crate)` @@ -62,7 +62,7 @@ warning: unreachable `pub` item warning: unreachable `pub` item --> $DIR/unreachable_pub-pub_crate.rs:42:5 | -42 | pub fn beryllium() {} +LL | pub fn beryllium() {} | ---^^^^^^^^^^^^^^^ | | | help: consider restricting its visibility: `pub(crate)` @@ -72,7 +72,7 @@ warning: unreachable `pub` item warning: unreachable `pub` item --> $DIR/unreachable_pub-pub_crate.rs:43:5 | -43 | pub trait Boron {} +LL | pub trait Boron {} | ---^^^^^^^^^^^^ | | | help: consider restricting its visibility: `pub(crate)` @@ -82,7 +82,7 @@ warning: unreachable `pub` item warning: unreachable `pub` item --> $DIR/unreachable_pub-pub_crate.rs:44:5 | -44 | pub const CARBON: usize = 1; +LL | pub const CARBON: usize = 1; | ---^^^^^^^^^^^^^^^^^^^^^^^^^ | | | help: consider restricting its visibility: `pub(crate)` @@ -92,7 +92,7 @@ warning: unreachable `pub` item warning: unreachable `pub` item --> $DIR/unreachable_pub-pub_crate.rs:45:5 | -45 | pub static NITROGEN: usize = 2; +LL | pub static NITROGEN: usize = 2; | ---^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | | | help: consider restricting its visibility: `pub(crate)` @@ -102,7 +102,7 @@ warning: unreachable `pub` item warning: unreachable `pub` item --> $DIR/unreachable_pub-pub_crate.rs:46:5 | -46 | pub type Oxygen = bool; +LL | pub type Oxygen = bool; | ---^^^^^^^^^^^^^^^^^^^^ | | | help: consider restricting its visibility: `pub(crate)` @@ -112,12 +112,12 @@ warning: unreachable `pub` item warning: unreachable `pub` item --> $DIR/unreachable_pub-pub_crate.rs:49:47 | -49 | ($visibility: vis, $name: ident) => { $visibility struct $name {} } +LL | ($visibility: vis, $name: ident) => { $visibility struct $name {} } | -----------^^^^^^^^^^^^^ | | | help: consider restricting its visibility: `pub(crate)` -50 | } -51 | define_empty_struct_with_visibility!(pub, Fluorine); +LL | } +LL | define_empty_struct_with_visibility!(pub, Fluorine); | ---------------------------------------------------- in this macro invocation | = help: or consider exporting it for use by other crates @@ -125,7 +125,7 @@ warning: unreachable `pub` item warning: unreachable `pub` item --> $DIR/unreachable_pub-pub_crate.rs:54:9 | -54 | pub fn catalyze() -> bool; +LL | pub fn catalyze() -> bool; | ---^^^^^^^^^^^^^^^^^^^^^^^ | | | help: consider restricting its visibility: `pub(crate)` diff --git a/src/test/ui/lint/unreachable_pub.stderr b/src/test/ui/lint/unreachable_pub.stderr index 093870866c0a3..1d693161108db 100644 --- a/src/test/ui/lint/unreachable_pub.stderr +++ b/src/test/ui/lint/unreachable_pub.stderr @@ -1,7 +1,7 @@ warning: unreachable `pub` item --> $DIR/unreachable_pub.rs:21:5 | -21 | pub use std::fmt; +LL | pub use std::fmt; | ---^^^^^^^^^^^^^^ | | | help: consider restricting its visibility: `crate` @@ -9,14 +9,14 @@ warning: unreachable `pub` item note: lint level defined here --> $DIR/unreachable_pub.rs:17:9 | -17 | #![warn(unreachable_pub)] +LL | #![warn(unreachable_pub)] | ^^^^^^^^^^^^^^^ = help: or consider exporting it for use by other crates warning: unreachable `pub` item --> $DIR/unreachable_pub.rs:23:5 | -23 | pub struct Hydrogen { +LL | pub struct Hydrogen { | ---^^^^^^^^^^^^^^^^ | | | help: consider restricting its visibility: `crate` @@ -26,7 +26,7 @@ warning: unreachable `pub` item warning: unreachable `pub` field --> $DIR/unreachable_pub.rs:25:9 | -25 | pub neutrons: usize, +LL | pub neutrons: usize, | ---^^^^^^^^^^^^^^^^ | | | help: consider restricting its visibility: `crate` @@ -34,7 +34,7 @@ warning: unreachable `pub` field warning: unreachable `pub` item --> $DIR/unreachable_pub.rs:31:9 | -31 | pub fn count_neutrons(&self) -> usize { self.neutrons } +LL | pub fn count_neutrons(&self) -> usize { self.neutrons } | ---^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | | | help: consider restricting its visibility: `crate` @@ -42,7 +42,7 @@ warning: unreachable `pub` item warning: unreachable `pub` item --> $DIR/unreachable_pub.rs:35:5 | -35 | pub enum Helium {} +LL | pub enum Helium {} | ---^^^^^^^^^^^^ | | | help: consider restricting its visibility: `crate` @@ -52,7 +52,7 @@ warning: unreachable `pub` item warning: unreachable `pub` item --> $DIR/unreachable_pub.rs:36:5 | -36 | pub union Lithium { c1: usize, c2: u8 } +LL | pub union Lithium { c1: usize, c2: u8 } | ---^^^^^^^^^^^^^^ | | | help: consider restricting its visibility: `crate` @@ -62,7 +62,7 @@ warning: unreachable `pub` item warning: unreachable `pub` item --> $DIR/unreachable_pub.rs:37:5 | -37 | pub fn beryllium() {} +LL | pub fn beryllium() {} | ---^^^^^^^^^^^^^^^ | | | help: consider restricting its visibility: `crate` @@ -72,7 +72,7 @@ warning: unreachable `pub` item warning: unreachable `pub` item --> $DIR/unreachable_pub.rs:38:5 | -38 | pub trait Boron {} +LL | pub trait Boron {} | ---^^^^^^^^^^^^ | | | help: consider restricting its visibility: `crate` @@ -82,7 +82,7 @@ warning: unreachable `pub` item warning: unreachable `pub` item --> $DIR/unreachable_pub.rs:39:5 | -39 | pub const CARBON: usize = 1; +LL | pub const CARBON: usize = 1; | ---^^^^^^^^^^^^^^^^^^^^^^^^^ | | | help: consider restricting its visibility: `crate` @@ -92,7 +92,7 @@ warning: unreachable `pub` item warning: unreachable `pub` item --> $DIR/unreachable_pub.rs:40:5 | -40 | pub static NITROGEN: usize = 2; +LL | pub static NITROGEN: usize = 2; | ---^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | | | help: consider restricting its visibility: `crate` @@ -102,7 +102,7 @@ warning: unreachable `pub` item warning: unreachable `pub` item --> $DIR/unreachable_pub.rs:41:5 | -41 | pub type Oxygen = bool; +LL | pub type Oxygen = bool; | ---^^^^^^^^^^^^^^^^^^^^ | | | help: consider restricting its visibility: `crate` @@ -112,12 +112,12 @@ warning: unreachable `pub` item warning: unreachable `pub` item --> $DIR/unreachable_pub.rs:44:47 | -44 | ($visibility: vis, $name: ident) => { $visibility struct $name {} } +LL | ($visibility: vis, $name: ident) => { $visibility struct $name {} } | -----------^^^^^^^^^^^^^ | | | help: consider restricting its visibility: `crate` -45 | } -46 | define_empty_struct_with_visibility!(pub, Fluorine); +LL | } +LL | define_empty_struct_with_visibility!(pub, Fluorine); | ---------------------------------------------------- in this macro invocation | = help: or consider exporting it for use by other crates @@ -125,7 +125,7 @@ warning: unreachable `pub` item warning: unreachable `pub` item --> $DIR/unreachable_pub.rs:49:9 | -49 | pub fn catalyze() -> bool; +LL | pub fn catalyze() -> bool; | ---^^^^^^^^^^^^^^^^^^^^^^^ | | | help: consider restricting its visibility: `crate` diff --git a/src/test/ui/lint/unused_parens_json_suggestion.stderr b/src/test/ui/lint/unused_parens_json_suggestion.stderr index 37eb9a98f74df..cd4379d90cf31 100644 --- a/src/test/ui/lint/unused_parens_json_suggestion.stderr +++ b/src/test/ui/lint/unused_parens_json_suggestion.stderr @@ -90,13 +90,13 @@ "rendered": "warning: unnecessary parentheses around assigned value --> $DIR/unused_parens_json_suggestion.rs:25:14 | -25 | let _a = (1 / (2 + 3)); +LL | let _a = (1 / (2 + 3)); | ^^^^^^^^^^^^^ help: remove these parentheses | note: lint level defined here --> $DIR/unused_parens_json_suggestion.rs:20:9 | -20 | #![warn(unused_parens)] +LL | #![warn(unused_parens)] | ^^^^^^^^^^^^^ " diff --git a/src/test/ui/lint/use_suggestion_json.stderr b/src/test/ui/lint/use_suggestion_json.stderr index 86c2ad4c0e7a4..5b527060380d2 100644 --- a/src/test/ui/lint/use_suggestion_json.stderr +++ b/src/test/ui/lint/use_suggestion_json.stderr @@ -370,17 +370,17 @@ mod foo { "rendered": "error[E0412]: cannot find type `Iter` in this scope --> $DIR/use_suggestion_json.rs:21:12 | -21 | let x: Iter; +LL | let x: Iter; | ^^^^ not found in this scope help: possible candidates are found in other modules, you can import them into scope | -20 | use std::collections::binary_heap::Iter; +LL | use std::collections::binary_heap::Iter; | -20 | use std::collections::btree_map::Iter; +LL | use std::collections::btree_map::Iter; | -20 | use std::collections::btree_set::Iter; +LL | use std::collections::btree_set::Iter; | -20 | use std::collections::hash_map::Iter; +LL | use std::collections::hash_map::Iter; | and 8 other candidates diff --git a/src/test/ui/liveness-return-last-stmt-semi.stderr b/src/test/ui/liveness-return-last-stmt-semi.stderr index 2057e14d55fd7..e62dcafe87033 100644 --- a/src/test/ui/liveness-return-last-stmt-semi.stderr +++ b/src/test/ui/liveness-return-last-stmt-semi.stderr @@ -1,13 +1,13 @@ error[E0308]: mismatched types --> $DIR/liveness-return-last-stmt-semi.rs:13:45 | -13 | macro_rules! test { () => { fn foo() -> i32 { 1; } } } +LL | macro_rules! test { () => { fn foo() -> i32 { 1; } } } | ^^^-^^ | | | | | help: consider removing this semicolon | expected i32, found () ... -27 | test!(); +LL | test!(); | -------- in this macro invocation | = note: expected type `i32` @@ -16,7 +16,7 @@ error[E0308]: mismatched types error[E0308]: mismatched types --> $DIR/liveness-return-last-stmt-semi.rs:16:23 | -16 | fn no_return() -> i32 {} //~ ERROR mismatched types +LL | fn no_return() -> i32 {} //~ ERROR mismatched types | ^^ expected i32, found () | = note: expected type `i32` @@ -25,11 +25,11 @@ error[E0308]: mismatched types error[E0308]: mismatched types --> $DIR/liveness-return-last-stmt-semi.rs:18:23 | -18 | fn bar(x: u32) -> u32 { //~ ERROR mismatched types +LL | fn bar(x: u32) -> u32 { //~ ERROR mismatched types | _______________________^ -19 | | x * 2; +LL | | x * 2; | | - help: consider removing this semicolon -20 | | } +LL | | } | |_^ expected u32, found () | = note: expected type `u32` @@ -38,10 +38,10 @@ error[E0308]: mismatched types error[E0308]: mismatched types --> $DIR/liveness-return-last-stmt-semi.rs:22:23 | -22 | fn baz(x: u64) -> u32 { //~ ERROR mismatched types +LL | fn baz(x: u64) -> u32 { //~ ERROR mismatched types | _______________________^ -23 | | x * 2; -24 | | } +LL | | x * 2; +LL | | } | |_^ expected u32, found () | = note: expected type `u32` diff --git a/src/test/ui/loop-break-value-no-repeat.stderr b/src/test/ui/loop-break-value-no-repeat.stderr index 982de00b4fa7c..fcd45c0866863 100644 --- a/src/test/ui/loop-break-value-no-repeat.stderr +++ b/src/test/ui/loop-break-value-no-repeat.stderr @@ -1,11 +1,11 @@ error[E0571]: `break` with value from a `for` loop --> $DIR/loop-break-value-no-repeat.rs:22:9 | -22 | break 22 //~ ERROR `break` with value from a `for` loop +LL | break 22 //~ ERROR `break` with value from a `for` loop | ^^^^^^^^ can only break with a value inside `loop` help: instead, use `break` on its own without a value inside this `for` loop | -22 | break //~ ERROR `break` with value from a `for` loop +LL | break //~ ERROR `break` with value from a `for` loop | ^^^^^ error: aborting due to previous error diff --git a/src/test/ui/loops-reject-duplicate-labels-2.stderr b/src/test/ui/loops-reject-duplicate-labels-2.stderr index 488046b71b3b1..d35ed4ff88a67 100644 --- a/src/test/ui/loops-reject-duplicate-labels-2.stderr +++ b/src/test/ui/loops-reject-duplicate-labels-2.stderr @@ -1,72 +1,72 @@ warning: label name `'fl` shadows a label name that is already in scope --> $DIR/loops-reject-duplicate-labels-2.rs:23:7 | -22 | { 'fl: for _ in 0..10 { break; } } +LL | { 'fl: for _ in 0..10 { break; } } | --- first declared here -23 | { 'fl: loop { break; } } //~ WARN label name `'fl` shadows a label name that is already in scope +LL | { 'fl: loop { break; } } //~ WARN label name `'fl` shadows a label name that is already in scope | ^^^ lifetime 'fl already in scope warning: label name `'lf` shadows a label name that is already in scope --> $DIR/loops-reject-duplicate-labels-2.rs:25:7 | -24 | { 'lf: loop { break; } } +LL | { 'lf: loop { break; } } | --- first declared here -25 | { 'lf: for _ in 0..10 { break; } } //~ WARN label name `'lf` shadows a label name that is already in scope +LL | { 'lf: for _ in 0..10 { break; } } //~ WARN label name `'lf` shadows a label name that is already in scope | ^^^ lifetime 'lf already in scope warning: label name `'wl` shadows a label name that is already in scope --> $DIR/loops-reject-duplicate-labels-2.rs:27:7 | -26 | { 'wl: while 2 > 1 { break; } } +LL | { 'wl: while 2 > 1 { break; } } | --- first declared here -27 | { 'wl: loop { break; } } //~ WARN label name `'wl` shadows a label name that is already in scope +LL | { 'wl: loop { break; } } //~ WARN label name `'wl` shadows a label name that is already in scope | ^^^ lifetime 'wl already in scope warning: label name `'lw` shadows a label name that is already in scope --> $DIR/loops-reject-duplicate-labels-2.rs:29:7 | -28 | { 'lw: loop { break; } } +LL | { 'lw: loop { break; } } | --- first declared here -29 | { 'lw: while 2 > 1 { break; } } //~ WARN label name `'lw` shadows a label name that is already in scope +LL | { 'lw: while 2 > 1 { break; } } //~ WARN label name `'lw` shadows a label name that is already in scope | ^^^ lifetime 'lw already in scope warning: label name `'fw` shadows a label name that is already in scope --> $DIR/loops-reject-duplicate-labels-2.rs:31:7 | -30 | { 'fw: for _ in 0..10 { break; } } +LL | { 'fw: for _ in 0..10 { break; } } | --- first declared here -31 | { 'fw: while 2 > 1 { break; } } //~ WARN label name `'fw` shadows a label name that is already in scope +LL | { 'fw: while 2 > 1 { break; } } //~ WARN label name `'fw` shadows a label name that is already in scope | ^^^ lifetime 'fw already in scope warning: label name `'wf` shadows a label name that is already in scope --> $DIR/loops-reject-duplicate-labels-2.rs:33:7 | -32 | { 'wf: while 2 > 1 { break; } } +LL | { 'wf: while 2 > 1 { break; } } | --- first declared here -33 | { 'wf: for _ in 0..10 { break; } } //~ WARN label name `'wf` shadows a label name that is already in scope +LL | { 'wf: for _ in 0..10 { break; } } //~ WARN label name `'wf` shadows a label name that is already in scope | ^^^ lifetime 'wf already in scope warning: label name `'tl` shadows a label name that is already in scope --> $DIR/loops-reject-duplicate-labels-2.rs:35:7 | -34 | { 'tl: while let Some(_) = None:: { break; } } +LL | { 'tl: while let Some(_) = None:: { break; } } | --- first declared here -35 | { 'tl: loop { break; } } //~ WARN label name `'tl` shadows a label name that is already in scope +LL | { 'tl: loop { break; } } //~ WARN label name `'tl` shadows a label name that is already in scope | ^^^ lifetime 'tl already in scope warning: label name `'lt` shadows a label name that is already in scope --> $DIR/loops-reject-duplicate-labels-2.rs:37:7 | -36 | { 'lt: loop { break; } } +LL | { 'lt: loop { break; } } | --- first declared here -37 | { 'lt: while let Some(_) = None:: { break; } } +LL | { 'lt: while let Some(_) = None:: { break; } } | ^^^ lifetime 'lt already in scope error: compilation successful --> $DIR/loops-reject-duplicate-labels-2.rs:42:1 | -42 | / pub fn main() { //~ ERROR compilation successful -43 | | foo(); -44 | | } +LL | / pub fn main() { //~ ERROR compilation successful +LL | | foo(); +LL | | } | |_^ diff --git a/src/test/ui/loops-reject-duplicate-labels.stderr b/src/test/ui/loops-reject-duplicate-labels.stderr index 3c287138c925c..d1b874ea99729 100644 --- a/src/test/ui/loops-reject-duplicate-labels.stderr +++ b/src/test/ui/loops-reject-duplicate-labels.stderr @@ -1,75 +1,75 @@ warning: label name `'fl` shadows a label name that is already in scope --> $DIR/loops-reject-duplicate-labels.rs:20:5 | -19 | 'fl: for _ in 0..10 { break; } +LL | 'fl: for _ in 0..10 { break; } | --- first declared here -20 | 'fl: loop { break; } //~ WARN label name `'fl` shadows a label name that is already in scope +LL | 'fl: loop { break; } //~ WARN label name `'fl` shadows a label name that is already in scope | ^^^ lifetime 'fl already in scope warning: label name `'lf` shadows a label name that is already in scope --> $DIR/loops-reject-duplicate-labels.rs:23:5 | -22 | 'lf: loop { break; } +LL | 'lf: loop { break; } | --- first declared here -23 | 'lf: for _ in 0..10 { break; } //~ WARN label name `'lf` shadows a label name that is already in scope +LL | 'lf: for _ in 0..10 { break; } //~ WARN label name `'lf` shadows a label name that is already in scope | ^^^ lifetime 'lf already in scope warning: label name `'wl` shadows a label name that is already in scope --> $DIR/loops-reject-duplicate-labels.rs:25:5 | -24 | 'wl: while 2 > 1 { break; } +LL | 'wl: while 2 > 1 { break; } | --- first declared here -25 | 'wl: loop { break; } //~ WARN label name `'wl` shadows a label name that is already in scope +LL | 'wl: loop { break; } //~ WARN label name `'wl` shadows a label name that is already in scope | ^^^ lifetime 'wl already in scope warning: label name `'lw` shadows a label name that is already in scope --> $DIR/loops-reject-duplicate-labels.rs:27:5 | -26 | 'lw: loop { break; } +LL | 'lw: loop { break; } | --- first declared here -27 | 'lw: while 2 > 1 { break; } //~ WARN label name `'lw` shadows a label name that is already in scope +LL | 'lw: while 2 > 1 { break; } //~ WARN label name `'lw` shadows a label name that is already in scope | ^^^ lifetime 'lw already in scope warning: label name `'fw` shadows a label name that is already in scope --> $DIR/loops-reject-duplicate-labels.rs:29:5 | -28 | 'fw: for _ in 0..10 { break; } +LL | 'fw: for _ in 0..10 { break; } | --- first declared here -29 | 'fw: while 2 > 1 { break; } //~ WARN label name `'fw` shadows a label name that is already in scope +LL | 'fw: while 2 > 1 { break; } //~ WARN label name `'fw` shadows a label name that is already in scope | ^^^ lifetime 'fw already in scope warning: label name `'wf` shadows a label name that is already in scope --> $DIR/loops-reject-duplicate-labels.rs:31:5 | -30 | 'wf: while 2 > 1 { break; } +LL | 'wf: while 2 > 1 { break; } | --- first declared here -31 | 'wf: for _ in 0..10 { break; } //~ WARN label name `'wf` shadows a label name that is already in scope +LL | 'wf: for _ in 0..10 { break; } //~ WARN label name `'wf` shadows a label name that is already in scope | ^^^ lifetime 'wf already in scope warning: label name `'tl` shadows a label name that is already in scope --> $DIR/loops-reject-duplicate-labels.rs:33:5 | -32 | 'tl: while let Some(_) = None:: { break; } +LL | 'tl: while let Some(_) = None:: { break; } | --- first declared here -33 | 'tl: loop { break; } //~ WARN label name `'tl` shadows a label name that is already in scope +LL | 'tl: loop { break; } //~ WARN label name `'tl` shadows a label name that is already in scope | ^^^ lifetime 'tl already in scope warning: label name `'lt` shadows a label name that is already in scope --> $DIR/loops-reject-duplicate-labels.rs:35:5 | -34 | 'lt: loop { break; } +LL | 'lt: loop { break; } | --- first declared here -35 | 'lt: while let Some(_) = None:: { break; } +LL | 'lt: while let Some(_) = None:: { break; } | ^^^ lifetime 'lt already in scope error: compilation successful --> $DIR/loops-reject-duplicate-labels.rs:49:1 | -49 | / pub fn main() { //~ ERROR compilation successful -50 | | let s = S; -51 | | s.m1(); -52 | | s.m2(); -53 | | foo(); -54 | | } +LL | / pub fn main() { //~ ERROR compilation successful +LL | | let s = S; +LL | | s.m1(); +LL | | s.m2(); +LL | | foo(); +LL | | } | |_^ diff --git a/src/test/ui/loops-reject-labels-shadowing-lifetimes.stderr b/src/test/ui/loops-reject-labels-shadowing-lifetimes.stderr index 07dbb68725dcc..0cdd58fdbd75d 100644 --- a/src/test/ui/loops-reject-labels-shadowing-lifetimes.stderr +++ b/src/test/ui/loops-reject-labels-shadowing-lifetimes.stderr @@ -1,110 +1,110 @@ warning: label name `'a` shadows a lifetime name that is already in scope --> $DIR/loops-reject-labels-shadowing-lifetimes.rs:20:9 | -19 | fn foo<'a>() { +LL | fn foo<'a>() { | -- first declared here -20 | 'a: loop { break 'a; } +LL | 'a: loop { break 'a; } | ^^ lifetime 'a already in scope warning: label name `'bad` shadows a lifetime name that is already in scope --> $DIR/loops-reject-labels-shadowing-lifetimes.rs:45:13 | -43 | impl<'bad, 'c> Struct<'bad, 'c> { +LL | impl<'bad, 'c> Struct<'bad, 'c> { | ---- first declared here -44 | fn meth_bad(&self) { -45 | 'bad: loop { break 'bad; } +LL | fn meth_bad(&self) { +LL | 'bad: loop { break 'bad; } | ^^^^ lifetime 'bad already in scope warning: label name `'bad` shadows a lifetime name that is already in scope --> $DIR/loops-reject-labels-shadowing-lifetimes.rs:52:13 | -50 | impl<'b, 'bad> Struct<'b, 'bad> { +LL | impl<'b, 'bad> Struct<'b, 'bad> { | ---- first declared here -51 | fn meth_bad2(&self) { -52 | 'bad: loop { break 'bad; } +LL | fn meth_bad2(&self) { +LL | 'bad: loop { break 'bad; } | ^^^^ lifetime 'bad already in scope warning: label name `'bad` shadows a lifetime name that is already in scope --> $DIR/loops-reject-labels-shadowing-lifetimes.rs:59:13 | -58 | fn meth_bad3<'bad>(x: &'bad i8) { +LL | fn meth_bad3<'bad>(x: &'bad i8) { | ---- first declared here -59 | 'bad: loop { break 'bad; } +LL | 'bad: loop { break 'bad; } | ^^^^ lifetime 'bad already in scope warning: label name `'bad` shadows a lifetime name that is already in scope --> $DIR/loops-reject-labels-shadowing-lifetimes.rs:64:13 | -63 | fn meth_bad4<'a,'bad>(x: &'a i8, y: &'bad i8) { +LL | fn meth_bad4<'a,'bad>(x: &'a i8, y: &'bad i8) { | ---- first declared here -64 | 'bad: loop { break 'bad; } +LL | 'bad: loop { break 'bad; } | ^^^^ lifetime 'bad already in scope warning: label name `'bad` shadows a lifetime name that is already in scope --> $DIR/loops-reject-labels-shadowing-lifetimes.rs:71:13 | -69 | impl <'bad, 'e> Enum<'bad, 'e> { +LL | impl <'bad, 'e> Enum<'bad, 'e> { | ---- first declared here -70 | fn meth_bad(&self) { -71 | 'bad: loop { break 'bad; } +LL | fn meth_bad(&self) { +LL | 'bad: loop { break 'bad; } | ^^^^ lifetime 'bad already in scope warning: label name `'bad` shadows a lifetime name that is already in scope --> $DIR/loops-reject-labels-shadowing-lifetimes.rs:77:13 | -75 | impl <'d, 'bad> Enum<'d, 'bad> { +LL | impl <'d, 'bad> Enum<'d, 'bad> { | ---- first declared here -76 | fn meth_bad2(&self) { -77 | 'bad: loop { break 'bad; } +LL | fn meth_bad2(&self) { +LL | 'bad: loop { break 'bad; } | ^^^^ lifetime 'bad already in scope warning: label name `'bad` shadows a lifetime name that is already in scope --> $DIR/loops-reject-labels-shadowing-lifetimes.rs:83:13 | -82 | fn meth_bad3<'bad>(x: &'bad i8) { +LL | fn meth_bad3<'bad>(x: &'bad i8) { | ---- first declared here -83 | 'bad: loop { break 'bad; } +LL | 'bad: loop { break 'bad; } | ^^^^ lifetime 'bad already in scope warning: label name `'bad` shadows a lifetime name that is already in scope --> $DIR/loops-reject-labels-shadowing-lifetimes.rs:88:13 | -87 | fn meth_bad4<'a,'bad>(x: &'bad i8) { +LL | fn meth_bad4<'a,'bad>(x: &'bad i8) { | ---- first declared here -88 | 'bad: loop { break 'bad; } +LL | 'bad: loop { break 'bad; } | ^^^^ lifetime 'bad already in scope warning: label name `'bad` shadows a lifetime name that is already in scope --> $DIR/loops-reject-labels-shadowing-lifetimes.rs:98:13 | -93 | trait HasDefaultMethod1<'bad> { +LL | trait HasDefaultMethod1<'bad> { | ---- first declared here ... -98 | 'bad: loop { break 'bad; } +LL | 'bad: loop { break 'bad; } | ^^^^ lifetime 'bad already in scope warning: label name `'bad` shadows a lifetime name that is already in scope - --> $DIR/loops-reject-labels-shadowing-lifetimes.rs:104:13 - | -102 | trait HasDefaultMethod2<'a,'bad> { - | ---- first declared here -103 | fn meth_bad(&self) { -104 | 'bad: loop { break 'bad; } - | ^^^^ lifetime 'bad already in scope + --> $DIR/loops-reject-labels-shadowing-lifetimes.rs:104:13 + | +LL | trait HasDefaultMethod2<'a,'bad> { + | ---- first declared here +LL | fn meth_bad(&self) { +LL | 'bad: loop { break 'bad; } + | ^^^^ lifetime 'bad already in scope warning: label name `'bad` shadows a lifetime name that is already in scope - --> $DIR/loops-reject-labels-shadowing-lifetimes.rs:110:13 - | -109 | fn meth_bad<'bad>(&self) { - | ---- first declared here -110 | 'bad: loop { break 'bad; } - | ^^^^ lifetime 'bad already in scope + --> $DIR/loops-reject-labels-shadowing-lifetimes.rs:110:13 + | +LL | fn meth_bad<'bad>(&self) { + | ---- first declared here +LL | 'bad: loop { break 'bad; } + | ^^^^ lifetime 'bad already in scope error: compilation successful - --> $DIR/loops-reject-labels-shadowing-lifetimes.rs:117:1 - | -117 | / pub fn main() { //~ ERROR compilation successful -118 | | foo(); -119 | | } - | |_^ + --> $DIR/loops-reject-labels-shadowing-lifetimes.rs:117:1 + | +LL | / pub fn main() { //~ ERROR compilation successful +LL | | foo(); +LL | | } + | |_^ diff --git a/src/test/ui/loops-reject-lifetime-shadowing-label.stderr b/src/test/ui/loops-reject-lifetime-shadowing-label.stderr index d44b1b7b62351..a050aec50c72b 100644 --- a/src/test/ui/loops-reject-lifetime-shadowing-label.stderr +++ b/src/test/ui/loops-reject-lifetime-shadowing-label.stderr @@ -1,16 +1,16 @@ warning: lifetime name `'a` shadows a label name that is already in scope --> $DIR/loops-reject-lifetime-shadowing-label.rs:31:51 | -30 | 'a: loop { +LL | 'a: loop { | -- first declared here -31 | let b = Box::new(|x: &i8| *x) as Box Fn(&'a i8) -> i8>; +LL | let b = Box::new(|x: &i8| *x) as Box Fn(&'a i8) -> i8>; | ^^ lifetime 'a already in scope error: compilation successful --> $DIR/loops-reject-lifetime-shadowing-label.rs:39:1 | -39 | / pub fn main() { //~ ERROR compilation successful -40 | | foo(); -41 | | } +LL | / pub fn main() { //~ ERROR compilation successful +LL | | foo(); +LL | | } | |_^ diff --git a/src/test/ui/lub-glb/old-lub-glb-hr.stderr b/src/test/ui/lub-glb/old-lub-glb-hr.stderr index 105de33fac496..d4be834553c7a 100644 --- a/src/test/ui/lub-glb/old-lub-glb-hr.stderr +++ b/src/test/ui/lub-glb/old-lub-glb-hr.stderr @@ -1,12 +1,12 @@ error[E0308]: match arms have incompatible types --> $DIR/old-lub-glb-hr.rs:18:13 | -18 | let z = match 22 { //~ ERROR incompatible types +LL | let z = match 22 { //~ ERROR incompatible types | _____________^ -19 | | 0 => x, -20 | | _ => y, +LL | | 0 => x, +LL | | _ => y, | | - match arm with an incompatible type -21 | | }; +LL | | }; | |_____^ expected bound lifetime parameter, found concrete lifetime | = note: expected type `for<'r, 's> fn(&'r u8, &'s u8)` diff --git a/src/test/ui/lub-glb/old-lub-glb-object.stderr b/src/test/ui/lub-glb/old-lub-glb-object.stderr index 3550314d44b61..9525d553907fa 100644 --- a/src/test/ui/lub-glb/old-lub-glb-object.stderr +++ b/src/test/ui/lub-glb/old-lub-glb-object.stderr @@ -1,12 +1,12 @@ error[E0308]: match arms have incompatible types --> $DIR/old-lub-glb-object.rs:20:13 | -20 | let z = match 22 { //~ ERROR incompatible types +LL | let z = match 22 { //~ ERROR incompatible types | _____________^ -21 | | 0 => x, -22 | | _ => y, +LL | | 0 => x, +LL | | _ => y, | | - match arm with an incompatible type -23 | | }; +LL | | }; | |_____^ expected bound lifetime parameter 'a, found concrete lifetime | = note: expected type `&for<'a, 'b> Foo<&'a u8, &'b u8>` diff --git a/src/test/ui/macro-context.stderr b/src/test/ui/macro-context.stderr index 2be89b67d11ba..65bbe09a212da 100644 --- a/src/test/ui/macro-context.stderr +++ b/src/test/ui/macro-context.stderr @@ -1,45 +1,45 @@ error: macro expansion ignores token `;` and any following --> $DIR/macro-context.rs:13:15 | -13 | () => ( i ; typeof ); //~ ERROR expected expression, found reserved keyword `typeof` +LL | () => ( i ; typeof ); //~ ERROR expected expression, found reserved keyword `typeof` | ^ | note: caused by the macro expansion here; the usage of `m!` is likely invalid in type context --> $DIR/macro-context.rs:20:12 | -20 | let a: m!(); +LL | let a: m!(); | ^^^^ error: macro expansion ignores token `typeof` and any following --> $DIR/macro-context.rs:13:17 | -13 | () => ( i ; typeof ); //~ ERROR expected expression, found reserved keyword `typeof` +LL | () => ( i ; typeof ); //~ ERROR expected expression, found reserved keyword `typeof` | ^^^^^^ | note: caused by the macro expansion here; the usage of `m!` is likely invalid in expression context --> $DIR/macro-context.rs:21:13 | -21 | let i = m!(); +LL | let i = m!(); | ^^^^ error: macro expansion ignores token `;` and any following --> $DIR/macro-context.rs:13:15 | -13 | () => ( i ; typeof ); //~ ERROR expected expression, found reserved keyword `typeof` +LL | () => ( i ; typeof ); //~ ERROR expected expression, found reserved keyword `typeof` | ^ | note: caused by the macro expansion here; the usage of `m!` is likely invalid in pattern context --> $DIR/macro-context.rs:23:9 | -23 | m!() => {} +LL | m!() => {} | ^^^^ error: expected expression, found reserved keyword `typeof` --> $DIR/macro-context.rs:13:17 | -13 | () => ( i ; typeof ); //~ ERROR expected expression, found reserved keyword `typeof` +LL | () => ( i ; typeof ); //~ ERROR expected expression, found reserved keyword `typeof` | ^^^^^^ ... -26 | m!(); +LL | m!(); | ----- in this macro invocation diff --git a/src/test/ui/macro-invalid-fragment-spec.stderr b/src/test/ui/macro-invalid-fragment-spec.stderr index b279933bd0512..bdb0e4a5c4044 100644 --- a/src/test/ui/macro-invalid-fragment-spec.stderr +++ b/src/test/ui/macro-invalid-fragment-spec.stderr @@ -1,7 +1,7 @@ error: invalid fragment specifier `foo` --> $DIR/macro-invalid-fragment-spec.rs:12:6 | -12 | ($x:foo) => () +LL | ($x:foo) => () | ^^^^^^ | = help: valid fragment specifiers are `ident`, `block`, `stmt`, `expr`, `pat`, `ty`, `path`, `meta`, `tt`, `item` and `vis` diff --git a/src/test/ui/macro-shadowing.stderr b/src/test/ui/macro-shadowing.stderr index 9ed372f275de2..28f09509a6233 100644 --- a/src/test/ui/macro-shadowing.stderr +++ b/src/test/ui/macro-shadowing.stderr @@ -1,10 +1,10 @@ error: `macro_two` is already in scope --> $DIR/macro-shadowing.rs:22:5 | -22 | #[macro_use] //~ ERROR `macro_two` is already in scope +LL | #[macro_use] //~ ERROR `macro_two` is already in scope | ^^^^^^^^^^^^ ... -25 | m1!(); +LL | m1!(); | ------ in this macro invocation | = note: macro-expanded `#[macro_use]`s may not shadow existing macros (see RFC 1560) @@ -12,10 +12,10 @@ error: `macro_two` is already in scope error: `foo` is already in scope --> $DIR/macro-shadowing.rs:20:5 | -20 | macro_rules! foo { () => {} } //~ ERROR `foo` is already in scope +LL | macro_rules! foo { () => {} } //~ ERROR `foo` is already in scope | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ... -25 | m1!(); +LL | m1!(); | ------ in this macro invocation | = note: macro-expanded `macro_rules!`s may not shadow existing macros (see RFC 1560) diff --git a/src/test/ui/macro_backtrace/main.stderr b/src/test/ui/macro_backtrace/main.stderr index 48138ee711b3f..10eabca63538d 100644 --- a/src/test/ui/macro_backtrace/main.stderr +++ b/src/test/ui/macro_backtrace/main.stderr @@ -1,30 +1,30 @@ error: expected one of `!`, `.`, `::`, `;`, `?`, `{`, `}`, or an operator, found `error` --> $DIR/main.rs:19:20 | -18 | / macro_rules! pong { -19 | | () => { syntax error }; +LL | / macro_rules! pong { +LL | | () => { syntax error }; | | ^^^^^ expected one of 8 possible tokens here -20 | | } +LL | | } | |_- in this expansion of `pong!` ... -26 | pong!(); +LL | pong!(); | -------- in this macro invocation error: expected one of `!`, `.`, `::`, `;`, `?`, `{`, `}`, or an operator, found `error` --> $DIR/main.rs:19:20 | -18 | / macro_rules! pong { -19 | | () => { syntax error }; +LL | / macro_rules! pong { +LL | | () => { syntax error }; | | ^^^^^ expected one of 8 possible tokens here -20 | | } +LL | | } | |_- in this expansion of `pong!` ... -27 | ping!(); +LL | ping!(); | -------- in this macro invocation | ::: :1:1 | -1 | ( ) => { pong ! ( ) ; } +LL | ( ) => { pong ! ( ) ; } | ------------------------- | | | | | in this macro invocation @@ -33,18 +33,18 @@ error: expected one of `!`, `.`, `::`, `;`, `?`, `{`, `}`, or an operator, found error: expected one of `!`, `.`, `::`, `;`, `?`, `{`, `}`, or an operator, found `error` --> $DIR/main.rs:19:20 | -18 | / macro_rules! pong { -19 | | () => { syntax error }; +LL | / macro_rules! pong { +LL | | () => { syntax error }; | | ^^^^^ expected one of 8 possible tokens here -20 | | } +LL | | } | |_- in this expansion of `pong!` (#5) ... -28 | deep!(); +LL | deep!(); | -------- in this macro invocation (#1) | ::: :1:1 | -1 | ( ) => { foo ! ( ) ; } +LL | ( ) => { foo ! ( ) ; } | ------------------------ | | | | | in this macro invocation (#2) @@ -52,7 +52,7 @@ error: expected one of `!`, `.`, `::`, `;`, `?`, `{`, `}`, or an operator, found | ::: :1:1 | -1 | ( ) => { bar ! ( ) ; } +LL | ( ) => { bar ! ( ) ; } | ------------------------ | | | | | in this macro invocation (#3) @@ -60,7 +60,7 @@ error: expected one of `!`, `.`, `::`, `;`, `?`, `{`, `}`, or an operator, found | ::: :1:1 | -1 | ( ) => { ping ! ( ) ; } +LL | ( ) => { ping ! ( ) ; } | ------------------------- | | | | | in this macro invocation (#4) @@ -68,7 +68,7 @@ error: expected one of `!`, `.`, `::`, `;`, `?`, `{`, `}`, or an operator, found | ::: :1:1 | -1 | ( ) => { pong ! ( ) ; } +LL | ( ) => { pong ! ( ) ; } | ------------------------- | | | | | in this macro invocation (#5) diff --git a/src/test/ui/macros/bad_hello.stderr b/src/test/ui/macros/bad_hello.stderr index 825aa64e40f52..578ff4ab9d4ad 100644 --- a/src/test/ui/macros/bad_hello.stderr +++ b/src/test/ui/macros/bad_hello.stderr @@ -1,7 +1,7 @@ error: expected a literal --> $DIR/bad_hello.rs:12:14 | -12 | println!(3 + 4); //~ ERROR expected a literal +LL | println!(3 + 4); //~ ERROR expected a literal | ^^^^^ error: aborting due to previous error diff --git a/src/test/ui/macros/format-foreign.stderr b/src/test/ui/macros/format-foreign.stderr index f9852c5477332..6804ce95fa873 100644 --- a/src/test/ui/macros/format-foreign.stderr +++ b/src/test/ui/macros/format-foreign.stderr @@ -1,7 +1,7 @@ error: multiple unused formatting arguments --> $DIR/format-foreign.rs:12:30 | -12 | println!("%.*3$s %s!/n", "Hello,", "World", 4); //~ ERROR multiple unused formatting arguments +LL | println!("%.*3$s %s!/n", "Hello,", "World", 4); //~ ERROR multiple unused formatting arguments | -------------------------^^^^^^^^--^^^^^^^--^-- multiple unused arguments in this statement | = help: `%.*3$s` should be written as `{:.2$}` @@ -12,7 +12,7 @@ error: multiple unused formatting arguments error: argument never used --> $DIR/format-foreign.rs:13:29 | -13 | println!("%1$*2$.*3$f", 123.456); //~ ERROR never used +LL | println!("%1$*2$.*3$f", 123.456); //~ ERROR never used | ^^^^^^^ | = help: `%1$*2$.*3$f` should be written as `{0:1$.2$}` @@ -21,13 +21,13 @@ error: argument never used error: argument never used --> $DIR/format-foreign.rs:17:30 | -17 | println!("{} %f", "one", 2.0); //~ ERROR never used +LL | println!("{} %f", "one", 2.0); //~ ERROR never used | ^^^ error: named argument never used --> $DIR/format-foreign.rs:19:39 | -19 | println!("Hi there, $NAME.", NAME="Tim"); //~ ERROR never used +LL | println!("Hi there, $NAME.", NAME="Tim"); //~ ERROR never used | ^^^^^ | = help: `$NAME` should be written as `{NAME}` diff --git a/src/test/ui/macros/format-unused-lables.stderr b/src/test/ui/macros/format-unused-lables.stderr index 64ea5626c1d62..777b492dcb65f 100644 --- a/src/test/ui/macros/format-unused-lables.stderr +++ b/src/test/ui/macros/format-unused-lables.stderr @@ -1,7 +1,7 @@ error: multiple unused formatting arguments --> $DIR/format-unused-lables.rs:12:22 | -12 | println!("Test", 123, 456, 789); +LL | println!("Test", 123, 456, 789); | -----------------^^^--^^^--^^^-- multiple unused arguments in this statement | = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info) @@ -9,14 +9,14 @@ error: multiple unused formatting arguments error: multiple unused formatting arguments --> $DIR/format-unused-lables.rs:16:9 | -15 | / println!("Test2", -16 | | 123, //~ ERROR multiple unused formatting arguments +LL | / println!("Test2", +LL | | 123, //~ ERROR multiple unused formatting arguments | | ^^^ -17 | | 456, +LL | | 456, | | ^^^ -18 | | 789 +LL | | 789 | | ^^^ -19 | | ); +LL | | ); | |______- multiple unused arguments in this statement | = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info) @@ -24,19 +24,19 @@ error: multiple unused formatting arguments error: named argument never used --> $DIR/format-unused-lables.rs:21:35 | -21 | println!("Some stuff", UNUSED="args"); //~ ERROR named argument never used +LL | println!("Some stuff", UNUSED="args"); //~ ERROR named argument never used | ^^^^^^ error: multiple unused formatting arguments --> $DIR/format-unused-lables.rs:24:9 | -23 | / println!("Some more $STUFF", -24 | | "woo!", //~ ERROR multiple unused formatting arguments +LL | / println!("Some more $STUFF", +LL | | "woo!", //~ ERROR multiple unused formatting arguments | | ^^^^^^ -25 | | STUFF= -26 | | "things" +LL | | STUFF= +LL | | "things" | | ^^^^^^^^ -27 | | , UNUSED="args"); +LL | | , UNUSED="args"); | |_______________________^^^^^^_- multiple unused arguments in this statement | = help: `$STUFF` should be written as `{STUFF}` diff --git a/src/test/compile-fail/macro-at-most-once-rep-ambig.rs b/src/test/ui/macros/macro-at-most-once-rep-ambig.rs similarity index 100% rename from src/test/compile-fail/macro-at-most-once-rep-ambig.rs rename to src/test/ui/macros/macro-at-most-once-rep-ambig.rs diff --git a/src/test/ui/macros/macro-at-most-once-rep-ambig.stderr b/src/test/ui/macros/macro-at-most-once-rep-ambig.stderr new file mode 100644 index 0000000000000..67a77e0a481d8 --- /dev/null +++ b/src/test/ui/macros/macro-at-most-once-rep-ambig.stderr @@ -0,0 +1,80 @@ +error: no rules expected the token `?` + --> $DIR/macro-at-most-once-rep-ambig.rs:40:11 + | +40 | foo!(a?a?a); //~ ERROR no rules expected the token `?` + | ^ + +error: no rules expected the token `?` + --> $DIR/macro-at-most-once-rep-ambig.rs:41:11 + | +41 | foo!(a?a); //~ ERROR no rules expected the token `?` + | ^ + +error: no rules expected the token `?` + --> $DIR/macro-at-most-once-rep-ambig.rs:42:11 + | +42 | foo!(a?); //~ ERROR no rules expected the token `?` + | ^ + +error: no rules expected the token `?` + --> $DIR/macro-at-most-once-rep-ambig.rs:43:11 + | +43 | baz!(a?a?a); //~ ERROR no rules expected the token `?` + | ^ + +error: no rules expected the token `?` + --> $DIR/macro-at-most-once-rep-ambig.rs:44:11 + | +44 | baz!(a?a); //~ ERROR no rules expected the token `?` + | ^ + +error: no rules expected the token `?` + --> $DIR/macro-at-most-once-rep-ambig.rs:45:11 + | +45 | baz!(a?); //~ ERROR no rules expected the token `?` + | ^ + +error: unexpected end of macro invocation + --> $DIR/macro-at-most-once-rep-ambig.rs:46:11 + | +46 | baz!(a,); //~ ERROR unexpected end of macro invocation + | ^ + +error: no rules expected the token `?` + --> $DIR/macro-at-most-once-rep-ambig.rs:47:11 + | +47 | baz!(a?a?a,); //~ ERROR no rules expected the token `?` + | ^ + +error: no rules expected the token `?` + --> $DIR/macro-at-most-once-rep-ambig.rs:48:11 + | +48 | baz!(a?a,); //~ ERROR no rules expected the token `?` + | ^ + +error: no rules expected the token `?` + --> $DIR/macro-at-most-once-rep-ambig.rs:49:11 + | +49 | baz!(a?,); //~ ERROR no rules expected the token `?` + | ^ + +error: unexpected end of macro invocation + --> $DIR/macro-at-most-once-rep-ambig.rs:50:5 + | +50 | barplus!(); //~ ERROR unexpected end of macro invocation + | ^^^^^^^^^^^ + +error: unexpected end of macro invocation + --> $DIR/macro-at-most-once-rep-ambig.rs:51:15 + | +51 | barplus!(a?); //~ ERROR unexpected end of macro invocation + | ^ + +error: unexpected end of macro invocation + --> $DIR/macro-at-most-once-rep-ambig.rs:52:15 + | +52 | barstar!(a?); //~ ERROR unexpected end of macro invocation + | ^ + +error: aborting due to 13 previous errors + diff --git a/src/test/ui/macros/macro-backtrace-invalid-internals.stderr b/src/test/ui/macros/macro-backtrace-invalid-internals.stderr index b9cad7e113dbf..2ad976015a296 100644 --- a/src/test/ui/macros/macro-backtrace-invalid-internals.stderr +++ b/src/test/ui/macros/macro-backtrace-invalid-internals.stderr @@ -1,81 +1,81 @@ error[E0599]: no method named `fake` found for type `{integer}` in the current scope --> $DIR/macro-backtrace-invalid-internals.rs:15:13 | -15 | 1.fake() //~ ERROR no method +LL | 1.fake() //~ ERROR no method | ^^^^ ... -62 | fake_method_stmt!(); +LL | fake_method_stmt!(); | -------------------- in this macro invocation error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields --> $DIR/macro-backtrace-invalid-internals.rs:21:13 | -21 | 1.fake //~ ERROR doesn't have fields +LL | 1.fake //~ ERROR doesn't have fields | ^^^^ ... -63 | fake_field_stmt!(); +LL | fake_field_stmt!(); | ------------------- in this macro invocation error[E0609]: no field `0` on type `{integer}` --> $DIR/macro-backtrace-invalid-internals.rs:27:11 | -27 | (1).0 //~ ERROR no field +LL | (1).0 //~ ERROR no field | ^^^^^ ... -64 | fake_anon_field_stmt!(); +LL | fake_anon_field_stmt!(); | ------------------------ in this macro invocation error[E0689]: can't call method `powi` on ambiguous numeric type `{float}` --> $DIR/macro-backtrace-invalid-internals.rs:51:15 | -51 | 2.0.powi(2) //~ ERROR can't call method `powi` on ambiguous numeric type `{float}` +LL | 2.0.powi(2) //~ ERROR can't call method `powi` on ambiguous numeric type `{float}` | ^^^^ ... -65 | real_method_stmt!(); +LL | real_method_stmt!(); | -------------------- in this macro invocation help: you must specify a concrete type for this numeric value, like `f32` | -51 | 2.0_f32.powi(2) //~ ERROR can't call method `powi` on ambiguous numeric type `{float}` +LL | 2.0_f32.powi(2) //~ ERROR can't call method `powi` on ambiguous numeric type `{float}` | ^^^^^^^ error[E0599]: no method named `fake` found for type `{integer}` in the current scope --> $DIR/macro-backtrace-invalid-internals.rs:33:13 | -33 | 1.fake() //~ ERROR no method +LL | 1.fake() //~ ERROR no method | ^^^^ ... -67 | let _ = fake_method_expr!(); +LL | let _ = fake_method_expr!(); | ------------------- in this macro invocation error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields --> $DIR/macro-backtrace-invalid-internals.rs:39:13 | -39 | 1.fake //~ ERROR doesn't have fields +LL | 1.fake //~ ERROR doesn't have fields | ^^^^ ... -68 | let _ = fake_field_expr!(); +LL | let _ = fake_field_expr!(); | ------------------ in this macro invocation error[E0609]: no field `0` on type `{integer}` --> $DIR/macro-backtrace-invalid-internals.rs:45:11 | -45 | (1).0 //~ ERROR no field +LL | (1).0 //~ ERROR no field | ^^^^^ ... -69 | let _ = fake_anon_field_expr!(); +LL | let _ = fake_anon_field_expr!(); | ----------------------- in this macro invocation error[E0689]: can't call method `powi` on ambiguous numeric type `{float}` --> $DIR/macro-backtrace-invalid-internals.rs:57:15 | -57 | 2.0.powi(2) //~ ERROR can't call method `powi` on ambiguous numeric type `{float}` +LL | 2.0.powi(2) //~ ERROR can't call method `powi` on ambiguous numeric type `{float}` | ^^^^ ... -70 | let _ = real_method_expr!(); +LL | let _ = real_method_expr!(); | ------------------- in this macro invocation help: you must specify a concrete type for this numeric value, like `f32` | -57 | 2.0_f32.powi(2) //~ ERROR can't call method `powi` on ambiguous numeric type `{float}` +LL | 2.0_f32.powi(2) //~ ERROR can't call method `powi` on ambiguous numeric type `{float}` | ^^^^^^^ error: aborting due to 8 previous errors diff --git a/src/test/ui/macros/macro-backtrace-nested.stderr b/src/test/ui/macros/macro-backtrace-nested.stderr index ee4a38312e289..32d40ef6c27fd 100644 --- a/src/test/ui/macros/macro-backtrace-nested.stderr +++ b/src/test/ui/macros/macro-backtrace-nested.stderr @@ -1,19 +1,19 @@ error[E0425]: cannot find value `fake` in this scope --> $DIR/macro-backtrace-nested.rs:15:12 | -15 | () => (fake) //~ ERROR cannot find +LL | () => (fake) //~ ERROR cannot find | ^^^^ not found in this scope ... -28 | 1 + call_nested_expr!(); +LL | 1 + call_nested_expr!(); | ------------------- in this macro invocation error[E0425]: cannot find value `fake` in this scope --> $DIR/macro-backtrace-nested.rs:15:12 | -15 | () => (fake) //~ ERROR cannot find +LL | () => (fake) //~ ERROR cannot find | ^^^^ not found in this scope ... -29 | call_nested_expr_sum!(); +LL | call_nested_expr_sum!(); | ------------------------ in this macro invocation error: aborting due to 2 previous errors diff --git a/src/test/ui/macros/macro-backtrace-println.stderr b/src/test/ui/macros/macro-backtrace-println.stderr index c587654d880a0..8f2eb0173a499 100644 --- a/src/test/ui/macros/macro-backtrace-println.stderr +++ b/src/test/ui/macros/macro-backtrace-println.stderr @@ -1,10 +1,10 @@ error: 1 positional argument in format string, but no arguments were given --> $DIR/macro-backtrace-println.rs:24:30 | -24 | ($fmt:expr) => (myprint!(concat!($fmt, "/n"))); //~ ERROR no arguments were given +LL | ($fmt:expr) => (myprint!(concat!($fmt, "/n"))); //~ ERROR no arguments were given | ^^^^^^^^^^^^^^^^^^^ ... -28 | myprintln!("{}"); +LL | myprintln!("{}"); | ----------------- in this macro invocation error: aborting due to previous error diff --git a/src/test/ui/macros/macro-name-typo.stderr b/src/test/ui/macros/macro-name-typo.stderr index ebe95356c26eb..4152d2eb96ea3 100644 --- a/src/test/ui/macros/macro-name-typo.stderr +++ b/src/test/ui/macros/macro-name-typo.stderr @@ -1,7 +1,7 @@ error: cannot find macro `printlx!` in this scope --> $DIR/macro-name-typo.rs:12:5 | -12 | printlx!("oh noes!"); //~ ERROR cannot find +LL | printlx!("oh noes!"); //~ ERROR cannot find | ^^^^^^^ help: you could try the macro: `println` error: aborting due to previous error diff --git a/src/test/ui/macros/macro_path_as_generic_bound.stderr b/src/test/ui/macros/macro_path_as_generic_bound.stderr index d59bcaa316e5d..06d22714dd8b6 100644 --- a/src/test/ui/macros/macro_path_as_generic_bound.stderr +++ b/src/test/ui/macros/macro_path_as_generic_bound.stderr @@ -1,7 +1,7 @@ error[E0433]: failed to resolve. Use of undeclared type or module `m` --> $DIR/macro_path_as_generic_bound.rs:17:6 | -17 | foo!(m::m2::A); //~ ERROR failed to resolve +LL | foo!(m::m2::A); //~ ERROR failed to resolve | ^ Use of undeclared type or module `m` error: cannot continue compilation due to previous error diff --git a/src/test/ui/macros/macro_undefined.stderr b/src/test/ui/macros/macro_undefined.stderr index 8d6da6a4732fc..8d44df8af0cbd 100644 --- a/src/test/ui/macros/macro_undefined.stderr +++ b/src/test/ui/macros/macro_undefined.stderr @@ -1,7 +1,7 @@ error: cannot find macro `kl!` in this scope --> $DIR/macro_undefined.rs:22:5 | -22 | kl!(); //~ ERROR cannot find +LL | kl!(); //~ ERROR cannot find | ^^ | = help: have you added the `#[macro_use]` on the module/import? @@ -9,7 +9,7 @@ error: cannot find macro `kl!` in this scope error: cannot find macro `k!` in this scope --> $DIR/macro_undefined.rs:21:5 | -21 | k!(); //~ ERROR cannot find +LL | k!(); //~ ERROR cannot find | ^ help: you could try the macro: `kl` error: aborting due to 2 previous errors diff --git a/src/test/ui/macros/span-covering-argument-1.stderr b/src/test/ui/macros/span-covering-argument-1.stderr index 677d2f10fd6c9..868d7cbc71cf4 100644 --- a/src/test/ui/macros/span-covering-argument-1.stderr +++ b/src/test/ui/macros/span-covering-argument-1.stderr @@ -1,12 +1,12 @@ error[E0596]: cannot borrow immutable local variable `foo` as mutable --> $DIR/span-covering-argument-1.rs:15:19 | -14 | let $s = 0; +LL | let $s = 0; | -- consider changing this to `mut $s` -15 | *&mut $s = 0; +LL | *&mut $s = 0; | ^^ cannot borrow mutably ... -22 | bad!(foo whatever); +LL | bad!(foo whatever); | ------------------- in this macro invocation error: aborting due to previous error diff --git a/src/test/ui/macros/trace-macro.stderr b/src/test/ui/macros/trace-macro.stderr index 842799648b2f7..938f876872f2f 100644 --- a/src/test/ui/macros/trace-macro.stderr +++ b/src/test/ui/macros/trace-macro.stderr @@ -1,7 +1,7 @@ note: trace_macro --> $DIR/trace-macro.rs:15:5 | -15 | println!("Hello, World!"); +LL | println!("Hello, World!"); | ^^^^^^^^^^^^^^^^^^^^^^^^^^ | = note: expanding `println! { "Hello, World!" }` diff --git a/src/test/ui/macros/trace_faulty_macros.stderr b/src/test/ui/macros/trace_faulty_macros.stderr index b0e4a56a3d1d6..9fb5b17a3114b 100644 --- a/src/test/ui/macros/trace_faulty_macros.stderr +++ b/src/test/ui/macros/trace_faulty_macros.stderr @@ -1,16 +1,16 @@ error: no rules expected the token `bcd` --> $DIR/trace_faulty_macros.rs:17:26 | -17 | my_faulty_macro!(bcd); //~ ERROR no rules +LL | my_faulty_macro!(bcd); //~ ERROR no rules | ^^^ ... -43 | my_faulty_macro!(); +LL | my_faulty_macro!(); | ------------------- in this macro invocation note: trace_macro --> $DIR/trace_faulty_macros.rs:43:5 | -43 | my_faulty_macro!(); +LL | my_faulty_macro!(); | ^^^^^^^^^^^^^^^^^^^ | = note: expanding `my_faulty_macro! { }` @@ -20,10 +20,10 @@ note: trace_macro error: recursion limit reached while expanding the macro `my_recursive_macro` --> $DIR/trace_faulty_macros.rs:32:9 | -32 | my_recursive_macro!(); //~ ERROR recursion limit +LL | my_recursive_macro!(); //~ ERROR recursion limit | ^^^^^^^^^^^^^^^^^^^^^^ ... -44 | my_recursive_macro!(); +LL | my_recursive_macro!(); | ---------------------- in this macro invocation | = help: consider adding a `#![recursion_limit="8"]` attribute to your crate @@ -31,7 +31,7 @@ error: recursion limit reached while expanding the macro `my_recursive_macro` note: trace_macro --> $DIR/trace_faulty_macros.rs:44:5 | -44 | my_recursive_macro!(); +LL | my_recursive_macro!(); | ^^^^^^^^^^^^^^^^^^^^^^ | = note: expanding `my_recursive_macro! { }` diff --git a/src/test/ui/main-wrong-location.stderr b/src/test/ui/main-wrong-location.stderr index cb9740b87792f..a1682ef5cd368 100644 --- a/src/test/ui/main-wrong-location.stderr +++ b/src/test/ui/main-wrong-location.stderr @@ -1,11 +1,11 @@ error[E0601]: main function not found - | - = note: the main function must be defined at the crate level but you have one or more functions named 'main' that are not defined at the crate level. Either move the definition or attach the `#[main]` attribute to override this behavior. + | + = note: the main function must be defined at the crate level but you have one or more functions named 'main' that are not defined at the crate level. Either move the definition or attach the `#[main]` attribute to override this behavior. note: here is a function named 'main' - --> $DIR/main-wrong-location.rs:14:5 - | -14| fn main() { } - | ^^^^^^^^^^^^^ + --> $DIR/main-wrong-location.rs:14:5 + | +LL | fn main() { } + | ^^^^^^^^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/maybe-bounds.stderr b/src/test/ui/maybe-bounds.stderr index df9c3bca36429..72f052b75e302 100644 --- a/src/test/ui/maybe-bounds.stderr +++ b/src/test/ui/maybe-bounds.stderr @@ -1,7 +1,7 @@ error: `?Trait` is not permitted in supertraits --> $DIR/maybe-bounds.rs:11:12 | -11 | trait Tr: ?Sized {} //~ ERROR `?Trait` is not permitted in supertraits +LL | trait Tr: ?Sized {} //~ ERROR `?Trait` is not permitted in supertraits | ^^^^^ | = note: traits are `?Sized` by default @@ -9,13 +9,13 @@ error: `?Trait` is not permitted in supertraits error: `?Trait` is not permitted in trait object types --> $DIR/maybe-bounds.rs:13:17 | -13 | type A1 = Tr + ?Sized; //~ ERROR `?Trait` is not permitted in trait object types +LL | type A1 = Tr + ?Sized; //~ ERROR `?Trait` is not permitted in trait object types | ^^^^^ error: `?Trait` is not permitted in trait object types --> $DIR/maybe-bounds.rs:14:25 | -14 | type A2 = for<'a> Tr + ?Sized; //~ ERROR `?Trait` is not permitted in trait object types +LL | type A2 = for<'a> Tr + ?Sized; //~ ERROR `?Trait` is not permitted in trait object types | ^^^^^ error: aborting due to 3 previous errors diff --git a/src/test/ui/method-call-err-msg.stderr b/src/test/ui/method-call-err-msg.stderr index f9524696ed724..3103dea582027 100644 --- a/src/test/ui/method-call-err-msg.stderr +++ b/src/test/ui/method-call-err-msg.stderr @@ -1,37 +1,37 @@ error[E0061]: this function takes 0 parameters but 1 parameter was supplied --> $DIR/method-call-err-msg.rs:22:7 | -15 | fn zero(self) -> Foo { self } +LL | fn zero(self) -> Foo { self } | -------------------- defined here ... -22 | x.zero(0) //~ ERROR this function takes 0 parameters but 1 parameter was supplied +LL | x.zero(0) //~ ERROR this function takes 0 parameters but 1 parameter was supplied | ^^^^ expected 0 parameters error[E0061]: this function takes 1 parameter but 0 parameters were supplied --> $DIR/method-call-err-msg.rs:23:7 | -16 | fn one(self, _: isize) -> Foo { self } +LL | fn one(self, _: isize) -> Foo { self } | ----------------------------- defined here ... -23 | .one() //~ ERROR this function takes 1 parameter but 0 parameters were supplied +LL | .one() //~ ERROR this function takes 1 parameter but 0 parameters were supplied | ^^^ expected 1 parameter error[E0061]: this function takes 2 parameters but 1 parameter was supplied --> $DIR/method-call-err-msg.rs:24:7 | -17 | fn two(self, _: isize, _: isize) -> Foo { self } +LL | fn two(self, _: isize, _: isize) -> Foo { self } | --------------------------------------- defined here ... -24 | .two(0); //~ ERROR this function takes 2 parameters but 1 parameter was supplied +LL | .two(0); //~ ERROR this function takes 2 parameters but 1 parameter was supplied | ^^^ expected 2 parameters error[E0599]: no method named `take` found for type `Foo` in the current scope --> $DIR/method-call-err-msg.rs:28:7 | -13 | pub struct Foo; +LL | pub struct Foo; | --------------- method `take` not found for this ... -28 | .take() //~ ERROR no method named `take` found for type `Foo` in the current scope +LL | .take() //~ ERROR no method named `take` found for type `Foo` in the current scope | ^^^^ | = note: the method `take` exists but the following trait bounds were not satisfied: diff --git a/src/test/ui/method-call-lifetime-args-lint.stderr b/src/test/ui/method-call-lifetime-args-lint.stderr index e319b54aa2cae..1cb6804fa47fb 100644 --- a/src/test/ui/method-call-lifetime-args-lint.stderr +++ b/src/test/ui/method-call-lifetime-args-lint.stderr @@ -1,16 +1,16 @@ error: cannot specify lifetime arguments explicitly if late bound lifetime parameters are present --> $DIR/method-call-lifetime-args-lint.rs:22:14 | -17 | fn late<'a, 'b>(self, _: &'a u8, _: &'b u8) {} +LL | fn late<'a, 'b>(self, _: &'a u8, _: &'b u8) {} | -- the late bound lifetime parameter is introduced here ... -22 | S.late::<'static>(&0, &0); +LL | S.late::<'static>(&0, &0); | ^^^^^^^ | note: lint level defined here --> $DIR/method-call-lifetime-args-lint.rs:11:9 | -11 | #![deny(late_bound_lifetime_arguments)] +LL | #![deny(late_bound_lifetime_arguments)] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! = note: for more information, see issue #42868 @@ -18,10 +18,10 @@ note: lint level defined here error: cannot specify lifetime arguments explicitly if late bound lifetime parameters are present --> $DIR/method-call-lifetime-args-lint.rs:26:23 | -18 | fn late_implicit(self, _: &u8, _: &u8) {} +LL | fn late_implicit(self, _: &u8, _: &u8) {} | - the late bound lifetime parameter is introduced here ... -26 | S.late_implicit::<'static>(&0, &0); +LL | S.late_implicit::<'static>(&0, &0); | ^^^^^^^ | = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! diff --git a/src/test/ui/method-call-lifetime-args.stderr b/src/test/ui/method-call-lifetime-args.stderr index a6c1b8efe2791..8bc48cc8e734c 100644 --- a/src/test/ui/method-call-lifetime-args.stderr +++ b/src/test/ui/method-call-lifetime-args.stderr @@ -1,25 +1,25 @@ error: cannot specify lifetime arguments explicitly if late bound lifetime parameters are present --> $DIR/method-call-lifetime-args.rs:19:15 | -19 | S::late::<'static>(S, &0, &0); +LL | S::late::<'static>(S, &0, &0); | ^^^^^^^ | note: the late bound lifetime parameter is introduced here --> $DIR/method-call-lifetime-args.rs:14:13 | -14 | fn late<'a, 'b>(self, _: &'a u8, _: &'b u8) {} +LL | fn late<'a, 'b>(self, _: &'a u8, _: &'b u8) {} | ^^ error: cannot specify lifetime arguments explicitly if late bound lifetime parameters are present --> $DIR/method-call-lifetime-args.rs:21:24 | -21 | S::late_implicit::<'static>(S, &0, &0); +LL | S::late_implicit::<'static>(S, &0, &0); | ^^^^^^^ | note: the late bound lifetime parameter is introduced here --> $DIR/method-call-lifetime-args.rs:15:31 | -15 | fn late_implicit(self, _: &u8, _: &u8) {} +LL | fn late_implicit(self, _: &u8, _: &u8) {} | ^ error: aborting due to 2 previous errors diff --git a/src/test/ui/method-missing-call.stderr b/src/test/ui/method-missing-call.stderr index d4cffbff4ef76..8c893e33a15da 100644 --- a/src/test/ui/method-missing-call.stderr +++ b/src/test/ui/method-missing-call.stderr @@ -1,7 +1,7 @@ error[E0615]: attempted to take value of method `get_x` on type `Point` --> $DIR/method-missing-call.rs:32:26 | -32 | .get_x;//~ ERROR attempted to take value of method `get_x` on type `Point` +LL | .get_x;//~ ERROR attempted to take value of method `get_x` on type `Point` | ^^^^^ | = help: maybe a `()` to call it is missing? @@ -9,7 +9,7 @@ error[E0615]: attempted to take value of method `get_x` on type `Point` error[E0615]: attempted to take value of method `filter_map` on type `std::iter::Filter, [closure@$DIR/method-missing-call.rs:37:20: 37:25]>, [closure@$DIR/method-missing-call.rs:38:23: 38:35]>` --> $DIR/method-missing-call.rs:39:16 | -39 | .filter_map; //~ ERROR attempted to take value of method `filter_map` on type +LL | .filter_map; //~ ERROR attempted to take value of method `filter_map` on type | ^^^^^^^^^^ | = help: maybe a `()` to call it is missing? diff --git a/src/test/ui/mismatched_types/E0053.stderr b/src/test/ui/mismatched_types/E0053.stderr index 226cb473e7789..a64e754c879fd 100644 --- a/src/test/ui/mismatched_types/E0053.stderr +++ b/src/test/ui/mismatched_types/E0053.stderr @@ -1,10 +1,10 @@ error[E0053]: method `foo` has an incompatible type for trait --> $DIR/E0053.rs:19:15 | -12 | fn foo(x: u16); +LL | fn foo(x: u16); | --- type in trait ... -19 | fn foo(x: i16) { } +LL | fn foo(x: i16) { } | ^^^ expected u16, found i16 | = note: expected type `fn(u16)` @@ -13,10 +13,10 @@ error[E0053]: method `foo` has an incompatible type for trait error[E0053]: method `bar` has an incompatible type for trait --> $DIR/E0053.rs:21:12 | -13 | fn bar(&self); +LL | fn bar(&self); | ----- type in trait ... -21 | fn bar(&mut self) { } +LL | fn bar(&mut self) { } | ^^^^^^^^^ types differ in mutability | = note: expected type `fn(&Bar)` diff --git a/src/test/ui/mismatched_types/E0409.stderr b/src/test/ui/mismatched_types/E0409.stderr index cc7c01790706a..3b74e37ff9e5c 100644 --- a/src/test/ui/mismatched_types/E0409.stderr +++ b/src/test/ui/mismatched_types/E0409.stderr @@ -1,7 +1,7 @@ error[E0409]: variable `y` is bound in inconsistent ways within the same match arm --> $DIR/E0409.rs:15:23 | -15 | (0, ref y) | (y, 0) => {} //~ ERROR E0409 +LL | (0, ref y) | (y, 0) => {} //~ ERROR E0409 | - ^ bound in different ways | | | first binding @@ -9,7 +9,7 @@ error[E0409]: variable `y` is bound in inconsistent ways within the same match a error[E0308]: mismatched types --> $DIR/E0409.rs:15:23 | -15 | (0, ref y) | (y, 0) => {} //~ ERROR E0409 +LL | (0, ref y) | (y, 0) => {} //~ ERROR E0409 | ^ expected &{integer}, found integral variable | = note: expected type `&{integer}` diff --git a/src/test/ui/mismatched_types/E0631.stderr b/src/test/ui/mismatched_types/E0631.stderr index 53f2f54325d57..bbd48bd09039f 100644 --- a/src/test/ui/mismatched_types/E0631.stderr +++ b/src/test/ui/mismatched_types/E0631.stderr @@ -1,7 +1,7 @@ error[E0631]: type mismatch in closure arguments --> $DIR/E0631.rs:17:5 | -17 | foo(|_: isize| {}); //~ ERROR type mismatch +LL | foo(|_: isize| {}); //~ ERROR type mismatch | ^^^ ---------- found signature of `fn(isize) -> _` | | | expected signature of `fn(usize) -> _` @@ -9,13 +9,13 @@ error[E0631]: type mismatch in closure arguments note: required by `foo` --> $DIR/E0631.rs:13:1 | -13 | fn foo(_: F) {} +LL | fn foo(_: F) {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^ error[E0631]: type mismatch in closure arguments --> $DIR/E0631.rs:18:5 | -18 | bar(|_: isize| {}); //~ ERROR type mismatch +LL | bar(|_: isize| {}); //~ ERROR type mismatch | ^^^ ---------- found signature of `fn(isize) -> _` | | | expected signature of `fn(usize) -> _` @@ -23,37 +23,37 @@ error[E0631]: type mismatch in closure arguments note: required by `bar` --> $DIR/E0631.rs:14:1 | -14 | fn bar>(_: F) {} +LL | fn bar>(_: F) {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^ error[E0631]: type mismatch in function arguments --> $DIR/E0631.rs:19:5 | -16 | fn f(_: u64) {} +LL | fn f(_: u64) {} | ------------ found signature of `fn(u64) -> _` ... -19 | foo(f); //~ ERROR type mismatch +LL | foo(f); //~ ERROR type mismatch | ^^^ expected signature of `fn(usize) -> _` | note: required by `foo` --> $DIR/E0631.rs:13:1 | -13 | fn foo(_: F) {} +LL | fn foo(_: F) {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^ error[E0631]: type mismatch in function arguments --> $DIR/E0631.rs:20:5 | -16 | fn f(_: u64) {} +LL | fn f(_: u64) {} | ------------ found signature of `fn(u64) -> _` ... -20 | bar(f); //~ ERROR type mismatch +LL | bar(f); //~ ERROR type mismatch | ^^^ expected signature of `fn(usize) -> _` | note: required by `bar` --> $DIR/E0631.rs:14:1 | -14 | fn bar>(_: F) {} +LL | fn bar>(_: F) {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^ error: aborting due to 4 previous errors diff --git a/src/test/ui/mismatched_types/abridged.stderr b/src/test/ui/mismatched_types/abridged.stderr index 2e1e5afad32c1..bff2fd8676cdc 100644 --- a/src/test/ui/mismatched_types/abridged.stderr +++ b/src/test/ui/mismatched_types/abridged.stderr @@ -1,9 +1,9 @@ error[E0308]: mismatched types --> $DIR/abridged.rs:26:5 | -25 | fn a() -> Foo { +LL | fn a() -> Foo { | --- expected `Foo` because of return type -26 | Some(Foo { bar: 1 }) //~ ERROR mismatched types +LL | Some(Foo { bar: 1 }) //~ ERROR mismatched types | ^^^^^^^^^^^^^^^^^^^^ expected struct `Foo`, found enum `std::option::Option` | = note: expected type `Foo` @@ -12,9 +12,9 @@ error[E0308]: mismatched types error[E0308]: mismatched types --> $DIR/abridged.rs:30:5 | -29 | fn a2() -> Foo { +LL | fn a2() -> Foo { | --- expected `Foo` because of return type -30 | Ok(Foo { bar: 1}) //~ ERROR mismatched types +LL | Ok(Foo { bar: 1}) //~ ERROR mismatched types | ^^^^^^^^^^^^^^^^^ expected struct `Foo`, found enum `std::result::Result` | = note: expected type `Foo` @@ -23,9 +23,9 @@ error[E0308]: mismatched types error[E0308]: mismatched types --> $DIR/abridged.rs:34:5 | -33 | fn b() -> Option { +LL | fn b() -> Option { | ----------- expected `std::option::Option` because of return type -34 | Foo { bar: 1 } //~ ERROR mismatched types +LL | Foo { bar: 1 } //~ ERROR mismatched types | ^^^^^^^^^^^^^^ expected enum `std::option::Option`, found struct `Foo` | = note: expected type `std::option::Option` @@ -34,9 +34,9 @@ error[E0308]: mismatched types error[E0308]: mismatched types --> $DIR/abridged.rs:38:5 | -37 | fn c() -> Result { +LL | fn c() -> Result { | ---------------- expected `std::result::Result` because of return type -38 | Foo { bar: 1 } //~ ERROR mismatched types +LL | Foo { bar: 1 } //~ ERROR mismatched types | ^^^^^^^^^^^^^^ expected enum `std::result::Result`, found struct `Foo` | = note: expected type `std::result::Result` @@ -45,10 +45,10 @@ error[E0308]: mismatched types error[E0308]: mismatched types --> $DIR/abridged.rs:49:5 | -41 | fn d() -> X, String> { +LL | fn d() -> X, String> { | ---------------------------- expected `X, std::string::String>` because of return type ... -49 | x //~ ERROR mismatched types +LL | x //~ ERROR mismatched types | ^ expected struct `std::string::String`, found integral variable | = note: expected type `X, std::string::String>` @@ -57,10 +57,10 @@ error[E0308]: mismatched types error[E0308]: mismatched types --> $DIR/abridged.rs:60:5 | -52 | fn e() -> X, String> { +LL | fn e() -> X, String> { | ---------------------------- expected `X, std::string::String>` because of return type ... -60 | x //~ ERROR mismatched types +LL | x //~ ERROR mismatched types | ^ expected struct `std::string::String`, found integral variable | = note: expected type `X, _>` diff --git a/src/test/ui/mismatched_types/binops.stderr b/src/test/ui/mismatched_types/binops.stderr index 828cf636951ed..ead9cde1e22f7 100644 --- a/src/test/ui/mismatched_types/binops.stderr +++ b/src/test/ui/mismatched_types/binops.stderr @@ -1,7 +1,7 @@ error[E0277]: cannot add `std::option::Option<{integer}>` to `{integer}` --> $DIR/binops.rs:12:7 | -12 | 1 + Some(1); //~ ERROR cannot add `std::option::Option<{integer}>` to `{integer}` +LL | 1 + Some(1); //~ ERROR cannot add `std::option::Option<{integer}>` to `{integer}` | ^ no implementation for `{integer} + std::option::Option<{integer}>` | = help: the trait `std::ops::Add>` is not implemented for `{integer}` @@ -9,7 +9,7 @@ error[E0277]: cannot add `std::option::Option<{integer}>` to `{integer}` error[E0277]: cannot subtract `std::option::Option<{integer}>` from `usize` --> $DIR/binops.rs:13:16 | -13 | 2 as usize - Some(1); //~ ERROR cannot subtract `std::option::Option<{integer}>` from `usize` +LL | 2 as usize - Some(1); //~ ERROR cannot subtract `std::option::Option<{integer}>` from `usize` | ^ no implementation for `usize - std::option::Option<{integer}>` | = help: the trait `std::ops::Sub>` is not implemented for `usize` @@ -17,7 +17,7 @@ error[E0277]: cannot subtract `std::option::Option<{integer}>` from `usize` error[E0277]: cannot multiply `()` to `{integer}` --> $DIR/binops.rs:14:7 | -14 | 3 * (); //~ ERROR cannot multiply `()` to `{integer}` +LL | 3 * (); //~ ERROR cannot multiply `()` to `{integer}` | ^ no implementation for `{integer} * ()` | = help: the trait `std::ops::Mul<()>` is not implemented for `{integer}` @@ -25,7 +25,7 @@ error[E0277]: cannot multiply `()` to `{integer}` error[E0277]: cannot divide `{integer}` by `&str` --> $DIR/binops.rs:15:7 | -15 | 4 / ""; //~ ERROR cannot divide `{integer}` by `&str` +LL | 4 / ""; //~ ERROR cannot divide `{integer}` by `&str` | ^ no implementation for `{integer} / &str` | = help: the trait `std::ops::Div<&str>` is not implemented for `{integer}` @@ -33,7 +33,7 @@ error[E0277]: cannot divide `{integer}` by `&str` error[E0277]: the trait bound `{integer}: std::cmp::PartialOrd` is not satisfied --> $DIR/binops.rs:16:7 | -16 | 5 < String::new(); //~ ERROR is not satisfied +LL | 5 < String::new(); //~ ERROR is not satisfied | ^ can't compare `{integer}` with `std::string::String` | = help: the trait `std::cmp::PartialOrd` is not implemented for `{integer}` @@ -41,7 +41,7 @@ error[E0277]: the trait bound `{integer}: std::cmp::PartialOrd>` is not satisfied --> $DIR/binops.rs:17:7 | -17 | 6 == Ok(1); //~ ERROR is not satisfied +LL | 6 == Ok(1); //~ ERROR is not satisfied | ^^ can't compare `{integer}` with `std::result::Result<{integer}, _>` | = help: the trait `std::cmp::PartialEq>` is not implemented for `{integer}` diff --git a/src/test/ui/mismatched_types/cast-rfc0401.stderr b/src/test/ui/mismatched_types/cast-rfc0401.stderr index fa4f590362123..472845057fce8 100644 --- a/src/test/ui/mismatched_types/cast-rfc0401.stderr +++ b/src/test/ui/mismatched_types/cast-rfc0401.stderr @@ -1,7 +1,7 @@ error[E0606]: casting `*const U` as `*const V` is invalid --> $DIR/cast-rfc0401.rs:13:5 | -13 | u as *const V //~ ERROR is invalid +LL | u as *const V //~ ERROR is invalid | ^^^^^^^^^^^^^ | = note: vtable kinds may not match @@ -9,7 +9,7 @@ error[E0606]: casting `*const U` as `*const V` is invalid error[E0606]: casting `*const U` as `*const str` is invalid --> $DIR/cast-rfc0401.rs:18:5 | -18 | u as *const str //~ ERROR is invalid +LL | u as *const str //~ ERROR is invalid | ^^^^^^^^^^^^^^^ | = note: vtable kinds may not match @@ -17,13 +17,13 @@ error[E0606]: casting `*const U` as `*const str` is invalid error[E0609]: no field `f` on type `fn() {main}` --> $DIR/cast-rfc0401.rs:75:18 | -75 | let _ = main.f as *const u32; //~ ERROR no field +LL | let _ = main.f as *const u32; //~ ERROR no field | ^ error[E0605]: non-primitive cast: `*const u8` as `&u8` --> $DIR/cast-rfc0401.rs:39:13 | -39 | let _ = v as &u8; //~ ERROR non-primitive cast +LL | let _ = v as &u8; //~ ERROR non-primitive cast | ^^^^^^^^ | = note: an `as` expression can only be used to convert between primitive types. Consider using the `From` trait @@ -31,7 +31,7 @@ error[E0605]: non-primitive cast: `*const u8` as `&u8` error[E0605]: non-primitive cast: `*const u8` as `E` --> $DIR/cast-rfc0401.rs:40:13 | -40 | let _ = v as E; //~ ERROR non-primitive cast +LL | let _ = v as E; //~ ERROR non-primitive cast | ^^^^^^ | = note: an `as` expression can only be used to convert between primitive types. Consider using the `From` trait @@ -39,7 +39,7 @@ error[E0605]: non-primitive cast: `*const u8` as `E` error[E0605]: non-primitive cast: `*const u8` as `fn()` --> $DIR/cast-rfc0401.rs:41:13 | -41 | let _ = v as fn(); //~ ERROR non-primitive cast +LL | let _ = v as fn(); //~ ERROR non-primitive cast | ^^^^^^^^^ | = note: an `as` expression can only be used to convert between primitive types. Consider using the `From` trait @@ -47,7 +47,7 @@ error[E0605]: non-primitive cast: `*const u8` as `fn()` error[E0605]: non-primitive cast: `*const u8` as `(u32,)` --> $DIR/cast-rfc0401.rs:42:13 | -42 | let _ = v as (u32,); //~ ERROR non-primitive cast +LL | let _ = v as (u32,); //~ ERROR non-primitive cast | ^^^^^^^^^^^ | = note: an `as` expression can only be used to convert between primitive types. Consider using the `From` trait @@ -55,7 +55,7 @@ error[E0605]: non-primitive cast: `*const u8` as `(u32,)` error[E0605]: non-primitive cast: `std::option::Option<&*const u8>` as `*const u8` --> $DIR/cast-rfc0401.rs:43:13 | -43 | let _ = Some(&v) as *const u8; //~ ERROR non-primitive cast +LL | let _ = Some(&v) as *const u8; //~ ERROR non-primitive cast | ^^^^^^^^^^^^^^^^^^^^^ | = note: an `as` expression can only be used to convert between primitive types. Consider using the `From` trait @@ -63,19 +63,19 @@ error[E0605]: non-primitive cast: `std::option::Option<&*const u8>` as `*const u error[E0606]: casting `*const u8` as `f32` is invalid --> $DIR/cast-rfc0401.rs:45:13 | -45 | let _ = v as f32; //~ ERROR is invalid +LL | let _ = v as f32; //~ ERROR is invalid | ^^^^^^^^ error[E0606]: casting `fn() {main}` as `f64` is invalid --> $DIR/cast-rfc0401.rs:46:13 | -46 | let _ = main as f64; //~ ERROR is invalid +LL | let _ = main as f64; //~ ERROR is invalid | ^^^^^^^^^^^ error[E0606]: casting `&*const u8` as `usize` is invalid --> $DIR/cast-rfc0401.rs:47:13 | -47 | let _ = &v as usize; //~ ERROR is invalid +LL | let _ = &v as usize; //~ ERROR is invalid | ^^^^^^^^^^^ | = help: cast through a raw pointer first @@ -83,13 +83,13 @@ error[E0606]: casting `&*const u8` as `usize` is invalid error[E0606]: casting `f32` as `*const u8` is invalid --> $DIR/cast-rfc0401.rs:48:13 | -48 | let _ = f as *const u8; //~ ERROR is invalid +LL | let _ = f as *const u8; //~ ERROR is invalid | ^^^^^^^^^^^^^^ error[E0054]: cannot cast as `bool` --> $DIR/cast-rfc0401.rs:49:13 | -49 | let _ = 3_i32 as bool; //~ ERROR cannot cast +LL | let _ = 3_i32 as bool; //~ ERROR cannot cast | ^^^^^^^^^^^^^ unsupported cast | = help: compare with zero instead @@ -97,7 +97,7 @@ error[E0054]: cannot cast as `bool` error[E0054]: cannot cast as `bool` --> $DIR/cast-rfc0401.rs:50:13 | -50 | let _ = E::A as bool; //~ ERROR cannot cast +LL | let _ = E::A as bool; //~ ERROR cannot cast | ^^^^^^^^^^^^ unsupported cast | = help: compare with zero instead @@ -105,13 +105,13 @@ error[E0054]: cannot cast as `bool` error[E0604]: only `u8` can be cast as `char`, not `u32` --> $DIR/cast-rfc0401.rs:51:13 | -51 | let _ = 0x61u32 as char; //~ ERROR can be cast as +LL | let _ = 0x61u32 as char; //~ ERROR can be cast as | ^^^^^^^^^^^^^^^ error[E0606]: casting `bool` as `f32` is invalid --> $DIR/cast-rfc0401.rs:53:13 | -53 | let _ = false as f32; //~ ERROR is invalid +LL | let _ = false as f32; //~ ERROR is invalid | ^^^^^^^^^^^^ | = help: cast through an integer first @@ -119,7 +119,7 @@ error[E0606]: casting `bool` as `f32` is invalid error[E0606]: casting `E` as `f32` is invalid --> $DIR/cast-rfc0401.rs:54:13 | -54 | let _ = E::A as f32; //~ ERROR is invalid +LL | let _ = E::A as f32; //~ ERROR is invalid | ^^^^^^^^^^^ | = help: cast through an integer first @@ -127,7 +127,7 @@ error[E0606]: casting `E` as `f32` is invalid error[E0606]: casting `char` as `f32` is invalid --> $DIR/cast-rfc0401.rs:55:13 | -55 | let _ = 'a' as f32; //~ ERROR is invalid +LL | let _ = 'a' as f32; //~ ERROR is invalid | ^^^^^^^^^^ | = help: cast through an integer first @@ -135,67 +135,67 @@ error[E0606]: casting `char` as `f32` is invalid error[E0606]: casting `bool` as `*const u8` is invalid --> $DIR/cast-rfc0401.rs:57:13 | -57 | let _ = false as *const u8; //~ ERROR is invalid +LL | let _ = false as *const u8; //~ ERROR is invalid | ^^^^^^^^^^^^^^^^^^ error[E0606]: casting `E` as `*const u8` is invalid --> $DIR/cast-rfc0401.rs:58:13 | -58 | let _ = E::A as *const u8; //~ ERROR is invalid +LL | let _ = E::A as *const u8; //~ ERROR is invalid | ^^^^^^^^^^^^^^^^^ error[E0606]: casting `char` as `*const u8` is invalid --> $DIR/cast-rfc0401.rs:59:13 | -59 | let _ = 'a' as *const u8; //~ ERROR is invalid +LL | let _ = 'a' as *const u8; //~ ERROR is invalid | ^^^^^^^^^^^^^^^^ error[E0606]: casting `usize` as `*const [u8]` is invalid --> $DIR/cast-rfc0401.rs:61:13 | -61 | let _ = 42usize as *const [u8]; //~ ERROR is invalid +LL | let _ = 42usize as *const [u8]; //~ ERROR is invalid | ^^^^^^^^^^^^^^^^^^^^^^ error[E0607]: cannot cast thin pointer `*const u8` to fat pointer `*const [u8]` --> $DIR/cast-rfc0401.rs:62:13 | -62 | let _ = v as *const [u8]; //~ ERROR cannot cast +LL | let _ = v as *const [u8]; //~ ERROR cannot cast | ^^^^^^^^^^^^^^^^ error[E0606]: casting `&Foo` as `*const str` is invalid --> $DIR/cast-rfc0401.rs:64:13 | -64 | let _ = foo as *const str; //~ ERROR is invalid +LL | let _ = foo as *const str; //~ ERROR is invalid | ^^^^^^^^^^^^^^^^^ error[E0606]: casting `&Foo` as `*mut str` is invalid --> $DIR/cast-rfc0401.rs:65:13 | -65 | let _ = foo as *mut str; //~ ERROR is invalid +LL | let _ = foo as *mut str; //~ ERROR is invalid | ^^^^^^^^^^^^^^^ error[E0606]: casting `fn() {main}` as `*mut str` is invalid --> $DIR/cast-rfc0401.rs:66:13 | -66 | let _ = main as *mut str; //~ ERROR is invalid +LL | let _ = main as *mut str; //~ ERROR is invalid | ^^^^^^^^^^^^^^^^ error[E0606]: casting `&f32` as `*mut f32` is invalid --> $DIR/cast-rfc0401.rs:67:13 | -67 | let _ = &f as *mut f32; //~ ERROR is invalid +LL | let _ = &f as *mut f32; //~ ERROR is invalid | ^^^^^^^^^^^^^^ error[E0606]: casting `&f32` as `*const f64` is invalid --> $DIR/cast-rfc0401.rs:68:13 | -68 | let _ = &f as *const f64; //~ ERROR is invalid +LL | let _ = &f as *const f64; //~ ERROR is invalid | ^^^^^^^^^^^^^^^^ error[E0606]: casting `*const [i8]` as `usize` is invalid --> $DIR/cast-rfc0401.rs:69:13 | -69 | let _ = fat_sv as usize; //~ ERROR is invalid +LL | let _ = fat_sv as usize; //~ ERROR is invalid | ^^^^^^^^^^^^^^^ | = help: cast through a thin pointer first @@ -203,7 +203,7 @@ error[E0606]: casting `*const [i8]` as `usize` is invalid error[E0606]: casting `*const Foo` as `*const [u16]` is invalid --> $DIR/cast-rfc0401.rs:78:13 | -78 | let _ = cf as *const [u16]; //~ ERROR is invalid +LL | let _ = cf as *const [u16]; //~ ERROR is invalid | ^^^^^^^^^^^^^^^^^^ | = note: vtable kinds may not match @@ -211,7 +211,7 @@ error[E0606]: casting `*const Foo` as `*const [u16]` is invalid error[E0606]: casting `*const Foo` as `*const Bar` is invalid --> $DIR/cast-rfc0401.rs:79:13 | -79 | let _ = cf as *const Bar; //~ ERROR is invalid +LL | let _ = cf as *const Bar; //~ ERROR is invalid | ^^^^^^^^^^^^^^^^ | = note: vtable kinds may not match @@ -219,7 +219,7 @@ error[E0606]: casting `*const Foo` as `*const Bar` is invalid error[E0277]: the trait bound `[u8]: std::marker::Sized` is not satisfied --> $DIR/cast-rfc0401.rs:63:13 | -63 | let _ = fat_v as *const Foo; //~ ERROR is not satisfied +LL | let _ = fat_v as *const Foo; //~ ERROR is not satisfied | ^^^^^ `[u8]` does not have a constant size known at compile-time | = help: the trait `std::marker::Sized` is not implemented for `[u8]` @@ -228,7 +228,7 @@ error[E0277]: the trait bound `[u8]: std::marker::Sized` is not satisfied error[E0277]: the trait bound `str: std::marker::Sized` is not satisfied --> $DIR/cast-rfc0401.rs:72:13 | -72 | let _ = a as *const Foo; //~ ERROR is not satisfied +LL | let _ = a as *const Foo; //~ ERROR is not satisfied | ^ `str` does not have a constant size known at compile-time | = help: the trait `std::marker::Sized` is not implemented for `str` @@ -237,13 +237,13 @@ error[E0277]: the trait bound `str: std::marker::Sized` is not satisfied error[E0606]: casting `&{float}` as `f32` is invalid --> $DIR/cast-rfc0401.rs:81:30 | -81 | vec![0.0].iter().map(|s| s as f32).collect::>(); //~ ERROR is invalid +LL | vec![0.0].iter().map(|s| s as f32).collect::>(); //~ ERROR is invalid | ^^^^^^^^ cannot cast `&{float}` as `f32` | help: did you mean `*s`? --> $DIR/cast-rfc0401.rs:81:30 | -81 | vec![0.0].iter().map(|s| s as f32).collect::>(); //~ ERROR is invalid +LL | vec![0.0].iter().map(|s| s as f32).collect::>(); //~ ERROR is invalid | ^ error: aborting due to 34 previous errors diff --git a/src/test/ui/mismatched_types/closure-arg-count-expected-type-issue-47244.stderr b/src/test/ui/mismatched_types/closure-arg-count-expected-type-issue-47244.stderr index 34934b8d19598..78906bf8e1689 100644 --- a/src/test/ui/mismatched_types/closure-arg-count-expected-type-issue-47244.stderr +++ b/src/test/ui/mismatched_types/closure-arg-count-expected-type-issue-47244.stderr @@ -1,13 +1,13 @@ error[E0593]: closure is expected to take a single 2-tuple as argument, but it takes 2 distinct arguments --> $DIR/closure-arg-count-expected-type-issue-47244.rs:24:14 | -24 | m.iter().map( |_, b| { +LL | m.iter().map( |_, b| { | ^^^ ------ takes 2 distinct arguments | | | expected closure that takes a single 2-tuple as argument help: change the closure to accept a tuple instead of individual arguments | -24 | m.iter().map( |(_, b)| { +LL | m.iter().map( |(_, b)| { | ^^^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/mismatched_types/closure-arg-count.stderr b/src/test/ui/mismatched_types/closure-arg-count.stderr index d2a6d6da814ca..9a45c13303bde 100644 --- a/src/test/ui/mismatched_types/closure-arg-count.stderr +++ b/src/test/ui/mismatched_types/closure-arg-count.stderr @@ -1,7 +1,7 @@ error[E0593]: closure is expected to take 2 arguments, but it takes 0 arguments --> $DIR/closure-arg-count.rs:15:15 | -15 | [1, 2, 3].sort_by(|| panic!()); +LL | [1, 2, 3].sort_by(|| panic!()); | ^^^^^^^ -- takes 0 arguments | | | expected closure that takes 2 arguments @@ -9,7 +9,7 @@ error[E0593]: closure is expected to take 2 arguments, but it takes 0 arguments error[E0593]: closure is expected to take 2 arguments, but it takes 1 argument --> $DIR/closure-arg-count.rs:17:15 | -17 | [1, 2, 3].sort_by(|tuple| panic!()); +LL | [1, 2, 3].sort_by(|tuple| panic!()); | ^^^^^^^ ------- takes 1 argument | | | expected closure that takes 2 arguments @@ -17,31 +17,31 @@ error[E0593]: closure is expected to take 2 arguments, but it takes 1 argument error[E0593]: closure is expected to take 2 distinct arguments, but it takes a single 2-tuple as argument --> $DIR/closure-arg-count.rs:19:15 | -19 | [1, 2, 3].sort_by(|(tuple, tuple2)| panic!()); +LL | [1, 2, 3].sort_by(|(tuple, tuple2)| panic!()); | ^^^^^^^ ----------------- takes a single 2-tuple as argument | | | expected closure that takes 2 distinct arguments help: change the closure to take multiple arguments instead of a single tuple | -19 | [1, 2, 3].sort_by(|tuple, tuple2| panic!()); +LL | [1, 2, 3].sort_by(|tuple, tuple2| panic!()); | ^^^^^^^^^^^^^^^ error[E0593]: closure is expected to take 2 distinct arguments, but it takes a single 2-tuple as argument --> $DIR/closure-arg-count.rs:21:15 | -21 | [1, 2, 3].sort_by(|(tuple, tuple2): (usize, _)| panic!()); +LL | [1, 2, 3].sort_by(|(tuple, tuple2): (usize, _)| panic!()); | ^^^^^^^ ----------------------------- takes a single 2-tuple as argument | | | expected closure that takes 2 distinct arguments help: change the closure to take multiple arguments instead of a single tuple | -21 | [1, 2, 3].sort_by(|tuple, tuple2| panic!()); +LL | [1, 2, 3].sort_by(|tuple, tuple2| panic!()); | ^^^^^^^^^^^^^^^ error[E0593]: closure is expected to take 1 argument, but it takes 0 arguments --> $DIR/closure-arg-count.rs:23:5 | -23 | f(|| panic!()); +LL | f(|| panic!()); | ^ -- takes 0 arguments | | | expected closure that takes 1 argument @@ -49,37 +49,37 @@ error[E0593]: closure is expected to take 1 argument, but it takes 0 arguments note: required by `f` --> $DIR/closure-arg-count.rs:13:1 | -13 | fn f>(_: F) {} +LL | fn f>(_: F) {} | ^^^^^^^^^^^^^^^^^^^^^^^^ error[E0593]: closure is expected to take a single 2-tuple as argument, but it takes 2 distinct arguments --> $DIR/closure-arg-count.rs:26:53 | -26 | let _it = vec![1, 2, 3].into_iter().enumerate().map(|i, x| i); +LL | let _it = vec![1, 2, 3].into_iter().enumerate().map(|i, x| i); | ^^^ ------ takes 2 distinct arguments | | | expected closure that takes a single 2-tuple as argument help: change the closure to accept a tuple instead of individual arguments | -26 | let _it = vec![1, 2, 3].into_iter().enumerate().map(|(i, x)| i); +LL | let _it = vec![1, 2, 3].into_iter().enumerate().map(|(i, x)| i); | ^^^^^^^^ error[E0593]: closure is expected to take a single 2-tuple as argument, but it takes 2 distinct arguments --> $DIR/closure-arg-count.rs:28:53 | -28 | let _it = vec![1, 2, 3].into_iter().enumerate().map(|i: usize, x| i); +LL | let _it = vec![1, 2, 3].into_iter().enumerate().map(|i: usize, x| i); | ^^^ ------------- takes 2 distinct arguments | | | expected closure that takes a single 2-tuple as argument help: change the closure to accept a tuple instead of individual arguments | -28 | let _it = vec![1, 2, 3].into_iter().enumerate().map(|(i, x)| i); +LL | let _it = vec![1, 2, 3].into_iter().enumerate().map(|(i, x)| i); | ^^^^^^^^ error[E0593]: closure is expected to take a single 2-tuple as argument, but it takes 3 distinct arguments --> $DIR/closure-arg-count.rs:30:53 | -30 | let _it = vec![1, 2, 3].into_iter().enumerate().map(|i, x, y| i); +LL | let _it = vec![1, 2, 3].into_iter().enumerate().map(|i, x, y| i); | ^^^ --------- takes 3 distinct arguments | | | expected closure that takes a single 2-tuple as argument @@ -87,33 +87,33 @@ error[E0593]: closure is expected to take a single 2-tuple as argument, but it t error[E0593]: function is expected to take a single 2-tuple as argument, but it takes 0 arguments --> $DIR/closure-arg-count.rs:32:53 | -32 | let _it = vec![1, 2, 3].into_iter().enumerate().map(foo); +LL | let _it = vec![1, 2, 3].into_iter().enumerate().map(foo); | ^^^ expected function that takes a single 2-tuple as argument ... -44 | fn foo() {} +LL | fn foo() {} | -------- takes 0 arguments error[E0593]: closure is expected to take a single 2-tuple as argument, but it takes 3 distinct arguments --> $DIR/closure-arg-count.rs:35:53 | -34 | let bar = |i, x, y| i; +LL | let bar = |i, x, y| i; | --------- takes 3 distinct arguments -35 | let _it = vec![1, 2, 3].into_iter().enumerate().map(bar); +LL | let _it = vec![1, 2, 3].into_iter().enumerate().map(bar); | ^^^ expected closure that takes a single 2-tuple as argument error[E0593]: function is expected to take a single 2-tuple as argument, but it takes 2 distinct arguments --> $DIR/closure-arg-count.rs:37:53 | -37 | let _it = vec![1, 2, 3].into_iter().enumerate().map(qux); +LL | let _it = vec![1, 2, 3].into_iter().enumerate().map(qux); | ^^^ expected function that takes a single 2-tuple as argument ... -45 | fn qux(x: usize, y: usize) {} +LL | fn qux(x: usize, y: usize) {} | -------------------------- takes 2 distinct arguments error[E0593]: function is expected to take 1 argument, but it takes 2 arguments --> $DIR/closure-arg-count.rs:40:41 | -40 | let _it = vec![1, 2, 3].into_iter().map(usize::checked_add); +LL | let _it = vec![1, 2, 3].into_iter().map(usize::checked_add); | ^^^ expected function that takes 1 argument error: aborting due to 12 previous errors diff --git a/src/test/ui/mismatched_types/closure-arg-type-mismatch.stderr b/src/test/ui/mismatched_types/closure-arg-type-mismatch.stderr index dfd02fe23b686..b996c9000aaea 100644 --- a/src/test/ui/mismatched_types/closure-arg-type-mismatch.stderr +++ b/src/test/ui/mismatched_types/closure-arg-type-mismatch.stderr @@ -1,7 +1,7 @@ error[E0631]: type mismatch in closure arguments --> $DIR/closure-arg-type-mismatch.rs:13:14 | -13 | a.iter().map(|_: (u32, u32)| 45); //~ ERROR type mismatch +LL | a.iter().map(|_: (u32, u32)| 45); //~ ERROR type mismatch | ^^^ ------------------ found signature of `fn((u32, u32)) -> _` | | | expected signature of `fn(&(u32, u32)) -> _` @@ -9,7 +9,7 @@ error[E0631]: type mismatch in closure arguments error[E0631]: type mismatch in closure arguments --> $DIR/closure-arg-type-mismatch.rs:14:14 | -14 | a.iter().map(|_: &(u16, u16)| 45); //~ ERROR type mismatch +LL | a.iter().map(|_: &(u16, u16)| 45); //~ ERROR type mismatch | ^^^ ------------------- found signature of `for<'r> fn(&'r (u16, u16)) -> _` | | | expected signature of `fn(&(u32, u32)) -> _` @@ -17,7 +17,7 @@ error[E0631]: type mismatch in closure arguments error[E0631]: type mismatch in closure arguments --> $DIR/closure-arg-type-mismatch.rs:15:14 | -15 | a.iter().map(|_: (u16, u16)| 45); //~ ERROR type mismatch +LL | a.iter().map(|_: (u16, u16)| 45); //~ ERROR type mismatch | ^^^ ------------------ found signature of `fn((u16, u16)) -> _` | | | expected signature of `fn(&(u32, u32)) -> _` @@ -25,7 +25,7 @@ error[E0631]: type mismatch in closure arguments error[E0631]: type mismatch in function arguments --> $DIR/closure-arg-type-mismatch.rs:20:5 | -20 | baz(f); //~ ERROR type mismatch +LL | baz(f); //~ ERROR type mismatch | ^^^ | | | expected signature of `for<'r> fn(*mut &'r u32) -> _` @@ -34,19 +34,19 @@ error[E0631]: type mismatch in function arguments note: required by `baz` --> $DIR/closure-arg-type-mismatch.rs:18:1 | -18 | fn baz(_: F) {} +LL | fn baz(_: F) {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error[E0271]: type mismatch resolving `for<'r> >::Output == ()` --> $DIR/closure-arg-type-mismatch.rs:20:5 | -20 | baz(f); //~ ERROR type mismatch +LL | baz(f); //~ ERROR type mismatch | ^^^ expected bound lifetime parameter, found concrete lifetime | note: required by `baz` --> $DIR/closure-arg-type-mismatch.rs:18:1 | -18 | fn baz(_: F) {} +LL | fn baz(_: F) {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: aborting due to 5 previous errors diff --git a/src/test/ui/mismatched_types/closure-mismatch.stderr b/src/test/ui/mismatched_types/closure-mismatch.stderr index 01de7e0749500..8ef4cea587ec0 100644 --- a/src/test/ui/mismatched_types/closure-mismatch.stderr +++ b/src/test/ui/mismatched_types/closure-mismatch.stderr @@ -1,20 +1,20 @@ error[E0271]: type mismatch resolving `for<'r> <[closure@$DIR/closure-mismatch.rs:18:9: 18:15] as std::ops::FnOnce<(&'r (),)>>::Output == ()` --> $DIR/closure-mismatch.rs:18:5 | -18 | baz(|_| ()); //~ ERROR type mismatch +LL | baz(|_| ()); //~ ERROR type mismatch | ^^^ expected bound lifetime parameter, found concrete lifetime | = note: required because of the requirements on the impl of `Foo` for `[closure@$DIR/closure-mismatch.rs:18:9: 18:15]` note: required by `baz` --> $DIR/closure-mismatch.rs:15:1 | -15 | fn baz(_: T) {} +LL | fn baz(_: T) {} | ^^^^^^^^^^^^^^^^^^^^ error[E0631]: type mismatch in closure arguments --> $DIR/closure-mismatch.rs:18:5 | -18 | baz(|_| ()); //~ ERROR type mismatch +LL | baz(|_| ()); //~ ERROR type mismatch | ^^^ ------ found signature of `fn(_) -> _` | | | expected signature of `for<'r> fn(&'r ()) -> _` @@ -23,7 +23,7 @@ error[E0631]: type mismatch in closure arguments note: required by `baz` --> $DIR/closure-mismatch.rs:15:1 | -15 | fn baz(_: T) {} +LL | fn baz(_: T) {} | ^^^^^^^^^^^^^^^^^^^^ error: aborting due to 2 previous errors diff --git a/src/test/ui/mismatched_types/const-fn-in-trait.stderr b/src/test/ui/mismatched_types/const-fn-in-trait.stderr index 4911db6b2eb43..da4b446e9c9b8 100644 --- a/src/test/ui/mismatched_types/const-fn-in-trait.stderr +++ b/src/test/ui/mismatched_types/const-fn-in-trait.stderr @@ -1,13 +1,13 @@ error[E0379]: trait fns cannot be declared const --> $DIR/const-fn-in-trait.rs:17:5 | -17 | const fn g(); //~ ERROR cannot be declared const +LL | const fn g(); //~ ERROR cannot be declared const | ^^^^^ trait fns cannot be const error[E0379]: trait fns cannot be declared const --> $DIR/const-fn-in-trait.rs:21:5 | -21 | const fn f() -> u32 { 22 } //~ ERROR cannot be declared const +LL | const fn f() -> u32 { 22 } //~ ERROR cannot be declared const | ^^^^^ trait fns cannot be const error: aborting due to 2 previous errors diff --git a/src/test/ui/mismatched_types/fn-variance-1.stderr b/src/test/ui/mismatched_types/fn-variance-1.stderr index 64c260c30ed49..68bce09262093 100644 --- a/src/test/ui/mismatched_types/fn-variance-1.stderr +++ b/src/test/ui/mismatched_types/fn-variance-1.stderr @@ -1,31 +1,31 @@ error[E0631]: type mismatch in function arguments --> $DIR/fn-variance-1.rs:21:5 | -13 | fn takes_mut(x: &mut isize) { } +LL | fn takes_mut(x: &mut isize) { } | --------------------------- found signature of `for<'r> fn(&'r mut isize) -> _` ... -21 | apply(&3, takes_mut); +LL | apply(&3, takes_mut); | ^^^^^ expected signature of `fn(&{integer}) -> _` | note: required by `apply` --> $DIR/fn-variance-1.rs:15:1 | -15 | fn apply(t: T, f: F) where F: FnOnce(T) { +LL | fn apply(t: T, f: F) where F: FnOnce(T) { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error[E0631]: type mismatch in function arguments --> $DIR/fn-variance-1.rs:25:5 | -11 | fn takes_imm(x: &isize) { } +LL | fn takes_imm(x: &isize) { } | ----------------------- found signature of `for<'r> fn(&'r isize) -> _` ... -25 | apply(&mut 3, takes_imm); +LL | apply(&mut 3, takes_imm); | ^^^^^ expected signature of `fn(&mut {integer}) -> _` | note: required by `apply` --> $DIR/fn-variance-1.rs:15:1 | -15 | fn apply(t: T, f: F) where F: FnOnce(T) { +LL | fn apply(t: T, f: F) where F: FnOnce(T) { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: aborting due to 2 previous errors diff --git a/src/test/ui/mismatched_types/for-loop-has-unit-body.stderr b/src/test/ui/mismatched_types/for-loop-has-unit-body.stderr index 4a619804a6c5d..be9e9909e18c4 100644 --- a/src/test/ui/mismatched_types/for-loop-has-unit-body.stderr +++ b/src/test/ui/mismatched_types/for-loop-has-unit-body.stderr @@ -1,7 +1,7 @@ error[E0308]: mismatched types --> $DIR/for-loop-has-unit-body.rs:13:9 | -13 | x //~ ERROR mismatched types +LL | x //~ ERROR mismatched types | ^ expected (), found integral variable | = note: expected type `()` diff --git a/src/test/ui/mismatched_types/issue-19109.stderr b/src/test/ui/mismatched_types/issue-19109.stderr index 2942619f64936..8782b606f2a62 100644 --- a/src/test/ui/mismatched_types/issue-19109.stderr +++ b/src/test/ui/mismatched_types/issue-19109.stderr @@ -1,9 +1,9 @@ error[E0308]: mismatched types --> $DIR/issue-19109.rs:14:5 | -13 | fn function(t: &mut Trait) { +LL | fn function(t: &mut Trait) { | - help: try adding a return type: `-> *mut Trait` -14 | t as *mut Trait +LL | t as *mut Trait | ^^^^^^^^^^^^^^^ expected (), found *-ptr | = note: expected type `()` diff --git a/src/test/ui/mismatched_types/issue-26480.stderr b/src/test/ui/mismatched_types/issue-26480.stderr index 5d25cb2f93c15..bf00b871e79fa 100644 --- a/src/test/ui/mismatched_types/issue-26480.stderr +++ b/src/test/ui/mismatched_types/issue-26480.stderr @@ -1,19 +1,19 @@ error[E0308]: mismatched types --> $DIR/issue-26480.rs:26:19 | -26 | $arr.len() * size_of($arr[0])); //~ ERROR mismatched types +LL | $arr.len() * size_of($arr[0])); //~ ERROR mismatched types | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected u64, found usize ... -37 | write!(hello); +LL | write!(hello); | -------------- in this macro invocation error[E0605]: non-primitive cast: `{integer}` as `()` --> $DIR/issue-26480.rs:32:19 | -32 | ($x:expr) => ($x as ()) //~ ERROR non-primitive cast +LL | ($x:expr) => ($x as ()) //~ ERROR non-primitive cast | ^^^^^^^^ ... -38 | cast!(2); +LL | cast!(2); | --------- in this macro invocation | = note: an `as` expression can only be used to convert between primitive types. Consider using the `From` trait diff --git a/src/test/ui/mismatched_types/issue-35030.stderr b/src/test/ui/mismatched_types/issue-35030.stderr index 3ec5d1b7b40c1..392769bc03a1b 100644 --- a/src/test/ui/mismatched_types/issue-35030.stderr +++ b/src/test/ui/mismatched_types/issue-35030.stderr @@ -1,7 +1,7 @@ error[E0308]: mismatched types --> $DIR/issue-35030.rs:19:14 | -19 | Some(true) //~ ERROR mismatched types +LL | Some(true) //~ ERROR mismatched types | ^^^^ expected type parameter, found bool | = note: expected type `bool` (type parameter) diff --git a/src/test/ui/mismatched_types/issue-36053-2.stderr b/src/test/ui/mismatched_types/issue-36053-2.stderr index 71a3a0a5714e8..ede1902da0a7e 100644 --- a/src/test/ui/mismatched_types/issue-36053-2.stderr +++ b/src/test/ui/mismatched_types/issue-36053-2.stderr @@ -1,7 +1,7 @@ error[E0599]: no method named `count` found for type `std::iter::Filter>, [closure@$DIR/issue-36053-2.rs:17:39: 17:53]>` in the current scope --> $DIR/issue-36053-2.rs:17:55 | -17 | once::<&str>("str").fuse().filter(|a: &str| true).count(); +LL | once::<&str>("str").fuse().filter(|a: &str| true).count(); | ^^^^^ | = note: the method `count` exists but the following trait bounds were not satisfied: @@ -11,7 +11,7 @@ error[E0599]: no method named `count` found for type `std::iter::Filter $DIR/issue-36053-2.rs:17:32 | -17 | once::<&str>("str").fuse().filter(|a: &str| true).count(); +LL | once::<&str>("str").fuse().filter(|a: &str| true).count(); | ^^^^^^ -------------- found signature of `for<'r> fn(&'r str) -> _` | | | expected signature of `for<'r> fn(&'r &str) -> _` diff --git a/src/test/ui/mismatched_types/issue-38371.stderr b/src/test/ui/mismatched_types/issue-38371.stderr index d34f05e054a67..c4dd05daeecaf 100644 --- a/src/test/ui/mismatched_types/issue-38371.stderr +++ b/src/test/ui/mismatched_types/issue-38371.stderr @@ -1,7 +1,7 @@ error[E0308]: mismatched types --> $DIR/issue-38371.rs:16:8 | -16 | fn foo(&foo: Foo) { //~ ERROR mismatched types +LL | fn foo(&foo: Foo) { //~ ERROR mismatched types | ^^^^ expected struct `Foo`, found reference | = note: expected type `Foo` @@ -11,7 +11,7 @@ error[E0308]: mismatched types error[E0308]: mismatched types --> $DIR/issue-38371.rs:30:9 | -30 | fn agh(&&bar: &u32) { //~ ERROR mismatched types +LL | fn agh(&&bar: &u32) { //~ ERROR mismatched types | ^^^^ expected u32, found reference | = note: expected type `u32` @@ -21,7 +21,7 @@ error[E0308]: mismatched types error[E0308]: mismatched types --> $DIR/issue-38371.rs:33:8 | -33 | fn bgh(&&bar: u32) { //~ ERROR mismatched types +LL | fn bgh(&&bar: u32) { //~ ERROR mismatched types | ^^^^^ expected u32, found reference | = note: expected type `u32` @@ -30,7 +30,7 @@ error[E0308]: mismatched types error[E0529]: expected an array or slice, found `u32` --> $DIR/issue-38371.rs:36:9 | -36 | fn ugh(&[bar]: &u32) { //~ ERROR expected an array or slice +LL | fn ugh(&[bar]: &u32) { //~ ERROR expected an array or slice | ^^^^^ pattern cannot match with input type `u32` error: aborting due to 4 previous errors diff --git a/src/test/ui/mismatched_types/main.stderr b/src/test/ui/mismatched_types/main.stderr index 41e4c51239804..f7a34d5121fc9 100644 --- a/src/test/ui/mismatched_types/main.stderr +++ b/src/test/ui/mismatched_types/main.stderr @@ -1,9 +1,9 @@ error[E0308]: mismatched types --> $DIR/main.rs:12:18 | -12 | let x: u32 = ( //~ ERROR mismatched types +LL | let x: u32 = ( //~ ERROR mismatched types | __________________^ -13 | | ); +LL | | ); | |_____^ expected u32, found () | = note: expected type `u32` diff --git a/src/test/ui/mismatched_types/method-help-unsatisfied-bound.stderr b/src/test/ui/mismatched_types/method-help-unsatisfied-bound.stderr index ab5b3e1791528..a84e006614435 100644 --- a/src/test/ui/mismatched_types/method-help-unsatisfied-bound.stderr +++ b/src/test/ui/mismatched_types/method-help-unsatisfied-bound.stderr @@ -1,7 +1,7 @@ error[E0599]: no method named `unwrap` found for type `std::result::Result<(), Foo>` in the current scope --> $DIR/method-help-unsatisfied-bound.rs:15:7 | -15 | a.unwrap(); +LL | a.unwrap(); | ^^^^^^ | = note: the method `unwrap` exists but the following trait bounds were not satisfied: diff --git a/src/test/ui/mismatched_types/overloaded-calls-bad.stderr b/src/test/ui/mismatched_types/overloaded-calls-bad.stderr index 1d4adc7d6d5fd..e3e270c5aeeef 100644 --- a/src/test/ui/mismatched_types/overloaded-calls-bad.stderr +++ b/src/test/ui/mismatched_types/overloaded-calls-bad.stderr @@ -1,7 +1,7 @@ error[E0308]: mismatched types --> $DIR/overloaded-calls-bad.rs:38:17 | -38 | let ans = s("what"); //~ ERROR mismatched types +LL | let ans = s("what"); //~ ERROR mismatched types | ^^^^^^ expected isize, found reference | = note: expected type `isize` @@ -10,13 +10,13 @@ error[E0308]: mismatched types error[E0057]: this function takes 1 parameter but 0 parameters were supplied --> $DIR/overloaded-calls-bad.rs:39:15 | -39 | let ans = s(); +LL | let ans = s(); | ^^^ expected 1 parameter error[E0057]: this function takes 1 parameter but 2 parameters were supplied --> $DIR/overloaded-calls-bad.rs:41:15 | -41 | let ans = s("burma", "shave"); +LL | let ans = s("burma", "shave"); | ^^^^^^^^^^^^^^^^^^^ expected 1 parameter error: aborting due to 3 previous errors diff --git a/src/test/ui/mismatched_types/recovered-block.stderr b/src/test/ui/mismatched_types/recovered-block.stderr index 23c1a5b8c2442..75fb7b28a6ea2 100644 --- a/src/test/ui/mismatched_types/recovered-block.stderr +++ b/src/test/ui/mismatched_types/recovered-block.stderr @@ -1,17 +1,17 @@ error: missing `struct` for struct definition --> $DIR/recovered-block.rs:23:8 | -23 | pub Foo { text } +LL | pub Foo { text } | ^ help: add `struct` here to parse `Foo` as a public struct | -23 | pub struct Foo { text } +LL | pub struct Foo { text } | ^^^^^^ error: expected one of `(` or `<`, found `{` --> $DIR/recovered-block.rs:29:9 | -29 | Foo { text: "".to_string() } +LL | Foo { text: "".to_string() } | ^ expected one of `(` or `<` here error: aborting due to 2 previous errors diff --git a/src/test/ui/mismatched_types/trait-bounds-cant-coerce.stderr b/src/test/ui/mismatched_types/trait-bounds-cant-coerce.stderr index ccc9fb56772f5..3c6cfb12b0b79 100644 --- a/src/test/ui/mismatched_types/trait-bounds-cant-coerce.stderr +++ b/src/test/ui/mismatched_types/trait-bounds-cant-coerce.stderr @@ -1,7 +1,7 @@ error[E0308]: mismatched types --> $DIR/trait-bounds-cant-coerce.rs:24:7 | -24 | a(x); //~ ERROR mismatched types [E0308] +LL | a(x); //~ ERROR mismatched types [E0308] | ^ expected trait `Foo + std::marker::Send`, found trait `Foo` | = note: expected type `std::boxed::Box` diff --git a/src/test/ui/mismatched_types/trait-impl-fn-incompatibility.stderr b/src/test/ui/mismatched_types/trait-impl-fn-incompatibility.stderr index f3cf1d5661533..bfe4a1884721a 100644 --- a/src/test/ui/mismatched_types/trait-impl-fn-incompatibility.stderr +++ b/src/test/ui/mismatched_types/trait-impl-fn-incompatibility.stderr @@ -1,10 +1,10 @@ error[E0053]: method `foo` has an incompatible type for trait --> $DIR/trait-impl-fn-incompatibility.rs:21:15 | -14 | fn foo(x: u16); +LL | fn foo(x: u16); | --- type in trait ... -21 | fn foo(x: i16) { } //~ ERROR incompatible type +LL | fn foo(x: i16) { } //~ ERROR incompatible type | ^^^ expected u16, found i16 | = note: expected type `fn(u16)` @@ -13,10 +13,10 @@ error[E0053]: method `foo` has an incompatible type for trait error[E0053]: method `bar` has an incompatible type for trait --> $DIR/trait-impl-fn-incompatibility.rs:22:28 | -15 | fn bar(&mut self, bar: &mut Bar); +LL | fn bar(&mut self, bar: &mut Bar); | -------- type in trait ... -22 | fn bar(&mut self, bar: &Bar) { } //~ ERROR incompatible type +LL | fn bar(&mut self, bar: &Bar) { } //~ ERROR incompatible type | ^^^^ types differ in mutability | = note: expected type `fn(&mut Bar, &mut Bar)` diff --git a/src/test/ui/mismatched_types/unboxed-closures-vtable-mismatch.stderr b/src/test/ui/mismatched_types/unboxed-closures-vtable-mismatch.stderr index 9c9bbd19c7552..968301bf3b4a1 100644 --- a/src/test/ui/mismatched_types/unboxed-closures-vtable-mismatch.stderr +++ b/src/test/ui/mismatched_types/unboxed-closures-vtable-mismatch.stderr @@ -1,16 +1,16 @@ error[E0631]: type mismatch in closure arguments --> $DIR/unboxed-closures-vtable-mismatch.rs:25:13 | -23 | let f = to_fn_mut(|x: usize, y: isize| -> isize { (x as isize) + y }); +LL | let f = to_fn_mut(|x: usize, y: isize| -> isize { (x as isize) + y }); | ----------------------------- found signature of `fn(usize, isize) -> _` -24 | //~^ NOTE found signature of `fn(usize, isize) -> _` -25 | let z = call_it(3, f); +LL | //~^ NOTE found signature of `fn(usize, isize) -> _` +LL | let z = call_it(3, f); | ^^^^^^^ expected signature of `fn(isize, isize) -> _` | note: required by `call_it` --> $DIR/unboxed-closures-vtable-mismatch.rs:17:1 | -17 | fn call_itisize>(y: isize, mut f: F) -> isize { +LL | fn call_itisize>(y: isize, mut f: F) -> isize { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/missing-block-hint.stderr b/src/test/ui/missing-block-hint.stderr index 3f50fdd4613eb..54f394a4220dd 100644 --- a/src/test/ui/missing-block-hint.stderr +++ b/src/test/ui/missing-block-hint.stderr @@ -1,13 +1,13 @@ error: expected `{`, found `=>` --> $DIR/missing-block-hint.rs:13:18 | -13 | if (foo) => {} //~ ERROR expected `{`, found `=>` +LL | if (foo) => {} //~ ERROR expected `{`, found `=>` | ^^ error: expected `{`, found `bar` --> $DIR/missing-block-hint.rs:17:13 | -17 | bar; //~ ERROR expected `{`, found `bar` +LL | bar; //~ ERROR expected `{`, found `bar` | ^^^- | | | help: try placing this code inside a block: `{ bar; }` diff --git a/src/test/ui/missing-items/issue-40221.stderr b/src/test/ui/missing-items/issue-40221.stderr index 883c4329f4db6..d092a674ba915 100644 --- a/src/test/ui/missing-items/issue-40221.stderr +++ b/src/test/ui/missing-items/issue-40221.stderr @@ -1,7 +1,7 @@ error[E0004]: non-exhaustive patterns: `C(QA)` not covered --> $DIR/issue-40221.rs:21:11 | -21 | match proto { //~ ERROR non-exhaustive patterns +LL | match proto { //~ ERROR non-exhaustive patterns | ^^^^^ pattern `C(QA)` not covered error: aborting due to previous error diff --git a/src/test/ui/missing-items/m2.stderr b/src/test/ui/missing-items/m2.stderr index 8c57214ec771f..a847d0337c996 100644 --- a/src/test/ui/missing-items/m2.stderr +++ b/src/test/ui/missing-items/m2.stderr @@ -3,7 +3,7 @@ error[E0601]: main function not found error[E0046]: not all trait items implemented, missing: `CONSTANT`, `Type`, `method` --> $DIR/m2.rs:19:1 | -19 | impl m1::X for X { //~ ERROR not all trait items implemented +LL | impl m1::X for X { //~ ERROR not all trait items implemented | ^^^^^^^^^^^^^^^^ missing `CONSTANT`, `Type`, `method` in implementation | = note: `CONSTANT` from trait: `const CONSTANT: u32;` diff --git a/src/test/ui/missing-items/missing-type-parameter.stderr b/src/test/ui/missing-items/missing-type-parameter.stderr index 1cb9e5f56d351..54bd9bda39120 100644 --- a/src/test/ui/missing-items/missing-type-parameter.stderr +++ b/src/test/ui/missing-items/missing-type-parameter.stderr @@ -1,7 +1,7 @@ error[E0282]: type annotations needed --> $DIR/missing-type-parameter.rs:14:5 | -14 | foo(); //~ ERROR type annotations needed +LL | foo(); //~ ERROR type annotations needed | ^^^ cannot infer type for `X` error: aborting due to previous error diff --git a/src/test/ui/missing_non_modrs_mod/missing_non_modrs_mod.stderr b/src/test/ui/missing_non_modrs_mod/missing_non_modrs_mod.stderr index 3ba71d32a31a6..95b23ebce2ac7 100644 --- a/src/test/ui/missing_non_modrs_mod/missing_non_modrs_mod.stderr +++ b/src/test/ui/missing_non_modrs_mod/missing_non_modrs_mod.stderr @@ -1,7 +1,7 @@ error[E0583]: file not found for module `missing` --> $DIR/foo.rs:13:5 | -13 | mod missing; +LL | mod missing; | ^^^^^^^ | = help: name the file either foo/missing.rs or foo/missing/mod.rs inside the directory "$DIR" diff --git a/src/test/ui/moves-based-on-type-block-bad.stderr b/src/test/ui/moves-based-on-type-block-bad.stderr index 5fc26a8ad68fa..22fa22327cb66 100644 --- a/src/test/ui/moves-based-on-type-block-bad.stderr +++ b/src/test/ui/moves-based-on-type-block-bad.stderr @@ -1,10 +1,10 @@ error[E0507]: cannot move out of borrowed content --> $DIR/moves-based-on-type-block-bad.rs:34:19 | -34 | match hellothere.x { //~ ERROR cannot move out +LL | match hellothere.x { //~ ERROR cannot move out | ^^^^^^^^^^ cannot move out of borrowed content ... -37 | box E::Bar(x) => println!("{}", x.to_string()), +LL | box E::Bar(x) => println!("{}", x.to_string()), | - hint: to prevent move, use `ref x` or `ref mut x` error: aborting due to previous error diff --git a/src/test/ui/moves-based-on-type-match-bindings.stderr b/src/test/ui/moves-based-on-type-match-bindings.stderr index 5256b55f01c6e..e349cd41b2f66 100644 --- a/src/test/ui/moves-based-on-type-match-bindings.stderr +++ b/src/test/ui/moves-based-on-type-match-bindings.stderr @@ -1,10 +1,10 @@ error[E0382]: use of partially moved value: `x` --> $DIR/moves-based-on-type-match-bindings.rs:26:12 | -23 | Foo {f} => {} +LL | Foo {f} => {} | - value moved here ... -26 | touch(&x); //~ ERROR use of partially moved value: `x` +LL | touch(&x); //~ ERROR use of partially moved value: `x` | ^ value used here after move | = note: move occurs because `x.f` has type `std::string::String`, which does not implement the `Copy` trait diff --git a/src/test/ui/moves-based-on-type-tuple.stderr b/src/test/ui/moves-based-on-type-tuple.stderr index e1667107c927c..3e15269718971 100644 --- a/src/test/ui/moves-based-on-type-tuple.stderr +++ b/src/test/ui/moves-based-on-type-tuple.stderr @@ -1,7 +1,7 @@ error[E0382]: use of moved value: `x` (Ast) --> $DIR/moves-based-on-type-tuple.rs:16:13 | -16 | box (x, x) +LL | box (x, x) | - ^ value used here after move | | | value moved here @@ -11,7 +11,7 @@ error[E0382]: use of moved value: `x` (Ast) error[E0382]: use of moved value: `x` (Mir) --> $DIR/moves-based-on-type-tuple.rs:16:13 | -16 | box (x, x) +LL | box (x, x) | - ^ value used here after move | | | value moved here diff --git a/src/test/ui/mut-ref.stderr b/src/test/ui/mut-ref.stderr index aaab243e22f72..d2df58881a25f 100644 --- a/src/test/ui/mut-ref.stderr +++ b/src/test/ui/mut-ref.stderr @@ -1,7 +1,7 @@ error: the order of `mut` and `ref` is incorrect --> $DIR/mut-ref.rs:14:9 | -14 | let mut ref x = 10; //~ ERROR the order of `mut` and `ref` is incorrect +LL | let mut ref x = 10; //~ ERROR the order of `mut` and `ref` is incorrect | ^^^^^^^ help: try switching the order: `ref mut` error: aborting due to previous error diff --git a/src/test/ui/nested_impl_trait.stderr b/src/test/ui/nested_impl_trait.stderr index 094926120cdee..b604c71433d1d 100644 --- a/src/test/ui/nested_impl_trait.stderr +++ b/src/test/ui/nested_impl_trait.stderr @@ -1,7 +1,7 @@ error[E0666]: nested `impl Trait` is not allowed --> $DIR/nested_impl_trait.rs:16:56 | -16 | fn bad_in_ret_position(x: impl Into) -> impl Into { x } +LL | fn bad_in_ret_position(x: impl Into) -> impl Into { x } | ----------^^^^^^^^^^- | | | | | nested `impl Trait` here @@ -10,7 +10,7 @@ error[E0666]: nested `impl Trait` is not allowed error[E0666]: nested `impl Trait` is not allowed --> $DIR/nested_impl_trait.rs:19:42 | -19 | fn bad_in_fn_syntax(x: fn() -> impl Into) {} +LL | fn bad_in_fn_syntax(x: fn() -> impl Into) {} | ----------^^^^^^^^^^- | | | | | nested `impl Trait` here @@ -19,7 +19,7 @@ error[E0666]: nested `impl Trait` is not allowed error[E0666]: nested `impl Trait` is not allowed --> $DIR/nested_impl_trait.rs:23:37 | -23 | fn bad_in_arg_position(_: impl Into) { } +LL | fn bad_in_arg_position(_: impl Into) { } | ----------^^^^^^^^^^- | | | | | nested `impl Trait` here @@ -28,7 +28,7 @@ error[E0666]: nested `impl Trait` is not allowed error[E0666]: nested `impl Trait` is not allowed --> $DIR/nested_impl_trait.rs:28:44 | -28 | fn bad(x: impl Into) -> impl Into { x } +LL | fn bad(x: impl Into) -> impl Into { x } | ----------^^^^^^^^^^- | | | | | nested `impl Trait` here @@ -37,13 +37,13 @@ error[E0666]: nested `impl Trait` is not allowed error[E0562]: `impl Trait` not allowed outside of function and inherent method return types --> $DIR/nested_impl_trait.rs:19:32 | -19 | fn bad_in_fn_syntax(x: fn() -> impl Into) {} +LL | fn bad_in_fn_syntax(x: fn() -> impl Into) {} | ^^^^^^^^^^^^^^^^^^^^^ error[E0562]: `impl Trait` not allowed outside of function and inherent method return types --> $DIR/nested_impl_trait.rs:36:42 | -36 | fn allowed_in_ret_type() -> impl Fn() -> impl Into { +LL | fn allowed_in_ret_type() -> impl Fn() -> impl Into { | ^^^^^^^^^^^^^^ error: aborting due to 6 previous errors diff --git a/src/test/ui/nll/borrowed-match-issue-45045.stderr b/src/test/ui/nll/borrowed-match-issue-45045.stderr index f5271b99c4be3..6015a776b5a57 100644 --- a/src/test/ui/nll/borrowed-match-issue-45045.stderr +++ b/src/test/ui/nll/borrowed-match-issue-45045.stderr @@ -1,23 +1,23 @@ error[E0503]: cannot use `e` because it was mutably borrowed --> $DIR/borrowed-match-issue-45045.rs:24:5 | -22 | let f = &mut e; +LL | let f = &mut e; | ------ borrow of `e` occurs here -23 | let g = f; -24 | / match e { //~ cannot use `e` because it was mutably borrowed [E0503] -25 | | Xyz::A => println!("a"), -26 | | //~^ cannot use `e` because it was mutably borrowed [E0503] -27 | | Xyz::B => println!("b"), -28 | | }; +LL | let g = f; +LL | / match e { //~ cannot use `e` because it was mutably borrowed [E0503] +LL | | Xyz::A => println!("a"), +LL | | //~^ cannot use `e` because it was mutably borrowed [E0503] +LL | | Xyz::B => println!("b"), +LL | | }; | |_____^ use of borrowed `e` error[E0503]: cannot use `e` because it was mutably borrowed --> $DIR/borrowed-match-issue-45045.rs:25:9 | -22 | let f = &mut e; +LL | let f = &mut e; | ------ borrow of `e` occurs here ... -25 | Xyz::A => println!("a"), +LL | Xyz::A => println!("a"), | ^^^^^^ use of borrowed `e` error: aborting due to 2 previous errors diff --git a/src/test/ui/nll/borrowed-referent-issue-38899.stderr b/src/test/ui/nll/borrowed-referent-issue-38899.stderr index 3031fec2d0b21..ae51cfea76020 100644 --- a/src/test/ui/nll/borrowed-referent-issue-38899.stderr +++ b/src/test/ui/nll/borrowed-referent-issue-38899.stderr @@ -1,10 +1,10 @@ error[E0502]: cannot borrow `*block.current` as immutable because it is also borrowed as mutable --> $DIR/borrowed-referent-issue-38899.rs:24:21 | -22 | let x = &mut block; +LL | let x = &mut block; | ---------- mutable borrow occurs here -23 | println!("{}", x.current); -24 | let p: &'a u8 = &*block.current; +LL | println!("{}", x.current); +LL | let p: &'a u8 = &*block.current; | ^^^^^^^^^^^^^^^ immutable borrow occurs here error: aborting due to previous error diff --git a/src/test/ui/nll/capture-ref-in-struct.stderr b/src/test/ui/nll/capture-ref-in-struct.stderr index d05ec91be3026..90750acf2d31a 100644 --- a/src/test/ui/nll/capture-ref-in-struct.stderr +++ b/src/test/ui/nll/capture-ref-in-struct.stderr @@ -1,13 +1,13 @@ error[E0597]: `y` does not live long enough --> $DIR/capture-ref-in-struct.rs:33:16 | -33 | y: &y, +LL | y: &y, | ^^ borrowed value does not live long enough ... -38 | } +LL | } | - borrowed value only lives until here -39 | -40 | deref(p); +LL | +LL | deref(p); | - borrow later used here | = note: borrowed value must be valid for lifetime '_#5r... diff --git a/src/test/ui/nll/closure-requirements/escape-argument-callee.stderr b/src/test/ui/nll/closure-requirements/escape-argument-callee.stderr index 3bd02f308c883..5f84001a8fb99 100644 --- a/src/test/ui/nll/closure-requirements/escape-argument-callee.stderr +++ b/src/test/ui/nll/closure-requirements/escape-argument-callee.stderr @@ -1,19 +1,19 @@ warning: not reporting region error due to -Znll --> $DIR/escape-argument-callee.rs:36:50 | -36 | let mut closure = expect_sig(|p, y| *p = y); +LL | let mut closure = expect_sig(|p, y| *p = y); | ^ error: free region `ReFree(DefId(0/1:9 ~ escape_argument_callee[317d]::test[0]::{{closure}}[0]), BrAnon(3))` does not outlive free region `ReFree(DefId(0/1:9 ~ escape_argument_callee[317d]::test[0]::{{closure}}[0]), BrAnon(2))` --> $DIR/escape-argument-callee.rs:36:45 | -36 | let mut closure = expect_sig(|p, y| *p = y); +LL | let mut closure = expect_sig(|p, y| *p = y); | ^^^^^^ note: No external requirements --> $DIR/escape-argument-callee.rs:36:38 | -36 | let mut closure = expect_sig(|p, y| *p = y); +LL | let mut closure = expect_sig(|p, y| *p = y); | ^^^^^^^^^^^^^ | = note: defining type: DefId(0/1:9 ~ escape_argument_callee[317d]::test[0]::{{closure}}[0]) with closure substs [ @@ -24,13 +24,13 @@ note: No external requirements note: No external requirements --> $DIR/escape-argument-callee.rs:30:1 | -30 | / fn test() { -31 | | let x = 44; -32 | | let mut p = &x; -33 | | +LL | / fn test() { +LL | | let x = 44; +LL | | let mut p = &x; +LL | | ... | -42 | | deref(p); -43 | | } +LL | | deref(p); +LL | | } | |_^ | = note: defining type: DefId(0/0:3 ~ escape_argument_callee[317d]::test[0]) with substs [] diff --git a/src/test/ui/nll/closure-requirements/escape-argument.stderr b/src/test/ui/nll/closure-requirements/escape-argument.stderr index ee29f2f9c5c59..087b2a81bc620 100644 --- a/src/test/ui/nll/closure-requirements/escape-argument.stderr +++ b/src/test/ui/nll/closure-requirements/escape-argument.stderr @@ -1,7 +1,7 @@ note: No external requirements --> $DIR/escape-argument.rs:36:38 | -36 | let mut closure = expect_sig(|p, y| *p = y); +LL | let mut closure = expect_sig(|p, y| *p = y); | ^^^^^^^^^^^^^ | = note: defining type: DefId(0/1:9 ~ escape_argument[317d]::test[0]::{{closure}}[0]) with closure substs [ @@ -12,13 +12,13 @@ note: No external requirements note: No external requirements --> $DIR/escape-argument.rs:30:1 | -30 | / fn test() { -31 | | let x = 44; -32 | | let mut p = &x; -33 | | +LL | / fn test() { +LL | | let x = 44; +LL | | let mut p = &x; +LL | | ... | -41 | | deref(p); -42 | | } +LL | | deref(p); +LL | | } | |_^ | = note: defining type: DefId(0/0:3 ~ escape_argument[317d]::test[0]) with substs [] @@ -26,13 +26,13 @@ note: No external requirements error[E0597]: `y` does not live long enough --> $DIR/escape-argument.rs:37:25 | -37 | closure(&mut p, &y); +LL | closure(&mut p, &y); | ^^ borrowed value does not live long enough -38 | //~^ ERROR `y` does not live long enough [E0597] -39 | } +LL | //~^ ERROR `y` does not live long enough [E0597] +LL | } | - borrowed value only lives until here -40 | -41 | deref(p); +LL | +LL | deref(p); | - borrow later used here | = note: borrowed value must be valid for lifetime '_#6r... diff --git a/src/test/ui/nll/closure-requirements/escape-upvar-nested.stderr b/src/test/ui/nll/closure-requirements/escape-upvar-nested.stderr index 501d299154737..02a55d0381495 100644 --- a/src/test/ui/nll/closure-requirements/escape-upvar-nested.stderr +++ b/src/test/ui/nll/closure-requirements/escape-upvar-nested.stderr @@ -1,7 +1,7 @@ note: External requirements --> $DIR/escape-upvar-nested.rs:31:32 | -31 | let mut closure1 = || p = &y; +LL | let mut closure1 = || p = &y; | ^^^^^^^^^ | = note: defining type: DefId(0/1:10 ~ escape_upvar_nested[317d]::test[0]::{{closure}}[0]::{{closure}}[0]) with closure substs [ @@ -16,11 +16,11 @@ note: External requirements note: External requirements --> $DIR/escape-upvar-nested.rs:30:27 | -30 | let mut closure = || { //~ ERROR `y` does not live long enough [E0597] +LL | let mut closure = || { //~ ERROR `y` does not live long enough [E0597] | ___________________________^ -31 | | let mut closure1 = || p = &y; -32 | | closure1(); -33 | | }; +LL | | let mut closure1 = || p = &y; +LL | | closure1(); +LL | | }; | |_________^ | = note: defining type: DefId(0/1:9 ~ escape_upvar_nested[317d]::test[0]::{{closure}}[0]) with closure substs [ @@ -35,13 +35,13 @@ note: External requirements note: No external requirements --> $DIR/escape-upvar-nested.rs:23:1 | -23 | / fn test() { -24 | | let x = 44; -25 | | let mut p = &x; -26 | | +LL | / fn test() { +LL | | let x = 44; +LL | | let mut p = &x; +LL | | ... | -38 | | deref(p); -39 | | } +LL | | deref(p); +LL | | } | |_^ | = note: defining type: DefId(0/0:3 ~ escape_upvar_nested[317d]::test[0]) with substs [] @@ -49,17 +49,17 @@ note: No external requirements error[E0597]: `y` does not live long enough --> $DIR/escape-upvar-nested.rs:30:27 | -30 | let mut closure = || { //~ ERROR `y` does not live long enough [E0597] +LL | let mut closure = || { //~ ERROR `y` does not live long enough [E0597] | ___________________________^ -31 | | let mut closure1 = || p = &y; -32 | | closure1(); -33 | | }; +LL | | let mut closure1 = || p = &y; +LL | | closure1(); +LL | | }; | |_________^ borrowed value does not live long enough ... -36 | } +LL | } | - borrowed value only lives until here -37 | -38 | deref(p); +LL | +LL | deref(p); | - borrow later used here | = note: borrowed value must be valid for lifetime '_#4r... diff --git a/src/test/ui/nll/closure-requirements/escape-upvar-ref.stderr b/src/test/ui/nll/closure-requirements/escape-upvar-ref.stderr index 556cd020f7ff5..c54abd3ecc5f1 100644 --- a/src/test/ui/nll/closure-requirements/escape-upvar-ref.stderr +++ b/src/test/ui/nll/closure-requirements/escape-upvar-ref.stderr @@ -1,7 +1,7 @@ note: External requirements --> $DIR/escape-upvar-ref.rs:33:27 | -33 | let mut closure = || p = &y; +LL | let mut closure = || p = &y; | ^^^^^^^^^ | = note: defining type: DefId(0/1:9 ~ escape_upvar_ref[317d]::test[0]::{{closure}}[0]) with closure substs [ @@ -16,13 +16,13 @@ note: External requirements note: No external requirements --> $DIR/escape-upvar-ref.rs:27:1 | -27 | / fn test() { -28 | | let x = 44; -29 | | let mut p = &x; -30 | | +LL | / fn test() { +LL | | let x = 44; +LL | | let mut p = &x; +LL | | ... | -38 | | deref(p); -39 | | } +LL | | deref(p); +LL | | } | |_^ | = note: defining type: DefId(0/0:3 ~ escape_upvar_ref[317d]::test[0]) with substs [] @@ -30,13 +30,13 @@ note: No external requirements error[E0597]: `y` does not live long enough --> $DIR/escape-upvar-ref.rs:33:27 | -33 | let mut closure = || p = &y; +LL | let mut closure = || p = &y; | ^^^^^^^^^ borrowed value does not live long enough ... -36 | } +LL | } | - borrowed value only lives until here -37 | -38 | deref(p); +LL | +LL | deref(p); | - borrow later used here | = note: borrowed value must be valid for lifetime '_#4r... diff --git a/src/test/ui/nll/closure-requirements/propagate-approximated-fail-no-postdom.stderr b/src/test/ui/nll/closure-requirements/propagate-approximated-fail-no-postdom.stderr index 7e48c0fc5842a..0c058e40a5086 100644 --- a/src/test/ui/nll/closure-requirements/propagate-approximated-fail-no-postdom.stderr +++ b/src/test/ui/nll/closure-requirements/propagate-approximated-fail-no-postdom.stderr @@ -1,25 +1,25 @@ warning: not reporting region error due to -Znll --> $DIR/propagate-approximated-fail-no-postdom.rs:55:21 | -55 | let p = x.get(); +LL | let p = x.get(); | ^^^^^^^ error: free region `ReFree(DefId(0/1:20 ~ propagate_approximated_fail_no_postdom[317d]::supply[0]::{{closure}}[0]), BrAnon(1))` does not outlive free region `ReFree(DefId(0/1:20 ~ propagate_approximated_fail_no_postdom[317d]::supply[0]::{{closure}}[0]), BrAnon(2))` --> $DIR/propagate-approximated-fail-no-postdom.rs:55:17 | -55 | let p = x.get(); +LL | let p = x.get(); | ^ note: No external requirements --> $DIR/propagate-approximated-fail-no-postdom.rs:53:9 | -53 | / |_outlives1, _outlives2, _outlives3, x, y| { -54 | | // Only works if 'x: 'y: -55 | | let p = x.get(); -56 | | //~^ WARN not reporting region error due to -Znll -57 | | //~| ERROR does not outlive free region -58 | | demand_y(x, y, p) -59 | | }, +LL | / |_outlives1, _outlives2, _outlives3, x, y| { +LL | | // Only works if 'x: 'y: +LL | | let p = x.get(); +LL | | //~^ WARN not reporting region error due to -Znll +LL | | //~| ERROR does not outlive free region +LL | | demand_y(x, y, p) +LL | | }, | |_________^ | = note: defining type: DefId(0/1:20 ~ propagate_approximated_fail_no_postdom[317d]::supply[0]::{{closure}}[0]) with closure substs [ @@ -30,13 +30,13 @@ note: No external requirements note: No external requirements --> $DIR/propagate-approximated-fail-no-postdom.rs:48:1 | -48 | / fn supply<'a, 'b, 'c>(cell_a: Cell<&'a u32>, cell_b: Cell<&'b u32>, cell_c: Cell<&'c u32>) { -49 | | establish_relationships( -50 | | cell_a, -51 | | cell_b, +LL | / fn supply<'a, 'b, 'c>(cell_a: Cell<&'a u32>, cell_b: Cell<&'b u32>, cell_c: Cell<&'c u32>) { +LL | | establish_relationships( +LL | | cell_a, +LL | | cell_b, ... | -60 | | ); -61 | | } +LL | | ); +LL | | } | |_^ | = note: defining type: DefId(0/0:6 ~ propagate_approximated_fail_no_postdom[317d]::supply[0]) with substs [] diff --git a/src/test/ui/nll/closure-requirements/propagate-approximated-ref.stderr b/src/test/ui/nll/closure-requirements/propagate-approximated-ref.stderr index f9a6999243a9c..f7a3f3d7fcf64 100644 --- a/src/test/ui/nll/closure-requirements/propagate-approximated-ref.stderr +++ b/src/test/ui/nll/closure-requirements/propagate-approximated-ref.stderr @@ -1,19 +1,19 @@ warning: not reporting region error due to -Znll --> $DIR/propagate-approximated-ref.rs:57:9 | -57 | demand_y(x, y, x.get()) //~ WARNING not reporting region error due to -Znll +LL | demand_y(x, y, x.get()) //~ WARNING not reporting region error due to -Znll | ^^^^^^^^^^^^^^^^^^^^^^^ note: External requirements --> $DIR/propagate-approximated-ref.rs:53:47 | -53 | establish_relationships(&cell_a, &cell_b, |_outlives1, _outlives2, x, y| { +LL | establish_relationships(&cell_a, &cell_b, |_outlives1, _outlives2, x, y| { | _______________________________________________^ -54 | | //~^ ERROR lifetime mismatch -55 | | -56 | | // Only works if 'x: 'y: -57 | | demand_y(x, y, x.get()) //~ WARNING not reporting region error due to -Znll -58 | | }); +LL | | //~^ ERROR lifetime mismatch +LL | | +LL | | // Only works if 'x: 'y: +LL | | demand_y(x, y, x.get()) //~ WARNING not reporting region error due to -Znll +LL | | }); | |_____^ | = note: defining type: DefId(0/1:18 ~ propagate_approximated_ref[317d]::supply[0]::{{closure}}[0]) with closure substs [ @@ -26,23 +26,23 @@ note: External requirements error[E0623]: lifetime mismatch --> $DIR/propagate-approximated-ref.rs:53:29 | -52 | fn supply<'a, 'b>(cell_a: Cell<&'a u32>, cell_b: Cell<&'b u32>) { +LL | fn supply<'a, 'b>(cell_a: Cell<&'a u32>, cell_b: Cell<&'b u32>) { | ------- ------- | | | these two types are declared with different lifetimes... -53 | establish_relationships(&cell_a, &cell_b, |_outlives1, _outlives2, x, y| { +LL | establish_relationships(&cell_a, &cell_b, |_outlives1, _outlives2, x, y| { | ^^^^^^^ ...but data from `cell_a` flows into `cell_b` here note: No external requirements --> $DIR/propagate-approximated-ref.rs:52:1 | -52 | / fn supply<'a, 'b>(cell_a: Cell<&'a u32>, cell_b: Cell<&'b u32>) { -53 | | establish_relationships(&cell_a, &cell_b, |_outlives1, _outlives2, x, y| { -54 | | //~^ ERROR lifetime mismatch -55 | | +LL | / fn supply<'a, 'b>(cell_a: Cell<&'a u32>, cell_b: Cell<&'b u32>) { +LL | | establish_relationships(&cell_a, &cell_b, |_outlives1, _outlives2, x, y| { +LL | | //~^ ERROR lifetime mismatch +LL | | ... | -58 | | }); -59 | | } +LL | | }); +LL | | } | |_^ | = note: defining type: DefId(0/0:6 ~ propagate_approximated_ref[317d]::supply[0]) with substs [] diff --git a/src/test/ui/nll/closure-requirements/propagate-approximated-shorter-to-static-comparing-against-free.stderr b/src/test/ui/nll/closure-requirements/propagate-approximated-shorter-to-static-comparing-against-free.stderr index 290377996c942..527c0039b587d 100644 --- a/src/test/ui/nll/closure-requirements/propagate-approximated-shorter-to-static-comparing-against-free.stderr +++ b/src/test/ui/nll/closure-requirements/propagate-approximated-shorter-to-static-comparing-against-free.stderr @@ -1,24 +1,24 @@ warning: not reporting region error due to -Znll --> $DIR/propagate-approximated-shorter-to-static-comparing-against-free.rs:31:5 | -31 | foo(cell, |cell_a, cell_x| { +LL | foo(cell, |cell_a, cell_x| { | ^^^ error: free region `ReFree(DefId(0/1:12 ~ propagate_approximated_shorter_to_static_comparing_against_free[317d]::case1[0]::{{closure}}[0]), BrAnon(1))` does not outlive free region `'_#1r` --> $DIR/propagate-approximated-shorter-to-static-comparing-against-free.rs:33:9 | -33 | cell_a.set(cell_x.get()); // forces 'x: 'a, error in closure +LL | cell_a.set(cell_x.get()); // forces 'x: 'a, error in closure | ^^^^^^ note: No external requirements --> $DIR/propagate-approximated-shorter-to-static-comparing-against-free.rs:31:15 | -31 | foo(cell, |cell_a, cell_x| { +LL | foo(cell, |cell_a, cell_x| { | _______________^ -32 | | //~^ WARNING not reporting region error due to -Znll -33 | | cell_a.set(cell_x.get()); // forces 'x: 'a, error in closure -34 | | //~^ ERROR does not outlive free region -35 | | }) +LL | | //~^ WARNING not reporting region error due to -Znll +LL | | cell_a.set(cell_x.get()); // forces 'x: 'a, error in closure +LL | | //~^ ERROR does not outlive free region +LL | | }) | |_____^ | = note: defining type: DefId(0/1:12 ~ propagate_approximated_shorter_to_static_comparing_against_free[317d]::case1[0]::{{closure}}[0]) with closure substs [ @@ -29,13 +29,13 @@ note: No external requirements note: No external requirements --> $DIR/propagate-approximated-shorter-to-static-comparing-against-free.rs:28:1 | -28 | / fn case1() { -29 | | let a = 0; -30 | | let cell = Cell::new(&a); -31 | | foo(cell, |cell_a, cell_x| { +LL | / fn case1() { +LL | | let a = 0; +LL | | let cell = Cell::new(&a); +LL | | foo(cell, |cell_a, cell_x| { ... | -35 | | }) -36 | | } +LL | | }) +LL | | } | |_^ | = note: defining type: DefId(0/0:5 ~ propagate_approximated_shorter_to_static_comparing_against_free[317d]::case1[0]) with substs [] @@ -43,10 +43,10 @@ note: No external requirements note: External requirements --> $DIR/propagate-approximated-shorter-to-static-comparing-against-free.rs:46:15 | -46 | foo(cell, |cell_a, cell_x| { +LL | foo(cell, |cell_a, cell_x| { | _______________^ -47 | | cell_x.set(cell_a.get()); // forces 'a: 'x, implies 'a = 'static -> borrow error -48 | | }) +LL | | cell_x.set(cell_a.get()); // forces 'a: 'x, implies 'a = 'static -> borrow error +LL | | }) | |_____^ | = note: defining type: DefId(0/1:13 ~ propagate_approximated_shorter_to_static_comparing_against_free[317d]::case2[0]::{{closure}}[0]) with closure substs [ @@ -59,13 +59,13 @@ note: External requirements note: No external requirements --> $DIR/propagate-approximated-shorter-to-static-comparing-against-free.rs:39:1 | -39 | / fn case2() { -40 | | let a = 0; -41 | | let cell = Cell::new(&a); -42 | | //~^ ERROR `a` does not live long enough +LL | / fn case2() { +LL | | let a = 0; +LL | | let cell = Cell::new(&a); +LL | | //~^ ERROR `a` does not live long enough ... | -48 | | }) -49 | | } +LL | | }) +LL | | } | |_^ | = note: defining type: DefId(0/0:6 ~ propagate_approximated_shorter_to_static_comparing_against_free[317d]::case2[0]) with substs [] @@ -73,10 +73,10 @@ note: No external requirements error[E0597]: `a` does not live long enough --> $DIR/propagate-approximated-shorter-to-static-comparing-against-free.rs:41:26 | -41 | let cell = Cell::new(&a); +LL | let cell = Cell::new(&a); | ^^ borrowed value does not live long enough ... -49 | } +LL | } | - borrowed value only lives until here | = note: borrowed value must be valid for lifetime '_#2r... diff --git a/src/test/ui/nll/closure-requirements/propagate-approximated-shorter-to-static-no-bound.stderr b/src/test/ui/nll/closure-requirements/propagate-approximated-shorter-to-static-no-bound.stderr index 13aedc408cf06..3131142ec73bf 100644 --- a/src/test/ui/nll/closure-requirements/propagate-approximated-shorter-to-static-no-bound.stderr +++ b/src/test/ui/nll/closure-requirements/propagate-approximated-shorter-to-static-no-bound.stderr @@ -1,19 +1,19 @@ warning: not reporting region error due to -Znll --> $DIR/propagate-approximated-shorter-to-static-no-bound.rs:49:9 | -49 | demand_y(x, y, x.get()) //~ WARNING not reporting region error due to -Znll +LL | demand_y(x, y, x.get()) //~ WARNING not reporting region error due to -Znll | ^^^^^^^^^^^^^^^^^^^^^^^ note: External requirements --> $DIR/propagate-approximated-shorter-to-static-no-bound.rs:45:47 | -45 | establish_relationships(&cell_a, &cell_b, |_outlives, x, y| { +LL | establish_relationships(&cell_a, &cell_b, |_outlives, x, y| { | _______________________________________________^ -46 | | //~^ ERROR does not outlive free region -47 | | -48 | | // Only works if 'x: 'y: -49 | | demand_y(x, y, x.get()) //~ WARNING not reporting region error due to -Znll -50 | | }); +LL | | //~^ ERROR does not outlive free region +LL | | +LL | | // Only works if 'x: 'y: +LL | | demand_y(x, y, x.get()) //~ WARNING not reporting region error due to -Znll +LL | | }); | |_____^ | = note: defining type: DefId(0/1:18 ~ propagate_approximated_shorter_to_static_no_bound[317d]::supply[0]::{{closure}}[0]) with closure substs [ @@ -26,25 +26,25 @@ note: External requirements error: free region `ReFree(DefId(0/0:6 ~ propagate_approximated_shorter_to_static_no_bound[317d]::supply[0]), BrNamed(crate0:DefIndex(1:16), 'a))` does not outlive free region `ReStatic` --> $DIR/propagate-approximated-shorter-to-static-no-bound.rs:45:47 | -45 | establish_relationships(&cell_a, &cell_b, |_outlives, x, y| { +LL | establish_relationships(&cell_a, &cell_b, |_outlives, x, y| { | _______________________________________________^ -46 | | //~^ ERROR does not outlive free region -47 | | -48 | | // Only works if 'x: 'y: -49 | | demand_y(x, y, x.get()) //~ WARNING not reporting region error due to -Znll -50 | | }); +LL | | //~^ ERROR does not outlive free region +LL | | +LL | | // Only works if 'x: 'y: +LL | | demand_y(x, y, x.get()) //~ WARNING not reporting region error due to -Znll +LL | | }); | |_____^ note: No external requirements --> $DIR/propagate-approximated-shorter-to-static-no-bound.rs:44:1 | -44 | / fn supply<'a, 'b>(cell_a: Cell<&'a u32>, cell_b: Cell<&'b u32>) { -45 | | establish_relationships(&cell_a, &cell_b, |_outlives, x, y| { -46 | | //~^ ERROR does not outlive free region -47 | | +LL | / fn supply<'a, 'b>(cell_a: Cell<&'a u32>, cell_b: Cell<&'b u32>) { +LL | | establish_relationships(&cell_a, &cell_b, |_outlives, x, y| { +LL | | //~^ ERROR does not outlive free region +LL | | ... | -50 | | }); -51 | | } +LL | | }); +LL | | } | |_^ | = note: defining type: DefId(0/0:6 ~ propagate_approximated_shorter_to_static_no_bound[317d]::supply[0]) with substs [] diff --git a/src/test/ui/nll/closure-requirements/propagate-approximated-shorter-to-static-wrong-bound.stderr b/src/test/ui/nll/closure-requirements/propagate-approximated-shorter-to-static-wrong-bound.stderr index 947ed650e6bca..5b038653b6068 100644 --- a/src/test/ui/nll/closure-requirements/propagate-approximated-shorter-to-static-wrong-bound.stderr +++ b/src/test/ui/nll/closure-requirements/propagate-approximated-shorter-to-static-wrong-bound.stderr @@ -1,19 +1,19 @@ warning: not reporting region error due to -Znll --> $DIR/propagate-approximated-shorter-to-static-wrong-bound.rs:51:9 | -51 | demand_y(x, y, x.get()) +LL | demand_y(x, y, x.get()) | ^^^^^^^^^^^^^^^^^^^^^^^ note: External requirements --> $DIR/propagate-approximated-shorter-to-static-wrong-bound.rs:48:47 | -48 | establish_relationships(&cell_a, &cell_b, |_outlives1, _outlives2, x, y| { +LL | establish_relationships(&cell_a, &cell_b, |_outlives1, _outlives2, x, y| { | _______________________________________________^ -49 | | //~^ ERROR does not outlive free region -50 | | // Only works if 'x: 'y: -51 | | demand_y(x, y, x.get()) -52 | | //~^ WARNING not reporting region error due to -Znll -53 | | }); +LL | | //~^ ERROR does not outlive free region +LL | | // Only works if 'x: 'y: +LL | | demand_y(x, y, x.get()) +LL | | //~^ WARNING not reporting region error due to -Znll +LL | | }); | |_____^ | = note: defining type: DefId(0/1:18 ~ propagate_approximated_shorter_to_static_wrong_bound[317d]::supply[0]::{{closure}}[0]) with closure substs [ @@ -26,25 +26,25 @@ note: External requirements error: free region `ReFree(DefId(0/0:6 ~ propagate_approximated_shorter_to_static_wrong_bound[317d]::supply[0]), BrNamed(crate0:DefIndex(1:16), 'a))` does not outlive free region `ReStatic` --> $DIR/propagate-approximated-shorter-to-static-wrong-bound.rs:48:47 | -48 | establish_relationships(&cell_a, &cell_b, |_outlives1, _outlives2, x, y| { +LL | establish_relationships(&cell_a, &cell_b, |_outlives1, _outlives2, x, y| { | _______________________________________________^ -49 | | //~^ ERROR does not outlive free region -50 | | // Only works if 'x: 'y: -51 | | demand_y(x, y, x.get()) -52 | | //~^ WARNING not reporting region error due to -Znll -53 | | }); +LL | | //~^ ERROR does not outlive free region +LL | | // Only works if 'x: 'y: +LL | | demand_y(x, y, x.get()) +LL | | //~^ WARNING not reporting region error due to -Znll +LL | | }); | |_____^ note: No external requirements --> $DIR/propagate-approximated-shorter-to-static-wrong-bound.rs:47:1 | -47 | / fn supply<'a, 'b>(cell_a: Cell<&'a u32>, cell_b: Cell<&'b u32>) { -48 | | establish_relationships(&cell_a, &cell_b, |_outlives1, _outlives2, x, y| { -49 | | //~^ ERROR does not outlive free region -50 | | // Only works if 'x: 'y: +LL | / fn supply<'a, 'b>(cell_a: Cell<&'a u32>, cell_b: Cell<&'b u32>) { +LL | | establish_relationships(&cell_a, &cell_b, |_outlives1, _outlives2, x, y| { +LL | | //~^ ERROR does not outlive free region +LL | | // Only works if 'x: 'y: ... | -53 | | }); -54 | | } +LL | | }); +LL | | } | |_^ | = note: defining type: DefId(0/0:6 ~ propagate_approximated_shorter_to_static_wrong_bound[317d]::supply[0]) with substs [] diff --git a/src/test/ui/nll/closure-requirements/propagate-approximated-val.stderr b/src/test/ui/nll/closure-requirements/propagate-approximated-val.stderr index 64766296e65a5..10b4d8532e6ab 100644 --- a/src/test/ui/nll/closure-requirements/propagate-approximated-val.stderr +++ b/src/test/ui/nll/closure-requirements/propagate-approximated-val.stderr @@ -1,19 +1,19 @@ warning: not reporting region error due to -Znll --> $DIR/propagate-approximated-val.rs:50:9 | -50 | demand_y(outlives1, outlives2, x.get()) //~ WARNING not reporting region error due to -Znll +LL | demand_y(outlives1, outlives2, x.get()) //~ WARNING not reporting region error due to -Znll | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ note: External requirements --> $DIR/propagate-approximated-val.rs:46:45 | -46 | establish_relationships(cell_a, cell_b, |outlives1, outlives2, x, y| { +LL | establish_relationships(cell_a, cell_b, |outlives1, outlives2, x, y| { | _____________________________________________^ -47 | | //~^ ERROR lifetime mismatch -48 | | -49 | | // Only works if 'x: 'y: -50 | | demand_y(outlives1, outlives2, x.get()) //~ WARNING not reporting region error due to -Znll -51 | | }); +LL | | //~^ ERROR lifetime mismatch +LL | | +LL | | // Only works if 'x: 'y: +LL | | demand_y(outlives1, outlives2, x.get()) //~ WARNING not reporting region error due to -Znll +LL | | }); | |_____^ | = note: defining type: DefId(0/1:18 ~ propagate_approximated_val[317d]::test[0]::{{closure}}[0]) with closure substs [ @@ -26,23 +26,23 @@ note: External requirements error[E0623]: lifetime mismatch --> $DIR/propagate-approximated-val.rs:46:29 | -45 | fn test<'a, 'b>(cell_a: Cell<&'a u32>, cell_b: Cell<&'b u32>) { +LL | fn test<'a, 'b>(cell_a: Cell<&'a u32>, cell_b: Cell<&'b u32>) { | ------- ------- | | | these two types are declared with different lifetimes... -46 | establish_relationships(cell_a, cell_b, |outlives1, outlives2, x, y| { +LL | establish_relationships(cell_a, cell_b, |outlives1, outlives2, x, y| { | ^^^^^^ ...but data from `cell_a` flows into `cell_b` here note: No external requirements --> $DIR/propagate-approximated-val.rs:45:1 | -45 | / fn test<'a, 'b>(cell_a: Cell<&'a u32>, cell_b: Cell<&'b u32>) { -46 | | establish_relationships(cell_a, cell_b, |outlives1, outlives2, x, y| { -47 | | //~^ ERROR lifetime mismatch -48 | | +LL | / fn test<'a, 'b>(cell_a: Cell<&'a u32>, cell_b: Cell<&'b u32>) { +LL | | establish_relationships(cell_a, cell_b, |outlives1, outlives2, x, y| { +LL | | //~^ ERROR lifetime mismatch +LL | | ... | -51 | | }); -52 | | } +LL | | }); +LL | | } | |_^ | = note: defining type: DefId(0/0:6 ~ propagate_approximated_val[317d]::test[0]) with substs [] diff --git a/src/test/ui/nll/closure-requirements/propagate-despite-same-free-region.stderr b/src/test/ui/nll/closure-requirements/propagate-despite-same-free-region.stderr index d93124963ebf8..ab4faaca75633 100644 --- a/src/test/ui/nll/closure-requirements/propagate-despite-same-free-region.stderr +++ b/src/test/ui/nll/closure-requirements/propagate-despite-same-free-region.stderr @@ -1,17 +1,17 @@ warning: not reporting region error due to -Znll --> $DIR/propagate-despite-same-free-region.rs:54:21 | -54 | let p = x.get(); +LL | let p = x.get(); | ^^^^^^^ note: External requirements --> $DIR/propagate-despite-same-free-region.rs:52:9 | -52 | / |_outlives1, _outlives2, x, y| { -53 | | // Only works if 'x: 'y: -54 | | let p = x.get(); -55 | | demand_y(x, y, p) -56 | | }, +LL | / |_outlives1, _outlives2, x, y| { +LL | | // Only works if 'x: 'y: +LL | | let p = x.get(); +LL | | demand_y(x, y, p) +LL | | }, | |_________^ | = note: defining type: DefId(0/1:16 ~ propagate_despite_same_free_region[317d]::supply[0]::{{closure}}[0]) with closure substs [ @@ -24,13 +24,13 @@ note: External requirements note: No external requirements --> $DIR/propagate-despite-same-free-region.rs:49:1 | -49 | / fn supply<'a>(cell_a: Cell<&'a u32>) { -50 | | establish_relationships( -51 | | cell_a, -52 | | |_outlives1, _outlives2, x, y| { +LL | / fn supply<'a>(cell_a: Cell<&'a u32>) { +LL | | establish_relationships( +LL | | cell_a, +LL | | |_outlives1, _outlives2, x, y| { ... | -57 | | ); -58 | | } +LL | | ); +LL | | } | |_^ | = note: defining type: DefId(0/0:6 ~ propagate_despite_same_free_region[317d]::supply[0]) with substs [] diff --git a/src/test/ui/nll/closure-requirements/propagate-fail-to-approximate-longer-no-bounds.stderr b/src/test/ui/nll/closure-requirements/propagate-fail-to-approximate-longer-no-bounds.stderr index 08dcfb042b5f4..ce808f56b4297 100644 --- a/src/test/ui/nll/closure-requirements/propagate-fail-to-approximate-longer-no-bounds.stderr +++ b/src/test/ui/nll/closure-requirements/propagate-fail-to-approximate-longer-no-bounds.stderr @@ -1,25 +1,25 @@ warning: not reporting region error due to -Znll --> $DIR/propagate-fail-to-approximate-longer-no-bounds.rs:47:9 | -47 | demand_y(x, y, x.get()) +LL | demand_y(x, y, x.get()) | ^^^^^^^^^^^^^^^^^^^^^^^ error: free region `ReFree(DefId(0/1:18 ~ propagate_fail_to_approximate_longer_no_bounds[317d]::supply[0]::{{closure}}[0]), BrAnon(4))` does not outlive free region `ReFree(DefId(0/1:18 ~ propagate_fail_to_approximate_longer_no_bounds[317d]::supply[0]::{{closure}}[0]), BrAnon(2))` --> $DIR/propagate-fail-to-approximate-longer-no-bounds.rs:47:18 | -47 | demand_y(x, y, x.get()) +LL | demand_y(x, y, x.get()) | ^ note: No external requirements --> $DIR/propagate-fail-to-approximate-longer-no-bounds.rs:45:47 | -45 | establish_relationships(&cell_a, &cell_b, |_outlives, x, y| { +LL | establish_relationships(&cell_a, &cell_b, |_outlives, x, y| { | _______________________________________________^ -46 | | // Only works if 'x: 'y: -47 | | demand_y(x, y, x.get()) -48 | | //~^ WARN not reporting region error due to -Znll -49 | | //~| ERROR does not outlive free region -50 | | }); +LL | | // Only works if 'x: 'y: +LL | | demand_y(x, y, x.get()) +LL | | //~^ WARN not reporting region error due to -Znll +LL | | //~| ERROR does not outlive free region +LL | | }); | |_____^ | = note: defining type: DefId(0/1:18 ~ propagate_fail_to_approximate_longer_no_bounds[317d]::supply[0]::{{closure}}[0]) with closure substs [ @@ -30,13 +30,13 @@ note: No external requirements note: No external requirements --> $DIR/propagate-fail-to-approximate-longer-no-bounds.rs:44:1 | -44 | / fn supply<'a, 'b>(cell_a: Cell<&'a u32>, cell_b: Cell<&'b u32>) { -45 | | establish_relationships(&cell_a, &cell_b, |_outlives, x, y| { -46 | | // Only works if 'x: 'y: -47 | | demand_y(x, y, x.get()) +LL | / fn supply<'a, 'b>(cell_a: Cell<&'a u32>, cell_b: Cell<&'b u32>) { +LL | | establish_relationships(&cell_a, &cell_b, |_outlives, x, y| { +LL | | // Only works if 'x: 'y: +LL | | demand_y(x, y, x.get()) ... | -50 | | }); -51 | | } +LL | | }); +LL | | } | |_^ | = note: defining type: DefId(0/0:6 ~ propagate_fail_to_approximate_longer_no_bounds[317d]::supply[0]) with substs [] diff --git a/src/test/ui/nll/closure-requirements/propagate-fail-to-approximate-longer-wrong-bounds.stderr b/src/test/ui/nll/closure-requirements/propagate-fail-to-approximate-longer-wrong-bounds.stderr index 502f565024970..547ff75bac62c 100644 --- a/src/test/ui/nll/closure-requirements/propagate-fail-to-approximate-longer-wrong-bounds.stderr +++ b/src/test/ui/nll/closure-requirements/propagate-fail-to-approximate-longer-wrong-bounds.stderr @@ -1,25 +1,25 @@ warning: not reporting region error due to -Znll --> $DIR/propagate-fail-to-approximate-longer-wrong-bounds.rs:51:9 | -51 | demand_y(x, y, x.get()) +LL | demand_y(x, y, x.get()) | ^^^^^^^^^^^^^^^^^^^^^^^ error: free region `ReFree(DefId(0/1:18 ~ propagate_fail_to_approximate_longer_wrong_bounds[317d]::supply[0]::{{closure}}[0]), BrAnon(2))` does not outlive free region `ReFree(DefId(0/1:18 ~ propagate_fail_to_approximate_longer_wrong_bounds[317d]::supply[0]::{{closure}}[0]), BrAnon(4))` --> $DIR/propagate-fail-to-approximate-longer-wrong-bounds.rs:51:18 | -51 | demand_y(x, y, x.get()) +LL | demand_y(x, y, x.get()) | ^ note: No external requirements --> $DIR/propagate-fail-to-approximate-longer-wrong-bounds.rs:49:47 | -49 | establish_relationships(&cell_a, &cell_b, |_outlives1, _outlives2, x, y| { +LL | establish_relationships(&cell_a, &cell_b, |_outlives1, _outlives2, x, y| { | _______________________________________________^ -50 | | // Only works if 'x: 'y: -51 | | demand_y(x, y, x.get()) -52 | | //~^ WARN not reporting region error due to -Znll -53 | | //~| ERROR does not outlive free region -54 | | }); +LL | | // Only works if 'x: 'y: +LL | | demand_y(x, y, x.get()) +LL | | //~^ WARN not reporting region error due to -Znll +LL | | //~| ERROR does not outlive free region +LL | | }); | |_____^ | = note: defining type: DefId(0/1:18 ~ propagate_fail_to_approximate_longer_wrong_bounds[317d]::supply[0]::{{closure}}[0]) with closure substs [ @@ -30,13 +30,13 @@ note: No external requirements note: No external requirements --> $DIR/propagate-fail-to-approximate-longer-wrong-bounds.rs:48:1 | -48 | / fn supply<'a, 'b>(cell_a: Cell<&'a u32>, cell_b: Cell<&'b u32>) { -49 | | establish_relationships(&cell_a, &cell_b, |_outlives1, _outlives2, x, y| { -50 | | // Only works if 'x: 'y: -51 | | demand_y(x, y, x.get()) +LL | / fn supply<'a, 'b>(cell_a: Cell<&'a u32>, cell_b: Cell<&'b u32>) { +LL | | establish_relationships(&cell_a, &cell_b, |_outlives1, _outlives2, x, y| { +LL | | // Only works if 'x: 'y: +LL | | demand_y(x, y, x.get()) ... | -54 | | }); -55 | | } +LL | | }); +LL | | } | |_^ | = note: defining type: DefId(0/0:6 ~ propagate_fail_to_approximate_longer_wrong_bounds[317d]::supply[0]) with substs [] diff --git a/src/test/ui/nll/closure-requirements/propagate-from-trait-match.stderr b/src/test/ui/nll/closure-requirements/propagate-from-trait-match.stderr index aefa160fcbc96..1b5bb0a7cd030 100644 --- a/src/test/ui/nll/closure-requirements/propagate-from-trait-match.stderr +++ b/src/test/ui/nll/closure-requirements/propagate-from-trait-match.stderr @@ -1,20 +1,20 @@ warning: not reporting region error due to -Znll --> $DIR/propagate-from-trait-match.rs:55:9 | -55 | require(value); +LL | require(value); | ^^^^^^^ note: External requirements --> $DIR/propagate-from-trait-match.rs:42:36 | -42 | establish_relationships(value, |value| { +LL | establish_relationships(value, |value| { | ____________________________________^ -43 | | //~^ ERROR the parameter type `T` may not live long enough -44 | | -45 | | // This function call requires that +LL | | //~^ ERROR the parameter type `T` may not live long enough +LL | | +LL | | // This function call requires that ... | -56 | | //~^ WARNING not reporting region error due to -Znll -57 | | }); +LL | | //~^ WARNING not reporting region error due to -Znll +LL | | }); | |_____^ | = note: defining type: DefId(0/1:16 ~ propagate_from_trait_match[317d]::supply[0]::{{closure}}[0]) with closure substs [ @@ -29,14 +29,14 @@ note: External requirements error[E0309]: the parameter type `T` may not live long enough --> $DIR/propagate-from-trait-match.rs:42:36 | -42 | establish_relationships(value, |value| { +LL | establish_relationships(value, |value| { | ____________________________________^ -43 | | //~^ ERROR the parameter type `T` may not live long enough -44 | | -45 | | // This function call requires that +LL | | //~^ ERROR the parameter type `T` may not live long enough +LL | | +LL | | // This function call requires that ... | -56 | | //~^ WARNING not reporting region error due to -Znll -57 | | }); +LL | | //~^ WARNING not reporting region error due to -Znll +LL | | }); | |_____^ | = help: consider adding an explicit lifetime bound `T: ReEarlyBound(0, 'a)`... @@ -44,13 +44,13 @@ error[E0309]: the parameter type `T` may not live long enough note: No external requirements --> $DIR/propagate-from-trait-match.rs:38:1 | -38 | / fn supply<'a, T>(value: T) -39 | | where -40 | | T: Trait<'a>, -41 | | { +LL | / fn supply<'a, T>(value: T) +LL | | where +LL | | T: Trait<'a>, +LL | | { ... | -57 | | }); -58 | | } +LL | | }); +LL | | } | |_^ | = note: defining type: DefId(0/0:6 ~ propagate_from_trait_match[317d]::supply[0]) with substs [ diff --git a/src/test/ui/nll/closure-requirements/region-lbr-anon-does-not-outlive-static.stderr b/src/test/ui/nll/closure-requirements/region-lbr-anon-does-not-outlive-static.stderr index 2a1122cbda7a9..8947faf24aee4 100644 --- a/src/test/ui/nll/closure-requirements/region-lbr-anon-does-not-outlive-static.stderr +++ b/src/test/ui/nll/closure-requirements/region-lbr-anon-does-not-outlive-static.stderr @@ -1,15 +1,15 @@ warning: not reporting region error due to -Znll --> $DIR/region-lbr-anon-does-not-outlive-static.rs:19:5 | -19 | &*x +LL | &*x | ^^^ error[E0621]: explicit lifetime required in the type of `x` --> $DIR/region-lbr-anon-does-not-outlive-static.rs:19:5 | -18 | fn foo(x: &u32) -> &'static u32 { +LL | fn foo(x: &u32) -> &'static u32 { | - consider changing the type of `x` to `&ReStatic u32` -19 | &*x +LL | &*x | ^^^ lifetime `ReStatic` required error: aborting due to previous error diff --git a/src/test/ui/nll/closure-requirements/region-lbr-named-does-not-outlive-static.stderr b/src/test/ui/nll/closure-requirements/region-lbr-named-does-not-outlive-static.stderr index 1edceba7b0916..ac3bf4b459fec 100644 --- a/src/test/ui/nll/closure-requirements/region-lbr-named-does-not-outlive-static.stderr +++ b/src/test/ui/nll/closure-requirements/region-lbr-named-does-not-outlive-static.stderr @@ -1,13 +1,13 @@ warning: not reporting region error due to -Znll --> $DIR/region-lbr-named-does-not-outlive-static.rs:19:5 | -19 | &*x +LL | &*x | ^^^ error: free region `ReFree(DefId(0/0:3 ~ region_lbr_named_does_not_outlive_static[317d]::foo[0]), BrNamed(crate0:DefIndex(1:9), 'a))` does not outlive free region `ReStatic` --> $DIR/region-lbr-named-does-not-outlive-static.rs:19:5 | -19 | &*x +LL | &*x | ^^^ error: aborting due to previous error diff --git a/src/test/ui/nll/closure-requirements/region-lbr1-does-not-outlive-ebr2.stderr b/src/test/ui/nll/closure-requirements/region-lbr1-does-not-outlive-ebr2.stderr index efe0b73f195a9..95090c858d3ed 100644 --- a/src/test/ui/nll/closure-requirements/region-lbr1-does-not-outlive-ebr2.stderr +++ b/src/test/ui/nll/closure-requirements/region-lbr1-does-not-outlive-ebr2.stderr @@ -1,17 +1,17 @@ warning: not reporting region error due to -Znll --> $DIR/region-lbr1-does-not-outlive-ebr2.rs:19:5 | -19 | &*x +LL | &*x | ^^^ error[E0623]: lifetime mismatch --> $DIR/region-lbr1-does-not-outlive-ebr2.rs:19:5 | -18 | fn foo<'a, 'b>(x: &'a u32, y: &'b u32) -> &'b u32 { +LL | fn foo<'a, 'b>(x: &'a u32, y: &'b u32) -> &'b u32 { | ------- ------- | | | this parameter and the return type are declared with different lifetimes... -19 | &*x +LL | &*x | ^^^ ...but data from `x` is returned here error: aborting due to previous error diff --git a/src/test/ui/nll/closure-requirements/return-wrong-bound-region.stderr b/src/test/ui/nll/closure-requirements/return-wrong-bound-region.stderr index 58a26e61e5767..b34f4c470df49 100644 --- a/src/test/ui/nll/closure-requirements/return-wrong-bound-region.stderr +++ b/src/test/ui/nll/closure-requirements/return-wrong-bound-region.stderr @@ -1,19 +1,19 @@ warning: not reporting region error due to -Znll --> $DIR/return-wrong-bound-region.rs:21:23 | -21 | expect_sig(|a, b| b); // ought to return `a` +LL | expect_sig(|a, b| b); // ought to return `a` | ^ error: free region `ReFree(DefId(0/1:9 ~ return_wrong_bound_region[317d]::test[0]::{{closure}}[0]), BrAnon(2))` does not outlive free region `ReFree(DefId(0/1:9 ~ return_wrong_bound_region[317d]::test[0]::{{closure}}[0]), BrAnon(1))` --> $DIR/return-wrong-bound-region.rs:21:23 | -21 | expect_sig(|a, b| b); // ought to return `a` +LL | expect_sig(|a, b| b); // ought to return `a` | ^ note: No external requirements --> $DIR/return-wrong-bound-region.rs:21:16 | -21 | expect_sig(|a, b| b); // ought to return `a` +LL | expect_sig(|a, b| b); // ought to return `a` | ^^^^^^^^ | = note: defining type: DefId(0/1:9 ~ return_wrong_bound_region[317d]::test[0]::{{closure}}[0]) with closure substs [ @@ -24,11 +24,11 @@ note: No external requirements note: No external requirements --> $DIR/return-wrong-bound-region.rs:20:1 | -20 | / fn test() { -21 | | expect_sig(|a, b| b); // ought to return `a` -22 | | //~^ WARN not reporting region error due to -Znll -23 | | //~| ERROR does not outlive free region -24 | | } +LL | / fn test() { +LL | | expect_sig(|a, b| b); // ought to return `a` +LL | | //~^ WARN not reporting region error due to -Znll +LL | | //~| ERROR does not outlive free region +LL | | } | |_^ | = note: defining type: DefId(0/0:3 ~ return_wrong_bound_region[317d]::test[0]) with substs [] diff --git a/src/test/ui/nll/drop-no-may-dangle.stderr b/src/test/ui/nll/drop-no-may-dangle.stderr index dee5873ba3be1..64479a76f0c88 100644 --- a/src/test/ui/nll/drop-no-may-dangle.stderr +++ b/src/test/ui/nll/drop-no-may-dangle.stderr @@ -1,24 +1,24 @@ error[E0506]: cannot assign to `v[..]` because it is borrowed --> $DIR/drop-no-may-dangle.rs:31:9 | -26 | let p: WrapMayNotDangle<&usize> = WrapMayNotDangle { value: &v[0] }; +LL | let p: WrapMayNotDangle<&usize> = WrapMayNotDangle { value: &v[0] }; | ----- borrow of `v[..]` occurs here ... -31 | v[0] += 1; //~ ERROR cannot assign to `v[..]` because it is borrowed +LL | v[0] += 1; //~ ERROR cannot assign to `v[..]` because it is borrowed | ^^^^^^^^^ assignment to borrowed `v[..]` occurs here ... -35 | } +LL | } | - borrow later used here, when `p` is dropped error[E0506]: cannot assign to `v[..]` because it is borrowed --> $DIR/drop-no-may-dangle.rs:34:5 | -26 | let p: WrapMayNotDangle<&usize> = WrapMayNotDangle { value: &v[0] }; +LL | let p: WrapMayNotDangle<&usize> = WrapMayNotDangle { value: &v[0] }; | ----- borrow of `v[..]` occurs here ... -34 | v[0] += 1; //~ ERROR cannot assign to `v[..]` because it is borrowed +LL | v[0] += 1; //~ ERROR cannot assign to `v[..]` because it is borrowed | ^^^^^^^^^ assignment to borrowed `v[..]` occurs here -35 | } +LL | } | - borrow later used here, when `p` is dropped error: aborting due to 2 previous errors diff --git a/src/test/ui/nll/get_default.stderr b/src/test/ui/nll/get_default.stderr index ed2c305090ccc..142c6d9d49a6b 100644 --- a/src/test/ui/nll/get_default.stderr +++ b/src/test/ui/nll/get_default.stderr @@ -1,49 +1,49 @@ error[E0502]: cannot borrow `*map` as mutable because it is also borrowed as immutable (Ast) --> $DIR/get_default.rs:33:17 | -28 | match map.get() { +LL | match map.get() { | --- immutable borrow occurs here ... -33 | map.set(String::new()); // Just AST errors here +LL | map.set(String::new()); // Just AST errors here | ^^^ mutable borrow occurs here ... -38 | } +LL | } | - immutable borrow ends here error[E0502]: cannot borrow `*map` as mutable because it is also borrowed as immutable (Ast) --> $DIR/get_default.rs:44:17 | -42 | match map.get() { +LL | match map.get() { | --- immutable borrow occurs here -43 | Some(v) => { -44 | map.set(String::new()); // Both AST and MIR error here +LL | Some(v) => { +LL | map.set(String::new()); // Both AST and MIR error here | ^^^ mutable borrow occurs here ... -55 | } +LL | } | - immutable borrow ends here error[E0502]: cannot borrow `*map` as mutable because it is also borrowed as immutable (Ast) --> $DIR/get_default.rs:50:17 | -42 | match map.get() { +LL | match map.get() { | --- immutable borrow occurs here ... -50 | map.set(String::new()); // Just AST errors here +LL | map.set(String::new()); // Just AST errors here | ^^^ mutable borrow occurs here ... -55 | } +LL | } | - immutable borrow ends here error[E0502]: cannot borrow `*map` as mutable because it is also borrowed as immutable (Mir) --> $DIR/get_default.rs:44:17 | -42 | match map.get() { +LL | match map.get() { | --- immutable borrow occurs here -43 | Some(v) => { -44 | map.set(String::new()); // Both AST and MIR error here +LL | Some(v) => { +LL | map.set(String::new()); // Both AST and MIR error here | ^^^ mutable borrow occurs here ... -47 | return v; +LL | return v; | - borrow later used here error: aborting due to 4 previous errors diff --git a/src/test/ui/nll/guarantor-issue-46974.stderr b/src/test/ui/nll/guarantor-issue-46974.stderr index 4f0bd88f988ae..d7692c359616f 100644 --- a/src/test/ui/nll/guarantor-issue-46974.stderr +++ b/src/test/ui/nll/guarantor-issue-46974.stderr @@ -1,19 +1,19 @@ error[E0506]: cannot assign to `*s` because it is borrowed --> $DIR/guarantor-issue-46974.rs:19:5 | -17 | let t = &mut *s; // this borrow should last for the entire function +LL | let t = &mut *s; // this borrow should last for the entire function | ------- borrow of `*s` occurs here -18 | let x = &t.0; -19 | *s = (2,); //~ ERROR cannot assign to `*s` +LL | let x = &t.0; +LL | *s = (2,); //~ ERROR cannot assign to `*s` | ^^^^^^^^^ assignment to borrowed `*s` occurs here error[E0621]: explicit lifetime required in the type of `s` --> $DIR/guarantor-issue-46974.rs:25:5 | -23 | fn bar(s: &Box<(i32,)>) -> &'static i32 { +LL | fn bar(s: &Box<(i32,)>) -> &'static i32 { | - consider changing the type of `s` to `&'static std::boxed::Box<(i32,)>` -24 | // FIXME(#46983): error message should be better -25 | &s.0 //~ ERROR explicit lifetime required in the type of `s` [E0621] +LL | // FIXME(#46983): error message should be better +LL | &s.0 //~ ERROR explicit lifetime required in the type of `s` [E0621] | ^^^^ lifetime `'static` required error: aborting due to 2 previous errors diff --git a/src/test/ui/nll/maybe-initialized-drop-implicit-fragment-drop.stderr b/src/test/ui/nll/maybe-initialized-drop-implicit-fragment-drop.stderr index fbaaf5511ccd5..ed060173445ea 100644 --- a/src/test/ui/nll/maybe-initialized-drop-implicit-fragment-drop.stderr +++ b/src/test/ui/nll/maybe-initialized-drop-implicit-fragment-drop.stderr @@ -1,13 +1,13 @@ error[E0506]: cannot assign to `x` because it is borrowed --> $DIR/maybe-initialized-drop-implicit-fragment-drop.rs:32:5 | -28 | let wrap = Wrap { p: &mut x }; +LL | let wrap = Wrap { p: &mut x }; | ------ borrow of `x` occurs here ... -32 | x = 1; //~ ERROR cannot assign to `x` because it is borrowed [E0506] +LL | x = 1; //~ ERROR cannot assign to `x` because it is borrowed [E0506] | ^^^^^ assignment to borrowed `x` occurs here -33 | // FIXME ^ Should not error in the future with implicit dtors, only manually implemented ones -34 | } +LL | // FIXME ^ Should not error in the future with implicit dtors, only manually implemented ones +LL | } | - borrow later used here, when `foo` is dropped error: aborting due to previous error diff --git a/src/test/ui/nll/maybe-initialized-drop-with-fragment.stderr b/src/test/ui/nll/maybe-initialized-drop-with-fragment.stderr index 5d526cda042e9..c1a674f957e09 100644 --- a/src/test/ui/nll/maybe-initialized-drop-with-fragment.stderr +++ b/src/test/ui/nll/maybe-initialized-drop-with-fragment.stderr @@ -1,12 +1,12 @@ error[E0506]: cannot assign to `x` because it is borrowed --> $DIR/maybe-initialized-drop-with-fragment.rs:31:5 | -27 | let wrap = Wrap { p: &mut x }; +LL | let wrap = Wrap { p: &mut x }; | ------ borrow of `x` occurs here ... -31 | x = 1; //~ ERROR cannot assign to `x` because it is borrowed [E0506] +LL | x = 1; //~ ERROR cannot assign to `x` because it is borrowed [E0506] | ^^^^^ assignment to borrowed `x` occurs here -32 | } +LL | } | - borrow later used here, when `foo` is dropped error: aborting due to previous error diff --git a/src/test/ui/nll/maybe-initialized-drop-with-uninitialized-fragments.stderr b/src/test/ui/nll/maybe-initialized-drop-with-uninitialized-fragments.stderr index ecd60821194f8..3d635477e015c 100644 --- a/src/test/ui/nll/maybe-initialized-drop-with-uninitialized-fragments.stderr +++ b/src/test/ui/nll/maybe-initialized-drop-with-uninitialized-fragments.stderr @@ -1,13 +1,13 @@ error[E0506]: cannot assign to `x` because it is borrowed --> $DIR/maybe-initialized-drop-with-uninitialized-fragments.rs:32:5 | -27 | let wrap = Wrap { p: &mut x }; +LL | let wrap = Wrap { p: &mut x }; | ------ borrow of `x` occurs here ... -32 | x = 1; //~ ERROR cannot assign to `x` because it is borrowed [E0506] +LL | x = 1; //~ ERROR cannot assign to `x` because it is borrowed [E0506] | ^^^^^ assignment to borrowed `x` occurs here -33 | // FIXME ^ This currently errors and it should not. -34 | } +LL | // FIXME ^ This currently errors and it should not. +LL | } | - borrow later used here, when `foo` is dropped error: aborting due to previous error diff --git a/src/test/ui/nll/maybe-initialized-drop.stderr b/src/test/ui/nll/maybe-initialized-drop.stderr index 874d63a0441b6..ad84c5e6440b2 100644 --- a/src/test/ui/nll/maybe-initialized-drop.stderr +++ b/src/test/ui/nll/maybe-initialized-drop.stderr @@ -1,11 +1,11 @@ error[E0506]: cannot assign to `x` because it is borrowed --> $DIR/maybe-initialized-drop.rs:26:5 | -25 | let wrap = Wrap { p: &mut x }; +LL | let wrap = Wrap { p: &mut x }; | ------ borrow of `x` occurs here -26 | x = 1; //~ ERROR cannot assign to `x` because it is borrowed [E0506] +LL | x = 1; //~ ERROR cannot assign to `x` because it is borrowed [E0506] | ^^^^^ assignment to borrowed `x` occurs here -27 | } +LL | } | - borrow later used here, when `wrap` is dropped error: aborting due to previous error diff --git a/src/test/ui/nll/return-ref-mut-issue-46557.stderr b/src/test/ui/nll/return-ref-mut-issue-46557.stderr index cd77569dae0bf..c31b8325b1080 100644 --- a/src/test/ui/nll/return-ref-mut-issue-46557.stderr +++ b/src/test/ui/nll/return-ref-mut-issue-46557.stderr @@ -1,10 +1,10 @@ error[E0597]: borrowed value does not live long enough --> $DIR/return-ref-mut-issue-46557.rs:17:21 | -17 | let ref mut x = 1234543; //~ ERROR borrowed value does not live long enough [E0597] +LL | let ref mut x = 1234543; //~ ERROR borrowed value does not live long enough [E0597] | ^^^^^^^ temporary value does not live long enough -18 | x -19 | } +LL | x +LL | } | - temporary value only lives until here | = note: borrowed value must be valid for lifetime '_#2r... diff --git a/src/test/ui/nll/trait-associated-constant.stderr b/src/test/ui/nll/trait-associated-constant.stderr index 21c1a6ded93c2..2200d661b326b 100644 --- a/src/test/ui/nll/trait-associated-constant.stderr +++ b/src/test/ui/nll/trait-associated-constant.stderr @@ -1,7 +1,7 @@ error[E0308]: mismatched types --> $DIR/trait-associated-constant.rs:31:5 | -31 | const AC: Option<&'c str> = None; +LL | const AC: Option<&'c str> = None; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ lifetime mismatch | = note: expected type `std::option::Option<&'b str>` @@ -9,18 +9,18 @@ error[E0308]: mismatched types note: the lifetime 'c as defined on the impl at 30:1... --> $DIR/trait-associated-constant.rs:30:1 | -30 | impl<'a: 'b, 'b, 'c> Anything<'a, 'b> for FailStruct1 { +LL | impl<'a: 'b, 'b, 'c> Anything<'a, 'b> for FailStruct1 { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ note: ...does not necessarily outlive the lifetime 'b as defined on the impl at 30:1 --> $DIR/trait-associated-constant.rs:30:1 | -30 | impl<'a: 'b, 'b, 'c> Anything<'a, 'b> for FailStruct1 { +LL | impl<'a: 'b, 'b, 'c> Anything<'a, 'b> for FailStruct1 { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error[E0308]: mismatched types --> $DIR/trait-associated-constant.rs:38:5 | -38 | const AC: Option<&'a str> = None; +LL | const AC: Option<&'a str> = None; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ lifetime mismatch | = note: expected type `std::option::Option<&'b str>` @@ -28,12 +28,12 @@ error[E0308]: mismatched types note: the lifetime 'a as defined on the impl at 37:1... --> $DIR/trait-associated-constant.rs:37:1 | -37 | impl<'a: 'b, 'b> Anything<'a, 'b> for FailStruct2 { +LL | impl<'a: 'b, 'b> Anything<'a, 'b> for FailStruct2 { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ note: ...does not necessarily outlive the lifetime 'b as defined on the impl at 37:1 --> $DIR/trait-associated-constant.rs:37:1 | -37 | impl<'a: 'b, 'b> Anything<'a, 'b> for FailStruct2 { +LL | impl<'a: 'b, 'b> Anything<'a, 'b> for FailStruct2 { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: aborting due to 2 previous errors diff --git a/src/test/ui/nll/ty-outlives/impl-trait-captures.stderr b/src/test/ui/nll/ty-outlives/impl-trait-captures.stderr index 4cfd12002e796..8a3f3b8851eaf 100644 --- a/src/test/ui/nll/ty-outlives/impl-trait-captures.stderr +++ b/src/test/ui/nll/ty-outlives/impl-trait-captures.stderr @@ -1,15 +1,15 @@ warning: not reporting region error due to -Znll --> $DIR/impl-trait-captures.rs:22:5 | -22 | x +LL | x | ^ error[E0621]: explicit lifetime required in the type of `x` --> $DIR/impl-trait-captures.rs:22:5 | -21 | fn foo<'a, T>(x: &T) -> impl Foo<'a> { +LL | fn foo<'a, T>(x: &T) -> impl Foo<'a> { | - consider changing the type of `x` to `&ReEarlyBound(0, 'a) T` -22 | x +LL | x | ^ lifetime `ReEarlyBound(0, 'a)` required error: aborting due to previous error diff --git a/src/test/ui/nll/ty-outlives/impl-trait-outlives.stderr b/src/test/ui/nll/ty-outlives/impl-trait-outlives.stderr index 5916d0060a02a..1e786e0d7ce4d 100644 --- a/src/test/ui/nll/ty-outlives/impl-trait-outlives.stderr +++ b/src/test/ui/nll/ty-outlives/impl-trait-outlives.stderr @@ -1,19 +1,19 @@ warning: not reporting region error due to -Znll --> $DIR/impl-trait-outlives.rs:18:35 | -18 | fn no_region<'a, T>(x: Box) -> impl Debug + 'a +LL | fn no_region<'a, T>(x: Box) -> impl Debug + 'a | ^^^^^^^^^^^^^^^ warning: not reporting region error due to -Znll --> $DIR/impl-trait-outlives.rs:34:42 | -34 | fn wrong_region<'a, 'b, T>(x: Box) -> impl Debug + 'a +LL | fn wrong_region<'a, 'b, T>(x: Box) -> impl Debug + 'a | ^^^^^^^^^^^^^^^ error[E0309]: the parameter type `T` may not live long enough --> $DIR/impl-trait-outlives.rs:23:5 | -23 | x +LL | x | ^ | = help: consider adding an explicit lifetime bound `T: ReEarlyBound(0, 'a)`... @@ -21,7 +21,7 @@ error[E0309]: the parameter type `T` may not live long enough error[E0309]: the parameter type `T` may not live long enough --> $DIR/impl-trait-outlives.rs:39:5 | -39 | x +LL | x | ^ | = help: consider adding an explicit lifetime bound `T: ReEarlyBound(0, 'a)`... diff --git a/src/test/ui/nll/ty-outlives/projection-implied-bounds.stderr b/src/test/ui/nll/ty-outlives/projection-implied-bounds.stderr index a49bdbbf09edf..94e3259207b11 100644 --- a/src/test/ui/nll/ty-outlives/projection-implied-bounds.stderr +++ b/src/test/ui/nll/ty-outlives/projection-implied-bounds.stderr @@ -1,13 +1,13 @@ warning: not reporting region error due to -Znll --> $DIR/projection-implied-bounds.rs:45:36 | -45 | twice(value, |value_ref, item| invoke2(value_ref, item)); +LL | twice(value, |value_ref, item| invoke2(value_ref, item)); | ^^^^^^^ error[E0310]: the parameter type `T` may not live long enough --> $DIR/projection-implied-bounds.rs:45:18 | -45 | twice(value, |value_ref, item| invoke2(value_ref, item)); +LL | twice(value, |value_ref, item| invoke2(value_ref, item)); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: consider adding an explicit lifetime bound `T: 'static`... diff --git a/src/test/ui/nll/ty-outlives/projection-no-regions-closure.stderr b/src/test/ui/nll/ty-outlives/projection-no-regions-closure.stderr index 30669dc4c2f8c..cbf38f1820dbb 100644 --- a/src/test/ui/nll/ty-outlives/projection-no-regions-closure.stderr +++ b/src/test/ui/nll/ty-outlives/projection-no-regions-closure.stderr @@ -1,19 +1,19 @@ warning: not reporting region error due to -Znll --> $DIR/projection-no-regions-closure.rs:36:31 | -36 | with_signature(x, |mut y| Box::new(y.next())) +LL | with_signature(x, |mut y| Box::new(y.next())) | ^^^^^^^^^^^^^^^^^^ warning: not reporting region error due to -Znll --> $DIR/projection-no-regions-closure.rs:54:31 | -54 | with_signature(x, |mut y| Box::new(y.next())) +LL | with_signature(x, |mut y| Box::new(y.next())) | ^^^^^^^^^^^^^^^^^^ note: External requirements --> $DIR/projection-no-regions-closure.rs:36:23 | -36 | with_signature(x, |mut y| Box::new(y.next())) +LL | with_signature(x, |mut y| Box::new(y.next())) | ^^^^^^^^^^^^^^^^^^^^^^^^^^ | = note: defining type: DefId(0/1:15 ~ projection_no_regions_closure[317d]::no_region[0]::{{closure}}[0]) with closure substs [ @@ -28,7 +28,7 @@ note: External requirements error[E0309]: the associated type `::Item` may not live long enough --> $DIR/projection-no-regions-closure.rs:36:23 | -36 | with_signature(x, |mut y| Box::new(y.next())) +LL | with_signature(x, |mut y| Box::new(y.next())) | ^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: consider adding an explicit lifetime bound `::Item: ReEarlyBound(0, 'a)`... @@ -36,13 +36,13 @@ error[E0309]: the associated type `::Item` may not liv note: No external requirements --> $DIR/projection-no-regions-closure.rs:32:1 | -32 | / fn no_region<'a, T>(x: Box) -> Box -33 | | where -34 | | T: Iterator, -35 | | { +LL | / fn no_region<'a, T>(x: Box) -> Box +LL | | where +LL | | T: Iterator, +LL | | { ... | -38 | | //~| ERROR the associated type `::Item` may not live long enough -39 | | } +LL | | //~| ERROR the associated type `::Item` may not live long enough +LL | | } | |_^ | = note: defining type: DefId(0/0:6 ~ projection_no_regions_closure[317d]::no_region[0]) with substs [ @@ -53,7 +53,7 @@ note: No external requirements note: External requirements --> $DIR/projection-no-regions-closure.rs:46:23 | -46 | with_signature(x, |mut y| Box::new(y.next())) +LL | with_signature(x, |mut y| Box::new(y.next())) | ^^^^^^^^^^^^^^^^^^^^^^^^^^ | = note: defining type: DefId(0/1:18 ~ projection_no_regions_closure[317d]::correct_region[0]::{{closure}}[0]) with closure substs [ @@ -68,12 +68,12 @@ note: External requirements note: No external requirements --> $DIR/projection-no-regions-closure.rs:42:1 | -42 | / fn correct_region<'a, T>(x: Box) -> Box -43 | | where -44 | | T: 'a + Iterator, -45 | | { -46 | | with_signature(x, |mut y| Box::new(y.next())) -47 | | } +LL | / fn correct_region<'a, T>(x: Box) -> Box +LL | | where +LL | | T: 'a + Iterator, +LL | | { +LL | | with_signature(x, |mut y| Box::new(y.next())) +LL | | } | |_^ | = note: defining type: DefId(0/0:7 ~ projection_no_regions_closure[317d]::correct_region[0]) with substs [ @@ -84,7 +84,7 @@ note: No external requirements note: External requirements --> $DIR/projection-no-regions-closure.rs:54:23 | -54 | with_signature(x, |mut y| Box::new(y.next())) +LL | with_signature(x, |mut y| Box::new(y.next())) | ^^^^^^^^^^^^^^^^^^^^^^^^^^ | = note: defining type: DefId(0/1:22 ~ projection_no_regions_closure[317d]::wrong_region[0]::{{closure}}[0]) with closure substs [ @@ -100,7 +100,7 @@ note: External requirements error[E0309]: the associated type `::Item` may not live long enough --> $DIR/projection-no-regions-closure.rs:54:23 | -54 | with_signature(x, |mut y| Box::new(y.next())) +LL | with_signature(x, |mut y| Box::new(y.next())) | ^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: consider adding an explicit lifetime bound `::Item: ReEarlyBound(0, 'a)`... @@ -108,13 +108,13 @@ error[E0309]: the associated type `::Item` may not liv note: No external requirements --> $DIR/projection-no-regions-closure.rs:50:1 | -50 | / fn wrong_region<'a, 'b, T>(x: Box) -> Box -51 | | where -52 | | T: 'b + Iterator, -53 | | { +LL | / fn wrong_region<'a, 'b, T>(x: Box) -> Box +LL | | where +LL | | T: 'b + Iterator, +LL | | { ... | -56 | | //~| ERROR the associated type `::Item` may not live long enough -57 | | } +LL | | //~| ERROR the associated type `::Item` may not live long enough +LL | | } | |_^ | = note: defining type: DefId(0/0:8 ~ projection_no_regions_closure[317d]::wrong_region[0]) with substs [ @@ -126,7 +126,7 @@ note: No external requirements note: External requirements --> $DIR/projection-no-regions-closure.rs:65:23 | -65 | with_signature(x, |mut y| Box::new(y.next())) +LL | with_signature(x, |mut y| Box::new(y.next())) | ^^^^^^^^^^^^^^^^^^^^^^^^^^ | = note: defining type: DefId(0/1:26 ~ projection_no_regions_closure[317d]::outlives_region[0]::{{closure}}[0]) with closure substs [ @@ -142,13 +142,13 @@ note: External requirements note: No external requirements --> $DIR/projection-no-regions-closure.rs:60:1 | -60 | / fn outlives_region<'a, 'b, T>(x: Box) -> Box -61 | | where -62 | | T: 'b + Iterator, -63 | | 'b: 'a, -64 | | { -65 | | with_signature(x, |mut y| Box::new(y.next())) -66 | | } +LL | / fn outlives_region<'a, 'b, T>(x: Box) -> Box +LL | | where +LL | | T: 'b + Iterator, +LL | | 'b: 'a, +LL | | { +LL | | with_signature(x, |mut y| Box::new(y.next())) +LL | | } | |_^ | = note: defining type: DefId(0/0:9 ~ projection_no_regions_closure[317d]::outlives_region[0]) with substs [ diff --git a/src/test/ui/nll/ty-outlives/projection-no-regions-fn.stderr b/src/test/ui/nll/ty-outlives/projection-no-regions-fn.stderr index d309bf2ce6ca4..b94d869e0f193 100644 --- a/src/test/ui/nll/ty-outlives/projection-no-regions-fn.stderr +++ b/src/test/ui/nll/ty-outlives/projection-no-regions-fn.stderr @@ -1,19 +1,19 @@ warning: not reporting region error due to -Znll --> $DIR/projection-no-regions-fn.rs:24:5 | -24 | Box::new(x.next()) +LL | Box::new(x.next()) | ^^^^^^^^^^^^^^^^^^ warning: not reporting region error due to -Znll --> $DIR/projection-no-regions-fn.rs:40:5 | -40 | Box::new(x.next()) +LL | Box::new(x.next()) | ^^^^^^^^^^^^^^^^^^ error[E0309]: the associated type `::Item` may not live long enough --> $DIR/projection-no-regions-fn.rs:24:5 | -24 | Box::new(x.next()) +LL | Box::new(x.next()) | ^^^^^^^^^^^^^^^^^^ | = help: consider adding an explicit lifetime bound `::Item: ReEarlyBound(0, 'a)`... @@ -21,7 +21,7 @@ error[E0309]: the associated type `::Item` may not liv error[E0309]: the associated type `::Item` may not live long enough --> $DIR/projection-no-regions-fn.rs:40:5 | -40 | Box::new(x.next()) +LL | Box::new(x.next()) | ^^^^^^^^^^^^^^^^^^ | = help: consider adding an explicit lifetime bound `::Item: ReEarlyBound(0, 'a)`... diff --git a/src/test/ui/nll/ty-outlives/projection-one-region-closure.stderr b/src/test/ui/nll/ty-outlives/projection-one-region-closure.stderr index 946c1a8f37235..2f32721882da6 100644 --- a/src/test/ui/nll/ty-outlives/projection-one-region-closure.stderr +++ b/src/test/ui/nll/ty-outlives/projection-one-region-closure.stderr @@ -1,25 +1,25 @@ warning: not reporting region error due to -Znll --> $DIR/projection-one-region-closure.rs:56:39 | -56 | with_signature(cell, t, |cell, t| require(cell, t)); +LL | with_signature(cell, t, |cell, t| require(cell, t)); | ^^^^^^^ warning: not reporting region error due to -Znll --> $DIR/projection-one-region-closure.rs:68:39 | -68 | with_signature(cell, t, |cell, t| require(cell, t)); +LL | with_signature(cell, t, |cell, t| require(cell, t)); | ^^^^^^^ warning: not reporting region error due to -Znll --> $DIR/projection-one-region-closure.rs:90:39 | -90 | with_signature(cell, t, |cell, t| require(cell, t)); +LL | with_signature(cell, t, |cell, t| require(cell, t)); | ^^^^^^^ note: External requirements --> $DIR/projection-one-region-closure.rs:56:29 | -56 | with_signature(cell, t, |cell, t| require(cell, t)); +LL | with_signature(cell, t, |cell, t| require(cell, t)); | ^^^^^^^^^^^^^^^^^^^^^^^^^^ | = note: defining type: DefId(0/1:19 ~ projection_one_region_closure[317d]::no_relationships_late[0]::{{closure}}[0]) with closure substs [ @@ -35,7 +35,7 @@ note: External requirements error[E0309]: the parameter type `T` may not live long enough --> $DIR/projection-one-region-closure.rs:56:29 | -56 | with_signature(cell, t, |cell, t| require(cell, t)); +LL | with_signature(cell, t, |cell, t| require(cell, t)); | ^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: consider adding an explicit lifetime bound `T: ReFree(DefId(0/0:8 ~ projection_one_region_closure[317d]::no_relationships_late[0]), BrNamed(crate0:DefIndex(1:16), 'a))`... @@ -43,19 +43,19 @@ error[E0309]: the parameter type `T` may not live long enough error: free region `ReEarlyBound(0, 'b)` does not outlive free region `ReFree(DefId(0/0:8 ~ projection_one_region_closure[317d]::no_relationships_late[0]), BrNamed(crate0:DefIndex(1:16), 'a))` --> $DIR/projection-one-region-closure.rs:56:20 | -56 | with_signature(cell, t, |cell, t| require(cell, t)); +LL | with_signature(cell, t, |cell, t| require(cell, t)); | ^^^^ note: No external requirements --> $DIR/projection-one-region-closure.rs:52:1 | -52 | / fn no_relationships_late<'a, 'b, T>(cell: Cell<&'a ()>, t: T) -53 | | where -54 | | T: Anything<'b>, -55 | | { +LL | / fn no_relationships_late<'a, 'b, T>(cell: Cell<&'a ()>, t: T) +LL | | where +LL | | T: Anything<'b>, +LL | | { ... | -59 | | //~| ERROR does not outlive free region -60 | | } +LL | | //~| ERROR does not outlive free region +LL | | } | |_^ | = note: defining type: DefId(0/0:8 ~ projection_one_region_closure[317d]::no_relationships_late[0]) with substs [ @@ -66,7 +66,7 @@ note: No external requirements note: External requirements --> $DIR/projection-one-region-closure.rs:68:29 | -68 | with_signature(cell, t, |cell, t| require(cell, t)); +LL | with_signature(cell, t, |cell, t| require(cell, t)); | ^^^^^^^^^^^^^^^^^^^^^^^^^^ | = note: defining type: DefId(0/1:23 ~ projection_one_region_closure[317d]::no_relationships_early[0]::{{closure}}[0]) with closure substs [ @@ -83,7 +83,7 @@ note: External requirements error[E0309]: the parameter type `T` may not live long enough --> $DIR/projection-one-region-closure.rs:68:29 | -68 | with_signature(cell, t, |cell, t| require(cell, t)); +LL | with_signature(cell, t, |cell, t| require(cell, t)); | ^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: consider adding an explicit lifetime bound `T: ReEarlyBound(0, 'a)`... @@ -91,19 +91,19 @@ error[E0309]: the parameter type `T` may not live long enough error: free region `ReEarlyBound(1, 'b)` does not outlive free region `ReEarlyBound(0, 'a)` --> $DIR/projection-one-region-closure.rs:68:20 | -68 | with_signature(cell, t, |cell, t| require(cell, t)); +LL | with_signature(cell, t, |cell, t| require(cell, t)); | ^^^^ note: No external requirements --> $DIR/projection-one-region-closure.rs:63:1 | -63 | / fn no_relationships_early<'a, 'b, T>(cell: Cell<&'a ()>, t: T) -64 | | where -65 | | T: Anything<'b>, -66 | | 'a: 'a, +LL | / fn no_relationships_early<'a, 'b, T>(cell: Cell<&'a ()>, t: T) +LL | | where +LL | | T: Anything<'b>, +LL | | 'a: 'a, ... | -71 | | //~| ERROR does not outlive free region -72 | | } +LL | | //~| ERROR does not outlive free region +LL | | } | |_^ | = note: defining type: DefId(0/0:9 ~ projection_one_region_closure[317d]::no_relationships_early[0]) with substs [ @@ -115,7 +115,7 @@ note: No external requirements note: External requirements --> $DIR/projection-one-region-closure.rs:90:29 | -90 | with_signature(cell, t, |cell, t| require(cell, t)); +LL | with_signature(cell, t, |cell, t| require(cell, t)); | ^^^^^^^^^^^^^^^^^^^^^^^^^^ | = note: defining type: DefId(0/1:27 ~ projection_one_region_closure[317d]::projection_outlives[0]::{{closure}}[0]) with closure substs [ @@ -132,7 +132,7 @@ note: External requirements error[E0309]: the parameter type `T` may not live long enough --> $DIR/projection-one-region-closure.rs:90:29 | -90 | with_signature(cell, t, |cell, t| require(cell, t)); +LL | with_signature(cell, t, |cell, t| require(cell, t)); | ^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: consider adding an explicit lifetime bound `T: ReEarlyBound(0, 'a)`... @@ -140,19 +140,19 @@ error[E0309]: the parameter type `T` may not live long enough error: free region `ReEarlyBound(1, 'b)` does not outlive free region `ReEarlyBound(0, 'a)` --> $DIR/projection-one-region-closure.rs:90:20 | -90 | with_signature(cell, t, |cell, t| require(cell, t)); +LL | with_signature(cell, t, |cell, t| require(cell, t)); | ^^^^ note: No external requirements --> $DIR/projection-one-region-closure.rs:75:1 | -75 | / fn projection_outlives<'a, 'b, T>(cell: Cell<&'a ()>, t: T) -76 | | where -77 | | T: Anything<'b>, -78 | | T::AssocType: 'a, +LL | / fn projection_outlives<'a, 'b, T>(cell: Cell<&'a ()>, t: T) +LL | | where +LL | | T: Anything<'b>, +LL | | T::AssocType: 'a, ... | -93 | | //~| ERROR free region `ReEarlyBound(1, 'b)` does not outlive free region `ReEarlyBound(0, 'a)` -94 | | } +LL | | //~| ERROR free region `ReEarlyBound(1, 'b)` does not outlive free region `ReEarlyBound(0, 'a)` +LL | | } | |_^ | = note: defining type: DefId(0/0:10 ~ projection_one_region_closure[317d]::projection_outlives[0]) with substs [ @@ -162,39 +162,39 @@ note: No external requirements ] note: External requirements - --> $DIR/projection-one-region-closure.rs:103:29 - | -103 | with_signature(cell, t, |cell, t| require(cell, t)); - | ^^^^^^^^^^^^^^^^^^^^^^^^^^ - | - = note: defining type: DefId(0/1:31 ~ projection_one_region_closure[317d]::elements_outlive[0]::{{closure}}[0]) with closure substs [ - '_#1r, - '_#2r, - T, - i32, - extern "rust-call" fn((std::cell::Cell<&'_#3r ()>, T)) - ] - = note: number of external vids: 4 - = note: where T: '_#3r - = note: where '_#2r: '_#3r + --> $DIR/projection-one-region-closure.rs:103:29 + | +LL | with_signature(cell, t, |cell, t| require(cell, t)); + | ^^^^^^^^^^^^^^^^^^^^^^^^^^ + | + = note: defining type: DefId(0/1:31 ~ projection_one_region_closure[317d]::elements_outlive[0]::{{closure}}[0]) with closure substs [ + '_#1r, + '_#2r, + T, + i32, + extern "rust-call" fn((std::cell::Cell<&'_#3r ()>, T)) + ] + = note: number of external vids: 4 + = note: where T: '_#3r + = note: where '_#2r: '_#3r note: No external requirements - --> $DIR/projection-one-region-closure.rs:97:1 - | -97 | / fn elements_outlive<'a, 'b, T>(cell: Cell<&'a ()>, t: T) -98 | | where -99 | | T: Anything<'b>, -100 | | T: 'a, -... | -103 | | with_signature(cell, t, |cell, t| require(cell, t)); -104 | | } - | |_^ - | - = note: defining type: DefId(0/0:11 ~ projection_one_region_closure[317d]::elements_outlive[0]) with substs [ - '_#1r, - '_#2r, - T - ] + --> $DIR/projection-one-region-closure.rs:97:1 + | +LL | / fn elements_outlive<'a, 'b, T>(cell: Cell<&'a ()>, t: T) +LL | | where +LL | | T: Anything<'b>, +LL | | T: 'a, +... | +LL | | with_signature(cell, t, |cell, t| require(cell, t)); +LL | | } + | |_^ + | + = note: defining type: DefId(0/0:11 ~ projection_one_region_closure[317d]::elements_outlive[0]) with substs [ + '_#1r, + '_#2r, + T + ] error: aborting due to 6 previous errors diff --git a/src/test/ui/nll/ty-outlives/projection-one-region-trait-bound-closure.stderr b/src/test/ui/nll/ty-outlives/projection-one-region-trait-bound-closure.stderr index b26fa96fe6389..7a8010ad8e0ea 100644 --- a/src/test/ui/nll/ty-outlives/projection-one-region-trait-bound-closure.stderr +++ b/src/test/ui/nll/ty-outlives/projection-one-region-trait-bound-closure.stderr @@ -1,25 +1,25 @@ warning: not reporting region error due to -Znll --> $DIR/projection-one-region-trait-bound-closure.rs:48:39 | -48 | with_signature(cell, t, |cell, t| require(cell, t)); +LL | with_signature(cell, t, |cell, t| require(cell, t)); | ^^^^^^^ warning: not reporting region error due to -Znll --> $DIR/projection-one-region-trait-bound-closure.rs:59:39 | -59 | with_signature(cell, t, |cell, t| require(cell, t)); +LL | with_signature(cell, t, |cell, t| require(cell, t)); | ^^^^^^^ warning: not reporting region error due to -Znll --> $DIR/projection-one-region-trait-bound-closure.rs:80:39 | -80 | with_signature(cell, t, |cell, t| require(cell, t)); +LL | with_signature(cell, t, |cell, t| require(cell, t)); | ^^^^^^^ note: External requirements --> $DIR/projection-one-region-trait-bound-closure.rs:48:29 | -48 | with_signature(cell, t, |cell, t| require(cell, t)); +LL | with_signature(cell, t, |cell, t| require(cell, t)); | ^^^^^^^^^^^^^^^^^^^^^^^^^^ | = note: defining type: DefId(0/1:19 ~ projection_one_region_trait_bound_closure[317d]::no_relationships_late[0]::{{closure}}[0]) with closure substs [ @@ -34,19 +34,19 @@ note: External requirements error: free region `ReEarlyBound(0, 'b)` does not outlive free region `ReFree(DefId(0/0:8 ~ projection_one_region_trait_bound_closure[317d]::no_relationships_late[0]), BrNamed(crate0:DefIndex(1:16), 'a))` --> $DIR/projection-one-region-trait-bound-closure.rs:48:20 | -48 | with_signature(cell, t, |cell, t| require(cell, t)); +LL | with_signature(cell, t, |cell, t| require(cell, t)); | ^^^^ note: No external requirements --> $DIR/projection-one-region-trait-bound-closure.rs:44:1 | -44 | / fn no_relationships_late<'a, 'b, T>(cell: Cell<&'a ()>, t: T) -45 | | where -46 | | T: Anything<'b>, -47 | | { +LL | / fn no_relationships_late<'a, 'b, T>(cell: Cell<&'a ()>, t: T) +LL | | where +LL | | T: Anything<'b>, +LL | | { ... | -50 | | //~| ERROR does not outlive free region -51 | | } +LL | | //~| ERROR does not outlive free region +LL | | } | |_^ | = note: defining type: DefId(0/0:8 ~ projection_one_region_trait_bound_closure[317d]::no_relationships_late[0]) with substs [ @@ -57,7 +57,7 @@ note: No external requirements note: External requirements --> $DIR/projection-one-region-trait-bound-closure.rs:59:29 | -59 | with_signature(cell, t, |cell, t| require(cell, t)); +LL | with_signature(cell, t, |cell, t| require(cell, t)); | ^^^^^^^^^^^^^^^^^^^^^^^^^^ | = note: defining type: DefId(0/1:23 ~ projection_one_region_trait_bound_closure[317d]::no_relationships_early[0]::{{closure}}[0]) with closure substs [ @@ -73,19 +73,19 @@ note: External requirements error: free region `ReEarlyBound(1, 'b)` does not outlive free region `ReEarlyBound(0, 'a)` --> $DIR/projection-one-region-trait-bound-closure.rs:59:20 | -59 | with_signature(cell, t, |cell, t| require(cell, t)); +LL | with_signature(cell, t, |cell, t| require(cell, t)); | ^^^^ note: No external requirements --> $DIR/projection-one-region-trait-bound-closure.rs:54:1 | -54 | / fn no_relationships_early<'a, 'b, T>(cell: Cell<&'a ()>, t: T) -55 | | where -56 | | T: Anything<'b>, -57 | | 'a: 'a, +LL | / fn no_relationships_early<'a, 'b, T>(cell: Cell<&'a ()>, t: T) +LL | | where +LL | | T: Anything<'b>, +LL | | 'a: 'a, ... | -61 | | //~| ERROR does not outlive free region -62 | | } +LL | | //~| ERROR does not outlive free region +LL | | } | |_^ | = note: defining type: DefId(0/0:9 ~ projection_one_region_trait_bound_closure[317d]::no_relationships_early[0]) with substs [ @@ -97,7 +97,7 @@ note: No external requirements note: External requirements --> $DIR/projection-one-region-trait-bound-closure.rs:80:29 | -80 | with_signature(cell, t, |cell, t| require(cell, t)); +LL | with_signature(cell, t, |cell, t| require(cell, t)); | ^^^^^^^^^^^^^^^^^^^^^^^^^^ | = note: defining type: DefId(0/1:27 ~ projection_one_region_trait_bound_closure[317d]::projection_outlives[0]::{{closure}}[0]) with closure substs [ @@ -113,19 +113,19 @@ note: External requirements error: free region `ReEarlyBound(1, 'b)` does not outlive free region `ReEarlyBound(0, 'a)` --> $DIR/projection-one-region-trait-bound-closure.rs:80:20 | -80 | with_signature(cell, t, |cell, t| require(cell, t)); +LL | with_signature(cell, t, |cell, t| require(cell, t)); | ^^^^ note: No external requirements --> $DIR/projection-one-region-trait-bound-closure.rs:65:1 | -65 | / fn projection_outlives<'a, 'b, T>(cell: Cell<&'a ()>, t: T) -66 | | where -67 | | T: Anything<'b>, -68 | | T::AssocType: 'a, +LL | / fn projection_outlives<'a, 'b, T>(cell: Cell<&'a ()>, t: T) +LL | | where +LL | | T: Anything<'b>, +LL | | T::AssocType: 'a, ... | -82 | | //~| ERROR does not outlive free region -83 | | } +LL | | //~| ERROR does not outlive free region +LL | | } | |_^ | = note: defining type: DefId(0/0:10 ~ projection_one_region_trait_bound_closure[317d]::projection_outlives[0]) with substs [ @@ -137,7 +137,7 @@ note: No external requirements note: External requirements --> $DIR/projection-one-region-trait-bound-closure.rs:91:29 | -91 | with_signature(cell, t, |cell, t| require(cell, t)); +LL | with_signature(cell, t, |cell, t| require(cell, t)); | ^^^^^^^^^^^^^^^^^^^^^^^^^^ | = note: defining type: DefId(0/1:31 ~ projection_one_region_trait_bound_closure[317d]::elements_outlive[0]::{{closure}}[0]) with closure substs [ @@ -153,13 +153,13 @@ note: External requirements note: No external requirements --> $DIR/projection-one-region-trait-bound-closure.rs:86:1 | -86 | / fn elements_outlive<'a, 'b, T>(cell: Cell<&'a ()>, t: T) -87 | | where -88 | | T: Anything<'b>, -89 | | 'b: 'a, -90 | | { -91 | | with_signature(cell, t, |cell, t| require(cell, t)); -92 | | } +LL | / fn elements_outlive<'a, 'b, T>(cell: Cell<&'a ()>, t: T) +LL | | where +LL | | T: Anything<'b>, +LL | | 'b: 'a, +LL | | { +LL | | with_signature(cell, t, |cell, t| require(cell, t)); +LL | | } | |_^ | = note: defining type: DefId(0/0:11 ~ projection_one_region_trait_bound_closure[317d]::elements_outlive[0]) with substs [ @@ -169,36 +169,36 @@ note: No external requirements ] note: External requirements - --> $DIR/projection-one-region-trait-bound-closure.rs:103:29 - | -103 | with_signature(cell, t, |cell, t| require(cell, t)); - | ^^^^^^^^^^^^^^^^^^^^^^^^^^ - | - = note: defining type: DefId(0/1:34 ~ projection_one_region_trait_bound_closure[317d]::one_region[0]::{{closure}}[0]) with closure substs [ - '_#1r, - T, - i32, - extern "rust-call" fn((std::cell::Cell<&'_#2r ()>, T)) - ] - = note: number of external vids: 3 - = note: where '_#1r: '_#2r + --> $DIR/projection-one-region-trait-bound-closure.rs:103:29 + | +LL | with_signature(cell, t, |cell, t| require(cell, t)); + | ^^^^^^^^^^^^^^^^^^^^^^^^^^ + | + = note: defining type: DefId(0/1:34 ~ projection_one_region_trait_bound_closure[317d]::one_region[0]::{{closure}}[0]) with closure substs [ + '_#1r, + T, + i32, + extern "rust-call" fn((std::cell::Cell<&'_#2r ()>, T)) + ] + = note: number of external vids: 3 + = note: where '_#1r: '_#2r note: No external requirements - --> $DIR/projection-one-region-trait-bound-closure.rs:95:1 - | -95 | / fn one_region<'a, T>(cell: Cell<&'a ()>, t: T) -96 | | where -97 | | T: Anything<'a>, -98 | | { -... | -103 | | with_signature(cell, t, |cell, t| require(cell, t)); -104 | | } - | |_^ - | - = note: defining type: DefId(0/0:12 ~ projection_one_region_trait_bound_closure[317d]::one_region[0]) with substs [ - '_#1r, - T - ] + --> $DIR/projection-one-region-trait-bound-closure.rs:95:1 + | +LL | / fn one_region<'a, T>(cell: Cell<&'a ()>, t: T) +LL | | where +LL | | T: Anything<'a>, +LL | | { +... | +LL | | with_signature(cell, t, |cell, t| require(cell, t)); +LL | | } + | |_^ + | + = note: defining type: DefId(0/0:12 ~ projection_one_region_trait_bound_closure[317d]::one_region[0]) with substs [ + '_#1r, + T + ] error: aborting due to 3 previous errors diff --git a/src/test/ui/nll/ty-outlives/projection-one-region-trait-bound-static-closure.stderr b/src/test/ui/nll/ty-outlives/projection-one-region-trait-bound-static-closure.stderr index 98b033b6a0672..875907e6b39d5 100644 --- a/src/test/ui/nll/ty-outlives/projection-one-region-trait-bound-static-closure.stderr +++ b/src/test/ui/nll/ty-outlives/projection-one-region-trait-bound-static-closure.stderr @@ -1,7 +1,7 @@ note: No external requirements --> $DIR/projection-one-region-trait-bound-static-closure.rs:47:29 | -47 | with_signature(cell, t, |cell, t| require(cell, t)); +LL | with_signature(cell, t, |cell, t| require(cell, t)); | ^^^^^^^^^^^^^^^^^^^^^^^^^^ | = note: defining type: DefId(0/1:19 ~ projection_one_region_trait_bound_static_closure[317d]::no_relationships_late[0]::{{closure}}[0]) with closure substs [ @@ -14,12 +14,12 @@ note: No external requirements note: No external requirements --> $DIR/projection-one-region-trait-bound-static-closure.rs:43:1 | -43 | / fn no_relationships_late<'a, 'b, T>(cell: Cell<&'a ()>, t: T) -44 | | where -45 | | T: Anything<'b>, -46 | | { -47 | | with_signature(cell, t, |cell, t| require(cell, t)); -48 | | } +LL | / fn no_relationships_late<'a, 'b, T>(cell: Cell<&'a ()>, t: T) +LL | | where +LL | | T: Anything<'b>, +LL | | { +LL | | with_signature(cell, t, |cell, t| require(cell, t)); +LL | | } | |_^ | = note: defining type: DefId(0/0:8 ~ projection_one_region_trait_bound_static_closure[317d]::no_relationships_late[0]) with substs [ @@ -30,7 +30,7 @@ note: No external requirements note: No external requirements --> $DIR/projection-one-region-trait-bound-static-closure.rs:56:29 | -56 | with_signature(cell, t, |cell, t| require(cell, t)); +LL | with_signature(cell, t, |cell, t| require(cell, t)); | ^^^^^^^^^^^^^^^^^^^^^^^^^^ | = note: defining type: DefId(0/1:23 ~ projection_one_region_trait_bound_static_closure[317d]::no_relationships_early[0]::{{closure}}[0]) with closure substs [ @@ -44,13 +44,13 @@ note: No external requirements note: No external requirements --> $DIR/projection-one-region-trait-bound-static-closure.rs:51:1 | -51 | / fn no_relationships_early<'a, 'b, T>(cell: Cell<&'a ()>, t: T) -52 | | where -53 | | T: Anything<'b>, -54 | | 'a: 'a, -55 | | { -56 | | with_signature(cell, t, |cell, t| require(cell, t)); -57 | | } +LL | / fn no_relationships_early<'a, 'b, T>(cell: Cell<&'a ()>, t: T) +LL | | where +LL | | T: Anything<'b>, +LL | | 'a: 'a, +LL | | { +LL | | with_signature(cell, t, |cell, t| require(cell, t)); +LL | | } | |_^ | = note: defining type: DefId(0/0:9 ~ projection_one_region_trait_bound_static_closure[317d]::no_relationships_early[0]) with substs [ @@ -62,7 +62,7 @@ note: No external requirements note: No external requirements --> $DIR/projection-one-region-trait-bound-static-closure.rs:75:29 | -75 | with_signature(cell, t, |cell, t| require(cell, t)); +LL | with_signature(cell, t, |cell, t| require(cell, t)); | ^^^^^^^^^^^^^^^^^^^^^^^^^^ | = note: defining type: DefId(0/1:27 ~ projection_one_region_trait_bound_static_closure[317d]::projection_outlives[0]::{{closure}}[0]) with closure substs [ @@ -76,13 +76,13 @@ note: No external requirements note: No external requirements --> $DIR/projection-one-region-trait-bound-static-closure.rs:60:1 | -60 | / fn projection_outlives<'a, 'b, T>(cell: Cell<&'a ()>, t: T) -61 | | where -62 | | T: Anything<'b>, -63 | | T::AssocType: 'a, +LL | / fn projection_outlives<'a, 'b, T>(cell: Cell<&'a ()>, t: T) +LL | | where +LL | | T: Anything<'b>, +LL | | T::AssocType: 'a, ... | -75 | | with_signature(cell, t, |cell, t| require(cell, t)); -76 | | } +LL | | with_signature(cell, t, |cell, t| require(cell, t)); +LL | | } | |_^ | = note: defining type: DefId(0/0:10 ~ projection_one_region_trait_bound_static_closure[317d]::projection_outlives[0]) with substs [ @@ -94,7 +94,7 @@ note: No external requirements note: No external requirements --> $DIR/projection-one-region-trait-bound-static-closure.rs:84:29 | -84 | with_signature(cell, t, |cell, t| require(cell, t)); +LL | with_signature(cell, t, |cell, t| require(cell, t)); | ^^^^^^^^^^^^^^^^^^^^^^^^^^ | = note: defining type: DefId(0/1:31 ~ projection_one_region_trait_bound_static_closure[317d]::elements_outlive[0]::{{closure}}[0]) with closure substs [ @@ -108,13 +108,13 @@ note: No external requirements note: No external requirements --> $DIR/projection-one-region-trait-bound-static-closure.rs:79:1 | -79 | / fn elements_outlive<'a, 'b, T>(cell: Cell<&'a ()>, t: T) -80 | | where -81 | | T: Anything<'b>, -82 | | 'b: 'a, -83 | | { -84 | | with_signature(cell, t, |cell, t| require(cell, t)); -85 | | } +LL | / fn elements_outlive<'a, 'b, T>(cell: Cell<&'a ()>, t: T) +LL | | where +LL | | T: Anything<'b>, +LL | | 'b: 'a, +LL | | { +LL | | with_signature(cell, t, |cell, t| require(cell, t)); +LL | | } | |_^ | = note: defining type: DefId(0/0:11 ~ projection_one_region_trait_bound_static_closure[317d]::elements_outlive[0]) with substs [ @@ -126,7 +126,7 @@ note: No external requirements note: No external requirements --> $DIR/projection-one-region-trait-bound-static-closure.rs:96:29 | -96 | with_signature(cell, t, |cell, t| require(cell, t)); +LL | with_signature(cell, t, |cell, t| require(cell, t)); | ^^^^^^^^^^^^^^^^^^^^^^^^^^ | = note: defining type: DefId(0/1:34 ~ projection_one_region_trait_bound_static_closure[317d]::one_region[0]::{{closure}}[0]) with closure substs [ @@ -139,13 +139,13 @@ note: No external requirements note: No external requirements --> $DIR/projection-one-region-trait-bound-static-closure.rs:88:1 | -88 | / fn one_region<'a, T>(cell: Cell<&'a ()>, t: T) -89 | | where -90 | | T: Anything<'a>, -91 | | { +LL | / fn one_region<'a, T>(cell: Cell<&'a ()>, t: T) +LL | | where +LL | | T: Anything<'a>, +LL | | { ... | -96 | | with_signature(cell, t, |cell, t| require(cell, t)); -97 | | } +LL | | with_signature(cell, t, |cell, t| require(cell, t)); +LL | | } | |_^ | = note: defining type: DefId(0/0:12 ~ projection_one_region_trait_bound_static_closure[317d]::one_region[0]) with substs [ diff --git a/src/test/ui/nll/ty-outlives/projection-two-region-trait-bound-closure.stderr b/src/test/ui/nll/ty-outlives/projection-two-region-trait-bound-closure.stderr index 78775ce94addd..5a698ff7a4f81 100644 --- a/src/test/ui/nll/ty-outlives/projection-two-region-trait-bound-closure.stderr +++ b/src/test/ui/nll/ty-outlives/projection-two-region-trait-bound-closure.stderr @@ -1,31 +1,31 @@ warning: not reporting region error due to -Znll --> $DIR/projection-two-region-trait-bound-closure.rs:49:39 | -49 | with_signature(cell, t, |cell, t| require(cell, t)); +LL | with_signature(cell, t, |cell, t| require(cell, t)); | ^^^^^^^ warning: not reporting region error due to -Znll --> $DIR/projection-two-region-trait-bound-closure.rs:60:39 | -60 | with_signature(cell, t, |cell, t| require(cell, t)); +LL | with_signature(cell, t, |cell, t| require(cell, t)); | ^^^^^^^ warning: not reporting region error due to -Znll --> $DIR/projection-two-region-trait-bound-closure.rs:81:39 | -81 | with_signature(cell, t, |cell, t| require(cell, t)); +LL | with_signature(cell, t, |cell, t| require(cell, t)); | ^^^^^^^ warning: not reporting region error due to -Znll - --> $DIR/projection-two-region-trait-bound-closure.rs:109:39 - | -109 | with_signature(cell, t, |cell, t| require(cell, t)); - | ^^^^^^^ + --> $DIR/projection-two-region-trait-bound-closure.rs:109:39 + | +LL | with_signature(cell, t, |cell, t| require(cell, t)); + | ^^^^^^^ note: External requirements --> $DIR/projection-two-region-trait-bound-closure.rs:49:29 | -49 | with_signature(cell, t, |cell, t| require(cell, t)); +LL | with_signature(cell, t, |cell, t| require(cell, t)); | ^^^^^^^^^^^^^^^^^^^^^^^^^^ | = note: defining type: DefId(0/1:22 ~ projection_two_region_trait_bound_closure[317d]::no_relationships_late[0]::{{closure}}[0]) with closure substs [ @@ -41,7 +41,7 @@ note: External requirements error[E0309]: the associated type `>::AssocType` may not live long enough --> $DIR/projection-two-region-trait-bound-closure.rs:49:29 | -49 | with_signature(cell, t, |cell, t| require(cell, t)); +LL | with_signature(cell, t, |cell, t| require(cell, t)); | ^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: consider adding an explicit lifetime bound `>::AssocType: ReFree(DefId(0/0:8 ~ projection_two_region_trait_bound_closure[317d]::no_relationships_late[0]), BrNamed(crate0:DefIndex(1:18), 'a))`... @@ -49,13 +49,13 @@ error[E0309]: the associated type `>::AssocType` may note: No external requirements --> $DIR/projection-two-region-trait-bound-closure.rs:45:1 | -45 | / fn no_relationships_late<'a, 'b, 'c, T>(cell: Cell<&'a ()>, t: T) -46 | | where -47 | | T: Anything<'b, 'c>, -48 | | { +LL | / fn no_relationships_late<'a, 'b, 'c, T>(cell: Cell<&'a ()>, t: T) +LL | | where +LL | | T: Anything<'b, 'c>, +LL | | { ... | -51 | | //~| ERROR associated type `>::AssocType` may not live long enough -52 | | } +LL | | //~| ERROR associated type `>::AssocType` may not live long enough +LL | | } | |_^ | = note: defining type: DefId(0/0:8 ~ projection_two_region_trait_bound_closure[317d]::no_relationships_late[0]) with substs [ @@ -67,7 +67,7 @@ note: No external requirements note: External requirements --> $DIR/projection-two-region-trait-bound-closure.rs:60:29 | -60 | with_signature(cell, t, |cell, t| require(cell, t)); +LL | with_signature(cell, t, |cell, t| require(cell, t)); | ^^^^^^^^^^^^^^^^^^^^^^^^^^ | = note: defining type: DefId(0/1:27 ~ projection_two_region_trait_bound_closure[317d]::no_relationships_early[0]::{{closure}}[0]) with closure substs [ @@ -84,7 +84,7 @@ note: External requirements error[E0309]: the associated type `>::AssocType` may not live long enough --> $DIR/projection-two-region-trait-bound-closure.rs:60:29 | -60 | with_signature(cell, t, |cell, t| require(cell, t)); +LL | with_signature(cell, t, |cell, t| require(cell, t)); | ^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: consider adding an explicit lifetime bound `>::AssocType: ReEarlyBound(0, 'a)`... @@ -92,13 +92,13 @@ error[E0309]: the associated type `>::AssocType` may note: No external requirements --> $DIR/projection-two-region-trait-bound-closure.rs:55:1 | -55 | / fn no_relationships_early<'a, 'b, 'c, T>(cell: Cell<&'a ()>, t: T) -56 | | where -57 | | T: Anything<'b, 'c>, -58 | | 'a: 'a, +LL | / fn no_relationships_early<'a, 'b, 'c, T>(cell: Cell<&'a ()>, t: T) +LL | | where +LL | | T: Anything<'b, 'c>, +LL | | 'a: 'a, ... | -62 | | //~| ERROR associated type `>::AssocType` may not live long enough -63 | | } +LL | | //~| ERROR associated type `>::AssocType` may not live long enough +LL | | } | |_^ | = note: defining type: DefId(0/0:9 ~ projection_two_region_trait_bound_closure[317d]::no_relationships_early[0]) with substs [ @@ -111,7 +111,7 @@ note: No external requirements note: External requirements --> $DIR/projection-two-region-trait-bound-closure.rs:81:29 | -81 | with_signature(cell, t, |cell, t| require(cell, t)); +LL | with_signature(cell, t, |cell, t| require(cell, t)); | ^^^^^^^^^^^^^^^^^^^^^^^^^^ | = note: defining type: DefId(0/1:32 ~ projection_two_region_trait_bound_closure[317d]::projection_outlives[0]::{{closure}}[0]) with closure substs [ @@ -128,7 +128,7 @@ note: External requirements error[E0309]: the associated type `>::AssocType` may not live long enough --> $DIR/projection-two-region-trait-bound-closure.rs:81:29 | -81 | with_signature(cell, t, |cell, t| require(cell, t)); +LL | with_signature(cell, t, |cell, t| require(cell, t)); | ^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: consider adding an explicit lifetime bound `>::AssocType: ReEarlyBound(0, 'a)`... @@ -136,13 +136,13 @@ error[E0309]: the associated type `>::AssocType` may note: No external requirements --> $DIR/projection-two-region-trait-bound-closure.rs:66:1 | -66 | / fn projection_outlives<'a, 'b, 'c, T>(cell: Cell<&'a ()>, t: T) -67 | | where -68 | | T: Anything<'b, 'c>, -69 | | T::AssocType: 'a, +LL | / fn projection_outlives<'a, 'b, 'c, T>(cell: Cell<&'a ()>, t: T) +LL | | where +LL | | T: Anything<'b, 'c>, +LL | | T::AssocType: 'a, ... | -83 | | //~| ERROR associated type `>::AssocType` may not live long enough -84 | | } +LL | | //~| ERROR associated type `>::AssocType` may not live long enough +LL | | } | |_^ | = note: defining type: DefId(0/0:10 ~ projection_two_region_trait_bound_closure[317d]::projection_outlives[0]) with substs [ @@ -155,7 +155,7 @@ note: No external requirements note: External requirements --> $DIR/projection-two-region-trait-bound-closure.rs:92:29 | -92 | with_signature(cell, t, |cell, t| require(cell, t)); +LL | with_signature(cell, t, |cell, t| require(cell, t)); | ^^^^^^^^^^^^^^^^^^^^^^^^^^ | = note: defining type: DefId(0/1:37 ~ projection_two_region_trait_bound_closure[317d]::elements_outlive1[0]::{{closure}}[0]) with closure substs [ @@ -172,13 +172,13 @@ note: External requirements note: No external requirements --> $DIR/projection-two-region-trait-bound-closure.rs:87:1 | -87 | / fn elements_outlive1<'a, 'b, 'c, T>(cell: Cell<&'a ()>, t: T) -88 | | where -89 | | T: Anything<'b, 'c>, -90 | | 'b: 'a, -91 | | { -92 | | with_signature(cell, t, |cell, t| require(cell, t)); -93 | | } +LL | / fn elements_outlive1<'a, 'b, 'c, T>(cell: Cell<&'a ()>, t: T) +LL | | where +LL | | T: Anything<'b, 'c>, +LL | | 'b: 'a, +LL | | { +LL | | with_signature(cell, t, |cell, t| require(cell, t)); +LL | | } | |_^ | = note: defining type: DefId(0/0:11 ~ projection_two_region_trait_bound_closure[317d]::elements_outlive1[0]) with substs [ @@ -189,144 +189,144 @@ note: No external requirements ] note: External requirements - --> $DIR/projection-two-region-trait-bound-closure.rs:101:29 - | -101 | with_signature(cell, t, |cell, t| require(cell, t)); - | ^^^^^^^^^^^^^^^^^^^^^^^^^^ - | - = note: defining type: DefId(0/1:42 ~ projection_two_region_trait_bound_closure[317d]::elements_outlive2[0]::{{closure}}[0]) with closure substs [ - '_#1r, - '_#2r, - '_#3r, - T, - i32, - extern "rust-call" fn((std::cell::Cell<&'_#4r ()>, T)) - ] - = note: number of external vids: 5 - = note: where >::AssocType: '_#4r + --> $DIR/projection-two-region-trait-bound-closure.rs:101:29 + | +LL | with_signature(cell, t, |cell, t| require(cell, t)); + | ^^^^^^^^^^^^^^^^^^^^^^^^^^ + | + = note: defining type: DefId(0/1:42 ~ projection_two_region_trait_bound_closure[317d]::elements_outlive2[0]::{{closure}}[0]) with closure substs [ + '_#1r, + '_#2r, + '_#3r, + T, + i32, + extern "rust-call" fn((std::cell::Cell<&'_#4r ()>, T)) + ] + = note: number of external vids: 5 + = note: where >::AssocType: '_#4r note: No external requirements - --> $DIR/projection-two-region-trait-bound-closure.rs:96:1 - | -96 | / fn elements_outlive2<'a, 'b, 'c, T>(cell: Cell<&'a ()>, t: T) -97 | | where -98 | | T: Anything<'b, 'c>, -99 | | 'c: 'a, -100 | | { -101 | | with_signature(cell, t, |cell, t| require(cell, t)); -102 | | } - | |_^ - | - = note: defining type: DefId(0/0:12 ~ projection_two_region_trait_bound_closure[317d]::elements_outlive2[0]) with substs [ - '_#1r, - '_#2r, - '_#3r, - T - ] + --> $DIR/projection-two-region-trait-bound-closure.rs:96:1 + | +LL | / fn elements_outlive2<'a, 'b, 'c, T>(cell: Cell<&'a ()>, t: T) +LL | | where +LL | | T: Anything<'b, 'c>, +LL | | 'c: 'a, +LL | | { +LL | | with_signature(cell, t, |cell, t| require(cell, t)); +LL | | } + | |_^ + | + = note: defining type: DefId(0/0:12 ~ projection_two_region_trait_bound_closure[317d]::elements_outlive2[0]) with substs [ + '_#1r, + '_#2r, + '_#3r, + T + ] note: External requirements - --> $DIR/projection-two-region-trait-bound-closure.rs:109:29 - | -109 | with_signature(cell, t, |cell, t| require(cell, t)); - | ^^^^^^^^^^^^^^^^^^^^^^^^^^ - | - = note: defining type: DefId(0/1:46 ~ projection_two_region_trait_bound_closure[317d]::two_regions[0]::{{closure}}[0]) with closure substs [ - '_#1r, - T, - i32, - extern "rust-call" fn((std::cell::Cell<&'_#2r ()>, T)) - ] - = note: number of external vids: 3 - = note: where >::AssocType: '_#2r + --> $DIR/projection-two-region-trait-bound-closure.rs:109:29 + | +LL | with_signature(cell, t, |cell, t| require(cell, t)); + | ^^^^^^^^^^^^^^^^^^^^^^^^^^ + | + = note: defining type: DefId(0/1:46 ~ projection_two_region_trait_bound_closure[317d]::two_regions[0]::{{closure}}[0]) with closure substs [ + '_#1r, + T, + i32, + extern "rust-call" fn((std::cell::Cell<&'_#2r ()>, T)) + ] + = note: number of external vids: 3 + = note: where >::AssocType: '_#2r error: free region `ReEarlyBound(0, 'b)` does not outlive free region `ReFree(DefId(0/0:13 ~ projection_two_region_trait_bound_closure[317d]::two_regions[0]), BrNamed(crate0:DefIndex(1:43), 'a))` - --> $DIR/projection-two-region-trait-bound-closure.rs:109:20 - | -109 | with_signature(cell, t, |cell, t| require(cell, t)); - | ^^^^ + --> $DIR/projection-two-region-trait-bound-closure.rs:109:20 + | +LL | with_signature(cell, t, |cell, t| require(cell, t)); + | ^^^^ note: No external requirements - --> $DIR/projection-two-region-trait-bound-closure.rs:105:1 - | -105 | / fn two_regions<'a, 'b, T>(cell: Cell<&'a ()>, t: T) -106 | | where -107 | | T: Anything<'b, 'b>, -108 | | { -... | -111 | | //~| ERROR does not outlive free region -112 | | } - | |_^ - | - = note: defining type: DefId(0/0:13 ~ projection_two_region_trait_bound_closure[317d]::two_regions[0]) with substs [ - '_#1r, - T - ] + --> $DIR/projection-two-region-trait-bound-closure.rs:105:1 + | +LL | / fn two_regions<'a, 'b, T>(cell: Cell<&'a ()>, t: T) +LL | | where +LL | | T: Anything<'b, 'b>, +LL | | { +... | +LL | | //~| ERROR does not outlive free region +LL | | } + | |_^ + | + = note: defining type: DefId(0/0:13 ~ projection_two_region_trait_bound_closure[317d]::two_regions[0]) with substs [ + '_#1r, + T + ] note: External requirements - --> $DIR/projection-two-region-trait-bound-closure.rs:120:29 - | -120 | with_signature(cell, t, |cell, t| require(cell, t)); - | ^^^^^^^^^^^^^^^^^^^^^^^^^^ - | - = note: defining type: DefId(0/1:50 ~ projection_two_region_trait_bound_closure[317d]::two_regions_outlive[0]::{{closure}}[0]) with closure substs [ - '_#1r, - '_#2r, - T, - i32, - extern "rust-call" fn((std::cell::Cell<&'_#3r ()>, T)) - ] - = note: number of external vids: 4 - = note: where >::AssocType: '_#3r + --> $DIR/projection-two-region-trait-bound-closure.rs:120:29 + | +LL | with_signature(cell, t, |cell, t| require(cell, t)); + | ^^^^^^^^^^^^^^^^^^^^^^^^^^ + | + = note: defining type: DefId(0/1:50 ~ projection_two_region_trait_bound_closure[317d]::two_regions_outlive[0]::{{closure}}[0]) with closure substs [ + '_#1r, + '_#2r, + T, + i32, + extern "rust-call" fn((std::cell::Cell<&'_#3r ()>, T)) + ] + = note: number of external vids: 4 + = note: where >::AssocType: '_#3r note: No external requirements - --> $DIR/projection-two-region-trait-bound-closure.rs:115:1 - | -115 | / fn two_regions_outlive<'a, 'b, T>(cell: Cell<&'a ()>, t: T) -116 | | where -117 | | T: Anything<'b, 'b>, -118 | | 'b: 'a, -119 | | { -120 | | with_signature(cell, t, |cell, t| require(cell, t)); -121 | | } - | |_^ - | - = note: defining type: DefId(0/0:14 ~ projection_two_region_trait_bound_closure[317d]::two_regions_outlive[0]) with substs [ - '_#1r, - '_#2r, - T - ] + --> $DIR/projection-two-region-trait-bound-closure.rs:115:1 + | +LL | / fn two_regions_outlive<'a, 'b, T>(cell: Cell<&'a ()>, t: T) +LL | | where +LL | | T: Anything<'b, 'b>, +LL | | 'b: 'a, +LL | | { +LL | | with_signature(cell, t, |cell, t| require(cell, t)); +LL | | } + | |_^ + | + = note: defining type: DefId(0/0:14 ~ projection_two_region_trait_bound_closure[317d]::two_regions_outlive[0]) with substs [ + '_#1r, + '_#2r, + T + ] note: External requirements - --> $DIR/projection-two-region-trait-bound-closure.rs:132:29 - | -132 | with_signature(cell, t, |cell, t| require(cell, t)); - | ^^^^^^^^^^^^^^^^^^^^^^^^^^ - | - = note: defining type: DefId(0/1:53 ~ projection_two_region_trait_bound_closure[317d]::one_region[0]::{{closure}}[0]) with closure substs [ - '_#1r, - T, - i32, - extern "rust-call" fn((std::cell::Cell<&'_#2r ()>, T)) - ] - = note: number of external vids: 3 - = note: where >::AssocType: '_#2r + --> $DIR/projection-two-region-trait-bound-closure.rs:132:29 + | +LL | with_signature(cell, t, |cell, t| require(cell, t)); + | ^^^^^^^^^^^^^^^^^^^^^^^^^^ + | + = note: defining type: DefId(0/1:53 ~ projection_two_region_trait_bound_closure[317d]::one_region[0]::{{closure}}[0]) with closure substs [ + '_#1r, + T, + i32, + extern "rust-call" fn((std::cell::Cell<&'_#2r ()>, T)) + ] + = note: number of external vids: 3 + = note: where >::AssocType: '_#2r note: No external requirements - --> $DIR/projection-two-region-trait-bound-closure.rs:124:1 - | -124 | / fn one_region<'a, T>(cell: Cell<&'a ()>, t: T) -125 | | where -126 | | T: Anything<'a, 'a>, -127 | | { -... | -132 | | with_signature(cell, t, |cell, t| require(cell, t)); -133 | | } - | |_^ - | - = note: defining type: DefId(0/0:15 ~ projection_two_region_trait_bound_closure[317d]::one_region[0]) with substs [ - '_#1r, - T - ] + --> $DIR/projection-two-region-trait-bound-closure.rs:124:1 + | +LL | / fn one_region<'a, T>(cell: Cell<&'a ()>, t: T) +LL | | where +LL | | T: Anything<'a, 'a>, +LL | | { +... | +LL | | with_signature(cell, t, |cell, t| require(cell, t)); +LL | | } + | |_^ + | + = note: defining type: DefId(0/0:15 ~ projection_two_region_trait_bound_closure[317d]::one_region[0]) with substs [ + '_#1r, + T + ] error: aborting due to 4 previous errors diff --git a/src/test/ui/nll/ty-outlives/ty-param-closure-approximate-lower-bound.stderr b/src/test/ui/nll/ty-outlives/ty-param-closure-approximate-lower-bound.stderr index f68a76c3d0de5..43906ec659c04 100644 --- a/src/test/ui/nll/ty-outlives/ty-param-closure-approximate-lower-bound.stderr +++ b/src/test/ui/nll/ty-outlives/ty-param-closure-approximate-lower-bound.stderr @@ -1,25 +1,25 @@ warning: not reporting region error due to -Znll --> $DIR/ty-param-closure-approximate-lower-bound.rs:35:31 | -35 | twice(cell, value, |a, b| invoke(a, b)); +LL | twice(cell, value, |a, b| invoke(a, b)); | ^^^^^^^^^^^^ warning: not reporting region error due to -Znll --> $DIR/ty-param-closure-approximate-lower-bound.rs:43:31 | -43 | twice(cell, value, |a, b| invoke(a, b)); +LL | twice(cell, value, |a, b| invoke(a, b)); | ^^^^^^ warning: not reporting region error due to -Znll --> $DIR/ty-param-closure-approximate-lower-bound.rs:43:31 | -43 | twice(cell, value, |a, b| invoke(a, b)); +LL | twice(cell, value, |a, b| invoke(a, b)); | ^^^^^^^^^^^^ note: External requirements --> $DIR/ty-param-closure-approximate-lower-bound.rs:35:24 | -35 | twice(cell, value, |a, b| invoke(a, b)); +LL | twice(cell, value, |a, b| invoke(a, b)); | ^^^^^^^^^^^^^^^^^^^ | = note: defining type: DefId(0/1:14 ~ ty_param_closure_approximate_lower_bound[317d]::generic[0]::{{closure}}[0]) with closure substs [ @@ -33,13 +33,13 @@ note: External requirements note: No external requirements --> $DIR/ty-param-closure-approximate-lower-bound.rs:33:1 | -33 | / fn generic(value: T) { -34 | | let cell = Cell::new(&()); -35 | | twice(cell, value, |a, b| invoke(a, b)); -36 | | //~^ WARNING not reporting region error -37 | | // -38 | | // This error from the old region solver looks bogus. -39 | | } +LL | / fn generic(value: T) { +LL | | let cell = Cell::new(&()); +LL | | twice(cell, value, |a, b| invoke(a, b)); +LL | | //~^ WARNING not reporting region error +LL | | // +LL | | // This error from the old region solver looks bogus. +LL | | } | |_^ | = note: defining type: DefId(0/0:5 ~ ty_param_closure_approximate_lower_bound[317d]::generic[0]) with substs [ @@ -49,7 +49,7 @@ note: No external requirements note: External requirements --> $DIR/ty-param-closure-approximate-lower-bound.rs:43:24 | -43 | twice(cell, value, |a, b| invoke(a, b)); +LL | twice(cell, value, |a, b| invoke(a, b)); | ^^^^^^^^^^^^^^^^^^^ | = note: defining type: DefId(0/1:17 ~ ty_param_closure_approximate_lower_bound[317d]::generic_fail[0]::{{closure}}[0]) with closure substs [ @@ -63,7 +63,7 @@ note: External requirements error[E0309]: the parameter type `T` may not live long enough --> $DIR/ty-param-closure-approximate-lower-bound.rs:43:24 | -43 | twice(cell, value, |a, b| invoke(a, b)); +LL | twice(cell, value, |a, b| invoke(a, b)); | ^^^^^^^^^^^^^^^^^^^ | = help: consider adding an explicit lifetime bound `T: ReFree(DefId(0/0:6 ~ ty_param_closure_approximate_lower_bound[317d]::generic_fail[0]), BrNamed(crate0:DefIndex(1:15), 'a))`... @@ -71,12 +71,12 @@ error[E0309]: the parameter type `T` may not live long enough note: No external requirements --> $DIR/ty-param-closure-approximate-lower-bound.rs:42:1 | -42 | / fn generic_fail<'a, T>(cell: Cell<&'a ()>, value: T) { -43 | | twice(cell, value, |a, b| invoke(a, b)); -44 | | //~^ WARNING not reporting region error -45 | | //~| WARNING not reporting region error -46 | | //~| ERROR the parameter type `T` may not live long enough -47 | | } +LL | / fn generic_fail<'a, T>(cell: Cell<&'a ()>, value: T) { +LL | | twice(cell, value, |a, b| invoke(a, b)); +LL | | //~^ WARNING not reporting region error +LL | | //~| WARNING not reporting region error +LL | | //~| ERROR the parameter type `T` may not live long enough +LL | | } | |_^ | = note: defining type: DefId(0/0:6 ~ ty_param_closure_approximate_lower_bound[317d]::generic_fail[0]) with substs [ diff --git a/src/test/ui/nll/ty-outlives/ty-param-closure-outlives-from-return-type.stderr b/src/test/ui/nll/ty-outlives/ty-param-closure-outlives-from-return-type.stderr index b7120017a2c0e..5650875ce0f05 100644 --- a/src/test/ui/nll/ty-outlives/ty-param-closure-outlives-from-return-type.stderr +++ b/src/test/ui/nll/ty-outlives/ty-param-closure-outlives-from-return-type.stderr @@ -1,19 +1,19 @@ warning: not reporting region error due to -Znll --> $DIR/ty-param-closure-outlives-from-return-type.rs:37:27 | -37 | with_signature(x, |y| y) +LL | with_signature(x, |y| y) | ^ warning: not reporting region error due to -Znll --> $DIR/ty-param-closure-outlives-from-return-type.rs:53:5 | -53 | x +LL | x | ^ note: External requirements --> $DIR/ty-param-closure-outlives-from-return-type.rs:37:23 | -37 | with_signature(x, |y| y) +LL | with_signature(x, |y| y) | ^^^^^ | = note: defining type: DefId(0/1:14 ~ ty_param_closure_outlives_from_return_type[317d]::no_region[0]::{{closure}}[0]) with closure substs [ @@ -28,7 +28,7 @@ note: External requirements error[E0309]: the parameter type `T` may not live long enough --> $DIR/ty-param-closure-outlives-from-return-type.rs:37:23 | -37 | with_signature(x, |y| y) +LL | with_signature(x, |y| y) | ^^^^^ | = help: consider adding an explicit lifetime bound `T: ReEarlyBound(0, 'a)`... @@ -36,13 +36,13 @@ error[E0309]: the parameter type `T` may not live long enough note: No external requirements --> $DIR/ty-param-closure-outlives-from-return-type.rs:26:1 | -26 | / fn no_region<'a, T>(x: Box) -> Box -27 | | where -28 | | T: Debug, -29 | | { +LL | / fn no_region<'a, T>(x: Box) -> Box +LL | | where +LL | | T: Debug, +LL | | { ... | -39 | | //~| ERROR the parameter type `T` may not live long enough -40 | | } +LL | | //~| ERROR the parameter type `T` may not live long enough +LL | | } | |_^ | = note: defining type: DefId(0/0:5 ~ ty_param_closure_outlives_from_return_type[317d]::no_region[0]) with substs [ @@ -53,7 +53,7 @@ note: No external requirements error[E0309]: the parameter type `T` may not live long enough --> $DIR/ty-param-closure-outlives-from-return-type.rs:53:5 | -53 | x +LL | x | ^ | = help: consider adding an explicit lifetime bound `T: ReEarlyBound(0, 'a)`... diff --git a/src/test/ui/nll/ty-outlives/ty-param-closure-outlives-from-where-clause.stderr b/src/test/ui/nll/ty-outlives/ty-param-closure-outlives-from-where-clause.stderr index ed4d4b1e68f7f..031b1fc5e53cf 100644 --- a/src/test/ui/nll/ty-outlives/ty-param-closure-outlives-from-where-clause.stderr +++ b/src/test/ui/nll/ty-outlives/ty-param-closure-outlives-from-where-clause.stderr @@ -1,26 +1,26 @@ warning: not reporting region error due to -Znll --> $DIR/ty-param-closure-outlives-from-where-clause.rs:45:9 | -45 | require(&x, &y) +LL | require(&x, &y) | ^^^^^^^ warning: not reporting region error due to -Znll --> $DIR/ty-param-closure-outlives-from-where-clause.rs:79:9 | -79 | require(&x, &y) +LL | require(&x, &y) | ^^^^^^^ note: External requirements --> $DIR/ty-param-closure-outlives-from-where-clause.rs:38:26 | -38 | with_signature(a, b, |x, y| { +LL | with_signature(a, b, |x, y| { | __________________________^ -39 | | //~^ ERROR the parameter type `T` may not live long enough -40 | | // -41 | | // See `correct_region`, which explains the point of this +LL | | //~^ ERROR the parameter type `T` may not live long enough +LL | | // +LL | | // See `correct_region`, which explains the point of this ... | -46 | | //~^ WARNING not reporting region error due to -Znll -47 | | }) +LL | | //~^ WARNING not reporting region error due to -Znll +LL | | }) | |_____^ | = note: defining type: DefId(0/1:16 ~ ty_param_closure_outlives_from_where_clause[317d]::no_region[0]::{{closure}}[0]) with closure substs [ @@ -34,14 +34,14 @@ note: External requirements error[E0309]: the parameter type `T` may not live long enough --> $DIR/ty-param-closure-outlives-from-where-clause.rs:38:26 | -38 | with_signature(a, b, |x, y| { +LL | with_signature(a, b, |x, y| { | __________________________^ -39 | | //~^ ERROR the parameter type `T` may not live long enough -40 | | // -41 | | // See `correct_region`, which explains the point of this +LL | | //~^ ERROR the parameter type `T` may not live long enough +LL | | // +LL | | // See `correct_region`, which explains the point of this ... | -46 | | //~^ WARNING not reporting region error due to -Znll -47 | | }) +LL | | //~^ WARNING not reporting region error due to -Znll +LL | | }) | |_____^ | = help: consider adding an explicit lifetime bound `T: ReFree(DefId(0/0:6 ~ ty_param_closure_outlives_from_where_clause[317d]::no_region[0]), BrNamed(crate0:DefIndex(1:14), 'a))`... @@ -49,13 +49,13 @@ error[E0309]: the parameter type `T` may not live long enough note: No external requirements --> $DIR/ty-param-closure-outlives-from-where-clause.rs:37:1 | -37 | / fn no_region<'a, T>(a: Cell<&'a ()>, b: T) { -38 | | with_signature(a, b, |x, y| { -39 | | //~^ ERROR the parameter type `T` may not live long enough -40 | | // +LL | / fn no_region<'a, T>(a: Cell<&'a ()>, b: T) { +LL | | with_signature(a, b, |x, y| { +LL | | //~^ ERROR the parameter type `T` may not live long enough +LL | | // ... | -47 | | }) -48 | | } +LL | | }) +LL | | } | |_^ | = note: defining type: DefId(0/0:6 ~ ty_param_closure_outlives_from_where_clause[317d]::no_region[0]) with substs [ @@ -65,14 +65,14 @@ note: No external requirements note: External requirements --> $DIR/ty-param-closure-outlives-from-where-clause.rs:55:26 | -55 | with_signature(a, b, |x, y| { +LL | with_signature(a, b, |x, y| { | __________________________^ -56 | | // Key point of this test: -57 | | // -58 | | // The *closure* is being type-checked with all of its free +LL | | // Key point of this test: +LL | | // +LL | | // The *closure* is being type-checked with all of its free ... | -67 | | require(&x, &y) -68 | | }) +LL | | require(&x, &y) +LL | | }) | |_____^ | = note: defining type: DefId(0/1:19 ~ ty_param_closure_outlives_from_where_clause[317d]::correct_region[0]::{{closure}}[0]) with closure substs [ @@ -87,13 +87,13 @@ note: External requirements note: No external requirements --> $DIR/ty-param-closure-outlives-from-where-clause.rs:51:1 | -51 | / fn correct_region<'a, T>(a: Cell<&'a ()>, b: T) -52 | | where -53 | | T: 'a, -54 | | { +LL | / fn correct_region<'a, T>(a: Cell<&'a ()>, b: T) +LL | | where +LL | | T: 'a, +LL | | { ... | -68 | | }) -69 | | } +LL | | }) +LL | | } | |_^ | = note: defining type: DefId(0/0:7 ~ ty_param_closure_outlives_from_where_clause[317d]::correct_region[0]) with substs [ @@ -104,13 +104,13 @@ note: No external requirements note: External requirements --> $DIR/ty-param-closure-outlives-from-where-clause.rs:76:26 | -76 | with_signature(a, b, |x, y| { +LL | with_signature(a, b, |x, y| { | __________________________^ -77 | | //~^ ERROR the parameter type `T` may not live long enough -78 | | // See `correct_region` -79 | | require(&x, &y) -80 | | //~^ WARNING not reporting region error due to -Znll -81 | | }) +LL | | //~^ ERROR the parameter type `T` may not live long enough +LL | | // See `correct_region` +LL | | require(&x, &y) +LL | | //~^ WARNING not reporting region error due to -Znll +LL | | }) | |_____^ | = note: defining type: DefId(0/1:23 ~ ty_param_closure_outlives_from_where_clause[317d]::wrong_region[0]::{{closure}}[0]) with closure substs [ @@ -125,13 +125,13 @@ note: External requirements error[E0309]: the parameter type `T` may not live long enough --> $DIR/ty-param-closure-outlives-from-where-clause.rs:76:26 | -76 | with_signature(a, b, |x, y| { +LL | with_signature(a, b, |x, y| { | __________________________^ -77 | | //~^ ERROR the parameter type `T` may not live long enough -78 | | // See `correct_region` -79 | | require(&x, &y) -80 | | //~^ WARNING not reporting region error due to -Znll -81 | | }) +LL | | //~^ ERROR the parameter type `T` may not live long enough +LL | | // See `correct_region` +LL | | require(&x, &y) +LL | | //~^ WARNING not reporting region error due to -Znll +LL | | }) | |_____^ | = help: consider adding an explicit lifetime bound `T: ReFree(DefId(0/0:8 ~ ty_param_closure_outlives_from_where_clause[317d]::wrong_region[0]), BrNamed(crate0:DefIndex(1:20), 'a))`... @@ -139,13 +139,13 @@ error[E0309]: the parameter type `T` may not live long enough note: No external requirements --> $DIR/ty-param-closure-outlives-from-where-clause.rs:72:1 | -72 | / fn wrong_region<'a, 'b, T>(a: Cell<&'a ()>, b: T) -73 | | where -74 | | T: 'b, -75 | | { +LL | / fn wrong_region<'a, 'b, T>(a: Cell<&'a ()>, b: T) +LL | | where +LL | | T: 'b, +LL | | { ... | -81 | | }) -82 | | } +LL | | }) +LL | | } | |_^ | = note: defining type: DefId(0/0:8 ~ ty_param_closure_outlives_from_where_clause[317d]::wrong_region[0]) with substs [ @@ -156,11 +156,11 @@ note: No external requirements note: External requirements --> $DIR/ty-param-closure-outlives-from-where-clause.rs:90:26 | -90 | with_signature(a, b, |x, y| { +LL | with_signature(a, b, |x, y| { | __________________________^ -91 | | // See `correct_region` -92 | | require(&x, &y) -93 | | }) +LL | | // See `correct_region` +LL | | require(&x, &y) +LL | | }) | |_____^ | = note: defining type: DefId(0/1:27 ~ ty_param_closure_outlives_from_where_clause[317d]::outlives_region[0]::{{closure}}[0]) with closure substs [ @@ -176,13 +176,13 @@ note: External requirements note: No external requirements --> $DIR/ty-param-closure-outlives-from-where-clause.rs:85:1 | -85 | / fn outlives_region<'a, 'b, T>(a: Cell<&'a ()>, b: T) -86 | | where -87 | | T: 'b, -88 | | 'b: 'a, +LL | / fn outlives_region<'a, 'b, T>(a: Cell<&'a ()>, b: T) +LL | | where +LL | | T: 'b, +LL | | 'b: 'a, ... | -93 | | }) -94 | | } +LL | | }) +LL | | } | |_^ | = note: defining type: DefId(0/0:9 ~ ty_param_closure_outlives_from_where_clause[317d]::outlives_region[0]) with substs [ diff --git a/src/test/ui/nll/ty-outlives/ty-param-fn-body-nll-feature.stderr b/src/test/ui/nll/ty-outlives/ty-param-fn-body-nll-feature.stderr index fa9105df07027..5ddda27fd7fc4 100644 --- a/src/test/ui/nll/ty-outlives/ty-param-fn-body-nll-feature.stderr +++ b/src/test/ui/nll/ty-outlives/ty-param-fn-body-nll-feature.stderr @@ -1,7 +1,7 @@ error[E0309]: the parameter type `T` may not live long enough --> $DIR/ty-param-fn-body-nll-feature.rs:31:5 | -31 | outlives(cell, t) +LL | outlives(cell, t) | ^^^^^^^^^^^^^^^^^ | = help: consider adding an explicit lifetime bound `T: 'a`... diff --git a/src/test/ui/nll/ty-outlives/ty-param-fn-body.stderr b/src/test/ui/nll/ty-outlives/ty-param-fn-body.stderr index 3334f4ecc7c86..c300a905b8b7b 100644 --- a/src/test/ui/nll/ty-outlives/ty-param-fn-body.stderr +++ b/src/test/ui/nll/ty-outlives/ty-param-fn-body.stderr @@ -1,13 +1,13 @@ warning: not reporting region error due to -Znll --> $DIR/ty-param-fn-body.rs:30:5 | -30 | outlives(cell, t) +LL | outlives(cell, t) | ^^^^^^^^ error[E0309]: the parameter type `T` may not live long enough --> $DIR/ty-param-fn-body.rs:30:5 | -30 | outlives(cell, t) +LL | outlives(cell, t) | ^^^^^^^^^^^^^^^^^ | = help: consider adding an explicit lifetime bound `T: 'a`... diff --git a/src/test/ui/nll/ty-outlives/ty-param-fn.stderr b/src/test/ui/nll/ty-outlives/ty-param-fn.stderr index 1e659e2e9f073..66c54d780859e 100644 --- a/src/test/ui/nll/ty-outlives/ty-param-fn.stderr +++ b/src/test/ui/nll/ty-outlives/ty-param-fn.stderr @@ -1,19 +1,19 @@ warning: not reporting region error due to -Znll --> $DIR/ty-param-fn.rs:22:5 | -22 | x +LL | x | ^ warning: not reporting region error due to -Znll --> $DIR/ty-param-fn.rs:38:5 | -38 | x +LL | x | ^ error[E0309]: the parameter type `T` may not live long enough --> $DIR/ty-param-fn.rs:22:5 | -22 | x +LL | x | ^ | = help: consider adding an explicit lifetime bound `T: 'a`... @@ -21,7 +21,7 @@ error[E0309]: the parameter type `T` may not live long enough error[E0309]: the parameter type `T` may not live long enough --> $DIR/ty-param-fn.rs:38:5 | -38 | x +LL | x | ^ | = help: consider adding an explicit lifetime bound `T: 'a`... diff --git a/src/test/ui/no-patterns-in-args.stderr b/src/test/ui/no-patterns-in-args.stderr index 0db9eb9ded3b2..61e97028cd7ef 100644 --- a/src/test/ui/no-patterns-in-args.stderr +++ b/src/test/ui/no-patterns-in-args.stderr @@ -1,31 +1,31 @@ error[E0130]: patterns aren't allowed in foreign function declarations --> $DIR/no-patterns-in-args.rs:12:11 | -12 | fn f1(mut arg: u8); //~ ERROR patterns aren't allowed in foreign function declarations +LL | fn f1(mut arg: u8); //~ ERROR patterns aren't allowed in foreign function declarations | ^^^^^^^ pattern not allowed in foreign function error[E0130]: patterns aren't allowed in foreign function declarations --> $DIR/no-patterns-in-args.rs:13:11 | -13 | fn f2(&arg: u8); //~ ERROR patterns aren't allowed in foreign function declarations +LL | fn f2(&arg: u8); //~ ERROR patterns aren't allowed in foreign function declarations | ^^^^ pattern not allowed in foreign function error[E0130]: patterns aren't allowed in foreign function declarations --> $DIR/no-patterns-in-args.rs:14:11 | -14 | fn f3(arg @ _: u8); //~ ERROR patterns aren't allowed in foreign function declarations +LL | fn f3(arg @ _: u8); //~ ERROR patterns aren't allowed in foreign function declarations | ^^^^^^^ pattern not allowed in foreign function error[E0561]: patterns aren't allowed in function pointer types --> $DIR/no-patterns-in-args.rs:20:14 | -20 | type A1 = fn(mut arg: u8); //~ ERROR patterns aren't allowed in function pointer types +LL | type A1 = fn(mut arg: u8); //~ ERROR patterns aren't allowed in function pointer types | ^^^^^^^ error[E0561]: patterns aren't allowed in function pointer types --> $DIR/no-patterns-in-args.rs:21:14 | -21 | type A2 = fn(&arg: u8); //~ ERROR patterns aren't allowed in function pointer types +LL | type A2 = fn(&arg: u8); //~ ERROR patterns aren't allowed in function pointer types | ^^^^ error: aborting due to 5 previous errors diff --git a/src/test/ui/non-constant-expr-for-arr-len.stderr b/src/test/ui/non-constant-expr-for-arr-len.stderr index be7e8583824a5..2c52d3fc9b0b3 100644 --- a/src/test/ui/non-constant-expr-for-arr-len.stderr +++ b/src/test/ui/non-constant-expr-for-arr-len.stderr @@ -1,7 +1,7 @@ error[E0435]: attempt to use a non-constant value in a constant --> $DIR/non-constant-expr-for-arr-len.rs:15:22 | -15 | let _x = [0; n]; +LL | let _x = [0; n]; | ^ non-constant value error: aborting due to previous error diff --git a/src/test/ui/non-exhaustive-pattern-witness.stderr b/src/test/ui/non-exhaustive-pattern-witness.stderr index f012dfed0b852..04a5c081832a3 100644 --- a/src/test/ui/non-exhaustive-pattern-witness.stderr +++ b/src/test/ui/non-exhaustive-pattern-witness.stderr @@ -1,43 +1,43 @@ error[E0004]: non-exhaustive patterns: `Foo { first: false, second: Some([_, _, _, _]) }` not covered --> $DIR/non-exhaustive-pattern-witness.rs:20:11 | -20 | match (Foo { first: true, second: None }) { +LL | match (Foo { first: true, second: None }) { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ pattern `Foo { first: false, second: Some([_, _, _, _]) }` not covered error[E0004]: non-exhaustive patterns: `Red` not covered --> $DIR/non-exhaustive-pattern-witness.rs:36:11 | -36 | match Color::Red { +LL | match Color::Red { | ^^^^^^^^^^ pattern `Red` not covered error[E0004]: non-exhaustive patterns: `East`, `South` and `West` not covered --> $DIR/non-exhaustive-pattern-witness.rs:48:11 | -48 | match Direction::North { +LL | match Direction::North { | ^^^^^^^^^^^^^^^^ patterns `East`, `South` and `West` not covered error[E0004]: non-exhaustive patterns: `Second`, `Third`, `Fourth` and 8 more not covered --> $DIR/non-exhaustive-pattern-witness.rs:59:11 | -59 | match ExcessiveEnum::First { +LL | match ExcessiveEnum::First { | ^^^^^^^^^^^^^^^^^^^^ patterns `Second`, `Third`, `Fourth` and 8 more not covered error[E0004]: non-exhaustive patterns: `CustomRGBA { a: true, .. }` not covered --> $DIR/non-exhaustive-pattern-witness.rs:67:11 | -67 | match Color::Red { +LL | match Color::Red { | ^^^^^^^^^^ pattern `CustomRGBA { a: true, .. }` not covered error[E0004]: non-exhaustive patterns: `[Second(true), Second(false)]` not covered --> $DIR/non-exhaustive-pattern-witness.rs:83:11 | -83 | match *x { +LL | match *x { | ^^ pattern `[Second(true), Second(false)]` not covered error[E0004]: non-exhaustive patterns: `((), false)` not covered --> $DIR/non-exhaustive-pattern-witness.rs:96:11 | -96 | match ((), false) { +LL | match ((), false) { | ^^^^^^^^^^^ pattern `((), false)` not covered error: aborting due to 7 previous errors 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 f60d2e93e3692..4bd6f12b44a8b 100644 --- a/src/test/ui/non_modrs_mods/non_modrs_mods.stderr +++ b/src/test/ui/non_modrs_mods/non_modrs_mods.stderr @@ -1,7 +1,7 @@ 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; +LL | pub mod innest; | ^^^^^^ | = help: add #![feature(non_modrs_mods)] to the crate attributes to enable @@ -10,7 +10,7 @@ error[E0658]: 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; +LL | pub mod inner_modrs_mod; | ^^^^^^^^^^^^^^^ | = help: add #![feature(non_modrs_mods)] to the crate attributes to enable @@ -19,7 +19,7 @@ error[E0658]: 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; +LL | pub mod inner_foors_mod; | ^^^^^^^^^^^^^^^ | = help: add #![feature(non_modrs_mods)] to the crate attributes to enable @@ -28,7 +28,7 @@ error[E0658]: 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; +LL | pub mod innest; | ^^^^^^ | = help: add #![feature(non_modrs_mods)] to the crate attributes to enable diff --git a/src/test/ui/not-enough-arguments.stderr b/src/test/ui/not-enough-arguments.stderr index 291aa6ec4c114..fe4152db4e25d 100644 --- a/src/test/ui/not-enough-arguments.stderr +++ b/src/test/ui/not-enough-arguments.stderr @@ -1,10 +1,10 @@ error[E0061]: this function takes 4 parameters but 3 parameters were supplied --> $DIR/not-enough-arguments.rs:20:3 | -15 | fn foo(a: isize, b: isize, c: isize, d:isize) { +LL | fn foo(a: isize, b: isize, c: isize, d:isize) { | --------------------------------------------- defined here ... -20 | foo(1, 2, 3); +LL | foo(1, 2, 3); | ^^^^^^^^^^^^ expected 4 parameters error: aborting due to previous error diff --git a/src/test/ui/numeric-fields.stderr b/src/test/ui/numeric-fields.stderr index cdf85d4f9718e..c2942f29e4ef0 100644 --- a/src/test/ui/numeric-fields.stderr +++ b/src/test/ui/numeric-fields.stderr @@ -1,7 +1,7 @@ error[E0560]: struct `S` has no field named `0b1` --> $DIR/numeric-fields.rs:14:15 | -14 | let s = S{0b1: 10, 0: 11}; +LL | let s = S{0b1: 10, 0: 11}; | ^^^^ `S` does not have this field | = note: available fields are: `0`, `1` @@ -9,7 +9,7 @@ error[E0560]: struct `S` has no field named `0b1` error[E0026]: struct `S` does not have a field named `0x1` --> $DIR/numeric-fields.rs:17:17 | -17 | S{0: a, 0x1: b, ..} => {} +LL | S{0: a, 0x1: b, ..} => {} | ^^^^^^ struct `S` does not have field `0x1` error: aborting due to 2 previous errors diff --git a/src/test/ui/object-safety-associated-consts.stderr b/src/test/ui/object-safety-associated-consts.stderr index f63ded9a8b108..747c0607138ba 100644 --- a/src/test/ui/object-safety-associated-consts.stderr +++ b/src/test/ui/object-safety-associated-consts.stderr @@ -1,7 +1,7 @@ error[E0038]: the trait `Bar` cannot be made into an object --> $DIR/object-safety-associated-consts.rs:19:1 | -19 | fn make_bar(t: &T) -> &Bar { +LL | fn make_bar(t: &T) -> &Bar { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Bar` cannot be made into an object | = note: the trait cannot contain associated consts like `X` diff --git a/src/test/ui/object-safety-generics.stderr b/src/test/ui/object-safety-generics.stderr index 7bc714163c7fa..65a88d43808e2 100644 --- a/src/test/ui/object-safety-generics.stderr +++ b/src/test/ui/object-safety-generics.stderr @@ -1,7 +1,7 @@ error[E0038]: the trait `Bar` cannot be made into an object --> $DIR/object-safety-generics.rs:24:1 | -24 | fn make_bar(t: &T) -> &Bar { +LL | fn make_bar(t: &T) -> &Bar { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Bar` cannot be made into an object | = note: method `bar` has generic type parameters @@ -9,7 +9,7 @@ error[E0038]: the trait `Bar` cannot be made into an object error[E0038]: the trait `Bar` cannot be made into an object --> $DIR/object-safety-generics.rs:29:1 | -29 | fn make_bar_explicit(t: &T) -> &Bar { +LL | fn make_bar_explicit(t: &T) -> &Bar { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Bar` cannot be made into an object | = note: method `bar` has generic type parameters diff --git a/src/test/ui/object-safety-mentions-Self.stderr b/src/test/ui/object-safety-mentions-Self.stderr index 8ed8dcc803154..c8e62dbd42df1 100644 --- a/src/test/ui/object-safety-mentions-Self.stderr +++ b/src/test/ui/object-safety-mentions-Self.stderr @@ -1,7 +1,7 @@ error[E0038]: the trait `Bar` cannot be made into an object --> $DIR/object-safety-mentions-Self.rs:27:1 | -27 | fn make_bar(t: &T) -> &Bar { +LL | fn make_bar(t: &T) -> &Bar { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Bar` cannot be made into an object | = note: method `bar` references the `Self` type in its arguments or return type @@ -9,7 +9,7 @@ error[E0038]: the trait `Bar` cannot be made into an object error[E0038]: the trait `Baz` cannot be made into an object --> $DIR/object-safety-mentions-Self.rs:32:1 | -32 | fn make_baz(t: &T) -> &Baz { +LL | fn make_baz(t: &T) -> &Baz { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Baz` cannot be made into an object | = note: method `bar` references the `Self` type in its arguments or return type diff --git a/src/test/ui/object-safety-sized.stderr b/src/test/ui/object-safety-sized.stderr index a733416ef6ccf..c9133d16ff114 100644 --- a/src/test/ui/object-safety-sized.stderr +++ b/src/test/ui/object-safety-sized.stderr @@ -1,7 +1,7 @@ error[E0038]: the trait `Bar` cannot be made into an object --> $DIR/object-safety-sized.rs:18:1 | -18 | fn make_bar(t: &T) -> &Bar { +LL | fn make_bar(t: &T) -> &Bar { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Bar` cannot be made into an object | = note: the trait cannot require that `Self : Sized` diff --git a/src/test/ui/object-safety-supertrait-mentions-Self.stderr b/src/test/ui/object-safety-supertrait-mentions-Self.stderr index a5a67553c6154..d5d8ab2746ccc 100644 --- a/src/test/ui/object-safety-supertrait-mentions-Self.stderr +++ b/src/test/ui/object-safety-supertrait-mentions-Self.stderr @@ -1,7 +1,7 @@ error[E0038]: the trait `Baz` cannot be made into an object --> $DIR/object-safety-supertrait-mentions-Self.rs:25:31 | -25 | fn make_baz(t: &T) -> &Baz { +LL | fn make_baz(t: &T) -> &Baz { | ^^^ the trait `Baz` cannot be made into an object | = note: the trait cannot use `Self` as a type parameter in the supertraits or where-clauses diff --git a/src/test/ui/obsolete-syntax-impl-for-dotdot.stderr b/src/test/ui/obsolete-syntax-impl-for-dotdot.stderr index aa0af840d1a1f..4a312d745f6c7 100644 --- a/src/test/ui/obsolete-syntax-impl-for-dotdot.stderr +++ b/src/test/ui/obsolete-syntax-impl-for-dotdot.stderr @@ -1,7 +1,7 @@ error: `impl Trait for .. {}` is an obsolete syntax --> $DIR/obsolete-syntax-impl-for-dotdot.rs:17:1 | -17 | impl Trait2 for .. {} //~ ERROR `impl Trait for .. {}` is an obsolete syntax +LL | impl Trait2 for .. {} //~ ERROR `impl Trait for .. {}` is an obsolete syntax | ^^^^^^^^^^^^^^^^^^^^^ | = help: use `auto trait Trait {}` instead diff --git a/src/test/ui/on-unimplemented/bad-annotation.stderr b/src/test/ui/on-unimplemented/bad-annotation.stderr index 7126cc76eb727..2e880d7146dcb 100644 --- a/src/test/ui/on-unimplemented/bad-annotation.stderr +++ b/src/test/ui/on-unimplemented/bad-annotation.stderr @@ -1,7 +1,7 @@ error[E0232]: `#[rustc_on_unimplemented]` requires a value --> $DIR/bad-annotation.rs:26:1 | -26 | #[rustc_on_unimplemented] //~ ERROR `#[rustc_on_unimplemented]` requires a value +LL | #[rustc_on_unimplemented] //~ ERROR `#[rustc_on_unimplemented]` requires a value | ^^^^^^^^^^^^^^^^^^^^^^^^^ value required here | = note: eg `#[rustc_on_unimplemented = "foo"]` @@ -9,19 +9,19 @@ error[E0232]: `#[rustc_on_unimplemented]` requires a value error[E0230]: there is no type parameter C on trait BadAnnotation2 --> $DIR/bad-annotation.rs:30:1 | -30 | #[rustc_on_unimplemented = "Unimplemented trait error on `{Self}` with params `<{A},{B},{C}>`"] +LL | #[rustc_on_unimplemented = "Unimplemented trait error on `{Self}` with params `<{A},{B},{C}>`"] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error[E0231]: only named substitution parameters are allowed --> $DIR/bad-annotation.rs:35:1 | -35 | #[rustc_on_unimplemented = "Unimplemented trait error on `{Self}` with params `<{A},{B},{}>`"] +LL | #[rustc_on_unimplemented = "Unimplemented trait error on `{Self}` with params `<{A},{B},{}>`"] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error[E0232]: this attribute must have a valid value --> $DIR/bad-annotation.rs:40:26 | -40 | #[rustc_on_unimplemented(lorem="")] +LL | #[rustc_on_unimplemented(lorem="")] | ^^^^^^^^ expected value here | = note: eg `#[rustc_on_unimplemented = "foo"]` @@ -29,7 +29,7 @@ error[E0232]: this attribute must have a valid value error[E0232]: this attribute must have a valid value --> $DIR/bad-annotation.rs:44:26 | -44 | #[rustc_on_unimplemented(lorem(ipsum(dolor)))] +LL | #[rustc_on_unimplemented(lorem(ipsum(dolor)))] | ^^^^^^^^^^^^^^^^^^^ expected value here | = note: eg `#[rustc_on_unimplemented = "foo"]` @@ -37,7 +37,7 @@ error[E0232]: this attribute must have a valid value error[E0232]: this attribute must have a valid value --> $DIR/bad-annotation.rs:48:39 | -48 | #[rustc_on_unimplemented(message="x", message="y")] +LL | #[rustc_on_unimplemented(message="x", message="y")] | ^^^^^^^^^^^ expected value here | = note: eg `#[rustc_on_unimplemented = "foo"]` @@ -45,7 +45,7 @@ error[E0232]: this attribute must have a valid value error[E0232]: this attribute must have a valid value --> $DIR/bad-annotation.rs:52:39 | -52 | #[rustc_on_unimplemented(message="x", on(desugared, message="y"))] +LL | #[rustc_on_unimplemented(message="x", on(desugared, message="y"))] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ expected value here | = note: eg `#[rustc_on_unimplemented = "foo"]` @@ -53,13 +53,13 @@ error[E0232]: this attribute must have a valid value error[E0232]: empty `on`-clause in `#[rustc_on_unimplemented]` --> $DIR/bad-annotation.rs:56:26 | -56 | #[rustc_on_unimplemented(on(), message="y")] +LL | #[rustc_on_unimplemented(on(), message="y")] | ^^^^ empty on-clause here error[E0232]: this attribute must have a valid value --> $DIR/bad-annotation.rs:60:26 | -60 | #[rustc_on_unimplemented(on="x", message="y")] +LL | #[rustc_on_unimplemented(on="x", message="y")] | ^^^^^^ expected value here | = note: eg `#[rustc_on_unimplemented = "foo"]` @@ -67,7 +67,7 @@ error[E0232]: this attribute must have a valid value error[E0232]: this attribute must have a valid value --> $DIR/bad-annotation.rs:67:40 | -67 | #[rustc_on_unimplemented(on(desugared, on(desugared, message="x")), message="y")] +LL | #[rustc_on_unimplemented(on(desugared, on(desugared, message="x")), message="y")] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ expected value here | = note: eg `#[rustc_on_unimplemented = "foo"]` diff --git a/src/test/ui/on-unimplemented/multiple-impls.stderr b/src/test/ui/on-unimplemented/multiple-impls.stderr index cfac3981be284..e969c1da05a74 100644 --- a/src/test/ui/on-unimplemented/multiple-impls.stderr +++ b/src/test/ui/on-unimplemented/multiple-impls.stderr @@ -1,20 +1,20 @@ error[E0277]: the trait bound `[i32]: Index` is not satisfied --> $DIR/multiple-impls.rs:43:5 | -43 | Index::index(&[] as &[i32], 2u32); +LL | Index::index(&[] as &[i32], 2u32); | ^^^^^^^^^^^^ trait message | = help: the trait `Index` is not implemented for `[i32]` note: required by `Index::index` --> $DIR/multiple-impls.rs:22:5 | -22 | fn index(&self, index: Idx) -> &Self::Output; +LL | fn index(&self, index: Idx) -> &Self::Output; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error[E0277]: the trait bound `[i32]: Index` is not satisfied --> $DIR/multiple-impls.rs:43:5 | -43 | Index::index(&[] as &[i32], 2u32); +LL | Index::index(&[] as &[i32], 2u32); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ trait message | = help: the trait `Index` is not implemented for `[i32]` @@ -22,20 +22,20 @@ error[E0277]: the trait bound `[i32]: Index` is not satisfied error[E0277]: the trait bound `[i32]: Index>` is not satisfied --> $DIR/multiple-impls.rs:46:5 | -46 | Index::index(&[] as &[i32], Foo(2u32)); +LL | Index::index(&[] as &[i32], Foo(2u32)); | ^^^^^^^^^^^^ on impl for Foo | = help: the trait `Index>` is not implemented for `[i32]` note: required by `Index::index` --> $DIR/multiple-impls.rs:22:5 | -22 | fn index(&self, index: Idx) -> &Self::Output; +LL | fn index(&self, index: Idx) -> &Self::Output; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error[E0277]: the trait bound `[i32]: Index>` is not satisfied --> $DIR/multiple-impls.rs:46:5 | -46 | Index::index(&[] as &[i32], Foo(2u32)); +LL | Index::index(&[] as &[i32], Foo(2u32)); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ on impl for Foo | = help: the trait `Index>` is not implemented for `[i32]` @@ -43,20 +43,20 @@ error[E0277]: the trait bound `[i32]: Index>` is not satisfied error[E0277]: the trait bound `[i32]: Index>` is not satisfied --> $DIR/multiple-impls.rs:49:5 | -49 | Index::index(&[] as &[i32], Bar(2u32)); +LL | Index::index(&[] as &[i32], Bar(2u32)); | ^^^^^^^^^^^^ on impl for Bar | = help: the trait `Index>` is not implemented for `[i32]` note: required by `Index::index` --> $DIR/multiple-impls.rs:22:5 | -22 | fn index(&self, index: Idx) -> &Self::Output; +LL | fn index(&self, index: Idx) -> &Self::Output; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error[E0277]: the trait bound `[i32]: Index>` is not satisfied --> $DIR/multiple-impls.rs:49:5 | -49 | Index::index(&[] as &[i32], Bar(2u32)); +LL | Index::index(&[] as &[i32], Bar(2u32)); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ on impl for Bar | = help: the trait `Index>` is not implemented for `[i32]` diff --git a/src/test/ui/on-unimplemented/no-debug.stderr b/src/test/ui/on-unimplemented/no-debug.stderr index af5b1e91211fb..a2c65855ae225 100644 --- a/src/test/ui/on-unimplemented/no-debug.stderr +++ b/src/test/ui/on-unimplemented/no-debug.stderr @@ -1,7 +1,7 @@ error[E0277]: `Foo` doesn't implement `std::fmt::Debug` --> $DIR/no-debug.rs:20:27 | -20 | println!("{:?} {:?}", Foo, Bar); +LL | println!("{:?} {:?}", Foo, Bar); | ^^^ `Foo` cannot be formatted using `:?`; add `#[derive(Debug)]` or manually implement `std::fmt::Debug` | = help: the trait `std::fmt::Debug` is not implemented for `Foo` @@ -10,7 +10,7 @@ error[E0277]: `Foo` doesn't implement `std::fmt::Debug` error[E0277]: `no_debug::Bar` doesn't implement `std::fmt::Debug` --> $DIR/no-debug.rs:20:32 | -20 | println!("{:?} {:?}", Foo, Bar); +LL | println!("{:?} {:?}", Foo, Bar); | ^^^ `no_debug::Bar` cannot be formatted using `:?` because it doesn't implement `std::fmt::Debug` | = help: the trait `std::fmt::Debug` is not implemented for `no_debug::Bar` @@ -19,7 +19,7 @@ error[E0277]: `no_debug::Bar` doesn't implement `std::fmt::Debug` error[E0277]: `Foo` doesn't implement `std::fmt::Display` --> $DIR/no-debug.rs:21:23 | -21 | println!("{} {}", Foo, Bar); +LL | println!("{} {}", Foo, Bar); | ^^^ `Foo` cannot be formatted with the default formatter; try using `:?` instead if you are using a format string | = help: the trait `std::fmt::Display` is not implemented for `Foo` @@ -28,7 +28,7 @@ error[E0277]: `Foo` doesn't implement `std::fmt::Display` error[E0277]: `no_debug::Bar` doesn't implement `std::fmt::Display` --> $DIR/no-debug.rs:21:28 | -21 | println!("{} {}", Foo, Bar); +LL | println!("{} {}", Foo, Bar); | ^^^ `no_debug::Bar` cannot be formatted with the default formatter; try using `:?` instead if you are using a format string | = help: the trait `std::fmt::Display` is not implemented for `no_debug::Bar` diff --git a/src/test/ui/on-unimplemented/on-impl.stderr b/src/test/ui/on-unimplemented/on-impl.stderr index ed2da68f08167..78672353cce7c 100644 --- a/src/test/ui/on-unimplemented/on-impl.stderr +++ b/src/test/ui/on-unimplemented/on-impl.stderr @@ -1,20 +1,20 @@ error[E0277]: the trait bound `[i32]: Index` is not satisfied --> $DIR/on-impl.rs:32:5 | -32 | Index::::index(&[1, 2, 3] as &[i32], 2u32); +LL | Index::::index(&[1, 2, 3] as &[i32], 2u32); | ^^^^^^^^^^^^^^^^^^^ a usize is required to index into a slice | = help: the trait `Index` is not implemented for `[i32]` note: required by `Index::index` --> $DIR/on-impl.rs:19:5 | -19 | fn index(&self, index: Idx) -> &Self::Output; +LL | fn index(&self, index: Idx) -> &Self::Output; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error[E0277]: the trait bound `[i32]: Index` is not satisfied --> $DIR/on-impl.rs:32:5 | -32 | Index::::index(&[1, 2, 3] as &[i32], 2u32); +LL | Index::::index(&[1, 2, 3] as &[i32], 2u32); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ a usize is required to index into a slice | = help: the trait `Index` is not implemented for `[i32]` diff --git a/src/test/ui/on-unimplemented/on-trait.stderr b/src/test/ui/on-unimplemented/on-trait.stderr index 028200a5558c8..01c456cb6ea61 100644 --- a/src/test/ui/on-unimplemented/on-trait.stderr +++ b/src/test/ui/on-unimplemented/on-trait.stderr @@ -1,27 +1,27 @@ error[E0277]: the trait bound `std::option::Option>: MyFromIterator<&u8>` is not satisfied --> $DIR/on-trait.rs:37:30 | -37 | let y: Option> = collect(x.iter()); // this should give approximately the same error for x.iter().collect() +LL | let y: Option> = collect(x.iter()); // this should give approximately the same error for x.iter().collect() | ^^^^^^^ a collection of type `std::option::Option>` cannot be built from an iterator over elements of type `&u8` | = help: the trait `MyFromIterator<&u8>` is not implemented for `std::option::Option>` note: required by `collect` --> $DIR/on-trait.rs:31:1 | -31 | fn collect, B: MyFromIterator>(it: I) -> B { +LL | fn collect, B: MyFromIterator>(it: I) -> B { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error[E0277]: the trait bound `std::string::String: Bar::Foo` is not satisfied --> $DIR/on-trait.rs:40:21 | -40 | let x: String = foobar(); //~ ERROR +LL | let x: String = foobar(); //~ ERROR | ^^^^^^ test error `std::string::String` with `u8` `_` `u32` in `Bar::Foo` | = help: the trait `Bar::Foo` is not implemented for `std::string::String` note: required by `foobar` --> $DIR/on-trait.rs:21:1 | -21 | fn foobar>() -> T { +LL | fn foobar>() -> T { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: aborting due to 2 previous errors diff --git a/src/test/ui/on-unimplemented/slice-index.stderr b/src/test/ui/on-unimplemented/slice-index.stderr index a1ecbce770a08..0d5bfd604e7c9 100644 --- a/src/test/ui/on-unimplemented/slice-index.stderr +++ b/src/test/ui/on-unimplemented/slice-index.stderr @@ -1,7 +1,7 @@ error[E0277]: the trait bound `i32: std::slice::SliceIndex<[i32]>` is not satisfied --> $DIR/slice-index.rs:21:5 | -21 | x[1i32]; //~ ERROR E0277 +LL | x[1i32]; //~ ERROR E0277 | ^^^^^^^ slice indices are of type `usize` or ranges of `usize` | = help: the trait `std::slice::SliceIndex<[i32]>` is not implemented for `i32` @@ -10,7 +10,7 @@ error[E0277]: the trait bound `i32: std::slice::SliceIndex<[i32]>` is not satisf error[E0277]: the trait bound `std::ops::RangeTo: std::slice::SliceIndex<[i32]>` is not satisfied --> $DIR/slice-index.rs:22:5 | -22 | x[..1i32]; //~ ERROR E0277 +LL | x[..1i32]; //~ ERROR E0277 | ^^^^^^^^^ slice indices are of type `usize` or ranges of `usize` | = help: the trait `std::slice::SliceIndex<[i32]>` is not implemented for `std::ops::RangeTo` diff --git a/src/test/ui/param-bounds-ignored.stderr b/src/test/ui/param-bounds-ignored.stderr index 19aa9c5d6e562..fe5986448fa1d 100644 --- a/src/test/ui/param-bounds-ignored.stderr +++ b/src/test/ui/param-bounds-ignored.stderr @@ -1,18 +1,18 @@ warning[E0122]: generic bounds are ignored in type aliases --> $DIR/param-bounds-ignored.rs:15:1 | -15 | type SVec = Vec; +LL | type SVec = Vec; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ warning[E0122]: generic bounds are ignored in type aliases --> $DIR/param-bounds-ignored.rs:16:1 | -16 | type VVec<'b, 'a: 'b> = Vec<&'a i32>; +LL | type VVec<'b, 'a: 'b> = Vec<&'a i32>; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ warning[E0122]: generic bounds are ignored in type aliases --> $DIR/param-bounds-ignored.rs:17:1 | -17 | type WVec<'b, T: 'b> = Vec; +LL | type WVec<'b, T: 'b> = Vec; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/src/test/ui/partialeq_help.stderr b/src/test/ui/partialeq_help.stderr index 25ae8b1276815..5b35a20376aa3 100644 --- a/src/test/ui/partialeq_help.stderr +++ b/src/test/ui/partialeq_help.stderr @@ -1,7 +1,7 @@ error[E0277]: the trait bound `&T: std::cmp::PartialEq` is not satisfied --> $DIR/partialeq_help.rs:12:7 | -12 | a == b; //~ ERROR E0277 +LL | a == b; //~ ERROR E0277 | ^^ can't compare `&T` with `T` | = help: the trait `std::cmp::PartialEq` is not implemented for `&T` diff --git a/src/test/ui/pat-slice-old-style.stderr b/src/test/ui/pat-slice-old-style.stderr index 29c41c49cc415..dd4b9a5846b18 100644 --- a/src/test/ui/pat-slice-old-style.stderr +++ b/src/test/ui/pat-slice-old-style.stderr @@ -1,7 +1,7 @@ error[E0658]: non-reference pattern used to match a reference (see issue #42640) --> $DIR/pat-slice-old-style.rs:19:9 | -19 | [a, b..] => {}, +LL | [a, b..] => {}, | ^^^^^^^^ help: consider using a reference: `&[a, b..]` | = help: add #![feature(match_default_bindings)] to the crate attributes to enable diff --git a/src/test/ui/path-lookahead.stderr b/src/test/ui/path-lookahead.stderr index 059312b2851c6..89df5e894aa34 100644 --- a/src/test/ui/path-lookahead.stderr +++ b/src/test/ui/path-lookahead.stderr @@ -1,32 +1,32 @@ warning: unnecessary parentheses around `return` value --> $DIR/path-lookahead.rs:18:10 | -18 | return (::to_string(&arg)); //~WARN unnecessary parentheses around `return` value +LL | return (::to_string(&arg)); //~WARN unnecessary parentheses around `return` value | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove these parentheses | note: lint level defined here --> $DIR/path-lookahead.rs:13:9 | -13 | #![warn(unused)] +LL | #![warn(unused)] | ^^^^^^ = note: #[warn(unused_parens)] implied by #[warn(unused)] warning: function is never used: `with_parens` --> $DIR/path-lookahead.rs:17:1 | -17 | fn with_parens(arg: T) -> String { //~WARN function is never used: `with_parens` +LL | fn with_parens(arg: T) -> String { //~WARN function is never used: `with_parens` | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | note: lint level defined here --> $DIR/path-lookahead.rs:13:9 | -13 | #![warn(unused)] +LL | #![warn(unused)] | ^^^^^^ = note: #[warn(dead_code)] implied by #[warn(unused)] warning: function is never used: `no_parens` --> $DIR/path-lookahead.rs:21:1 | -21 | fn no_parens(arg: T) -> String { //~WARN function is never used: `no_parens` +LL | fn no_parens(arg: T) -> String { //~WARN function is never used: `no_parens` | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/src/test/ui/pub/pub-restricted-error-fn.stderr b/src/test/ui/pub/pub-restricted-error-fn.stderr index 9cfc3968ab125..aa8b0eaf79f68 100644 --- a/src/test/ui/pub/pub-restricted-error-fn.stderr +++ b/src/test/ui/pub/pub-restricted-error-fn.stderr @@ -1,7 +1,7 @@ error: unmatched visibility `pub` --> $DIR/pub-restricted-error-fn.rs:13:10 | -13 | pub(crate) () fn foo() {} //~ unmatched visibility +LL | pub(crate) () fn foo() {} //~ unmatched visibility | ^ error: aborting due to previous error diff --git a/src/test/ui/pub/pub-restricted-error.stderr b/src/test/ui/pub/pub-restricted-error.stderr index 1bdb47d97d279..e40cd58f87a30 100644 --- a/src/test/ui/pub/pub-restricted-error.stderr +++ b/src/test/ui/pub/pub-restricted-error.stderr @@ -1,7 +1,7 @@ error: expected identifier, found `(` --> $DIR/pub-restricted-error.rs:16:16 | -16 | pub(crate) () foo: usize, //~ ERROR expected identifier +LL | pub(crate) () foo: usize, //~ ERROR expected identifier | ^ expected identifier error: aborting due to previous error diff --git a/src/test/ui/pub/pub-restricted-non-path.stderr b/src/test/ui/pub/pub-restricted-non-path.stderr index e5b13218de1b4..fc3ca7e93df00 100644 --- a/src/test/ui/pub/pub-restricted-non-path.stderr +++ b/src/test/ui/pub/pub-restricted-non-path.stderr @@ -1,7 +1,7 @@ error: expected identifier, found `.` --> $DIR/pub-restricted-non-path.rs:13:6 | -13 | pub (.) fn afn() {} //~ ERROR expected identifier +LL | pub (.) fn afn() {} //~ ERROR expected identifier | ^ expected identifier error: aborting due to previous error diff --git a/src/test/ui/pub/pub-restricted.stderr b/src/test/ui/pub/pub-restricted.stderr index 0bedcddc0b4cc..7005088965df1 100644 --- a/src/test/ui/pub/pub-restricted.stderr +++ b/src/test/ui/pub/pub-restricted.stderr @@ -1,7 +1,7 @@ error: incorrect visibility restriction --> $DIR/pub-restricted.rs:15:6 | -15 | pub (a) fn afn() {} //~ incorrect visibility restriction +LL | pub (a) fn afn() {} //~ incorrect visibility restriction | ^ help: make this visible only to module `a` with `in`: `in a` | = help: some possible visibility restrictions are: @@ -12,7 +12,7 @@ error: incorrect visibility restriction error: incorrect visibility restriction --> $DIR/pub-restricted.rs:16:6 | -16 | pub (b) fn bfn() {} //~ incorrect visibility restriction +LL | pub (b) fn bfn() {} //~ incorrect visibility restriction | ^ help: make this visible only to module `b` with `in`: `in b` | = help: some possible visibility restrictions are: @@ -23,7 +23,7 @@ error: incorrect visibility restriction error: incorrect visibility restriction --> $DIR/pub-restricted.rs:32:14 | -32 | pub (a) invalid: usize, //~ incorrect visibility restriction +LL | pub (a) invalid: usize, //~ incorrect visibility restriction | ^ help: make this visible only to module `a` with `in`: `in a` | = help: some possible visibility restrictions are: @@ -34,7 +34,7 @@ error: incorrect visibility restriction error: incorrect visibility restriction --> $DIR/pub-restricted.rs:41:6 | -41 | pub (xyz) fn xyz() {} //~ incorrect visibility restriction +LL | pub (xyz) fn xyz() {} //~ incorrect visibility restriction | ^^^ help: make this visible only to module `xyz` with `in`: `in xyz` | = help: some possible visibility restrictions are: @@ -45,7 +45,7 @@ error: incorrect visibility restriction error: visibilities can only be restricted to ancestor modules --> $DIR/pub-restricted.rs:33:17 | -33 | pub (in x) non_parent_invalid: usize, //~ ERROR visibilities can only be restricted +LL | pub (in x) non_parent_invalid: usize, //~ ERROR visibilities can only be restricted | ^ error: aborting due to 5 previous errors diff --git a/src/test/ui/qualified-path-params-2.stderr b/src/test/ui/qualified-path-params-2.stderr index 35a9698451f1b..a8ef0f4eb8220 100644 --- a/src/test/ui/qualified-path-params-2.stderr +++ b/src/test/ui/qualified-path-params-2.stderr @@ -1,13 +1,13 @@ error[E0109]: type parameters are not allowed on this type --> $DIR/qualified-path-params-2.rs:28:26 | -28 | type A = ::A::f; +LL | type A = ::A::f; | ^^ type parameter not allowed error[E0223]: ambiguous associated type --> $DIR/qualified-path-params-2.rs:28:10 | -28 | type A = ::A::f; +LL | type A = ::A::f; | ^^^^^^^^^^^^^^^^^^^ ambiguous associated type | = note: specify the type using the syntax `<::A as Trait>::f` diff --git a/src/test/ui/reachable/expr_add.stderr b/src/test/ui/reachable/expr_add.stderr index 4ae286d2fff11..d3e1da0e71894 100644 --- a/src/test/ui/reachable/expr_add.stderr +++ b/src/test/ui/reachable/expr_add.stderr @@ -1,13 +1,13 @@ error: unreachable expression --> $DIR/expr_add.rs:27:13 | -27 | let x = Foo + return; //~ ERROR unreachable +LL | let x = Foo + return; //~ ERROR unreachable | ^^^^^^^^^^^^ | note: lint level defined here --> $DIR/expr_add.rs:13:9 | -13 | #![deny(unreachable_code)] +LL | #![deny(unreachable_code)] | ^^^^^^^^^^^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/reachable/expr_again.stderr b/src/test/ui/reachable/expr_again.stderr index 152c96e52b6ab..65c0c588329cc 100644 --- a/src/test/ui/reachable/expr_again.stderr +++ b/src/test/ui/reachable/expr_again.stderr @@ -1,13 +1,13 @@ error: unreachable statement --> $DIR/expr_again.rs:18:9 | -18 | println!("hi"); +LL | println!("hi"); | ^^^^^^^^^^^^^^^ | note: lint level defined here --> $DIR/expr_again.rs:13:9 | -13 | #![deny(unreachable_code)] +LL | #![deny(unreachable_code)] | ^^^^^^^^^^^^^^^^ = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info) diff --git a/src/test/ui/reachable/expr_array.stderr b/src/test/ui/reachable/expr_array.stderr index 0f64d15850360..3257514ea500d 100644 --- a/src/test/ui/reachable/expr_array.stderr +++ b/src/test/ui/reachable/expr_array.stderr @@ -1,19 +1,19 @@ error: unreachable expression --> $DIR/expr_array.rs:20:34 | -20 | let x: [usize; 2] = [return, 22]; //~ ERROR unreachable +LL | let x: [usize; 2] = [return, 22]; //~ ERROR unreachable | ^^ | note: lint level defined here --> $DIR/expr_array.rs:14:9 | -14 | #![deny(unreachable_code)] +LL | #![deny(unreachable_code)] | ^^^^^^^^^^^^^^^^ error: unreachable expression --> $DIR/expr_array.rs:25:25 | -25 | let x: [usize; 2] = [22, return]; //~ ERROR unreachable +LL | let x: [usize; 2] = [22, return]; //~ ERROR unreachable | ^^^^^^^^^^^^ error: aborting due to 2 previous errors diff --git a/src/test/ui/reachable/expr_assign.stderr b/src/test/ui/reachable/expr_assign.stderr index 42c00d5a8b7d8..15dcf2c2401d3 100644 --- a/src/test/ui/reachable/expr_assign.stderr +++ b/src/test/ui/reachable/expr_assign.stderr @@ -1,25 +1,25 @@ error: unreachable expression --> $DIR/expr_assign.rs:20:5 | -20 | x = return; //~ ERROR unreachable +LL | x = return; //~ ERROR unreachable | ^^^^^^^^^^ | note: lint level defined here --> $DIR/expr_assign.rs:14:9 | -14 | #![deny(unreachable_code)] +LL | #![deny(unreachable_code)] | ^^^^^^^^^^^^^^^^ error: unreachable expression --> $DIR/expr_assign.rs:30:14 | -30 | *p = return; //~ ERROR unreachable +LL | *p = return; //~ ERROR unreachable | ^^^^^^ error: unreachable expression --> $DIR/expr_assign.rs:36:15 | -36 | *{return; &mut i} = 22; //~ ERROR unreachable +LL | *{return; &mut i} = 22; //~ ERROR unreachable | ^^^^^^ error: aborting due to 3 previous errors diff --git a/src/test/ui/reachable/expr_block.stderr b/src/test/ui/reachable/expr_block.stderr index 4c08be524f282..a0cef6449f7df 100644 --- a/src/test/ui/reachable/expr_block.stderr +++ b/src/test/ui/reachable/expr_block.stderr @@ -1,19 +1,19 @@ error: unreachable expression --> $DIR/expr_block.rs:21:9 | -21 | 22 //~ ERROR unreachable +LL | 22 //~ ERROR unreachable | ^^ | note: lint level defined here --> $DIR/expr_block.rs:14:9 | -14 | #![deny(unreachable_code)] +LL | #![deny(unreachable_code)] | ^^^^^^^^^^^^^^^^ error: unreachable statement --> $DIR/expr_block.rs:36:9 | -36 | println!("foo"); +LL | println!("foo"); | ^^^^^^^^^^^^^^^^ | = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info) diff --git a/src/test/ui/reachable/expr_box.stderr b/src/test/ui/reachable/expr_box.stderr index d8b5d9f8d7684..08b916030dd9f 100644 --- a/src/test/ui/reachable/expr_box.stderr +++ b/src/test/ui/reachable/expr_box.stderr @@ -1,13 +1,13 @@ error: unreachable expression --> $DIR/expr_box.rs:16:13 | -16 | let x = box return; //~ ERROR unreachable +LL | let x = box return; //~ ERROR unreachable | ^^^^^^^^^^ | note: lint level defined here --> $DIR/expr_box.rs:13:9 | -13 | #![deny(unreachable_code)] +LL | #![deny(unreachable_code)] | ^^^^^^^^^^^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/reachable/expr_call.stderr b/src/test/ui/reachable/expr_call.stderr index eaafe8dc5d593..455e5ab3653d8 100644 --- a/src/test/ui/reachable/expr_call.stderr +++ b/src/test/ui/reachable/expr_call.stderr @@ -1,19 +1,19 @@ error: unreachable expression --> $DIR/expr_call.rs:23:17 | -23 | foo(return, 22); //~ ERROR unreachable +LL | foo(return, 22); //~ ERROR unreachable | ^^ | note: lint level defined here --> $DIR/expr_call.rs:14:9 | -14 | #![deny(unreachable_code)] +LL | #![deny(unreachable_code)] | ^^^^^^^^^^^^^^^^ error: unreachable expression --> $DIR/expr_call.rs:28:5 | -28 | bar(return); //~ ERROR unreachable +LL | bar(return); //~ ERROR unreachable | ^^^^^^^^^^^ error: aborting due to 2 previous errors diff --git a/src/test/ui/reachable/expr_cast.stderr b/src/test/ui/reachable/expr_cast.stderr index d6fb37768c541..8c37759aa469e 100644 --- a/src/test/ui/reachable/expr_cast.stderr +++ b/src/test/ui/reachable/expr_cast.stderr @@ -1,13 +1,13 @@ error: unreachable expression --> $DIR/expr_cast.rs:20:13 | -20 | let x = {return} as !; //~ ERROR unreachable +LL | let x = {return} as !; //~ ERROR unreachable | ^^^^^^^^^^^^^ | note: lint level defined here --> $DIR/expr_cast.rs:14:9 | -14 | #![deny(unreachable_code)] +LL | #![deny(unreachable_code)] | ^^^^^^^^^^^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/reachable/expr_if.stderr b/src/test/ui/reachable/expr_if.stderr index b8f3f494c5c35..c14cdbfc2bc77 100644 --- a/src/test/ui/reachable/expr_if.stderr +++ b/src/test/ui/reachable/expr_if.stderr @@ -1,13 +1,13 @@ error: unreachable statement --> $DIR/expr_if.rs:38:5 | -38 | println!("But I am."); +LL | println!("But I am."); | ^^^^^^^^^^^^^^^^^^^^^^ | note: lint level defined here --> $DIR/expr_if.rs:14:9 | -14 | #![deny(unreachable_code)] +LL | #![deny(unreachable_code)] | ^^^^^^^^^^^^^^^^ = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info) diff --git a/src/test/ui/reachable/expr_loop.stderr b/src/test/ui/reachable/expr_loop.stderr index ce4b30c798411..7f834567de368 100644 --- a/src/test/ui/reachable/expr_loop.stderr +++ b/src/test/ui/reachable/expr_loop.stderr @@ -1,20 +1,20 @@ error: unreachable statement --> $DIR/expr_loop.rs:19:5 | -19 | println!("I am dead."); +LL | println!("I am dead."); | ^^^^^^^^^^^^^^^^^^^^^^^ | note: lint level defined here --> $DIR/expr_loop.rs:14:9 | -14 | #![deny(unreachable_code)] +LL | #![deny(unreachable_code)] | ^^^^^^^^^^^^^^^^ = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info) error: unreachable statement --> $DIR/expr_loop.rs:31:5 | -31 | println!("I am dead."); +LL | println!("I am dead."); | ^^^^^^^^^^^^^^^^^^^^^^^ | = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info) @@ -22,7 +22,7 @@ error: unreachable statement error: unreachable statement --> $DIR/expr_loop.rs:41:5 | -41 | println!("I am dead."); +LL | println!("I am dead."); | ^^^^^^^^^^^^^^^^^^^^^^^ | = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info) diff --git a/src/test/ui/reachable/expr_match.stderr b/src/test/ui/reachable/expr_match.stderr index 499beac644c52..d4cf21cef2810 100644 --- a/src/test/ui/reachable/expr_match.stderr +++ b/src/test/ui/reachable/expr_match.stderr @@ -1,19 +1,19 @@ error: unreachable expression --> $DIR/expr_match.rs:20:5 | -20 | match {return} { } //~ ERROR unreachable +LL | match {return} { } //~ ERROR unreachable | ^^^^^^^^^^^^^^^^^^ | note: lint level defined here --> $DIR/expr_match.rs:14:9 | -14 | #![deny(unreachable_code)] +LL | #![deny(unreachable_code)] | ^^^^^^^^^^^^^^^^ error: unreachable statement --> $DIR/expr_match.rs:25:5 | -25 | println!("I am dead"); +LL | println!("I am dead"); | ^^^^^^^^^^^^^^^^^^^^^^ | = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info) @@ -21,7 +21,7 @@ error: unreachable statement error: unreachable statement --> $DIR/expr_match.rs:35:5 | -35 | println!("I am dead"); +LL | println!("I am dead"); | ^^^^^^^^^^^^^^^^^^^^^^ | = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info) diff --git a/src/test/ui/reachable/expr_method.stderr b/src/test/ui/reachable/expr_method.stderr index db9d5c3d22c1a..b9348b5d48155 100644 --- a/src/test/ui/reachable/expr_method.stderr +++ b/src/test/ui/reachable/expr_method.stderr @@ -1,19 +1,19 @@ error: unreachable expression --> $DIR/expr_method.rs:26:21 | -26 | Foo.foo(return, 22); //~ ERROR unreachable +LL | Foo.foo(return, 22); //~ ERROR unreachable | ^^ | note: lint level defined here --> $DIR/expr_method.rs:14:9 | -14 | #![deny(unreachable_code)] +LL | #![deny(unreachable_code)] | ^^^^^^^^^^^^^^^^ error: unreachable expression --> $DIR/expr_method.rs:31:5 | -31 | Foo.bar(return); //~ ERROR unreachable +LL | Foo.bar(return); //~ ERROR unreachable | ^^^^^^^^^^^^^^^ error: aborting due to 2 previous errors diff --git a/src/test/ui/reachable/expr_repeat.stderr b/src/test/ui/reachable/expr_repeat.stderr index 54b29b616f3d7..90cc3183c72e4 100644 --- a/src/test/ui/reachable/expr_repeat.stderr +++ b/src/test/ui/reachable/expr_repeat.stderr @@ -1,13 +1,13 @@ error: unreachable expression --> $DIR/expr_repeat.rs:20:25 | -20 | let x: [usize; 2] = [return; 2]; //~ ERROR unreachable +LL | let x: [usize; 2] = [return; 2]; //~ ERROR unreachable | ^^^^^^^^^^^ | note: lint level defined here --> $DIR/expr_repeat.rs:14:9 | -14 | #![deny(unreachable_code)] +LL | #![deny(unreachable_code)] | ^^^^^^^^^^^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/reachable/expr_return.stderr b/src/test/ui/reachable/expr_return.stderr index a96def6011eb8..3876da6541df0 100644 --- a/src/test/ui/reachable/expr_return.stderr +++ b/src/test/ui/reachable/expr_return.stderr @@ -1,13 +1,13 @@ error: unreachable expression --> $DIR/expr_return.rs:21:22 | -21 | let x = {return {return {return;}}}; //~ ERROR unreachable +LL | let x = {return {return {return;}}}; //~ ERROR unreachable | ^^^^^^^^^^^^^^^^ | note: lint level defined here --> $DIR/expr_return.rs:14:9 | -14 | #![deny(unreachable_code)] +LL | #![deny(unreachable_code)] | ^^^^^^^^^^^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/reachable/expr_struct.stderr b/src/test/ui/reachable/expr_struct.stderr index b2cb1ef19cf83..43985bbbb5c09 100644 --- a/src/test/ui/reachable/expr_struct.stderr +++ b/src/test/ui/reachable/expr_struct.stderr @@ -1,31 +1,31 @@ error: unreachable expression --> $DIR/expr_struct.rs:25:13 | -25 | let x = Foo { a: 22, b: 33, ..return }; //~ ERROR unreachable +LL | let x = Foo { a: 22, b: 33, ..return }; //~ ERROR unreachable | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | note: lint level defined here --> $DIR/expr_struct.rs:14:9 | -14 | #![deny(unreachable_code)] +LL | #![deny(unreachable_code)] | ^^^^^^^^^^^^^^^^ error: unreachable expression --> $DIR/expr_struct.rs:30:33 | -30 | let x = Foo { a: return, b: 33, ..return }; //~ ERROR unreachable +LL | let x = Foo { a: return, b: 33, ..return }; //~ ERROR unreachable | ^^ error: unreachable expression --> $DIR/expr_struct.rs:35:39 | -35 | let x = Foo { a: 22, b: return, ..return }; //~ ERROR unreachable +LL | let x = Foo { a: 22, b: return, ..return }; //~ ERROR unreachable | ^^^^^^ error: unreachable expression --> $DIR/expr_struct.rs:40:13 | -40 | let x = Foo { a: 22, b: return }; //~ ERROR unreachable +LL | let x = Foo { a: 22, b: return }; //~ ERROR unreachable | ^^^^^^^^^^^^^^^^^^^^^^^^ error: aborting due to 4 previous errors diff --git a/src/test/ui/reachable/expr_tup.stderr b/src/test/ui/reachable/expr_tup.stderr index af43162a98447..ff9aa666d8e37 100644 --- a/src/test/ui/reachable/expr_tup.stderr +++ b/src/test/ui/reachable/expr_tup.stderr @@ -1,19 +1,19 @@ error: unreachable expression --> $DIR/expr_tup.rs:20:38 | -20 | let x: (usize, usize) = (return, 2); //~ ERROR unreachable +LL | let x: (usize, usize) = (return, 2); //~ ERROR unreachable | ^ | note: lint level defined here --> $DIR/expr_tup.rs:14:9 | -14 | #![deny(unreachable_code)] +LL | #![deny(unreachable_code)] | ^^^^^^^^^^^^^^^^ error: unreachable expression --> $DIR/expr_tup.rs:25:29 | -25 | let x: (usize, usize) = (2, return); //~ ERROR unreachable +LL | let x: (usize, usize) = (2, return); //~ ERROR unreachable | ^^^^^^^^^^^ error: aborting due to 2 previous errors diff --git a/src/test/ui/reachable/expr_type.stderr b/src/test/ui/reachable/expr_type.stderr index d6bcb4ec80f8b..d6b9f75edf101 100644 --- a/src/test/ui/reachable/expr_type.stderr +++ b/src/test/ui/reachable/expr_type.stderr @@ -1,13 +1,13 @@ error: unreachable expression --> $DIR/expr_type.rs:20:13 | -20 | let x = {return}: !; //~ ERROR unreachable +LL | let x = {return}: !; //~ ERROR unreachable | ^^^^^^^^^^^ | note: lint level defined here --> $DIR/expr_type.rs:14:9 | -14 | #![deny(unreachable_code)] +LL | #![deny(unreachable_code)] | ^^^^^^^^^^^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/reachable/expr_unary.stderr b/src/test/ui/reachable/expr_unary.stderr index 39120f0bdf980..c1cfa56aa33a1 100644 --- a/src/test/ui/reachable/expr_unary.stderr +++ b/src/test/ui/reachable/expr_unary.stderr @@ -1,25 +1,25 @@ error: unreachable expression --> $DIR/expr_unary.rs:19:28 | -19 | let x: ! = ! { return; 22 }; //~ ERROR unreachable +LL | let x: ! = ! { return; 22 }; //~ ERROR unreachable | ^^ | note: lint level defined here --> $DIR/expr_unary.rs:14:9 | -14 | #![deny(unreachable_code)] +LL | #![deny(unreachable_code)] | ^^^^^^^^^^^^^^^^ error: cannot coerce `{integer}` to ! --> $DIR/expr_unary.rs:19:28 | -19 | let x: ! = ! { return; 22 }; //~ ERROR unreachable +LL | let x: ! = ! { return; 22 }; //~ ERROR unreachable | ^^ | note: lint level defined here --> $DIR/expr_unary.rs:15:9 | -15 | #![deny(coerce_never)] +LL | #![deny(coerce_never)] | ^^^^^^^^^^^^ = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! = note: for more information, see issue #46325 @@ -27,7 +27,7 @@ note: lint level defined here error[E0600]: cannot apply unary operator `!` to type `!` --> $DIR/expr_unary.rs:19:16 | -19 | let x: ! = ! { return; 22 }; //~ ERROR unreachable +LL | let x: ! = ! { return; 22 }; //~ ERROR unreachable | ^^^^^^^^^^^^^^^^ error: aborting due to 3 previous errors diff --git a/src/test/ui/reachable/expr_while.stderr b/src/test/ui/reachable/expr_while.stderr index 36109826983e7..cd09390661518 100644 --- a/src/test/ui/reachable/expr_while.stderr +++ b/src/test/ui/reachable/expr_while.stderr @@ -1,20 +1,20 @@ error: unreachable statement --> $DIR/expr_while.rs:19:9 | -19 | println!("Hello, world!"); +LL | println!("Hello, world!"); | ^^^^^^^^^^^^^^^^^^^^^^^^^^ | note: lint level defined here --> $DIR/expr_while.rs:14:9 | -14 | #![deny(unreachable_code)] +LL | #![deny(unreachable_code)] | ^^^^^^^^^^^^^^^^ = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info) error: unreachable statement --> $DIR/expr_while.rs:33:9 | -33 | println!("I am dead."); +LL | println!("I am dead."); | ^^^^^^^^^^^^^^^^^^^^^^^ | = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info) @@ -22,7 +22,7 @@ error: unreachable statement error: unreachable statement --> $DIR/expr_while.rs:35:5 | -35 | println!("I am, too."); +LL | println!("I am, too."); | ^^^^^^^^^^^^^^^^^^^^^^^ | = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info) diff --git a/src/test/ui/recursive-requirements.stderr b/src/test/ui/recursive-requirements.stderr index 8cf2c65b1e25c..7ac7bc421ebbb 100644 --- a/src/test/ui/recursive-requirements.stderr +++ b/src/test/ui/recursive-requirements.stderr @@ -1,7 +1,7 @@ error[E0275]: overflow evaluating the requirement `Foo: std::marker::Sync` --> $DIR/recursive-requirements.rs:26:12 | -26 | let _: AssertSync = unimplemented!(); //~ ERROR E0275 +LL | let _: AssertSync = unimplemented!(); //~ ERROR E0275 | ^^^^^^^^^^^^^^^ | = help: consider adding a `#![recursion_limit="128"]` attribute to your crate diff --git a/src/test/ui/region-borrow-params-issue-29793-small.stderr b/src/test/ui/region-borrow-params-issue-29793-small.stderr index 7cdea5b0bd264..b2e79ced34a37 100644 --- a/src/test/ui/region-borrow-params-issue-29793-small.stderr +++ b/src/test/ui/region-borrow-params-issue-29793-small.stderr @@ -1,12 +1,12 @@ error[E0597]: `x` does not live long enough --> $DIR/region-borrow-params-issue-29793-small.rs:19:34 | -19 | let f = |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`) +LL | let f = |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`) | --------- ^ borrowed value does not live long enough | | | capture occurs here ... -23 | }; +LL | }; | - borrowed value dropped before borrower | = note: values in a scope are dropped in the opposite order they are created @@ -14,12 +14,12 @@ error[E0597]: `x` does not live long enough error[E0597]: `y` does not live long enough --> $DIR/region-borrow-params-issue-29793-small.rs:19:45 | -19 | let f = |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`) +LL | let f = |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`) | --------- ^ borrowed value does not live long enough | | | capture occurs here ... -23 | }; +LL | }; | - borrowed value dropped before borrower | = note: values in a scope are dropped in the opposite order they are created @@ -27,12 +27,12 @@ error[E0597]: `y` does not live long enough error[E0597]: `x` does not live long enough --> $DIR/region-borrow-params-issue-29793-small.rs:34:34 | -34 | let f = |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`) +LL | let f = |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`) | --------- ^ borrowed value does not live long enough | | | capture occurs here ... -38 | }; +LL | }; | - borrowed value dropped before borrower | = note: values in a scope are dropped in the opposite order they are created @@ -40,12 +40,12 @@ error[E0597]: `x` does not live long enough error[E0597]: `y` does not live long enough --> $DIR/region-borrow-params-issue-29793-small.rs:34:45 | -34 | let f = |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`) +LL | let f = |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`) | --------- ^ borrowed value does not live long enough | | | capture occurs here ... -38 | }; +LL | }; | - borrowed value dropped before borrower | = note: values in a scope are dropped in the opposite order they are created @@ -53,194 +53,194 @@ error[E0597]: `y` does not live long enough error[E0373]: closure may outlive the current function, but it borrows `x`, which is owned by the current function --> $DIR/region-borrow-params-issue-29793-small.rs:65:17 | -65 | let f = |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`) +LL | let f = |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`) | ^^^^^^^^^ - `x` is borrowed here | | | may outlive borrowed value `x` help: to force the closure to take ownership of `x` (and any other referenced variables), use the `move` keyword | -65 | let f = move |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`) +LL | let f = move |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`) | ^^^^^^^^^^^^^^ error[E0373]: closure may outlive the current function, but it borrows `y`, which is owned by the current function --> $DIR/region-borrow-params-issue-29793-small.rs:65:17 | -65 | let f = |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`) +LL | let f = |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`) | ^^^^^^^^^ - `y` is borrowed here | | | may outlive borrowed value `y` help: to force the closure to take ownership of `y` (and any other referenced variables), use the `move` keyword | -65 | let f = move |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`) +LL | let f = move |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`) | ^^^^^^^^^^^^^^ error[E0373]: closure may outlive the current function, but it borrows `x`, which is owned by the current function --> $DIR/region-borrow-params-issue-29793-small.rs:76:17 | -76 | let f = |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`) +LL | let f = |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`) | ^^^^^^^^^ - `x` is borrowed here | | | may outlive borrowed value `x` help: to force the closure to take ownership of `x` (and any other referenced variables), use the `move` keyword | -76 | let f = move |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`) +LL | let f = move |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`) | ^^^^^^^^^^^^^^ error[E0373]: closure may outlive the current function, but it borrows `y`, which is owned by the current function --> $DIR/region-borrow-params-issue-29793-small.rs:76:17 | -76 | let f = |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`) +LL | let f = |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`) | ^^^^^^^^^ - `y` is borrowed here | | | may outlive borrowed value `y` help: to force the closure to take ownership of `y` (and any other referenced variables), use the `move` keyword | -76 | let f = move |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`) +LL | let f = move |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`) | ^^^^^^^^^^^^^^ error[E0373]: closure may outlive the current function, but it borrows `x`, which is owned by the current function - --> $DIR/region-borrow-params-issue-29793-small.rs:100:21 - | -100 | let f = |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`) - | ^^^^^^^^^ - `x` is borrowed here - | | - | may outlive borrowed value `x` + --> $DIR/region-borrow-params-issue-29793-small.rs:100:21 + | +LL | let f = |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`) + | ^^^^^^^^^ - `x` is borrowed here + | | + | may outlive borrowed value `x` help: to force the closure to take ownership of `x` (and any other referenced variables), use the `move` keyword - | -100 | let f = move |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`) - | ^^^^^^^^^^^^^^ + | +LL | let f = move |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`) + | ^^^^^^^^^^^^^^ error[E0373]: closure may outlive the current function, but it borrows `y`, which is owned by the current function - --> $DIR/region-borrow-params-issue-29793-small.rs:100:21 - | -100 | let f = |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`) - | ^^^^^^^^^ - `y` is borrowed here - | | - | may outlive borrowed value `y` + --> $DIR/region-borrow-params-issue-29793-small.rs:100:21 + | +LL | let f = |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`) + | ^^^^^^^^^ - `y` is borrowed here + | | + | may outlive borrowed value `y` help: to force the closure to take ownership of `y` (and any other referenced variables), use the `move` keyword - | -100 | let f = move |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`) - | ^^^^^^^^^^^^^^ + | +LL | let f = move |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`) + | ^^^^^^^^^^^^^^ error[E0373]: closure may outlive the current function, but it borrows `x`, which is owned by the current function - --> $DIR/region-borrow-params-issue-29793-small.rs:114:21 - | -114 | let f = |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`) - | ^^^^^^^^^ - `x` is borrowed here - | | - | may outlive borrowed value `x` + --> $DIR/region-borrow-params-issue-29793-small.rs:114:21 + | +LL | let f = |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`) + | ^^^^^^^^^ - `x` is borrowed here + | | + | may outlive borrowed value `x` help: to force the closure to take ownership of `x` (and any other referenced variables), use the `move` keyword - | -114 | let f = move |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`) - | ^^^^^^^^^^^^^^ + | +LL | let f = move |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`) + | ^^^^^^^^^^^^^^ error[E0373]: closure may outlive the current function, but it borrows `y`, which is owned by the current function - --> $DIR/region-borrow-params-issue-29793-small.rs:114:21 - | -114 | let f = |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`) - | ^^^^^^^^^ - `y` is borrowed here - | | - | may outlive borrowed value `y` + --> $DIR/region-borrow-params-issue-29793-small.rs:114:21 + | +LL | let f = |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`) + | ^^^^^^^^^ - `y` is borrowed here + | | + | may outlive borrowed value `y` help: to force the closure to take ownership of `y` (and any other referenced variables), use the `move` keyword - | -114 | let f = move |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`) - | ^^^^^^^^^^^^^^ + | +LL | let f = move |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`) + | ^^^^^^^^^^^^^^ error[E0373]: closure may outlive the current function, but it borrows `x`, which is owned by the current function - --> $DIR/region-borrow-params-issue-29793-small.rs:142:21 - | -142 | let f = |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`) - | ^^^^^^^^^ - `x` is borrowed here - | | - | may outlive borrowed value `x` + --> $DIR/region-borrow-params-issue-29793-small.rs:142:21 + | +LL | let f = |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`) + | ^^^^^^^^^ - `x` is borrowed here + | | + | may outlive borrowed value `x` help: to force the closure to take ownership of `x` (and any other referenced variables), use the `move` keyword - | -142 | let f = move |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`) - | ^^^^^^^^^^^^^^ + | +LL | let f = move |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`) + | ^^^^^^^^^^^^^^ error[E0373]: closure may outlive the current function, but it borrows `y`, which is owned by the current function - --> $DIR/region-borrow-params-issue-29793-small.rs:142:21 - | -142 | let f = |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`) - | ^^^^^^^^^ - `y` is borrowed here - | | - | may outlive borrowed value `y` + --> $DIR/region-borrow-params-issue-29793-small.rs:142:21 + | +LL | let f = |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`) + | ^^^^^^^^^ - `y` is borrowed here + | | + | may outlive borrowed value `y` help: to force the closure to take ownership of `y` (and any other referenced variables), use the `move` keyword - | -142 | let f = move |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`) - | ^^^^^^^^^^^^^^ + | +LL | let f = move |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`) + | ^^^^^^^^^^^^^^ error[E0373]: closure may outlive the current function, but it borrows `x`, which is owned by the current function - --> $DIR/region-borrow-params-issue-29793-small.rs:157:21 - | -157 | let f = |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`) - | ^^^^^^^^^ - `x` is borrowed here - | | - | may outlive borrowed value `x` + --> $DIR/region-borrow-params-issue-29793-small.rs:157:21 + | +LL | let f = |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`) + | ^^^^^^^^^ - `x` is borrowed here + | | + | may outlive borrowed value `x` help: to force the closure to take ownership of `x` (and any other referenced variables), use the `move` keyword - | -157 | let f = move |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`) - | ^^^^^^^^^^^^^^ + | +LL | let f = move |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`) + | ^^^^^^^^^^^^^^ error[E0373]: closure may outlive the current function, but it borrows `y`, which is owned by the current function - --> $DIR/region-borrow-params-issue-29793-small.rs:157:21 - | -157 | let f = |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`) - | ^^^^^^^^^ - `y` is borrowed here - | | - | may outlive borrowed value `y` + --> $DIR/region-borrow-params-issue-29793-small.rs:157:21 + | +LL | let f = |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`) + | ^^^^^^^^^ - `y` is borrowed here + | | + | may outlive borrowed value `y` help: to force the closure to take ownership of `y` (and any other referenced variables), use the `move` keyword - | -157 | let f = move |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`) - | ^^^^^^^^^^^^^^ + | +LL | let f = move |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`) + | ^^^^^^^^^^^^^^ error[E0373]: closure may outlive the current function, but it borrows `x`, which is owned by the current function - --> $DIR/region-borrow-params-issue-29793-small.rs:185:21 - | -185 | let f = |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`) - | ^^^^^^^^^ - `x` is borrowed here - | | - | may outlive borrowed value `x` + --> $DIR/region-borrow-params-issue-29793-small.rs:185:21 + | +LL | let f = |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`) + | ^^^^^^^^^ - `x` is borrowed here + | | + | may outlive borrowed value `x` help: to force the closure to take ownership of `x` (and any other referenced variables), use the `move` keyword - | -185 | let f = move |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`) - | ^^^^^^^^^^^^^^ + | +LL | let f = move |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`) + | ^^^^^^^^^^^^^^ error[E0373]: closure may outlive the current function, but it borrows `y`, which is owned by the current function - --> $DIR/region-borrow-params-issue-29793-small.rs:185:21 - | -185 | let f = |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`) - | ^^^^^^^^^ - `y` is borrowed here - | | - | may outlive borrowed value `y` + --> $DIR/region-borrow-params-issue-29793-small.rs:185:21 + | +LL | let f = |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`) + | ^^^^^^^^^ - `y` is borrowed here + | | + | may outlive borrowed value `y` help: to force the closure to take ownership of `y` (and any other referenced variables), use the `move` keyword - | -185 | let f = move |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`) - | ^^^^^^^^^^^^^^ + | +LL | let f = move |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`) + | ^^^^^^^^^^^^^^ error[E0373]: closure may outlive the current function, but it borrows `x`, which is owned by the current function - --> $DIR/region-borrow-params-issue-29793-small.rs:199:21 - | -199 | let f = |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`) - | ^^^^^^^^^ - `x` is borrowed here - | | - | may outlive borrowed value `x` + --> $DIR/region-borrow-params-issue-29793-small.rs:199:21 + | +LL | let f = |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`) + | ^^^^^^^^^ - `x` is borrowed here + | | + | may outlive borrowed value `x` help: to force the closure to take ownership of `x` (and any other referenced variables), use the `move` keyword - | -199 | let f = move |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`) - | ^^^^^^^^^^^^^^ + | +LL | let f = move |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`) + | ^^^^^^^^^^^^^^ error[E0373]: closure may outlive the current function, but it borrows `y`, which is owned by the current function - --> $DIR/region-borrow-params-issue-29793-small.rs:199:21 - | -199 | let f = |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`) - | ^^^^^^^^^ - `y` is borrowed here - | | - | may outlive borrowed value `y` + --> $DIR/region-borrow-params-issue-29793-small.rs:199:21 + | +LL | let f = |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`) + | ^^^^^^^^^ - `y` is borrowed here + | | + | may outlive borrowed value `y` help: to force the closure to take ownership of `y` (and any other referenced variables), use the `move` keyword - | -199 | let f = move |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`) - | ^^^^^^^^^^^^^^ + | +LL | let f = move |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`) + | ^^^^^^^^^^^^^^ error: aborting due to 20 previous errors diff --git a/src/test/ui/regions-fn-subtyping-return-static.stderr b/src/test/ui/regions-fn-subtyping-return-static.stderr index 4a97537223cf6..860c3aae880e0 100644 --- a/src/test/ui/regions-fn-subtyping-return-static.stderr +++ b/src/test/ui/regions-fn-subtyping-return-static.stderr @@ -1,7 +1,7 @@ error[E0308]: mismatched types --> $DIR/regions-fn-subtyping-return-static.rs:51:12 | -51 | want_F(bar); //~ ERROR E0308 +LL | want_F(bar); //~ ERROR E0308 | ^^^ expected concrete lifetime, found bound lifetime parameter 'cx | = note: expected type `for<'cx> fn(&'cx S) -> &'cx S` diff --git a/src/test/ui/regions-nested-fns-2.stderr b/src/test/ui/regions-nested-fns-2.stderr index 5f0bbf6d12b1f..32900c344663f 100644 --- a/src/test/ui/regions-nested-fns-2.stderr +++ b/src/test/ui/regions-nested-fns-2.stderr @@ -1,14 +1,14 @@ error[E0373]: closure may outlive the current function, but it borrows `y`, which is owned by the current function --> $DIR/regions-nested-fns-2.rs:16:9 | -16 | |z| { +LL | |z| { | ^^^ may outlive borrowed value `y` -17 | //~^ ERROR E0373 -18 | if false { &y } else { z } +LL | //~^ ERROR E0373 +LL | if false { &y } else { z } | - `y` is borrowed here help: to force the closure to take ownership of `y` (and any other referenced variables), use the `move` keyword | -16 | move |z| { +LL | move |z| { | ^^^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/resolve-conflict-item-vs-import.stderr b/src/test/ui/resolve-conflict-item-vs-import.stderr index e2245b8a8b10a..d71e9ca1241db 100644 --- a/src/test/ui/resolve-conflict-item-vs-import.stderr +++ b/src/test/ui/resolve-conflict-item-vs-import.stderr @@ -1,16 +1,16 @@ error[E0255]: the name `transmute` is defined multiple times --> $DIR/resolve-conflict-item-vs-import.rs:13:1 | -11 | use std::mem::transmute; +LL | use std::mem::transmute; | ------------------- previous import of the value `transmute` here -12 | -13 | fn transmute() {} +LL | +LL | fn transmute() {} | ^^^^^^^^^^^^^^ `transmute` redefined here | = note: `transmute` must be defined only once in the value namespace of this module help: You can use `as` to change the binding name of the import | -11 | use std::mem::transmute as other_transmute; +LL | use std::mem::transmute as other_transmute; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/resolve-inconsistent-names.stderr b/src/test/ui/resolve-inconsistent-names.stderr index 8ae5a6b8a820f..4d27153e3b0f1 100644 --- a/src/test/ui/resolve-inconsistent-names.stderr +++ b/src/test/ui/resolve-inconsistent-names.stderr @@ -1,7 +1,7 @@ error[E0408]: variable `a` is not bound in all patterns --> $DIR/resolve-inconsistent-names.rs:14:12 | -14 | a | b => {} //~ ERROR variable `a` is not bound in all patterns +LL | a | b => {} //~ ERROR variable `a` is not bound in all patterns | - ^ pattern doesn't bind `a` | | | variable not in all patterns @@ -9,7 +9,7 @@ error[E0408]: variable `a` is not bound in all patterns error[E0408]: variable `b` is not bound in all patterns --> $DIR/resolve-inconsistent-names.rs:14:8 | -14 | a | b => {} //~ ERROR variable `a` is not bound in all patterns +LL | a | b => {} //~ ERROR variable `a` is not bound in all patterns | ^ - variable not in all patterns | | | pattern doesn't bind `b` diff --git a/src/test/ui/resolve/enums-are-namespaced-xc.stderr b/src/test/ui/resolve/enums-are-namespaced-xc.stderr index 5acc678df90e3..e7e6fc9964372 100644 --- a/src/test/ui/resolve/enums-are-namespaced-xc.stderr +++ b/src/test/ui/resolve/enums-are-namespaced-xc.stderr @@ -1,31 +1,31 @@ error[E0425]: cannot find value `A` in module `namespaced_enums` --> $DIR/enums-are-namespaced-xc.rs:15:31 | -15 | let _ = namespaced_enums::A; +LL | let _ = namespaced_enums::A; | ^ not found in `namespaced_enums` help: possible candidate is found in another module, you can import it into scope | -14 | use namespaced_enums::Foo::A; +LL | use namespaced_enums::Foo::A; | error[E0425]: cannot find function `B` in module `namespaced_enums` --> $DIR/enums-are-namespaced-xc.rs:17:31 | -17 | let _ = namespaced_enums::B(10); +LL | let _ = namespaced_enums::B(10); | ^ not found in `namespaced_enums` help: possible candidate is found in another module, you can import it into scope | -14 | use namespaced_enums::Foo::B; +LL | use namespaced_enums::Foo::B; | error[E0422]: cannot find struct, variant or union type `C` in module `namespaced_enums` --> $DIR/enums-are-namespaced-xc.rs:19:31 | -19 | let _ = namespaced_enums::C { a: 10 }; +LL | let _ = namespaced_enums::C { a: 10 }; | ^ not found in `namespaced_enums` help: possible candidate is found in another module, you can import it into scope | -14 | use namespaced_enums::Foo::C; +LL | use namespaced_enums::Foo::C; | error: aborting due to 3 previous errors diff --git a/src/test/ui/resolve/issue-14254.stderr b/src/test/ui/resolve/issue-14254.stderr index 1bb5a4cab4951..49dcde5e8ca93 100644 --- a/src/test/ui/resolve/issue-14254.stderr +++ b/src/test/ui/resolve/issue-14254.stderr @@ -1,146 +1,146 @@ error[E0425]: cannot find function `baz` in this scope --> $DIR/issue-14254.rs:29:9 | -29 | baz(); +LL | baz(); | ^^^ help: try: `self.baz` error[E0425]: cannot find value `a` in this scope --> $DIR/issue-14254.rs:31:9 | -31 | a; +LL | a; | ^ not found in this scope error[E0425]: cannot find function `baz` in this scope --> $DIR/issue-14254.rs:38:9 | -38 | baz(); +LL | baz(); | ^^^ help: try: `self.baz` error[E0425]: cannot find value `x` in this scope --> $DIR/issue-14254.rs:40:9 | -40 | x; +LL | x; | ^ help: try: `self.x` error[E0425]: cannot find value `y` in this scope --> $DIR/issue-14254.rs:42:9 | -42 | y; +LL | y; | ^ help: try: `self.y` error[E0425]: cannot find value `a` in this scope --> $DIR/issue-14254.rs:44:9 | -44 | a; +LL | a; | ^ not found in this scope error[E0425]: cannot find value `bah` in this scope --> $DIR/issue-14254.rs:46:9 | -46 | bah; +LL | bah; | ^^^ help: try: `Self::bah` error[E0425]: cannot find value `b` in this scope --> $DIR/issue-14254.rs:48:9 | -48 | b; +LL | b; | ^ not found in this scope error[E0425]: cannot find function `baz` in this scope --> $DIR/issue-14254.rs:55:9 | -55 | baz(); +LL | baz(); | ^^^ help: try: `self.baz` error[E0425]: cannot find value `x` in this scope --> $DIR/issue-14254.rs:57:9 | -57 | x; +LL | x; | ^ help: try: `self.x` error[E0425]: cannot find value `y` in this scope --> $DIR/issue-14254.rs:59:9 | -59 | y; +LL | y; | ^ help: try: `self.y` error[E0425]: cannot find value `a` in this scope --> $DIR/issue-14254.rs:61:9 | -61 | a; +LL | a; | ^ not found in this scope error[E0425]: cannot find value `bah` in this scope --> $DIR/issue-14254.rs:63:9 | -63 | bah; +LL | bah; | ^^^ help: try: `Self::bah` error[E0425]: cannot find value `b` in this scope --> $DIR/issue-14254.rs:65:9 | -65 | b; +LL | b; | ^ not found in this scope error[E0425]: cannot find function `baz` in this scope --> $DIR/issue-14254.rs:72:9 | -72 | baz(); +LL | baz(); | ^^^ help: try: `self.baz` error[E0425]: cannot find value `bah` in this scope --> $DIR/issue-14254.rs:74:9 | -74 | bah; +LL | bah; | ^^^ help: try: `Self::bah` error[E0425]: cannot find function `baz` in this scope --> $DIR/issue-14254.rs:81:9 | -81 | baz(); +LL | baz(); | ^^^ help: try: `self.baz` error[E0425]: cannot find value `bah` in this scope --> $DIR/issue-14254.rs:83:9 | -83 | bah; +LL | bah; | ^^^ help: try: `Self::bah` error[E0425]: cannot find function `baz` in this scope --> $DIR/issue-14254.rs:90:9 | -90 | baz(); +LL | baz(); | ^^^ help: try: `self.baz` error[E0425]: cannot find value `bah` in this scope --> $DIR/issue-14254.rs:92:9 | -92 | bah; +LL | bah; | ^^^ help: try: `Self::bah` error[E0425]: cannot find function `baz` in this scope --> $DIR/issue-14254.rs:99:9 | -99 | baz(); +LL | baz(); | ^^^ help: try: `self.baz` error[E0425]: cannot find value `bah` in this scope - --> $DIR/issue-14254.rs:101:9 - | -101 | bah; - | ^^^ help: try: `Self::bah` + --> $DIR/issue-14254.rs:101:9 + | +LL | bah; + | ^^^ help: try: `Self::bah` error[E0425]: cannot find function `baz` in this scope - --> $DIR/issue-14254.rs:108:9 - | -108 | baz(); - | ^^^ help: try: `self.baz` + --> $DIR/issue-14254.rs:108:9 + | +LL | baz(); + | ^^^ help: try: `self.baz` error[E0425]: cannot find value `bah` in this scope - --> $DIR/issue-14254.rs:110:9 - | -110 | bah; - | ^^^ help: try: `Self::bah` + --> $DIR/issue-14254.rs:110:9 + | +LL | bah; + | ^^^ help: try: `Self::bah` error[E0601]: main function not found diff --git a/src/test/ui/resolve/issue-16058.stderr b/src/test/ui/resolve/issue-16058.stderr index 322a1fea52eed..a6e454393af2e 100644 --- a/src/test/ui/resolve/issue-16058.stderr +++ b/src/test/ui/resolve/issue-16058.stderr @@ -1,15 +1,15 @@ error[E0574]: expected struct, variant or union type, found enum `Result` --> $DIR/issue-16058.rs:19:9 | -19 | Result { +LL | Result { | ^^^^^^ not a struct, variant or union type help: possible better candidates are found in other modules, you can import them into scope | -12 | use std::fmt::Result; +LL | use std::fmt::Result; | -12 | use std::io::Result; +LL | use std::io::Result; | -12 | use std::thread::Result; +LL | use std::thread::Result; | error: aborting due to previous error diff --git a/src/test/ui/resolve/issue-17518.stderr b/src/test/ui/resolve/issue-17518.stderr index ffb110d5c3afe..255e270e5239f 100644 --- a/src/test/ui/resolve/issue-17518.stderr +++ b/src/test/ui/resolve/issue-17518.stderr @@ -1,11 +1,11 @@ error[E0422]: cannot find struct, variant or union type `E` in this scope --> $DIR/issue-17518.rs:16:5 | -16 | E { name: "foobar" }; //~ ERROR cannot find struct, variant or union type `E` +LL | E { name: "foobar" }; //~ ERROR cannot find struct, variant or union type `E` | ^ not found in this scope help: possible candidate is found in another module, you can import it into scope | -11 | use SomeEnum::E; +LL | use SomeEnum::E; | error: aborting due to previous error diff --git a/src/test/ui/resolve/issue-18252.stderr b/src/test/ui/resolve/issue-18252.stderr index edc7196d84645..ffa1417615b1d 100644 --- a/src/test/ui/resolve/issue-18252.stderr +++ b/src/test/ui/resolve/issue-18252.stderr @@ -1,7 +1,7 @@ error[E0423]: expected function, found struct variant `Foo::Variant` --> $DIR/issue-18252.rs:16:13 | -16 | let f = Foo::Variant(42); +LL | let f = Foo::Variant(42); | ^^^^^^^^^^^^ did you mean `Foo::Variant { /* fields */ }`? error: aborting due to previous error diff --git a/src/test/ui/resolve/issue-19452.stderr b/src/test/ui/resolve/issue-19452.stderr index 7b14d49af51dd..55a3a2b74c7c9 100644 --- a/src/test/ui/resolve/issue-19452.stderr +++ b/src/test/ui/resolve/issue-19452.stderr @@ -1,13 +1,13 @@ error[E0423]: expected value, found struct variant `Homura::Madoka` --> $DIR/issue-19452.rs:19:18 | -19 | let homura = Homura::Madoka; +LL | let homura = Homura::Madoka; | ^^^^^^^^^^^^^^ did you mean `Homura::Madoka { /* fields */ }`? error[E0423]: expected value, found struct variant `issue_19452_aux::Homura::Madoka` --> $DIR/issue-19452.rs:22:18 | -22 | let homura = issue_19452_aux::Homura::Madoka; +LL | let homura = issue_19452_aux::Homura::Madoka; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ did you mean `issue_19452_aux::Homura::Madoka { /* fields */ }`? error: aborting due to 2 previous errors diff --git a/src/test/ui/resolve/issue-21221-1.stderr b/src/test/ui/resolve/issue-21221-1.stderr index 88405fd841b06..a9d2aeee2d151 100644 --- a/src/test/ui/resolve/issue-21221-1.stderr +++ b/src/test/ui/resolve/issue-21221-1.stderr @@ -1,48 +1,48 @@ error[E0405]: cannot find trait `Mul` in this scope --> $DIR/issue-21221-1.rs:53:6 | -53 | impl Mul for Foo { +LL | impl Mul for Foo { | ^^^ not found in this scope help: possible candidates are found in other modules, you can import them into scope | -11 | use mul1::Mul; +LL | use mul1::Mul; | -11 | use mul2::Mul; +LL | use mul2::Mul; | -11 | use std::ops::Mul; +LL | use std::ops::Mul; | error[E0412]: cannot find type `Mul` in this scope --> $DIR/issue-21221-1.rs:68:16 | -68 | fn getMul() -> Mul { +LL | fn getMul() -> Mul { | ^^^ not found in this scope help: possible candidates are found in other modules, you can import them into scope | -11 | use mul1::Mul; +LL | use mul1::Mul; | -11 | use mul2::Mul; +LL | use mul2::Mul; | -11 | use mul3::Mul; +LL | use mul3::Mul; | -11 | use mul4::Mul; +LL | use mul4::Mul; | and 2 other candidates error[E0405]: cannot find trait `ThisTraitReallyDoesntExistInAnyModuleReally` in this scope --> $DIR/issue-21221-1.rs:73:6 | -73 | impl ThisTraitReallyDoesntExistInAnyModuleReally for Foo { +LL | impl ThisTraitReallyDoesntExistInAnyModuleReally for Foo { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not found in this scope error[E0405]: cannot find trait `Div` in this scope --> $DIR/issue-21221-1.rs:78:6 | -78 | impl Div for Foo { +LL | impl Div for Foo { | ^^^ not found in this scope help: possible candidate is found in another module, you can import it into scope | -11 | use std::ops::Div; +LL | use std::ops::Div; | error: cannot continue compilation due to previous error diff --git a/src/test/ui/resolve/issue-21221-2.stderr b/src/test/ui/resolve/issue-21221-2.stderr index 0ae8052758dac..50781d4379272 100644 --- a/src/test/ui/resolve/issue-21221-2.stderr +++ b/src/test/ui/resolve/issue-21221-2.stderr @@ -1,11 +1,11 @@ error[E0405]: cannot find trait `T` in this scope --> $DIR/issue-21221-2.rs:28:6 | -28 | impl T for Foo { } +LL | impl T for Foo { } | ^ not found in this scope help: possible candidate is found in another module, you can import it into scope | -11 | use foo::bar::T; +LL | use foo::bar::T; | error[E0601]: main function not found diff --git a/src/test/ui/resolve/issue-21221-3.stderr b/src/test/ui/resolve/issue-21221-3.stderr index b26a8cdacb029..7725f74cb49fc 100644 --- a/src/test/ui/resolve/issue-21221-3.stderr +++ b/src/test/ui/resolve/issue-21221-3.stderr @@ -1,11 +1,11 @@ error[E0405]: cannot find trait `OuterTrait` in this scope --> $DIR/issue-21221-3.rs:25:6 | -25 | impl OuterTrait for Foo {} +LL | impl OuterTrait for Foo {} | ^^^^^^^^^^ not found in this scope help: possible candidate is found in another module, you can import it into scope | -18 | use issue_21221_3::outer::OuterTrait; +LL | use issue_21221_3::outer::OuterTrait; | error: cannot continue compilation due to previous error diff --git a/src/test/ui/resolve/issue-21221-4.stderr b/src/test/ui/resolve/issue-21221-4.stderr index 0a22d8e1fe1ad..b0a4d5ba4d898 100644 --- a/src/test/ui/resolve/issue-21221-4.stderr +++ b/src/test/ui/resolve/issue-21221-4.stderr @@ -1,11 +1,11 @@ error[E0405]: cannot find trait `T` in this scope --> $DIR/issue-21221-4.rs:20:6 | -20 | impl T for Foo {} +LL | impl T for Foo {} | ^ not found in this scope help: possible candidate is found in another module, you can import it into scope | -18 | use issue_21221_4::T; +LL | use issue_21221_4::T; | error: cannot continue compilation due to previous error diff --git a/src/test/ui/resolve/issue-23305.stderr b/src/test/ui/resolve/issue-23305.stderr index a0b4d424ec968..510ab1d6e345e 100644 --- a/src/test/ui/resolve/issue-23305.stderr +++ b/src/test/ui/resolve/issue-23305.stderr @@ -1,13 +1,13 @@ error[E0391]: cyclic dependency detected --> $DIR/issue-23305.rs:15:12 | -15 | impl ToNbt {} +LL | impl ToNbt {} | ^^^^ cyclic reference | note: the cycle begins when processing ``... --> $DIR/issue-23305.rs:15:1 | -15 | impl ToNbt {} +LL | impl ToNbt {} | ^^^^^^^^^^^^^^^^ = note: ...which then again requires processing ``, completing the cycle. diff --git a/src/test/ui/resolve/issue-2356.stderr b/src/test/ui/resolve/issue-2356.stderr index db68167a57364..bed6e4add5f4e 100644 --- a/src/test/ui/resolve/issue-2356.stderr +++ b/src/test/ui/resolve/issue-2356.stderr @@ -1,25 +1,25 @@ error[E0425]: cannot find function `shave` in this scope --> $DIR/issue-2356.rs:27:5 | -27 | shave(); +LL | shave(); | ^^^^^ not found in this scope error[E0425]: cannot find function `clone` in this scope --> $DIR/issue-2356.rs:34:5 | -34 | clone(); +LL | clone(); | ^^^^^ help: try: `self.clone` error[E0425]: cannot find function `default` in this scope --> $DIR/issue-2356.rs:41:5 | -41 | default(); +LL | default(); | ^^^^^^^ help: try: `Self::default` error[E0425]: cannot find value `whiskers` in this scope --> $DIR/issue-2356.rs:49:5 | -49 | whiskers -= other; +LL | whiskers -= other; | ^^^^^^^^ | | | `self` value is only available in methods with `self` parameter @@ -28,67 +28,67 @@ error[E0425]: cannot find value `whiskers` in this scope error[E0425]: cannot find function `shave` in this scope --> $DIR/issue-2356.rs:51:5 | -51 | shave(4); +LL | shave(4); | ^^^^^ help: try: `Self::shave` error[E0425]: cannot find function `purr` in this scope --> $DIR/issue-2356.rs:53:5 | -53 | purr(); +LL | purr(); | ^^^^ not found in this scope error[E0425]: cannot find function `static_method` in this scope --> $DIR/issue-2356.rs:62:9 | -62 | static_method(); +LL | static_method(); | ^^^^^^^^^^^^^ not found in this scope error[E0425]: cannot find function `purr` in this scope --> $DIR/issue-2356.rs:64:9 | -64 | purr(); +LL | purr(); | ^^^^ not found in this scope error[E0425]: cannot find function `purr` in this scope --> $DIR/issue-2356.rs:66:9 | -66 | purr(); +LL | purr(); | ^^^^ not found in this scope error[E0425]: cannot find function `purr` in this scope --> $DIR/issue-2356.rs:68:9 | -68 | purr(); +LL | purr(); | ^^^^ not found in this scope error[E0424]: expected value, found module `self` --> $DIR/issue-2356.rs:75:8 | -75 | if self.whiskers > 3 { +LL | if self.whiskers > 3 { | ^^^^ `self` value is only available in methods with `self` parameter error[E0425]: cannot find function `grow_older` in this scope --> $DIR/issue-2356.rs:82:5 | -82 | grow_older(); +LL | grow_older(); | ^^^^^^^^^^ not found in this scope error[E0425]: cannot find function `shave` in this scope --> $DIR/issue-2356.rs:84:5 | -84 | shave(); +LL | shave(); | ^^^^^ not found in this scope error[E0425]: cannot find value `whiskers` in this scope --> $DIR/issue-2356.rs:89:5 | -89 | whiskers = 0; +LL | whiskers = 0; | ^^^^^^^^ help: try: `self.whiskers` error[E0425]: cannot find value `whiskers` in this scope --> $DIR/issue-2356.rs:94:5 | -94 | whiskers = 4; +LL | whiskers = 4; | ^^^^^^^^ | | | `self` value is only available in methods with `self` parameter @@ -97,14 +97,14 @@ error[E0425]: cannot find value `whiskers` in this scope error[E0425]: cannot find function `purr_louder` in this scope --> $DIR/issue-2356.rs:96:5 | -96 | purr_louder(); +LL | purr_louder(); | ^^^^^^^^^^^ not found in this scope error[E0424]: expected value, found module `self` - --> $DIR/issue-2356.rs:102:5 - | -102 | self += 1; - | ^^^^ `self` value is only available in methods with `self` parameter + --> $DIR/issue-2356.rs:102:5 + | +LL | self += 1; + | ^^^^ `self` value is only available in methods with `self` parameter error: aborting due to 17 previous errors diff --git a/src/test/ui/resolve/issue-24968.stderr b/src/test/ui/resolve/issue-24968.stderr index 111710d515a92..dc460cb0685ce 100644 --- a/src/test/ui/resolve/issue-24968.stderr +++ b/src/test/ui/resolve/issue-24968.stderr @@ -1,7 +1,7 @@ error[E0411]: cannot find type `Self` in this scope --> $DIR/issue-24968.rs:11:11 | -11 | fn foo(_: Self) { +LL | fn foo(_: Self) { | ^^^^ `Self` is only available in traits and impls error: aborting due to previous error diff --git a/src/test/ui/resolve/issue-33876.stderr b/src/test/ui/resolve/issue-33876.stderr index 5dbecc4f0c5fa..3ef83018d0829 100644 --- a/src/test/ui/resolve/issue-33876.stderr +++ b/src/test/ui/resolve/issue-33876.stderr @@ -1,7 +1,7 @@ error[E0423]: expected value, found trait `Bar` --> $DIR/issue-33876.rs:20:22 | -20 | let any: &Any = &Bar; //~ ERROR expected value, found trait `Bar` +LL | let any: &Any = &Bar; //~ ERROR expected value, found trait `Bar` | ^^^ not a value error: aborting due to previous error diff --git a/src/test/ui/resolve/issue-3907-2.stderr b/src/test/ui/resolve/issue-3907-2.stderr index 2ef8c830eb2fe..7395da0a0a285 100644 --- a/src/test/ui/resolve/issue-3907-2.stderr +++ b/src/test/ui/resolve/issue-3907-2.stderr @@ -1,7 +1,7 @@ error[E0038]: the trait `issue_3907::Foo` cannot be made into an object --> $DIR/issue-3907-2.rs:20:1 | -20 | fn bar(_x: Foo) {} +LL | fn bar(_x: Foo) {} | ^^^^^^^^^^^^^^^ the trait `issue_3907::Foo` cannot be made into an object | = note: method `bar` has no receiver diff --git a/src/test/ui/resolve/issue-3907.stderr b/src/test/ui/resolve/issue-3907.stderr index 26ff7e70fd073..2b8b2b20685f8 100644 --- a/src/test/ui/resolve/issue-3907.stderr +++ b/src/test/ui/resolve/issue-3907.stderr @@ -1,11 +1,11 @@ error[E0404]: expected trait, found type alias `Foo` --> $DIR/issue-3907.rs:20:6 | -20 | impl Foo for S { //~ ERROR expected trait, found type alias `Foo` +LL | impl Foo for S { //~ ERROR expected trait, found type alias `Foo` | ^^^ type aliases cannot be used for traits help: possible better candidate is found in another module, you can import it into scope | -14 | use issue_3907::Foo; +LL | use issue_3907::Foo; | error: cannot continue compilation due to previous error diff --git a/src/test/ui/resolve/issue-39226.stderr b/src/test/ui/resolve/issue-39226.stderr index f6ee0b025bb2e..ebae51565fdf1 100644 --- a/src/test/ui/resolve/issue-39226.stderr +++ b/src/test/ui/resolve/issue-39226.stderr @@ -1,7 +1,7 @@ error[E0423]: expected value, found struct `Handle` --> $DIR/issue-39226.rs:20:17 | -20 | handle: Handle +LL | handle: Handle | ^^^^^^ | | | did you mean `handle`? diff --git a/src/test/ui/resolve/issue-5035-2.stderr b/src/test/ui/resolve/issue-5035-2.stderr index 791b20725f3bc..4c97e7e7eccb6 100644 --- a/src/test/ui/resolve/issue-5035-2.stderr +++ b/src/test/ui/resolve/issue-5035-2.stderr @@ -1,7 +1,7 @@ error[E0277]: the trait bound `I + 'static: std::marker::Sized` is not satisfied --> $DIR/issue-5035-2.rs:14:8 | -14 | fn foo(_x: K) {} //~ ERROR: `I + 'static: std::marker::Sized` is not satisfied +LL | fn foo(_x: K) {} //~ ERROR: `I + 'static: std::marker::Sized` is not satisfied | ^^ `I + 'static` does not have a constant size known at compile-time | = help: the trait `std::marker::Sized` is not implemented for `I + 'static` diff --git a/src/test/ui/resolve/issue-5035.stderr b/src/test/ui/resolve/issue-5035.stderr index 3b37f5d4c83dd..6597f05889af8 100644 --- a/src/test/ui/resolve/issue-5035.stderr +++ b/src/test/ui/resolve/issue-5035.stderr @@ -1,13 +1,13 @@ error[E0432]: unresolved import `ImportError` --> $DIR/issue-5035.rs:15:5 | -15 | use ImportError; //~ ERROR unresolved import `ImportError` [E0432] +LL | use ImportError; //~ ERROR unresolved import `ImportError` [E0432] | ^^^^^^^^^^^ no `ImportError` in the root error[E0404]: expected trait, found type alias `K` --> $DIR/issue-5035.rs:13:6 | -13 | impl K for isize {} //~ ERROR expected trait, found type alias `K` +LL | impl K for isize {} //~ ERROR expected trait, found type alias `K` | ^ | | | did you mean `I`? diff --git a/src/test/ui/resolve/issue-6702.stderr b/src/test/ui/resolve/issue-6702.stderr index b50295752f2e0..fc439bef8f608 100644 --- a/src/test/ui/resolve/issue-6702.stderr +++ b/src/test/ui/resolve/issue-6702.stderr @@ -1,7 +1,7 @@ error[E0423]: expected function, found struct `Monster` --> $DIR/issue-6702.rs:17:14 | -17 | let _m = Monster(); //~ ERROR expected function, found struct `Monster` +LL | let _m = Monster(); //~ ERROR expected function, found struct `Monster` | ^^^^^^^ did you mean `Monster { /* fields */ }`? error: aborting due to previous error diff --git a/src/test/ui/resolve/levenshtein.stderr b/src/test/ui/resolve/levenshtein.stderr index 68d46ccf6857d..1409f58d296c0 100644 --- a/src/test/ui/resolve/levenshtein.stderr +++ b/src/test/ui/resolve/levenshtein.stderr @@ -1,49 +1,49 @@ error[E0412]: cannot find type `esize` in this scope --> $DIR/levenshtein.rs:15:11 | -15 | fn foo(c: esize) {} // Misspelled primitive type name. +LL | fn foo(c: esize) {} // Misspelled primitive type name. | ^^^^^ did you mean `isize`? error[E0412]: cannot find type `Baz` in this scope --> $DIR/levenshtein.rs:20:10 | -20 | type A = Baz; // Misspelled type name. +LL | type A = Baz; // Misspelled type name. | ^^^ did you mean `Bar`? error[E0412]: cannot find type `Opiton` in this scope --> $DIR/levenshtein.rs:22:10 | -22 | type B = Opiton; // Misspelled type name from the prelude. +LL | type B = Opiton; // Misspelled type name from the prelude. | ^^^^^^ did you mean `Option`? error[E0412]: cannot find type `Baz` in this scope --> $DIR/levenshtein.rs:26:14 | -26 | type A = Baz; // No suggestion here, Bar is not visible +LL | type A = Baz; // No suggestion here, Bar is not visible | ^^^ not found in this scope error[E0425]: cannot find value `MAXITEM` in this scope --> $DIR/levenshtein.rs:34:20 | -34 | let v = [0u32; MAXITEM]; // Misspelled constant name. +LL | let v = [0u32; MAXITEM]; // Misspelled constant name. | ^^^^^^^ did you mean `MAX_ITEM`? error[E0425]: cannot find function `foobar` in this scope --> $DIR/levenshtein.rs:36:5 | -36 | foobar(); // Misspelled function name. +LL | foobar(); // Misspelled function name. | ^^^^^^ did you mean `foo_bar`? error[E0412]: cannot find type `first` in module `m` --> $DIR/levenshtein.rs:38:15 | -38 | let b: m::first = m::second; // Misspelled item in module. +LL | let b: m::first = m::second; // Misspelled item in module. | ^^^^^ did you mean `First`? error[E0425]: cannot find value `second` in module `m` --> $DIR/levenshtein.rs:38:26 | -38 | let b: m::first = m::second; // Misspelled item in module. +LL | let b: m::first = m::second; // Misspelled item in module. | ^^^^^^ did you mean `Second`? error: aborting due to 8 previous errors diff --git a/src/test/ui/resolve/name-clash-nullary.stderr b/src/test/ui/resolve/name-clash-nullary.stderr index 014b1fe1b5b07..5e44a6e2b37eb 100644 --- a/src/test/ui/resolve/name-clash-nullary.stderr +++ b/src/test/ui/resolve/name-clash-nullary.stderr @@ -1,7 +1,7 @@ error[E0308]: mismatched types --> $DIR/name-clash-nullary.rs:12:7 | -12 | let None: isize = 42; //~ ERROR mismatched types +LL | let None: isize = 42; //~ ERROR mismatched types | ^^^^ expected isize, found enum `std::option::Option` | = note: expected type `isize` diff --git a/src/test/ui/resolve/privacy-enum-ctor.stderr b/src/test/ui/resolve/privacy-enum-ctor.stderr index c4f6d1f5b7407..84d54ec8328d0 100644 --- a/src/test/ui/resolve/privacy-enum-ctor.stderr +++ b/src/test/ui/resolve/privacy-enum-ctor.stderr @@ -1,7 +1,7 @@ error[E0423]: expected value, found enum `n::Z` --> $DIR/privacy-enum-ctor.rs:33:9 | -33 | n::Z; +LL | n::Z; | ^^^^ | = note: did you mean to use one of the following variants? @@ -12,7 +12,7 @@ error[E0423]: expected value, found enum `n::Z` error[E0423]: expected value, found enum `Z` --> $DIR/privacy-enum-ctor.rs:35:9 | -35 | Z; +LL | Z; | ^ did you mean `f`? | = note: did you mean to use one of the following variants? @@ -23,13 +23,13 @@ error[E0423]: expected value, found enum `Z` error[E0423]: expected value, found struct variant `Z::Struct` --> $DIR/privacy-enum-ctor.rs:39:20 | -39 | let _: Z = Z::Struct; +LL | let _: Z = Z::Struct; | ^^^^^^^^^ did you mean `Z::Struct { /* fields */ }`? error[E0423]: expected value, found enum `m::E` --> $DIR/privacy-enum-ctor.rs:51:16 | -51 | let _: E = m::E; +LL | let _: E = m::E; | ^^^- | | | did you mean `f`? @@ -40,21 +40,21 @@ error[E0423]: expected value, found enum `m::E` - `E::Unit` help: possible better candidates are found in other modules, you can import them into scope | -48 | use std::f32::consts::E; +LL | use std::f32::consts::E; | -48 | use std::f64::consts::E; +LL | use std::f64::consts::E; | error[E0423]: expected value, found struct variant `m::E::Struct` --> $DIR/privacy-enum-ctor.rs:55:16 | -55 | let _: E = m::E::Struct; +LL | let _: E = m::E::Struct; | ^^^^^^^^^^^^ did you mean `m::E::Struct { /* fields */ }`? error[E0423]: expected value, found enum `E` --> $DIR/privacy-enum-ctor.rs:59:16 | -59 | let _: E = E; +LL | let _: E = E; | ^ | = note: did you mean to use one of the following variants? @@ -63,31 +63,31 @@ error[E0423]: expected value, found enum `E` - `E::Unit` help: possible better candidates are found in other modules, you can import them into scope | -48 | use std::f32::consts::E; +LL | use std::f32::consts::E; | -48 | use std::f64::consts::E; +LL | use std::f64::consts::E; | error[E0423]: expected value, found struct variant `E::Struct` --> $DIR/privacy-enum-ctor.rs:63:16 | -63 | let _: E = E::Struct; +LL | let _: E = E::Struct; | ^^^^^^^^^ did you mean `E::Struct { /* fields */ }`? error[E0412]: cannot find type `Z` in this scope --> $DIR/privacy-enum-ctor.rs:67:12 | -67 | let _: Z = m::n::Z; +LL | let _: Z = m::n::Z; | ^ did you mean `E`? help: possible candidate is found in another module, you can import it into scope | -48 | use m::n::Z; +LL | use m::n::Z; | error[E0423]: expected value, found enum `m::n::Z` --> $DIR/privacy-enum-ctor.rs:67:16 | -67 | let _: Z = m::n::Z; +LL | let _: Z = m::n::Z; | ^^^^^^^ | = note: did you mean to use one of the following variants? @@ -98,67 +98,67 @@ error[E0423]: expected value, found enum `m::n::Z` error[E0412]: cannot find type `Z` in this scope --> $DIR/privacy-enum-ctor.rs:71:12 | -71 | let _: Z = m::n::Z::Fn; +LL | let _: Z = m::n::Z::Fn; | ^ did you mean `E`? help: possible candidate is found in another module, you can import it into scope | -48 | use m::n::Z; +LL | use m::n::Z; | error[E0412]: cannot find type `Z` in this scope --> $DIR/privacy-enum-ctor.rs:74:12 | -74 | let _: Z = m::n::Z::Struct; +LL | let _: Z = m::n::Z::Struct; | ^ did you mean `E`? help: possible candidate is found in another module, you can import it into scope | -48 | use m::n::Z; +LL | use m::n::Z; | error[E0423]: expected value, found struct variant `m::n::Z::Struct` --> $DIR/privacy-enum-ctor.rs:74:16 | -74 | let _: Z = m::n::Z::Struct; +LL | let _: Z = m::n::Z::Struct; | ^^^^^^^^^^^^^^^ did you mean `m::n::Z::Struct { /* fields */ }`? error[E0412]: cannot find type `Z` in this scope --> $DIR/privacy-enum-ctor.rs:78:12 | -78 | let _: Z = m::n::Z::Unit {}; +LL | let _: Z = m::n::Z::Unit {}; | ^ did you mean `E`? help: possible candidate is found in another module, you can import it into scope | -48 | use m::n::Z; +LL | use m::n::Z; | error[E0603]: enum `Z` is private --> $DIR/privacy-enum-ctor.rs:67:16 | -67 | let _: Z = m::n::Z; +LL | let _: Z = m::n::Z; | ^^^^^^^ error[E0603]: enum `Z` is private --> $DIR/privacy-enum-ctor.rs:71:16 | -71 | let _: Z = m::n::Z::Fn; +LL | let _: Z = m::n::Z::Fn; | ^^^^^^^^^^^ error[E0603]: enum `Z` is private --> $DIR/privacy-enum-ctor.rs:74:16 | -74 | let _: Z = m::n::Z::Struct; +LL | let _: Z = m::n::Z::Struct; | ^^^^^^^^^^^^^^^ error[E0603]: enum `Z` is private --> $DIR/privacy-enum-ctor.rs:78:16 | -78 | let _: Z = m::n::Z::Unit {}; +LL | let _: Z = m::n::Z::Unit {}; | ^^^^^^^^^^^^^ error[E0308]: mismatched types --> $DIR/privacy-enum-ctor.rs:37:20 | -37 | let _: Z = Z::Fn; +LL | let _: Z = Z::Fn; | ^^^^^ expected enum `m::n::Z`, found fn item | = note: expected type `m::n::Z` @@ -167,20 +167,20 @@ error[E0308]: mismatched types error[E0618]: expected function, found enum variant `Z::Unit` --> $DIR/privacy-enum-ctor.rs:41:17 | -26 | Unit, +LL | Unit, | ---- `Z::Unit` defined here ... -41 | let _ = Z::Unit(); +LL | let _ = Z::Unit(); | ^^^^^^^^^ not a function help: `Z::Unit` is a unit variant, you need to write it without the parenthesis | -41 | let _ = Z::Unit; +LL | let _ = Z::Unit; | ^^^^^^^ error[E0308]: mismatched types --> $DIR/privacy-enum-ctor.rs:53:16 | -53 | let _: E = m::E::Fn; +LL | let _: E = m::E::Fn; | ^^^^^^^^ expected enum `m::E`, found fn item | = note: expected type `m::E` @@ -189,20 +189,20 @@ error[E0308]: mismatched types error[E0618]: expected function, found enum variant `m::E::Unit` --> $DIR/privacy-enum-ctor.rs:57:16 | -17 | Unit, +LL | Unit, | ---- `m::E::Unit` defined here ... -57 | let _: E = m::E::Unit(); +LL | let _: E = m::E::Unit(); | ^^^^^^^^^^^^ not a function help: `m::E::Unit` is a unit variant, you need to write it without the parenthesis | -57 | let _: E = m::E::Unit; +LL | let _: E = m::E::Unit; | ^^^^^^^^^^ error[E0308]: mismatched types --> $DIR/privacy-enum-ctor.rs:61:16 | -61 | let _: E = E::Fn; +LL | let _: E = E::Fn; | ^^^^^ expected enum `m::E`, found fn item | = note: expected type `m::E` @@ -211,14 +211,14 @@ error[E0308]: mismatched types error[E0618]: expected function, found enum variant `E::Unit` --> $DIR/privacy-enum-ctor.rs:65:16 | -17 | Unit, +LL | Unit, | ---- `E::Unit` defined here ... -65 | let _: E = E::Unit(); +LL | let _: E = E::Unit(); | ^^^^^^^^^ not a function help: `E::Unit` is a unit variant, you need to write it without the parenthesis | -65 | let _: E = E::Unit; +LL | let _: E = E::Unit; | ^^^^^^^ error: aborting due to 23 previous errors diff --git a/src/test/ui/resolve/privacy-struct-ctor.stderr b/src/test/ui/resolve/privacy-struct-ctor.stderr index e97a4e4143cc3..4e5fd0f549ec6 100644 --- a/src/test/ui/resolve/privacy-struct-ctor.stderr +++ b/src/test/ui/resolve/privacy-struct-ctor.stderr @@ -1,76 +1,76 @@ error[E0423]: expected value, found struct `Z` --> $DIR/privacy-struct-ctor.rs:30:9 | -30 | Z; +LL | Z; | ^ | | | did you mean `S`? | constructor is not visible here due to private fields help: possible better candidate is found in another module, you can import it into scope | -25 | use m::n::Z; +LL | use m::n::Z; | error[E0423]: expected value, found struct `S` --> $DIR/privacy-struct-ctor.rs:43:5 | -43 | S; +LL | S; | ^ constructor is not visible here due to private fields help: possible better candidate is found in another module, you can import it into scope | -35 | use m::S; +LL | use m::S; | error[E0423]: expected value, found struct `S2` --> $DIR/privacy-struct-ctor.rs:48:5 | -48 | S2; +LL | S2; | ^^ did you mean `S2 { /* fields */ }`? error[E0423]: expected value, found struct `xcrate::S` --> $DIR/privacy-struct-ctor.rs:53:5 | -53 | xcrate::S; +LL | xcrate::S; | ^^^^^^^^^ constructor is not visible here due to private fields help: possible better candidate is found in another module, you can import it into scope | -35 | use m::S; +LL | use m::S; | error[E0603]: tuple struct `Z` is private --> $DIR/privacy-struct-ctor.rs:28:9 | -28 | n::Z; +LL | n::Z; | ^^^^ error[E0603]: tuple struct `S` is private --> $DIR/privacy-struct-ctor.rs:39:5 | -39 | m::S; +LL | m::S; | ^^^^ error[E0603]: tuple struct `S` is private --> $DIR/privacy-struct-ctor.rs:41:16 | -41 | let _: S = m::S(2); +LL | let _: S = m::S(2); | ^^^^ error[E0603]: tuple struct `Z` is private --> $DIR/privacy-struct-ctor.rs:45:5 | -45 | m::n::Z; +LL | m::n::Z; | ^^^^^^^ error[E0603]: tuple struct `S` is private --> $DIR/privacy-struct-ctor.rs:51:5 | -51 | xcrate::m::S; +LL | xcrate::m::S; | ^^^^^^^^^^^^ error[E0603]: tuple struct `Z` is private --> $DIR/privacy-struct-ctor.rs:55:5 | -55 | xcrate::m::n::Z; +LL | xcrate::m::n::Z; | ^^^^^^^^^^^^^^^ error: aborting due to 10 previous errors diff --git a/src/test/ui/resolve/resolve-assoc-suggestions.stderr b/src/test/ui/resolve/resolve-assoc-suggestions.stderr index 3a6eeda833a7b..fd39b162c654e 100644 --- a/src/test/ui/resolve/resolve-assoc-suggestions.stderr +++ b/src/test/ui/resolve/resolve-assoc-suggestions.stderr @@ -1,55 +1,55 @@ error[E0412]: cannot find type `field` in this scope --> $DIR/resolve-assoc-suggestions.rs:26:16 | -26 | let _: field; +LL | let _: field; | ^^^^^ not found in this scope error[E0531]: cannot find tuple struct/variant `field` in this scope --> $DIR/resolve-assoc-suggestions.rs:28:13 | -28 | let field(..); +LL | let field(..); | ^^^^^ not found in this scope error[E0425]: cannot find value `field` in this scope --> $DIR/resolve-assoc-suggestions.rs:30:9 | -30 | field; +LL | field; | ^^^^^ help: try: `self.field` error[E0412]: cannot find type `Type` in this scope --> $DIR/resolve-assoc-suggestions.rs:33:16 | -33 | let _: Type; +LL | let _: Type; | ^^^^ help: try: `Self::Type` error[E0531]: cannot find tuple struct/variant `Type` in this scope --> $DIR/resolve-assoc-suggestions.rs:35:13 | -35 | let Type(..); +LL | let Type(..); | ^^^^ not found in this scope error[E0425]: cannot find value `Type` in this scope --> $DIR/resolve-assoc-suggestions.rs:37:9 | -37 | Type; +LL | Type; | ^^^^ not found in this scope error[E0412]: cannot find type `method` in this scope --> $DIR/resolve-assoc-suggestions.rs:40:16 | -40 | let _: method; +LL | let _: method; | ^^^^^^ not found in this scope error[E0531]: cannot find tuple struct/variant `method` in this scope --> $DIR/resolve-assoc-suggestions.rs:42:13 | -42 | let method(..); +LL | let method(..); | ^^^^^^ not found in this scope error[E0425]: cannot find value `method` in this scope --> $DIR/resolve-assoc-suggestions.rs:44:9 | -44 | method; +LL | method; | ^^^^^^ help: try: `self.method` error: aborting due to 9 previous errors diff --git a/src/test/ui/resolve/resolve-hint-macro.stderr b/src/test/ui/resolve/resolve-hint-macro.stderr index ffb3f8484306f..09efe49e7ef44 100644 --- a/src/test/ui/resolve/resolve-hint-macro.stderr +++ b/src/test/ui/resolve/resolve-hint-macro.stderr @@ -1,7 +1,7 @@ error[E0423]: expected function, found macro `assert` --> $DIR/resolve-hint-macro.rs:12:5 | -12 | assert(true); +LL | assert(true); | ^^^^^^ did you mean `assert!(...)`? error: aborting due to previous error diff --git a/src/test/ui/resolve/resolve-speculative-adjustment.stderr b/src/test/ui/resolve/resolve-speculative-adjustment.stderr index 45512b26705d5..2831d62eb97d1 100644 --- a/src/test/ui/resolve/resolve-speculative-adjustment.stderr +++ b/src/test/ui/resolve/resolve-speculative-adjustment.stderr @@ -1,25 +1,25 @@ error[E0425]: cannot find value `field` in this scope --> $DIR/resolve-speculative-adjustment.rs:27:13 | -27 | field; +LL | field; | ^^^^^ not found in this scope error[E0425]: cannot find function `method` in this scope --> $DIR/resolve-speculative-adjustment.rs:29:13 | -29 | method(); +LL | method(); | ^^^^^^ not found in this scope error[E0425]: cannot find value `field` in this scope --> $DIR/resolve-speculative-adjustment.rs:33:9 | -33 | field; +LL | field; | ^^^^^ help: try: `self.field` error[E0425]: cannot find function `method` in this scope --> $DIR/resolve-speculative-adjustment.rs:35:9 | -35 | method(); +LL | method(); | ^^^^^^ help: try: `self.method` error: aborting due to 4 previous errors diff --git a/src/test/ui/resolve/suggest-path-instead-of-mod-dot-item.stderr b/src/test/ui/resolve/suggest-path-instead-of-mod-dot-item.stderr index 861026ade182e..9f1c56baa7d76 100644 --- a/src/test/ui/resolve/suggest-path-instead-of-mod-dot-item.stderr +++ b/src/test/ui/resolve/suggest-path-instead-of-mod-dot-item.stderr @@ -1,7 +1,7 @@ error[E0423]: expected value, found module `a` --> $DIR/suggest-path-instead-of-mod-dot-item.rs:27:5 | -27 | a.I +LL | a.I | ^-- | | | did you mean `a::I`? @@ -9,7 +9,7 @@ error[E0423]: expected value, found module `a` error[E0423]: expected value, found module `a` --> $DIR/suggest-path-instead-of-mod-dot-item.rs:32:5 | -32 | a.g() +LL | a.g() | ^---- | | | did you mean `a::g(...)`? @@ -17,7 +17,7 @@ error[E0423]: expected value, found module `a` error[E0423]: expected value, found module `a` --> $DIR/suggest-path-instead-of-mod-dot-item.rs:37:5 | -37 | a.b.J +LL | a.b.J | ^-- | | | did you mean `a::b`? @@ -25,7 +25,7 @@ error[E0423]: expected value, found module `a` error[E0423]: expected value, found module `a::b` --> $DIR/suggest-path-instead-of-mod-dot-item.rs:42:5 | -42 | a::b.J +LL | a::b.J | ^^^--- | | | | | did you mean `I`? @@ -34,7 +34,7 @@ error[E0423]: expected value, found module `a::b` error[E0423]: expected value, found module `a` --> $DIR/suggest-path-instead-of-mod-dot-item.rs:47:5 | -47 | a.b.f(); +LL | a.b.f(); | ^-- | | | did you mean `a::b`? @@ -42,7 +42,7 @@ error[E0423]: expected value, found module `a` error[E0423]: expected value, found module `a::b` --> $DIR/suggest-path-instead-of-mod-dot-item.rs:50:12 | -50 | v.push(a::b); +LL | v.push(a::b); | ^^^- | | | did you mean `I`? @@ -50,7 +50,7 @@ error[E0423]: expected value, found module `a::b` error[E0423]: expected value, found module `a::b` --> $DIR/suggest-path-instead-of-mod-dot-item.rs:55:5 | -55 | a::b.f() +LL | a::b.f() | ^^^----- | | | | | did you mean `I`? @@ -59,7 +59,7 @@ error[E0423]: expected value, found module `a::b` error[E0423]: expected value, found module `a::b` --> $DIR/suggest-path-instead-of-mod-dot-item.rs:60:5 | -60 | a::b +LL | a::b | ^^^- | | | did you mean `I`? @@ -67,7 +67,7 @@ error[E0423]: expected value, found module `a::b` error[E0423]: expected function, found module `a::b` --> $DIR/suggest-path-instead-of-mod-dot-item.rs:65:5 | -65 | a::b() +LL | a::b() | ^^^- | | | did you mean `I`? diff --git a/src/test/ui/resolve/token-error-correct-2.stderr b/src/test/ui/resolve/token-error-correct-2.stderr index 00bd5dba8d994..2a598c3485314 100644 --- a/src/test/ui/resolve/token-error-correct-2.stderr +++ b/src/test/ui/resolve/token-error-correct-2.stderr @@ -1,19 +1,19 @@ error: incorrect close delimiter: `)` --> $DIR/token-error-correct-2.rs:16:5 | -16 | ) //~ ERROR: incorrect close delimiter: `)` +LL | ) //~ ERROR: incorrect close delimiter: `)` | ^ | note: unclosed delimiter --> $DIR/token-error-correct-2.rs:14:12 | -14 | if foo { +LL | if foo { | ^ error[E0425]: cannot find value `foo` in this scope --> $DIR/token-error-correct-2.rs:14:8 | -14 | if foo { +LL | if foo { | ^^^ not found in this scope error: aborting due to 2 previous errors diff --git a/src/test/ui/resolve/token-error-correct-3.stderr b/src/test/ui/resolve/token-error-correct-3.stderr index 33cf1d87817f6..58366c40bf636 100644 --- a/src/test/ui/resolve/token-error-correct-3.stderr +++ b/src/test/ui/resolve/token-error-correct-3.stderr @@ -1,40 +1,40 @@ error: incorrect close delimiter: `}` --> $DIR/token-error-correct-3.rs:30:9 | -30 | } else { //~ ERROR: incorrect close delimiter: `}` +LL | } else { //~ ERROR: incorrect close delimiter: `}` | ^ | note: unclosed delimiter --> $DIR/token-error-correct-3.rs:24:21 | -24 | callback(path.as_ref(); //~ ERROR expected one of +LL | callback(path.as_ref(); //~ ERROR expected one of | ^ error: expected one of `,`, `.`, `?`, or an operator, found `;` --> $DIR/token-error-correct-3.rs:24:35 | -24 | callback(path.as_ref(); //~ ERROR expected one of +LL | callback(path.as_ref(); //~ ERROR expected one of | ^ expected one of `,`, `.`, `?`, or an operator here error: expected one of `.`, `;`, `?`, `}`, or an operator, found `)` --> $DIR/token-error-correct-3.rs:30:9 | -25 | fs::create_dir_all(path.as_ref()).map(|()| true) //~ ERROR: mismatched types +LL | fs::create_dir_all(path.as_ref()).map(|()| true) //~ ERROR: mismatched types | - expected one of `.`, `;`, `?`, `}`, or an operator here ... -30 | } else { //~ ERROR: incorrect close delimiter: `}` +LL | } else { //~ ERROR: incorrect close delimiter: `}` | ^ unexpected token error[E0425]: cannot find function `is_directory` in this scope --> $DIR/token-error-correct-3.rs:23:13 | -23 | if !is_directory(path.as_ref()) { //~ ERROR: cannot find function `is_directory` +LL | if !is_directory(path.as_ref()) { //~ ERROR: cannot find function `is_directory` | ^^^^^^^^^^^^ not found in this scope error[E0308]: mismatched types --> $DIR/token-error-correct-3.rs:25:13 | -25 | fs::create_dir_all(path.as_ref()).map(|()| true) //~ ERROR: mismatched types +LL | fs::create_dir_all(path.as_ref()).map(|()| true) //~ ERROR: mismatched types | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^- help: try adding a semicolon: `;` | | | expected (), found enum `std::result::Result` diff --git a/src/test/ui/resolve/token-error-correct.stderr b/src/test/ui/resolve/token-error-correct.stderr index e26f0e85aa676..344c288b596e0 100644 --- a/src/test/ui/resolve/token-error-correct.stderr +++ b/src/test/ui/resolve/token-error-correct.stderr @@ -1,31 +1,31 @@ error: incorrect close delimiter: `}` --> $DIR/token-error-correct.rs:16:1 | -16 | } +LL | } | ^ | note: unclosed delimiter --> $DIR/token-error-correct.rs:14:12 | -14 | foo(bar(; +LL | foo(bar(; | ^ error: incorrect close delimiter: `}` --> $DIR/token-error-correct.rs:16:1 | -16 | } +LL | } | ^ | note: unclosed delimiter --> $DIR/token-error-correct.rs:14:8 | -14 | foo(bar(; +LL | foo(bar(; | ^ error: expected expression, found `;` --> $DIR/token-error-correct.rs:14:13 | -14 | foo(bar(; +LL | foo(bar(; | ^ error: aborting due to 3 previous errors diff --git a/src/test/ui/resolve/tuple-struct-alias.stderr b/src/test/ui/resolve/tuple-struct-alias.stderr index 843d7c20ffd2c..5e42e95d1f271 100644 --- a/src/test/ui/resolve/tuple-struct-alias.stderr +++ b/src/test/ui/resolve/tuple-struct-alias.stderr @@ -1,7 +1,7 @@ error[E0423]: expected function, found self type `Self` --> $DIR/tuple-struct-alias.rs:16:17 | -16 | let s = Self(0, 1); //~ ERROR expected function +LL | let s = Self(0, 1); //~ ERROR expected function | ^^^^ not a function | = note: can't use `Self` as a constructor, you must use the implemented struct @@ -9,7 +9,7 @@ error[E0423]: expected function, found self type `Self` error[E0532]: expected tuple struct/variant, found self type `Self` --> $DIR/tuple-struct-alias.rs:18:13 | -18 | Self(..) => {} //~ ERROR expected tuple struct/variant +LL | Self(..) => {} //~ ERROR expected tuple struct/variant | ^^^^ not a tuple struct/variant | = note: can't use `Self` as a constructor, you must use the implemented struct @@ -17,7 +17,7 @@ error[E0532]: expected tuple struct/variant, found self type `Self` error[E0423]: expected function, found type alias `A` --> $DIR/tuple-struct-alias.rs:24:13 | -24 | let s = A(0, 1); //~ ERROR expected function +LL | let s = A(0, 1); //~ ERROR expected function | ^ did you mean `S`? | = note: can't use a type alias as a constructor @@ -25,7 +25,7 @@ error[E0423]: expected function, found type alias `A` error[E0532]: expected tuple struct/variant, found type alias `A` --> $DIR/tuple-struct-alias.rs:26:9 | -26 | A(..) => {} //~ ERROR expected tuple struct/variant +LL | A(..) => {} //~ ERROR expected tuple struct/variant | ^ did you mean `S`? | = note: can't use a type alias as a constructor diff --git a/src/test/ui/resolve/unboxed-closure-sugar-nonexistent-trait.stderr b/src/test/ui/resolve/unboxed-closure-sugar-nonexistent-trait.stderr index eaee35451ec93..6e7bd28d16fc3 100644 --- a/src/test/ui/resolve/unboxed-closure-sugar-nonexistent-trait.stderr +++ b/src/test/ui/resolve/unboxed-closure-sugar-nonexistent-trait.stderr @@ -1,13 +1,13 @@ error[E0405]: cannot find trait `Nonexist` in this scope --> $DIR/unboxed-closure-sugar-nonexistent-trait.rs:11:8 | -11 | fn f isize>(x: F) {} +LL | fn f isize>(x: F) {} | ^^^^^^^^ not found in this scope error[E0404]: expected trait, found type alias `Typedef` --> $DIR/unboxed-closure-sugar-nonexistent-trait.rs:16:8 | -16 | fn g isize>(x: F) {} +LL | fn g isize>(x: F) {} | ^^^^^^^^^^^^^^^^^^^^^^^ type aliases cannot be used for traits error: cannot continue compilation due to previous error diff --git a/src/test/ui/resolve/unresolved_static_type_field.stderr b/src/test/ui/resolve/unresolved_static_type_field.stderr index 014e03eb252be..ee771da53fcf9 100644 --- a/src/test/ui/resolve/unresolved_static_type_field.stderr +++ b/src/test/ui/resolve/unresolved_static_type_field.stderr @@ -1,7 +1,7 @@ error[E0425]: cannot find value `cx` in this scope --> $DIR/unresolved_static_type_field.rs:19:11 | -19 | f(cx); +LL | f(cx); | ^^ | | | `self` value is only available in methods with `self` parameter diff --git a/src/test/ui/resolve/use_suggestion_placement.stderr b/src/test/ui/resolve/use_suggestion_placement.stderr index 3607aa5e9abd9..b708acfb2dbed 100644 --- a/src/test/ui/resolve/use_suggestion_placement.stderr +++ b/src/test/ui/resolve/use_suggestion_placement.stderr @@ -1,33 +1,33 @@ error[E0412]: cannot find type `Path` in this scope --> $DIR/use_suggestion_placement.rs:27:16 | -27 | type Bar = Path; //~ ERROR cannot find +LL | type Bar = Path; //~ ERROR cannot find | ^^^^ not found in this scope help: possible candidate is found in another module, you can import it into scope | -23 | use std::path::Path; +LL | use std::path::Path; | error[E0425]: cannot find value `A` in this scope --> $DIR/use_suggestion_placement.rs:32:13 | -32 | let _ = A; //~ ERROR cannot find +LL | let _ = A; //~ ERROR cannot find | ^ not found in this scope help: possible candidate is found in another module, you can import it into scope | -13 | use m::A; +LL | use m::A; | error[E0412]: cannot find type `HashMap` in this scope --> $DIR/use_suggestion_placement.rs:37:23 | -37 | type Dict = HashMap; //~ ERROR cannot find +LL | type Dict = HashMap; //~ ERROR cannot find | ^^^^^^^ not found in this scope help: possible candidates are found in other modules, you can import them into scope | -13 | use std::collections::HashMap; +LL | use std::collections::HashMap; | -13 | use std::collections::hash_map::HashMap; +LL | use std::collections::hash_map::HashMap; | error: aborting due to 3 previous errors diff --git a/src/test/ui/rfc-2005-default-binding-mode/const.stderr b/src/test/ui/rfc-2005-default-binding-mode/const.stderr index afcbf76c1a44f..5cb15a0507d99 100644 --- a/src/test/ui/rfc-2005-default-binding-mode/const.stderr +++ b/src/test/ui/rfc-2005-default-binding-mode/const.stderr @@ -1,7 +1,7 @@ error[E0308]: mismatched types --> $DIR/const.rs:26:9 | -26 | FOO => {}, //~ ERROR mismatched types +LL | FOO => {}, //~ ERROR mismatched types | ^^^ expected &Foo, found struct `Foo` | = note: expected type `&Foo` diff --git a/src/test/ui/rfc-2005-default-binding-mode/enum.stderr b/src/test/ui/rfc-2005-default-binding-mode/enum.stderr index 052ab5892d254..51c687a126294 100644 --- a/src/test/ui/rfc-2005-default-binding-mode/enum.stderr +++ b/src/test/ui/rfc-2005-default-binding-mode/enum.stderr @@ -1,25 +1,25 @@ error[E0594]: cannot assign to immutable borrowed content `*x` --> $DIR/enum.rs:21:5 | -20 | let Wrap(x) = &Wrap(3); +LL | let Wrap(x) = &Wrap(3); | - consider changing this to `x` -21 | *x += 1; //~ ERROR cannot assign to immutable +LL | *x += 1; //~ ERROR cannot assign to immutable | ^^^^^^^ cannot borrow as mutable error[E0594]: cannot assign to immutable borrowed content `*x` --> $DIR/enum.rs:25:9 | -24 | if let Some(x) = &Some(3) { +LL | if let Some(x) = &Some(3) { | - consider changing this to `x` -25 | *x += 1; //~ ERROR cannot assign to immutable +LL | *x += 1; //~ ERROR cannot assign to immutable | ^^^^^^^ cannot borrow as mutable error[E0594]: cannot assign to immutable borrowed content `*x` --> $DIR/enum.rs:31:9 | -30 | while let Some(x) = &Some(3) { +LL | while let Some(x) = &Some(3) { | - consider changing this to `x` -31 | *x += 1; //~ ERROR cannot assign to immutable +LL | *x += 1; //~ ERROR cannot assign to immutable | ^^^^^^^ cannot borrow as mutable error: aborting due to 3 previous errors diff --git a/src/test/ui/rfc-2005-default-binding-mode/explicit-mut.stderr b/src/test/ui/rfc-2005-default-binding-mode/explicit-mut.stderr index c1c59fe678525..aa6b25738eb06 100644 --- a/src/test/ui/rfc-2005-default-binding-mode/explicit-mut.stderr +++ b/src/test/ui/rfc-2005-default-binding-mode/explicit-mut.stderr @@ -1,25 +1,25 @@ error[E0594]: cannot assign to immutable borrowed content `*n` --> $DIR/explicit-mut.rs:19:13 | -18 | Some(n) => { +LL | Some(n) => { | - consider changing this to `n` -19 | *n += 1; //~ ERROR cannot assign to immutable +LL | *n += 1; //~ ERROR cannot assign to immutable | ^^^^^^^ cannot borrow as mutable error[E0594]: cannot assign to immutable borrowed content `*n` --> $DIR/explicit-mut.rs:27:13 | -26 | Some(n) => { +LL | Some(n) => { | - consider changing this to `n` -27 | *n += 1; //~ ERROR cannot assign to immutable +LL | *n += 1; //~ ERROR cannot assign to immutable | ^^^^^^^ cannot borrow as mutable error[E0594]: cannot assign to immutable borrowed content `*n` --> $DIR/explicit-mut.rs:35:13 | -34 | Some(n) => { +LL | Some(n) => { | - consider changing this to `n` -35 | *n += 1; //~ ERROR cannot assign to immutable +LL | *n += 1; //~ ERROR cannot assign to immutable | ^^^^^^^ cannot borrow as mutable error: aborting due to 3 previous errors diff --git a/src/test/ui/rfc-2005-default-binding-mode/for.stderr b/src/test/ui/rfc-2005-default-binding-mode/for.stderr index 795dffb722a15..7ae773d2ed22d 100644 --- a/src/test/ui/rfc-2005-default-binding-mode/for.stderr +++ b/src/test/ui/rfc-2005-default-binding-mode/for.stderr @@ -1,7 +1,7 @@ error[E0009]: cannot bind by-move and by-ref in the same pattern --> $DIR/for.rs:18:13 | -18 | for (n, mut m) in &tups { +LL | for (n, mut m) in &tups { | - ^^^^^ by-move pattern here | | | both by-ref and by-move used diff --git a/src/test/ui/rfc-2005-default-binding-mode/issue-44912-or.stderr b/src/test/ui/rfc-2005-default-binding-mode/issue-44912-or.stderr index 7430dc2c87f95..95553b4f14c81 100644 --- a/src/test/ui/rfc-2005-default-binding-mode/issue-44912-or.stderr +++ b/src/test/ui/rfc-2005-default-binding-mode/issue-44912-or.stderr @@ -1,7 +1,7 @@ error[E0409]: variable `x` is bound in inconsistent ways within the same match arm --> $DIR/issue-44912-or.rs:18:35 | -18 | Some((x, 3)) | &Some((ref x, 5)) => x, +LL | Some((x, 3)) | &Some((ref x, 5)) => x, | - first binding ^ bound in different ways error: aborting due to previous error diff --git a/src/test/ui/rfc-2005-default-binding-mode/lit.stderr b/src/test/ui/rfc-2005-default-binding-mode/lit.stderr index f5ed7ee7181dd..eb0991be953fd 100644 --- a/src/test/ui/rfc-2005-default-binding-mode/lit.stderr +++ b/src/test/ui/rfc-2005-default-binding-mode/lit.stderr @@ -1,7 +1,7 @@ error[E0308]: mismatched types --> $DIR/lit.rs:19:13 | -19 | "abc" => true, //~ ERROR mismatched types +LL | "abc" => true, //~ ERROR mismatched types | ^^^^^ expected &str, found str | = note: expected type `&&str` @@ -10,7 +10,7 @@ error[E0308]: mismatched types error[E0308]: mismatched types --> $DIR/lit.rs:28:9 | -28 | b"abc" => true, //~ ERROR mismatched types +LL | b"abc" => true, //~ ERROR mismatched types | ^^^^^^ expected &[u8], found array of 3 elements | = note: expected type `&&[u8]` diff --git a/src/test/ui/rfc-2005-default-binding-mode/no-double-error.stderr b/src/test/ui/rfc-2005-default-binding-mode/no-double-error.stderr index 830422875886b..571c2d60be2d6 100644 --- a/src/test/ui/rfc-2005-default-binding-mode/no-double-error.stderr +++ b/src/test/ui/rfc-2005-default-binding-mode/no-double-error.stderr @@ -1,7 +1,7 @@ error[E0599]: no associated item named `XXX` found for type `u32` in the current scope --> $DIR/no-double-error.rs:18:9 | -18 | u32::XXX => { } //~ ERROR no associated item named +LL | u32::XXX => { } //~ ERROR no associated item named | ^^^^^^^^ associated item not found in `u32` error: aborting due to previous error diff --git a/src/test/ui/rfc-2005-default-binding-mode/slice.stderr b/src/test/ui/rfc-2005-default-binding-mode/slice.stderr index ec2225c9f9236..47e6cd4e8d41a 100644 --- a/src/test/ui/rfc-2005-default-binding-mode/slice.stderr +++ b/src/test/ui/rfc-2005-default-binding-mode/slice.stderr @@ -1,7 +1,7 @@ error[E0004]: non-exhaustive patterns: `&[]` not covered --> $DIR/slice.rs:17:11 | -17 | match sl { //~ ERROR non-exhaustive patterns +LL | match sl { //~ ERROR non-exhaustive patterns | ^^ pattern `&[]` not covered error: aborting due to previous error 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 8aa17adbcb3ab..93002074223ca 100644 --- a/src/test/ui/rfc-2005-default-binding-mode/suggestion.stderr +++ b/src/test/ui/rfc-2005-default-binding-mode/suggestion.stderr @@ -1,7 +1,7 @@ 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 +LL | if let Some(y) = &Some(22) { //~ ERROR non-reference pattern | ^^^^^^^ help: consider using a reference: `&Some(y)` | = help: add #![feature(match_default_bindings)] to the crate attributes to enable diff --git a/src/test/ui/rfc1598-generic-associated-types/construct_with_other_type.stderr b/src/test/ui/rfc1598-generic-associated-types/construct_with_other_type.stderr index e74592fa9ff98..9d3fa949cf5b2 100644 --- a/src/test/ui/rfc1598-generic-associated-types/construct_with_other_type.stderr +++ b/src/test/ui/rfc1598-generic-associated-types/construct_with_other_type.stderr @@ -1,7 +1,7 @@ error[E0110]: lifetime parameters are not allowed on this type --> $DIR/construct_with_other_type.rs:25:37 | -25 | type Quux<'a> = ::Bar<'a, 'static>; +LL | type Quux<'a> = ::Bar<'a, 'static>; | ^^ lifetime parameter not allowed on this type error: aborting due to previous error diff --git a/src/test/ui/rfc1598-generic-associated-types/empty_generics.stderr b/src/test/ui/rfc1598-generic-associated-types/empty_generics.stderr index de0c1e310bcb8..aff3044e9a14d 100644 --- a/src/test/ui/rfc1598-generic-associated-types/empty_generics.stderr +++ b/src/test/ui/rfc1598-generic-associated-types/empty_generics.stderr @@ -1,7 +1,7 @@ error: expected one of `>`, identifier, or lifetime, found `,` --> $DIR/empty_generics.rs:14:14 | -14 | type Bar<,>; +LL | type Bar<,>; | ^ expected one of `>`, identifier, or lifetime here error: aborting due to previous error diff --git a/src/test/ui/rfc1598-generic-associated-types/generic_associated_type_undeclared_lifetimes.stderr b/src/test/ui/rfc1598-generic-associated-types/generic_associated_type_undeclared_lifetimes.stderr index 587be7113cec7..1edacc9dcbb53 100644 --- a/src/test/ui/rfc1598-generic-associated-types/generic_associated_type_undeclared_lifetimes.stderr +++ b/src/test/ui/rfc1598-generic-associated-types/generic_associated_type_undeclared_lifetimes.stderr @@ -1,31 +1,31 @@ error[E0261]: use of undeclared lifetime name `'b` --> $DIR/generic_associated_type_undeclared_lifetimes.rs:22:37 | -22 | + Deref>; +LL | + Deref>; | ^^ undeclared lifetime error[E0261]: use of undeclared lifetime name `'undeclared` --> $DIR/generic_associated_type_undeclared_lifetimes.rs:26:41 | -26 | fn iter<'a>(&'a self) -> Self::Iter<'undeclared>; +LL | fn iter<'a>(&'a self) -> Self::Iter<'undeclared>; | ^^^^^^^^^^^ undeclared lifetime error[E0110]: lifetime parameters are not allowed on this type --> $DIR/generic_associated_type_undeclared_lifetimes.rs:20:47 | -20 | type Iter<'a>: Iterator> +LL | type Iter<'a>: Iterator> | ^^ lifetime parameter not allowed on this type error[E0110]: lifetime parameters are not allowed on this type --> $DIR/generic_associated_type_undeclared_lifetimes.rs:22:37 | -22 | + Deref>; +LL | + Deref>; | ^^ lifetime parameter not allowed on this type error[E0110]: lifetime parameters are not allowed on this type --> $DIR/generic_associated_type_undeclared_lifetimes.rs:26:41 | -26 | fn iter<'a>(&'a self) -> Self::Iter<'undeclared>; +LL | fn iter<'a>(&'a self) -> Self::Iter<'undeclared>; | ^^^^^^^^^^^ lifetime parameter not allowed on this type error: aborting due to 5 previous errors diff --git a/src/test/ui/rfc1598-generic-associated-types/iterable.stderr b/src/test/ui/rfc1598-generic-associated-types/iterable.stderr index d12ca5e5d4ef7..8584e71d3fcac 100644 --- a/src/test/ui/rfc1598-generic-associated-types/iterable.stderr +++ b/src/test/ui/rfc1598-generic-associated-types/iterable.stderr @@ -1,19 +1,19 @@ error[E0110]: lifetime parameters are not allowed on this type --> $DIR/iterable.rs:20:47 | -20 | type Iter<'a>: Iterator>; +LL | type Iter<'a>: Iterator>; | ^^ lifetime parameter not allowed on this type error[E0110]: lifetime parameters are not allowed on this type --> $DIR/iterable.rs:25:48 | -25 | type Iter2<'a>: Deref as Iterator>::Item>; +LL | type Iter2<'a>: Deref as Iterator>::Item>; | ^^ lifetime parameter not allowed on this type error[E0110]: lifetime parameters are not allowed on this type --> $DIR/iterable.rs:28:41 | -28 | fn iter<'a>(&'a self) -> Self::Iter<'a>; +LL | fn iter<'a>(&'a self) -> Self::Iter<'a>; | ^^ lifetime parameter not allowed on this type error: aborting due to 3 previous errors diff --git a/src/test/ui/rfc1598-generic-associated-types/pointer_family.stderr b/src/test/ui/rfc1598-generic-associated-types/pointer_family.stderr index cc7f06f3b86d5..10790fd0e7138 100644 --- a/src/test/ui/rfc1598-generic-associated-types/pointer_family.stderr +++ b/src/test/ui/rfc1598-generic-associated-types/pointer_family.stderr @@ -1,25 +1,25 @@ error[E0109]: type parameters are not allowed on this type --> $DIR/pointer_family.rs:46:21 | -46 | bar: P::Pointer, +LL | bar: P::Pointer, | ^^^^^^ type parameter not allowed error[E0109]: type parameters are not allowed on this type --> $DIR/pointer_family.rs:21:42 | -21 | fn new(value: T) -> Self::Pointer; +LL | fn new(value: T) -> Self::Pointer; | ^ type parameter not allowed error[E0109]: type parameters are not allowed on this type --> $DIR/pointer_family.rs:29:42 | -29 | fn new(value: T) -> Self::Pointer { +LL | fn new(value: T) -> Self::Pointer { | ^ type parameter not allowed error[E0109]: type parameters are not allowed on this type --> $DIR/pointer_family.rs:39:42 | -39 | fn new(value: T) -> Self::Pointer { +LL | fn new(value: T) -> Self::Pointer { | ^ type parameter not allowed error: aborting due to 4 previous errors diff --git a/src/test/ui/rfc1598-generic-associated-types/streaming_iterator.stderr b/src/test/ui/rfc1598-generic-associated-types/streaming_iterator.stderr index b1908d022ed06..ccf32b9dbcf6e 100644 --- a/src/test/ui/rfc1598-generic-associated-types/streaming_iterator.stderr +++ b/src/test/ui/rfc1598-generic-associated-types/streaming_iterator.stderr @@ -1,19 +1,19 @@ error[E0110]: lifetime parameters are not allowed on this type --> $DIR/streaming_iterator.rs:27:41 | -27 | bar: ::Item<'static>, +LL | bar: ::Item<'static>, | ^^^^^^^ lifetime parameter not allowed on this type error[E0110]: lifetime parameters are not allowed on this type --> $DIR/streaming_iterator.rs:35:64 | -35 | fn foo(iter: T) where T: StreamingIterator, for<'a> T::Item<'a>: Display { /* ... */ } +LL | fn foo(iter: T) where T: StreamingIterator, for<'a> T::Item<'a>: Display { /* ... */ } | ^^ lifetime parameter not allowed on this type error[E0110]: lifetime parameters are not allowed on this type --> $DIR/streaming_iterator.rs:21:48 | -21 | fn next<'a>(&'a self) -> Option>; +LL | fn next<'a>(&'a self) -> Option>; | ^^ lifetime parameter not allowed on this type error: aborting due to 3 previous errors diff --git a/src/test/ui/rfc_1940-must_use_on_functions/fn_must_use.stderr b/src/test/ui/rfc_1940-must_use_on_functions/fn_must_use.stderr index 92d1eeaf15524..d0a8bb525b617 100644 --- a/src/test/ui/rfc_1940-must_use_on_functions/fn_must_use.stderr +++ b/src/test/ui/rfc_1940-must_use_on_functions/fn_must_use.stderr @@ -1,48 +1,48 @@ warning: unused return value of `need_to_use_this_value` which must be used: it's important --> $DIR/fn_must_use.rs:61:5 | -61 | need_to_use_this_value(); //~ WARN unused return value +LL | need_to_use_this_value(); //~ WARN unused return value | ^^^^^^^^^^^^^^^^^^^^^^^^^ | note: lint level defined here --> $DIR/fn_must_use.rs:14:9 | -14 | #![warn(unused_must_use)] +LL | #![warn(unused_must_use)] | ^^^^^^^^^^^^^^^ warning: unused return value of `MyStruct::need_to_use_this_method_value` which must be used --> $DIR/fn_must_use.rs:66:5 | -66 | m.need_to_use_this_method_value(); //~ WARN unused return value +LL | m.need_to_use_this_method_value(); //~ WARN unused return value | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ warning: unused return value of `EvenNature::is_even` which must be used: no side effects --> $DIR/fn_must_use.rs:67:5 | -67 | m.is_even(); // trait method! +LL | m.is_even(); // trait method! | ^^^^^^^^^^^^ warning: unused return value of `std::cmp::PartialEq::eq` which must be used --> $DIR/fn_must_use.rs:73:5 | -73 | 2.eq(&3); //~ WARN unused return value +LL | 2.eq(&3); //~ WARN unused return value | ^^^^^^^^^ warning: unused return value of `std::cmp::PartialEq::eq` which must be used --> $DIR/fn_must_use.rs:74:5 | -74 | m.eq(&n); //~ WARN unused return value +LL | m.eq(&n); //~ WARN unused return value | ^^^^^^^^^ warning: unused comparison which must be used --> $DIR/fn_must_use.rs:77:5 | -77 | 2 == 3; //~ WARN unused comparison +LL | 2 == 3; //~ WARN unused comparison | ^^^^^^ warning: unused comparison which must be used --> $DIR/fn_must_use.rs:78:5 | -78 | m == n; //~ WARN unused comparison +LL | m == n; //~ WARN unused comparison | ^^^^^^ diff --git a/src/test/ui/self-impl.stderr b/src/test/ui/self-impl.stderr index e1be5c18a6870..4a0993100cfbd 100644 --- a/src/test/ui/self-impl.stderr +++ b/src/test/ui/self-impl.stderr @@ -1,7 +1,7 @@ error[E0223]: ambiguous associated type --> $DIR/self-impl.rs:33:16 | -33 | let _: ::Baz = true; +LL | let _: ::Baz = true; | ^^^^^^^^^^^ ambiguous associated type | = note: specify the type using the syntax `::Baz` @@ -9,7 +9,7 @@ error[E0223]: ambiguous associated type error[E0223]: ambiguous associated type --> $DIR/self-impl.rs:35:16 | -35 | let _: Self::Baz = true; +LL | let _: Self::Baz = true; | ^^^^^^^^^ ambiguous associated type | = note: specify the type using the syntax `::Baz` diff --git a/src/test/ui/shadowed-lifetime.stderr b/src/test/ui/shadowed-lifetime.stderr index 8eaa3e595658a..66283f49d4558 100644 --- a/src/test/ui/shadowed-lifetime.stderr +++ b/src/test/ui/shadowed-lifetime.stderr @@ -1,17 +1,17 @@ error[E0496]: lifetime name `'a` shadows a lifetime name that is already in scope --> $DIR/shadowed-lifetime.rs:16:25 | -15 | impl<'a> Foo<'a> { +LL | impl<'a> Foo<'a> { | -- first declared here -16 | fn shadow_in_method<'a>(&'a self) -> &'a isize { +LL | fn shadow_in_method<'a>(&'a self) -> &'a isize { | ^^ lifetime 'a already in scope error[E0496]: lifetime name `'b` shadows a lifetime name that is already in scope --> $DIR/shadowed-lifetime.rs:22:20 | -21 | fn shadow_in_type<'b>(&'b self) -> &'b isize { +LL | fn shadow_in_type<'b>(&'b self) -> &'b isize { | -- first declared here -22 | let x: for<'b> fn(&'b isize) = panic!(); +LL | let x: for<'b> fn(&'b isize) = panic!(); | ^^ lifetime 'b already in scope error: aborting due to 2 previous errors diff --git a/src/test/ui/shadowed-type-parameter.stderr b/src/test/ui/shadowed-type-parameter.stderr index a16a9c0244fb6..caa64c6e87aa6 100644 --- a/src/test/ui/shadowed-type-parameter.stderr +++ b/src/test/ui/shadowed-type-parameter.stderr @@ -1,27 +1,27 @@ error[E0194]: type parameter `T` shadows another type parameter of the same name --> $DIR/shadowed-type-parameter.rs:30:27 | -27 | trait Bar { +LL | trait Bar { | - first `T` declared here ... -30 | fn shadow_in_required(&self); +LL | fn shadow_in_required(&self); | ^ shadows another type parameter error[E0194]: type parameter `T` shadows another type parameter of the same name --> $DIR/shadowed-type-parameter.rs:33:27 | -27 | trait Bar { +LL | trait Bar { | - first `T` declared here ... -33 | fn shadow_in_provided(&self) {} +LL | fn shadow_in_provided(&self) {} | ^ shadows another type parameter error[E0194]: type parameter `T` shadows another type parameter of the same name --> $DIR/shadowed-type-parameter.rs:18:25 | -17 | impl Foo { +LL | impl Foo { | - first `T` declared here -18 | fn shadow_in_method(&self) {} +LL | fn shadow_in_method(&self) {} | ^ shadows another type parameter error: aborting due to 3 previous errors diff --git a/src/test/ui/similar-tokens.stderr b/src/test/ui/similar-tokens.stderr index b4968b1018ff4..fe157b99e65da 100644 --- a/src/test/ui/similar-tokens.stderr +++ b/src/test/ui/similar-tokens.stderr @@ -1,7 +1,7 @@ error: expected one of `,`, `::`, or `as`, found `.` --> $DIR/similar-tokens.rs:17:10 | -17 | use x::{A. B}; //~ ERROR expected one of `,`, `::`, or `as`, found `.` +LL | use x::{A. B}; //~ ERROR expected one of `,`, `::`, or `as`, found `.` | ^ expected one of `,`, `::`, or `as` here error: aborting due to previous error diff --git a/src/test/ui/span/E0046.stderr b/src/test/ui/span/E0046.stderr index fb13f21fe00f7..8d2cc68295067 100644 --- a/src/test/ui/span/E0046.stderr +++ b/src/test/ui/span/E0046.stderr @@ -1,10 +1,10 @@ error[E0046]: not all trait items implemented, missing: `foo` --> $DIR/E0046.rs:17:1 | -12 | fn foo(); +LL | fn foo(); | --------- `foo` from trait ... -17 | impl Foo for Bar {} +LL | impl Foo for Bar {} | ^^^^^^^^^^^^^^^^ missing `foo` in implementation error: aborting due to previous error diff --git a/src/test/ui/span/E0057.stderr b/src/test/ui/span/E0057.stderr index 450c87ca0322b..3250465c8f08e 100644 --- a/src/test/ui/span/E0057.stderr +++ b/src/test/ui/span/E0057.stderr @@ -1,13 +1,13 @@ error[E0057]: this function takes 1 parameter but 0 parameters were supplied --> $DIR/E0057.rs:13:13 | -13 | let a = f(); //~ ERROR E0057 +LL | let a = f(); //~ ERROR E0057 | ^^^ expected 1 parameter error[E0057]: this function takes 1 parameter but 2 parameters were supplied --> $DIR/E0057.rs:15:13 | -15 | let c = f(2, 3); //~ ERROR E0057 +LL | let c = f(2, 3); //~ ERROR E0057 | ^^^^^^^ expected 1 parameter error: aborting due to 2 previous errors diff --git a/src/test/ui/span/E0072.stderr b/src/test/ui/span/E0072.stderr index 82b8579d5a12c..4e2ed20fd475e 100644 --- a/src/test/ui/span/E0072.stderr +++ b/src/test/ui/span/E0072.stderr @@ -1,10 +1,10 @@ error[E0072]: recursive type `ListNode` has infinite size --> $DIR/E0072.rs:11:1 | -11 | struct ListNode { //~ ERROR has infinite size +LL | struct ListNode { //~ ERROR has infinite size | ^^^^^^^^^^^^^^^ recursive type has infinite size -12 | head: u8, -13 | tail: Option, +LL | head: u8, +LL | tail: Option, | ---------------------- recursive without indirection | = help: insert indirection (e.g., a `Box`, `Rc`, or `&`) at some point to make `ListNode` representable diff --git a/src/test/ui/span/E0204.stderr b/src/test/ui/span/E0204.stderr index 0d9617c4c7324..387eafe1f67a4 100644 --- a/src/test/ui/span/E0204.stderr +++ b/src/test/ui/span/E0204.stderr @@ -1,37 +1,37 @@ error[E0204]: the trait `Copy` may not be implemented for this type --> $DIR/E0204.rs:15:6 | -12 | foo: Vec, +LL | foo: Vec, | ------------- this field does not implement `Copy` ... -15 | impl Copy for Foo { } //~ ERROR may not be implemented for this type +LL | impl Copy for Foo { } //~ ERROR may not be implemented for this type | ^^^^ error[E0204]: the trait `Copy` may not be implemented for this type --> $DIR/E0204.rs:17:10 | -17 | #[derive(Copy)] //~ ERROR may not be implemented for this type +LL | #[derive(Copy)] //~ ERROR may not be implemented for this type | ^^^^ -18 | struct Foo2<'a> { -19 | ty: &'a mut bool, +LL | struct Foo2<'a> { +LL | ty: &'a mut bool, | ---------------- this field does not implement `Copy` error[E0204]: the trait `Copy` may not be implemented for this type --> $DIR/E0204.rs:27:6 | -23 | Bar { x: Vec }, +LL | Bar { x: Vec }, | ----------- this field does not implement `Copy` ... -27 | impl Copy for EFoo { } //~ ERROR may not be implemented for this type +LL | impl Copy for EFoo { } //~ ERROR may not be implemented for this type | ^^^^ error[E0204]: the trait `Copy` may not be implemented for this type --> $DIR/E0204.rs:29:10 | -29 | #[derive(Copy)] //~ ERROR may not be implemented for this type +LL | #[derive(Copy)] //~ ERROR may not be implemented for this type | ^^^^ -30 | enum EFoo2<'a> { -31 | Bar(&'a mut bool), +LL | enum EFoo2<'a> { +LL | Bar(&'a mut bool), | ------------- this field does not implement `Copy` error: aborting due to 4 previous errors diff --git a/src/test/ui/span/E0493.stderr b/src/test/ui/span/E0493.stderr index d7996eaef3a4b..eca1649ca06cd 100644 --- a/src/test/ui/span/E0493.stderr +++ b/src/test/ui/span/E0493.stderr @@ -1,7 +1,7 @@ error[E0493]: destructors cannot be evaluated at compile-time --> $DIR/E0493.rs:27:17 | -27 | const F : Foo = (Foo { a : 0 }, Foo { a : 1 }).1; +LL | const F : Foo = (Foo { a : 0 }, Foo { a : 1 }).1; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constants cannot evaluate destructors error: aborting due to previous error diff --git a/src/test/ui/span/E0535.stderr b/src/test/ui/span/E0535.stderr index 23070e1555b9b..243e4a77202b8 100644 --- a/src/test/ui/span/E0535.stderr +++ b/src/test/ui/span/E0535.stderr @@ -1,7 +1,7 @@ error[E0535]: invalid argument --> $DIR/E0535.rs:11:10 | -11 | #[inline(unknown)] //~ ERROR E0535 +LL | #[inline(unknown)] //~ ERROR E0535 | ^^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/span/E0536.stderr b/src/test/ui/span/E0536.stderr index c33b89953e274..9e08a524d90d9 100644 --- a/src/test/ui/span/E0536.stderr +++ b/src/test/ui/span/E0536.stderr @@ -1,7 +1,7 @@ error[E0536]: expected 1 cfg-pattern --> $DIR/E0536.rs:11:7 | -11 | #[cfg(not())] //~ ERROR E0536 +LL | #[cfg(not())] //~ ERROR E0536 | ^^^^^ error: aborting due to previous error diff --git a/src/test/ui/span/E0537.stderr b/src/test/ui/span/E0537.stderr index 9d66ddbaae317..25faaeac05797 100644 --- a/src/test/ui/span/E0537.stderr +++ b/src/test/ui/span/E0537.stderr @@ -1,7 +1,7 @@ error[E0537]: invalid predicate `unknown` --> $DIR/E0537.rs:11:7 | -11 | #[cfg(unknown())] //~ ERROR E0537 +LL | #[cfg(unknown())] //~ ERROR E0537 | ^^^^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/span/borrowck-borrow-overloaded-auto-deref-mut.stderr b/src/test/ui/span/borrowck-borrow-overloaded-auto-deref-mut.stderr index 2d580e7c20eee..ba1ce858823ba 100644 --- a/src/test/ui/span/borrowck-borrow-overloaded-auto-deref-mut.stderr +++ b/src/test/ui/span/borrowck-borrow-overloaded-auto-deref-mut.stderr @@ -1,86 +1,86 @@ error[E0596]: cannot borrow immutable argument `x` as mutable --> $DIR/borrowck-borrow-overloaded-auto-deref-mut.rs:63:24 | -62 | fn deref_mut_field1(x: Own) { +LL | fn deref_mut_field1(x: Own) { | - consider changing this to `mut x` -63 | let __isize = &mut x.y; //~ ERROR cannot borrow +LL | let __isize = &mut x.y; //~ ERROR cannot borrow | ^ cannot borrow mutably error[E0596]: cannot borrow immutable borrowed content `*x` as mutable --> $DIR/borrowck-borrow-overloaded-auto-deref-mut.rs:75:10 | -74 | fn deref_extend_mut_field1(x: &Own) -> &mut isize { +LL | fn deref_extend_mut_field1(x: &Own) -> &mut isize { | ----------- use `&mut Own` here to make mutable -75 | &mut x.y //~ ERROR cannot borrow +LL | &mut x.y //~ ERROR cannot borrow | ^ cannot borrow as mutable error[E0499]: cannot borrow `*x` as mutable more than once at a time --> $DIR/borrowck-borrow-overloaded-auto-deref-mut.rs:88:19 | -87 | let _x = &mut x.x; +LL | let _x = &mut x.x; | - first mutable borrow occurs here -88 | let _y = &mut x.y; //~ ERROR cannot borrow +LL | let _y = &mut x.y; //~ ERROR cannot borrow | ^ second mutable borrow occurs here -89 | } +LL | } | - first borrow ends here error[E0596]: cannot borrow immutable argument `x` as mutable --> $DIR/borrowck-borrow-overloaded-auto-deref-mut.rs:98:5 | -97 | fn assign_field1<'a>(x: Own) { +LL | fn assign_field1<'a>(x: Own) { | - consider changing this to `mut x` -98 | x.y = 3; //~ ERROR cannot borrow +LL | x.y = 3; //~ ERROR cannot borrow | ^ cannot borrow mutably error[E0596]: cannot borrow immutable borrowed content `*x` as mutable - --> $DIR/borrowck-borrow-overloaded-auto-deref-mut.rs:102:5 - | -101 | fn assign_field2<'a>(x: &'a Own) { - | -------------- use `&'a mut Own` here to make mutable -102 | x.y = 3; //~ ERROR cannot borrow - | ^ cannot borrow as mutable + --> $DIR/borrowck-borrow-overloaded-auto-deref-mut.rs:102:5 + | +LL | fn assign_field2<'a>(x: &'a Own) { + | -------------- use `&'a mut Own` here to make mutable +LL | x.y = 3; //~ ERROR cannot borrow + | ^ cannot borrow as mutable error[E0499]: cannot borrow `*x` as mutable more than once at a time - --> $DIR/borrowck-borrow-overloaded-auto-deref-mut.rs:111:5 - | -110 | let _p: &mut Point = &mut **x; - | -- first mutable borrow occurs here -111 | x.y = 3; //~ ERROR cannot borrow - | ^ second mutable borrow occurs here -112 | } - | - first borrow ends here + --> $DIR/borrowck-borrow-overloaded-auto-deref-mut.rs:111:5 + | +LL | let _p: &mut Point = &mut **x; + | -- first mutable borrow occurs here +LL | x.y = 3; //~ ERROR cannot borrow + | ^ second mutable borrow occurs here +LL | } + | - first borrow ends here error[E0596]: cannot borrow immutable argument `x` as mutable - --> $DIR/borrowck-borrow-overloaded-auto-deref-mut.rs:119:5 - | -118 | fn deref_mut_method1(x: Own) { - | - consider changing this to `mut x` -119 | x.set(0, 0); //~ ERROR cannot borrow - | ^ cannot borrow mutably + --> $DIR/borrowck-borrow-overloaded-auto-deref-mut.rs:119:5 + | +LL | fn deref_mut_method1(x: Own) { + | - consider changing this to `mut x` +LL | x.set(0, 0); //~ ERROR cannot borrow + | ^ cannot borrow mutably error[E0596]: cannot borrow immutable borrowed content `*x` as mutable - --> $DIR/borrowck-borrow-overloaded-auto-deref-mut.rs:131:5 - | -130 | fn deref_extend_mut_method1(x: &Own) -> &mut isize { - | ----------- use `&mut Own` here to make mutable -131 | x.y_mut() //~ ERROR cannot borrow - | ^ cannot borrow as mutable + --> $DIR/borrowck-borrow-overloaded-auto-deref-mut.rs:131:5 + | +LL | fn deref_extend_mut_method1(x: &Own) -> &mut isize { + | ----------- use `&mut Own` here to make mutable +LL | x.y_mut() //~ ERROR cannot borrow + | ^ cannot borrow as mutable error[E0596]: cannot borrow immutable argument `x` as mutable - --> $DIR/borrowck-borrow-overloaded-auto-deref-mut.rs:139:6 - | -138 | fn assign_method1<'a>(x: Own) { - | - consider changing this to `mut x` -139 | *x.y_mut() = 3; //~ ERROR cannot borrow - | ^ cannot borrow mutably + --> $DIR/borrowck-borrow-overloaded-auto-deref-mut.rs:139:6 + | +LL | fn assign_method1<'a>(x: Own) { + | - consider changing this to `mut x` +LL | *x.y_mut() = 3; //~ ERROR cannot borrow + | ^ cannot borrow mutably error[E0596]: cannot borrow immutable borrowed content `*x` as mutable - --> $DIR/borrowck-borrow-overloaded-auto-deref-mut.rs:143:6 - | -142 | fn assign_method2<'a>(x: &'a Own) { - | -------------- use `&'a mut Own` here to make mutable -143 | *x.y_mut() = 3; //~ ERROR cannot borrow - | ^ cannot borrow as mutable + --> $DIR/borrowck-borrow-overloaded-auto-deref-mut.rs:143:6 + | +LL | fn assign_method2<'a>(x: &'a Own) { + | -------------- use `&'a mut Own` here to make mutable +LL | *x.y_mut() = 3; //~ ERROR cannot borrow + | ^ cannot borrow as mutable error: aborting due to 10 previous errors diff --git a/src/test/ui/span/borrowck-borrow-overloaded-deref-mut.stderr b/src/test/ui/span/borrowck-borrow-overloaded-deref-mut.stderr index 3d380a9a2e88d..b27b880b62fda 100644 --- a/src/test/ui/span/borrowck-borrow-overloaded-deref-mut.stderr +++ b/src/test/ui/span/borrowck-borrow-overloaded-deref-mut.stderr @@ -1,33 +1,33 @@ error[E0596]: cannot borrow immutable argument `x` as mutable --> $DIR/borrowck-borrow-overloaded-deref-mut.rs:39:25 | -38 | fn deref_mut1(x: Own) { +LL | fn deref_mut1(x: Own) { | - consider changing this to `mut x` -39 | let __isize = &mut *x; //~ ERROR cannot borrow +LL | let __isize = &mut *x; //~ ERROR cannot borrow | ^ cannot borrow mutably error[E0596]: cannot borrow immutable borrowed content `*x` as mutable --> $DIR/borrowck-borrow-overloaded-deref-mut.rs:51:11 | -50 | fn deref_extend_mut1<'a>(x: &'a Own) -> &'a mut isize { +LL | fn deref_extend_mut1<'a>(x: &'a Own) -> &'a mut isize { | -------------- use `&'a mut Own` here to make mutable -51 | &mut **x //~ ERROR cannot borrow +LL | &mut **x //~ ERROR cannot borrow | ^^ cannot borrow as mutable error[E0596]: cannot borrow immutable argument `x` as mutable --> $DIR/borrowck-borrow-overloaded-deref-mut.rs:59:6 | -58 | fn assign1<'a>(x: Own) { +LL | fn assign1<'a>(x: Own) { | - consider changing this to `mut x` -59 | *x = 3; //~ ERROR cannot borrow +LL | *x = 3; //~ ERROR cannot borrow | ^ cannot borrow mutably error[E0596]: cannot borrow immutable borrowed content `*x` as mutable --> $DIR/borrowck-borrow-overloaded-deref-mut.rs:63:6 | -62 | fn assign2<'a>(x: &'a Own) { +LL | fn assign2<'a>(x: &'a Own) { | -------------- use `&'a mut Own` here to make mutable -63 | **x = 3; //~ ERROR cannot borrow +LL | **x = 3; //~ ERROR cannot borrow | ^^ cannot borrow as mutable error: aborting due to 4 previous errors diff --git a/src/test/ui/span/borrowck-call-is-borrow-issue-12224.stderr b/src/test/ui/span/borrowck-call-is-borrow-issue-12224.stderr index 581b366af1c1b..c72be10e76beb 100644 --- a/src/test/ui/span/borrowck-call-is-borrow-issue-12224.stderr +++ b/src/test/ui/span/borrowck-call-is-borrow-issue-12224.stderr @@ -1,47 +1,47 @@ error[E0499]: cannot borrow `f` as mutable more than once at a time --> $DIR/borrowck-call-is-borrow-issue-12224.rs:22:16 | -22 | f(Box::new(|| { +LL | f(Box::new(|| { | - ^^ second mutable borrow occurs here | | | first mutable borrow occurs here -23 | //~^ ERROR: cannot borrow `f` as mutable more than once -24 | f((Box::new(|| {}))) +LL | //~^ ERROR: cannot borrow `f` as mutable more than once +LL | f((Box::new(|| {}))) | - borrow occurs due to use of `f` in closure -25 | })); +LL | })); | - first borrow ends here error[E0596]: cannot borrow immutable borrowed content `*f` as mutable --> $DIR/borrowck-call-is-borrow-issue-12224.rs:35:5 | -34 | fn test2(f: &F) where F: FnMut() { +LL | fn test2(f: &F) where F: FnMut() { | -- use `&mut F` here to make mutable -35 | (*f)(); +LL | (*f)(); | ^^^^ cannot borrow as mutable error[E0596]: cannot borrow `Box` content `*f.f` of immutable binding as mutable --> $DIR/borrowck-call-is-borrow-issue-12224.rs:44:5 | -43 | fn test4(f: &Test) { +LL | fn test4(f: &Test) { | ----- use `&mut Test` here to make mutable -44 | f.f.call_mut(()) +LL | f.f.call_mut(()) | ^^^ cannot borrow as mutable error[E0504]: cannot move `f` into closure because it is borrowed --> $DIR/borrowck-call-is-borrow-issue-12224.rs:63:13 | -62 | f(Box::new(|a| { +LL | f(Box::new(|a| { | - borrow of `f` occurs here -63 | foo(f); +LL | foo(f); | ^ move into closure occurs here error[E0507]: cannot move out of captured outer variable in an `FnMut` closure --> $DIR/borrowck-call-is-borrow-issue-12224.rs:63:13 | -61 | let mut f = |g: Box, b: isize| {}; +LL | let mut f = |g: Box, b: isize| {}; | ----- captured outer variable -62 | f(Box::new(|a| { -63 | foo(f); +LL | f(Box::new(|a| { +LL | foo(f); | ^ cannot move out of captured outer variable in an `FnMut` closure error: aborting due to 5 previous errors diff --git a/src/test/ui/span/borrowck-call-method-from-mut-aliasable.stderr b/src/test/ui/span/borrowck-call-method-from-mut-aliasable.stderr index a57cc94b9ba74..5f90f7e927766 100644 --- a/src/test/ui/span/borrowck-call-method-from-mut-aliasable.stderr +++ b/src/test/ui/span/borrowck-call-method-from-mut-aliasable.stderr @@ -1,10 +1,10 @@ error[E0596]: cannot borrow immutable borrowed content `*x` as mutable --> $DIR/borrowck-call-method-from-mut-aliasable.rs:27:5 | -25 | fn b(x: &Foo) { +LL | fn b(x: &Foo) { | ---- use `&mut Foo` here to make mutable -26 | x.f(); -27 | x.h(); //~ ERROR cannot borrow +LL | x.f(); +LL | x.h(); //~ ERROR cannot borrow | ^ cannot borrow as mutable error: aborting due to previous error diff --git a/src/test/ui/span/borrowck-fn-in-const-b.stderr b/src/test/ui/span/borrowck-fn-in-const-b.stderr index 45712d1a71024..a8f7826a9c277 100644 --- a/src/test/ui/span/borrowck-fn-in-const-b.stderr +++ b/src/test/ui/span/borrowck-fn-in-const-b.stderr @@ -1,9 +1,9 @@ error[E0596]: cannot borrow immutable borrowed content `*x` as mutable --> $DIR/borrowck-fn-in-const-b.rs:17:9 | -16 | fn broken(x: &Vec) { +LL | fn broken(x: &Vec) { | ------------ use `&mut Vec` here to make mutable -17 | x.push(format!("this is broken")); +LL | x.push(format!("this is broken")); | ^ cannot borrow as mutable error: aborting due to previous error diff --git a/src/test/ui/span/borrowck-let-suggestion-suffixes.stderr b/src/test/ui/span/borrowck-let-suggestion-suffixes.stderr index e65fd723e5f58..adf85bc81a335 100644 --- a/src/test/ui/span/borrowck-let-suggestion-suffixes.stderr +++ b/src/test/ui/span/borrowck-let-suggestion-suffixes.stderr @@ -1,10 +1,10 @@ error[E0597]: `young[..]` does not live long enough --> $DIR/borrowck-let-suggestion-suffixes.rs:21:14 | -21 | v2.push(&young[0]); // statement 4 +LL | v2.push(&young[0]); // statement 4 | ^^^^^^^^ borrowed value does not live long enough ... -56 | } +LL | } | - `young[..]` dropped here while still borrowed | = note: values in a scope are dropped in the opposite order they are created @@ -12,12 +12,12 @@ error[E0597]: `young[..]` does not live long enough error[E0597]: borrowed value does not live long enough --> $DIR/borrowck-let-suggestion-suffixes.rs:28:14 | -28 | v3.push(&id('x')); // statement 6 +LL | v3.push(&id('x')); // statement 6 | ^^^^^^^ - temporary value dropped here while still borrowed | | | temporary value does not live long enough ... -56 | } +LL | } | - temporary value needs to live until here | = note: consider using a `let` binding to increase its lifetime @@ -25,12 +25,12 @@ error[E0597]: borrowed value does not live long enough error[E0597]: borrowed value does not live long enough --> $DIR/borrowck-let-suggestion-suffixes.rs:38:18 | -38 | v4.push(&id('y')); +LL | v4.push(&id('y')); | ^^^^^^^ - temporary value dropped here while still borrowed | | | temporary value does not live long enough ... -44 | } // (statement 7) +LL | } // (statement 7) | - temporary value needs to live until here | = note: consider using a `let` binding to increase its lifetime @@ -38,12 +38,12 @@ error[E0597]: borrowed value does not live long enough error[E0597]: borrowed value does not live long enough --> $DIR/borrowck-let-suggestion-suffixes.rs:49:14 | -49 | v5.push(&id('z')); +LL | v5.push(&id('z')); | ^^^^^^^ - temporary value dropped here while still borrowed | | | temporary value does not live long enough ... -56 | } +LL | } | - temporary value needs to live until here | = note: consider using a `let` binding to increase its lifetime diff --git a/src/test/ui/span/borrowck-object-mutability.stderr b/src/test/ui/span/borrowck-object-mutability.stderr index 530993f399a99..5ecac4bd43e18 100644 --- a/src/test/ui/span/borrowck-object-mutability.stderr +++ b/src/test/ui/span/borrowck-object-mutability.stderr @@ -1,19 +1,19 @@ error[E0596]: cannot borrow immutable borrowed content `*x` as mutable --> $DIR/borrowck-object-mutability.rs:19:5 | -17 | fn borrowed_receiver(x: &Foo) { +LL | fn borrowed_receiver(x: &Foo) { | ---- use `&mut Foo` here to make mutable -18 | x.borrowed(); -19 | x.borrowed_mut(); //~ ERROR cannot borrow +LL | x.borrowed(); +LL | x.borrowed_mut(); //~ ERROR cannot borrow | ^ cannot borrow as mutable error[E0596]: cannot borrow immutable `Box` content `*x` as mutable --> $DIR/borrowck-object-mutability.rs:29:5 | -27 | fn owned_receiver(x: Box) { +LL | fn owned_receiver(x: Box) { | - consider changing this to `mut x` -28 | x.borrowed(); -29 | x.borrowed_mut(); //~ ERROR cannot borrow +LL | x.borrowed(); +LL | x.borrowed_mut(); //~ ERROR cannot borrow | ^ cannot borrow as mutable error: aborting due to 2 previous errors diff --git a/src/test/ui/span/borrowck-ref-into-rvalue.stderr b/src/test/ui/span/borrowck-ref-into-rvalue.stderr index 80ddd150757e6..57c0dbe5c6c73 100644 --- a/src/test/ui/span/borrowck-ref-into-rvalue.stderr +++ b/src/test/ui/span/borrowck-ref-into-rvalue.stderr @@ -1,13 +1,13 @@ error[E0597]: borrowed value does not live long enough --> $DIR/borrowck-ref-into-rvalue.rs:14:14 | -14 | Some(ref m) => { +LL | Some(ref m) => { | ^^^^^ borrowed value does not live long enough ... -19 | } +LL | } | - borrowed value dropped here while still borrowed -20 | println!("{}", *msg); -21 | } +LL | println!("{}", *msg); +LL | } | - borrowed value needs to live until here | = note: consider using a `let` binding to increase its lifetime diff --git a/src/test/ui/span/coerce-suggestions.stderr b/src/test/ui/span/coerce-suggestions.stderr index 06f0e6ec228f2..1d3dae5299483 100644 --- a/src/test/ui/span/coerce-suggestions.stderr +++ b/src/test/ui/span/coerce-suggestions.stderr @@ -1,7 +1,7 @@ error[E0308]: mismatched types --> $DIR/coerce-suggestions.rs:17:20 | -17 | let x: usize = String::new(); +LL | let x: usize = String::new(); | ^^^^^^^^^^^^^ expected usize, found struct `std::string::String` | = note: expected type `usize` @@ -10,7 +10,7 @@ error[E0308]: mismatched types error[E0308]: mismatched types --> $DIR/coerce-suggestions.rs:19:19 | -19 | let x: &str = String::new(); +LL | let x: &str = String::new(); | ^^^^^^^^^^^^^ | | | expected &str, found struct `std::string::String` @@ -22,7 +22,7 @@ error[E0308]: mismatched types error[E0308]: mismatched types --> $DIR/coerce-suggestions.rs:22:10 | -22 | test(&y); +LL | test(&y); | ^^ types differ in mutability | = note: expected type `&mut std::string::String` @@ -31,7 +31,7 @@ error[E0308]: mismatched types error[E0308]: mismatched types --> $DIR/coerce-suggestions.rs:24:11 | -24 | test2(&y); +LL | test2(&y); | ^^ types differ in mutability | = note: expected type `&mut i32` @@ -40,7 +40,7 @@ error[E0308]: mismatched types error[E0308]: mismatched types --> $DIR/coerce-suggestions.rs:27:9 | -27 | f = box f; +LL | f = box f; | ^^^^^ | | | cyclic type of infinite size @@ -49,7 +49,7 @@ error[E0308]: mismatched types error[E0308]: mismatched types --> $DIR/coerce-suggestions.rs:31:9 | -31 | s = format!("foo"); +LL | s = format!("foo"); | ^^^^^^^^^^^^^^ | | | expected mutable reference, found struct `std::string::String` diff --git a/src/test/ui/span/destructor-restrictions.stderr b/src/test/ui/span/destructor-restrictions.stderr index abe982c5ce3c1..d901a5253cbcf 100644 --- a/src/test/ui/span/destructor-restrictions.stderr +++ b/src/test/ui/span/destructor-restrictions.stderr @@ -1,9 +1,9 @@ error[E0597]: `*a` does not live long enough --> $DIR/destructor-restrictions.rs:18:10 | -18 | *a.borrow() + 1 +LL | *a.borrow() + 1 | ^ borrowed value does not live long enough -19 | }; //~^ ERROR `*a` does not live long enough +LL | }; //~^ ERROR `*a` does not live long enough | -- borrowed value needs to live until here | | | `*a` dropped here while still borrowed diff --git a/src/test/ui/span/dropck-object-cycle.stderr b/src/test/ui/span/dropck-object-cycle.stderr index 2b760415a1aa2..9ce6b7d2c9ade 100644 --- a/src/test/ui/span/dropck-object-cycle.stderr +++ b/src/test/ui/span/dropck-object-cycle.stderr @@ -1,10 +1,10 @@ error[E0597]: `*m` does not live long enough --> $DIR/dropck-object-cycle.rs:37:32 | -37 | assert_eq!(object_invoke1(&*m), (4,5)); +LL | assert_eq!(object_invoke1(&*m), (4,5)); | ^^ borrowed value does not live long enough ... -57 | } +LL | } | - `*m` dropped here while still borrowed | = note: values in a scope are dropped in the opposite order they are created diff --git a/src/test/ui/span/dropck_arr_cycle_checked.stderr b/src/test/ui/span/dropck_arr_cycle_checked.stderr index 1225c36ab3de3..0dcdbef348e0f 100644 --- a/src/test/ui/span/dropck_arr_cycle_checked.stderr +++ b/src/test/ui/span/dropck_arr_cycle_checked.stderr @@ -1,68 +1,68 @@ error[E0597]: `b2` does not live long enough - --> $DIR/dropck_arr_cycle_checked.rs:103:25 - | -103 | b1.a[0].v.set(Some(&b2)); - | ^^ borrowed value does not live long enough + --> $DIR/dropck_arr_cycle_checked.rs:103:25 + | +LL | b1.a[0].v.set(Some(&b2)); + | ^^ borrowed value does not live long enough ... -115 | } - | - `b2` dropped here while still borrowed - | - = note: values in a scope are dropped in the opposite order they are created +LL | } + | - `b2` dropped here while still borrowed + | + = note: values in a scope are dropped in the opposite order they are created error[E0597]: `b3` does not live long enough - --> $DIR/dropck_arr_cycle_checked.rs:105:25 - | -105 | b1.a[1].v.set(Some(&b3)); - | ^^ borrowed value does not live long enough + --> $DIR/dropck_arr_cycle_checked.rs:105:25 + | +LL | b1.a[1].v.set(Some(&b3)); + | ^^ borrowed value does not live long enough ... -115 | } - | - `b3` dropped here while still borrowed - | - = note: values in a scope are dropped in the opposite order they are created +LL | } + | - `b3` dropped here while still borrowed + | + = note: values in a scope are dropped in the opposite order they are created error[E0597]: `b2` does not live long enough - --> $DIR/dropck_arr_cycle_checked.rs:107:25 - | -107 | b2.a[0].v.set(Some(&b2)); - | ^^ borrowed value does not live long enough + --> $DIR/dropck_arr_cycle_checked.rs:107:25 + | +LL | b2.a[0].v.set(Some(&b2)); + | ^^ borrowed value does not live long enough ... -115 | } - | - `b2` dropped here while still borrowed - | - = note: values in a scope are dropped in the opposite order they are created +LL | } + | - `b2` dropped here while still borrowed + | + = note: values in a scope are dropped in the opposite order they are created error[E0597]: `b3` does not live long enough - --> $DIR/dropck_arr_cycle_checked.rs:109:25 - | -109 | b2.a[1].v.set(Some(&b3)); - | ^^ borrowed value does not live long enough + --> $DIR/dropck_arr_cycle_checked.rs:109:25 + | +LL | b2.a[1].v.set(Some(&b3)); + | ^^ borrowed value does not live long enough ... -115 | } - | - `b3` dropped here while still borrowed - | - = note: values in a scope are dropped in the opposite order they are created +LL | } + | - `b3` dropped here while still borrowed + | + = note: values in a scope are dropped in the opposite order they are created error[E0597]: `b1` does not live long enough - --> $DIR/dropck_arr_cycle_checked.rs:111:25 - | -111 | b3.a[0].v.set(Some(&b1)); - | ^^ borrowed value does not live long enough + --> $DIR/dropck_arr_cycle_checked.rs:111:25 + | +LL | b3.a[0].v.set(Some(&b1)); + | ^^ borrowed value does not live long enough ... -115 | } - | - `b1` dropped here while still borrowed - | - = note: values in a scope are dropped in the opposite order they are created +LL | } + | - `b1` dropped here while still borrowed + | + = note: values in a scope are dropped in the opposite order they are created error[E0597]: `b2` does not live long enough - --> $DIR/dropck_arr_cycle_checked.rs:113:25 - | -113 | b3.a[1].v.set(Some(&b2)); - | ^^ borrowed value does not live long enough -114 | //~^ ERROR `b2` does not live long enough -115 | } - | - `b2` dropped here while still borrowed - | - = note: values in a scope are dropped in the opposite order they are created + --> $DIR/dropck_arr_cycle_checked.rs:113:25 + | +LL | b3.a[1].v.set(Some(&b2)); + | ^^ borrowed value does not live long enough +LL | //~^ ERROR `b2` does not live long enough +LL | } + | - `b2` dropped here while still borrowed + | + = note: values in a scope are dropped in the opposite order they are created error: aborting due to 6 previous errors diff --git a/src/test/ui/span/dropck_direct_cycle_with_drop.stderr b/src/test/ui/span/dropck_direct_cycle_with_drop.stderr index 462b291f4fad0..eb7747efe1be1 100644 --- a/src/test/ui/span/dropck_direct_cycle_with_drop.stderr +++ b/src/test/ui/span/dropck_direct_cycle_with_drop.stderr @@ -1,10 +1,10 @@ error[E0597]: `d2` does not live long enough --> $DIR/dropck_direct_cycle_with_drop.rs:46:20 | -46 | d1.p.set(Some(&d2)); +LL | d1.p.set(Some(&d2)); | ^^ borrowed value does not live long enough ... -50 | } +LL | } | - `d2` dropped here while still borrowed | = note: values in a scope are dropped in the opposite order they are created @@ -12,10 +12,10 @@ error[E0597]: `d2` does not live long enough error[E0597]: `d1` does not live long enough --> $DIR/dropck_direct_cycle_with_drop.rs:48:20 | -48 | d2.p.set(Some(&d1)); +LL | d2.p.set(Some(&d1)); | ^^ borrowed value does not live long enough -49 | //~^ ERROR `d1` does not live long enough -50 | } +LL | //~^ ERROR `d1` does not live long enough +LL | } | - `d1` dropped here while still borrowed | = note: values in a scope are dropped in the opposite order they are created diff --git a/src/test/ui/span/dropck_misc_variants.stderr b/src/test/ui/span/dropck_misc_variants.stderr index b839701f08b91..8db3b88ef210a 100644 --- a/src/test/ui/span/dropck_misc_variants.stderr +++ b/src/test/ui/span/dropck_misc_variants.stderr @@ -1,9 +1,9 @@ error[E0597]: `bomb` does not live long enough --> $DIR/dropck_misc_variants.rs:33:37 | -33 | _w = Wrap::<&[&str]>(NoisyDrop(&bomb)); +LL | _w = Wrap::<&[&str]>(NoisyDrop(&bomb)); | ^^^^ borrowed value does not live long enough -34 | } +LL | } | - `bomb` dropped here while still borrowed | = note: values in a scope are dropped in the opposite order they are created @@ -11,10 +11,10 @@ error[E0597]: `bomb` does not live long enough error[E0597]: `v` does not live long enough --> $DIR/dropck_misc_variants.rs:41:28 | -41 | let u = NoisyDrop(&v); +LL | let u = NoisyDrop(&v); | ^ borrowed value does not live long enough ... -45 | } +LL | } | - `v` dropped here while still borrowed | = note: values in a scope are dropped in the opposite order they are created diff --git a/src/test/ui/span/dropck_vec_cycle_checked.stderr b/src/test/ui/span/dropck_vec_cycle_checked.stderr index 799dfb8e2010b..38244c0afb89b 100644 --- a/src/test/ui/span/dropck_vec_cycle_checked.stderr +++ b/src/test/ui/span/dropck_vec_cycle_checked.stderr @@ -1,68 +1,68 @@ error[E0597]: `c2` does not live long enough - --> $DIR/dropck_vec_cycle_checked.rs:110:25 - | -110 | c1.v[0].v.set(Some(&c2)); - | ^^ borrowed value does not live long enough + --> $DIR/dropck_vec_cycle_checked.rs:110:25 + | +LL | c1.v[0].v.set(Some(&c2)); + | ^^ borrowed value does not live long enough ... -122 | } - | - `c2` dropped here while still borrowed - | - = note: values in a scope are dropped in the opposite order they are created +LL | } + | - `c2` dropped here while still borrowed + | + = note: values in a scope are dropped in the opposite order they are created error[E0597]: `c3` does not live long enough - --> $DIR/dropck_vec_cycle_checked.rs:112:25 - | -112 | c1.v[1].v.set(Some(&c3)); - | ^^ borrowed value does not live long enough + --> $DIR/dropck_vec_cycle_checked.rs:112:25 + | +LL | c1.v[1].v.set(Some(&c3)); + | ^^ borrowed value does not live long enough ... -122 | } - | - `c3` dropped here while still borrowed - | - = note: values in a scope are dropped in the opposite order they are created +LL | } + | - `c3` dropped here while still borrowed + | + = note: values in a scope are dropped in the opposite order they are created error[E0597]: `c2` does not live long enough - --> $DIR/dropck_vec_cycle_checked.rs:114:25 - | -114 | c2.v[0].v.set(Some(&c2)); - | ^^ borrowed value does not live long enough + --> $DIR/dropck_vec_cycle_checked.rs:114:25 + | +LL | c2.v[0].v.set(Some(&c2)); + | ^^ borrowed value does not live long enough ... -122 | } - | - `c2` dropped here while still borrowed - | - = note: values in a scope are dropped in the opposite order they are created +LL | } + | - `c2` dropped here while still borrowed + | + = note: values in a scope are dropped in the opposite order they are created error[E0597]: `c3` does not live long enough - --> $DIR/dropck_vec_cycle_checked.rs:116:25 - | -116 | c2.v[1].v.set(Some(&c3)); - | ^^ borrowed value does not live long enough + --> $DIR/dropck_vec_cycle_checked.rs:116:25 + | +LL | c2.v[1].v.set(Some(&c3)); + | ^^ borrowed value does not live long enough ... -122 | } - | - `c3` dropped here while still borrowed - | - = note: values in a scope are dropped in the opposite order they are created +LL | } + | - `c3` dropped here while still borrowed + | + = note: values in a scope are dropped in the opposite order they are created error[E0597]: `c1` does not live long enough - --> $DIR/dropck_vec_cycle_checked.rs:118:25 - | -118 | c3.v[0].v.set(Some(&c1)); - | ^^ borrowed value does not live long enough + --> $DIR/dropck_vec_cycle_checked.rs:118:25 + | +LL | c3.v[0].v.set(Some(&c1)); + | ^^ borrowed value does not live long enough ... -122 | } - | - `c1` dropped here while still borrowed - | - = note: values in a scope are dropped in the opposite order they are created +LL | } + | - `c1` dropped here while still borrowed + | + = note: values in a scope are dropped in the opposite order they are created error[E0597]: `c2` does not live long enough - --> $DIR/dropck_vec_cycle_checked.rs:120:25 - | -120 | c3.v[1].v.set(Some(&c2)); - | ^^ borrowed value does not live long enough -121 | //~^ ERROR `c2` does not live long enough -122 | } - | - `c2` dropped here while still borrowed - | - = note: values in a scope are dropped in the opposite order they are created + --> $DIR/dropck_vec_cycle_checked.rs:120:25 + | +LL | c3.v[1].v.set(Some(&c2)); + | ^^ borrowed value does not live long enough +LL | //~^ ERROR `c2` does not live long enough +LL | } + | - `c2` dropped here while still borrowed + | + = note: values in a scope are dropped in the opposite order they are created error: aborting due to 6 previous errors diff --git a/src/test/ui/span/gated-features-attr-spans.stderr b/src/test/ui/span/gated-features-attr-spans.stderr index f15c4a72c5a6b..9b795c4b89e91 100644 --- a/src/test/ui/span/gated-features-attr-spans.stderr +++ b/src/test/ui/span/gated-features-attr-spans.stderr @@ -1,7 +1,7 @@ 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 +LL | #[repr(simd)] //~ ERROR are experimental | ^^^^^^^^^^^^^ | = help: add #![feature(repr_simd)] to the crate attributes to enable @@ -9,7 +9,7 @@ error[E0658]: SIMD types are experimental and possibly buggy (see issue #27731) warning: `#[must_use]` on methods is experimental (see issue #43302) --> $DIR/gated-features-attr-spans.rs:27:5 | -27 | #[must_use] fn summon_weapon(&self) -> Weapon { self.weapon } +LL | #[must_use] fn summon_weapon(&self) -> Weapon { self.weapon } | ^^^^^^^^^^^ | = help: add #![feature(fn_must_use)] to the crate attributes to enable @@ -17,7 +17,7 @@ warning: `#[must_use]` on methods is experimental (see issue #43302) warning: `#[must_use]` on functions is experimental (see issue #43302) --> $DIR/gated-features-attr-spans.rs:31:1 | -31 | #[must_use] //~ WARN is experimental +LL | #[must_use] //~ WARN is experimental | ^^^^^^^^^^^ | = help: add #![feature(fn_must_use)] to the crate attributes to enable diff --git a/src/test/ui/span/impl-parsing.stderr b/src/test/ui/span/impl-parsing.stderr index 912638446b961..3cfcf7b768314 100644 --- a/src/test/ui/span/impl-parsing.stderr +++ b/src/test/ui/span/impl-parsing.stderr @@ -1,31 +1,31 @@ error: missing `for` in a trait impl --> $DIR/impl-parsing.rs:16:11 | -16 | impl Trait Type {} //~ ERROR missing `for` in a trait impl +LL | impl Trait Type {} //~ ERROR missing `for` in a trait impl | ^ error: missing `for` in a trait impl --> $DIR/impl-parsing.rs:17:11 | -17 | impl Trait .. {} //~ ERROR missing `for` in a trait impl +LL | impl Trait .. {} //~ ERROR missing `for` in a trait impl | ^ error: expected a trait, found type --> $DIR/impl-parsing.rs:18:6 | -18 | impl ?Sized for Type {} //~ ERROR expected a trait, found type +LL | impl ?Sized for Type {} //~ ERROR expected a trait, found type | ^^^^^^ error: expected a trait, found type --> $DIR/impl-parsing.rs:19:6 | -19 | impl ?Sized for .. {} //~ ERROR expected a trait, found type +LL | impl ?Sized for .. {} //~ ERROR expected a trait, found type | ^^^^^^ error: expected `impl`, found `FAIL` --> $DIR/impl-parsing.rs:21:16 | -21 | default unsafe FAIL //~ ERROR expected `impl`, found `FAIL` +LL | default unsafe FAIL //~ ERROR expected `impl`, found `FAIL` | ^^^^ expected `impl` here error: aborting due to 5 previous errors diff --git a/src/test/ui/span/impl-wrong-item-for-trait.stderr b/src/test/ui/span/impl-wrong-item-for-trait.stderr index 6473b24dec5b3..cf01e09460173 100644 --- a/src/test/ui/span/impl-wrong-item-for-trait.stderr +++ b/src/test/ui/span/impl-wrong-item-for-trait.stderr @@ -1,67 +1,67 @@ error[E0437]: type `bar` is not a member of trait `Foo` --> $DIR/impl-wrong-item-for-trait.rs:41:5 | -41 | type bar = u64; +LL | type bar = u64; | ^^^^^^^^^^^^^^^ not a member of trait `Foo` error[E0323]: item `bar` is an associated const, which doesn't match its trait `Foo` --> $DIR/impl-wrong-item-for-trait.rs:23:5 | -15 | fn bar(&self); +LL | fn bar(&self); | -------------- item in trait ... -23 | const bar: u64 = 1; +LL | const bar: u64 = 1; | ^^^^^^^^^^^^^^^^^^^ does not match trait error[E0046]: not all trait items implemented, missing: `bar` --> $DIR/impl-wrong-item-for-trait.rs:21:1 | -15 | fn bar(&self); +LL | fn bar(&self); | -------------- `bar` from trait ... -21 | impl Foo for FooConstForMethod { +LL | impl Foo for FooConstForMethod { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ missing `bar` in implementation error[E0324]: item `MY_CONST` is an associated method, which doesn't match its trait `Foo` --> $DIR/impl-wrong-item-for-trait.rs:33:5 | -16 | const MY_CONST: u32; +LL | const MY_CONST: u32; | -------------------- item in trait ... -33 | fn MY_CONST() {} +LL | fn MY_CONST() {} | ^^^^^^^^^^^^^^^^ does not match trait error[E0046]: not all trait items implemented, missing: `MY_CONST` --> $DIR/impl-wrong-item-for-trait.rs:30:1 | -16 | const MY_CONST: u32; +LL | const MY_CONST: u32; | -------------------- `MY_CONST` from trait ... -30 | impl Foo for FooMethodForConst { +LL | impl Foo for FooMethodForConst { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ missing `MY_CONST` in implementation error[E0325]: item `bar` is an associated type, which doesn't match its trait `Foo` --> $DIR/impl-wrong-item-for-trait.rs:41:5 | -15 | fn bar(&self); +LL | fn bar(&self); | -------------- item in trait ... -41 | type bar = u64; +LL | type bar = u64; | ^^^^^^^^^^^^^^^ does not match trait error[E0046]: not all trait items implemented, missing: `bar` --> $DIR/impl-wrong-item-for-trait.rs:39:1 | -15 | fn bar(&self); +LL | fn bar(&self); | -------------- `bar` from trait ... -39 | impl Foo for FooTypeForMethod { +LL | impl Foo for FooTypeForMethod { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ missing `bar` in implementation error[E0046]: not all trait items implemented, missing: `fmt` --> $DIR/impl-wrong-item-for-trait.rs:47:1 | -47 | impl Debug for FooTypeForMethod { +LL | impl Debug for FooTypeForMethod { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ missing `fmt` in implementation | = note: `fmt` from trait: `fn(&Self, &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error>` diff --git a/src/test/ui/span/import-ty-params.stderr b/src/test/ui/span/import-ty-params.stderr index e2c3e34c47160..7e2c2d382fd69 100644 --- a/src/test/ui/span/import-ty-params.stderr +++ b/src/test/ui/span/import-ty-params.stderr @@ -1,13 +1,13 @@ error: unexpected generic arguments in path --> $DIR/import-ty-params.rs:24:15 | -24 | import! { a::b::c::S } //~ ERROR unexpected generic arguments in path +LL | import! { a::b::c::S } //~ ERROR unexpected generic arguments in path | ^^^^^^^^^^^^^^ error: unexpected generic arguments in path --> $DIR/import-ty-params.rs:27:15 | -27 | import! { a::b::c::S<> } //~ ERROR unexpected generic arguments in path +LL | import! { a::b::c::S<> } //~ ERROR unexpected generic arguments in path | ^^^^^^^^^^^^ error: aborting due to 2 previous errors diff --git a/src/test/ui/span/issue-11925.stderr b/src/test/ui/span/issue-11925.stderr index 01cd7661fb73d..c8e66c3b9ce1e 100644 --- a/src/test/ui/span/issue-11925.stderr +++ b/src/test/ui/span/issue-11925.stderr @@ -1,13 +1,13 @@ error[E0597]: `x` does not live long enough --> $DIR/issue-11925.rs:18:36 | -18 | let f = to_fn_once(move|| &x); //~ ERROR does not live long enough +LL | let f = to_fn_once(move|| &x); //~ ERROR does not live long enough | ^ | | | borrowed value does not live long enough | `x` dropped here while still borrowed ... -23 | } +LL | } | - borrowed value needs to live until here error: aborting due to previous error diff --git a/src/test/ui/span/issue-15480.stderr b/src/test/ui/span/issue-15480.stderr index 28841fbea973c..44f339d5587e9 100644 --- a/src/test/ui/span/issue-15480.stderr +++ b/src/test/ui/span/issue-15480.stderr @@ -1,12 +1,12 @@ error[E0597]: borrowed value does not live long enough --> $DIR/issue-15480.rs:15:10 | -15 | &id(3) +LL | &id(3) | ^^^^^ temporary value does not live long enough -16 | ]; +LL | ]; | - temporary value dropped here while still borrowed ... -22 | } +LL | } | - temporary value needs to live until here | = note: consider using a `let` binding to increase its lifetime diff --git a/src/test/ui/span/issue-23338-locals-die-before-temps-of-body.stderr b/src/test/ui/span/issue-23338-locals-die-before-temps-of-body.stderr index 1c9a64bc21309..69d19c0d7e297 100644 --- a/src/test/ui/span/issue-23338-locals-die-before-temps-of-body.stderr +++ b/src/test/ui/span/issue-23338-locals-die-before-temps-of-body.stderr @@ -1,9 +1,9 @@ error[E0597]: `y` does not live long enough --> $DIR/issue-23338-locals-die-before-temps-of-body.rs:20:5 | -20 | y.borrow().clone() +LL | y.borrow().clone() | ^ borrowed value does not live long enough -21 | } +LL | } | - `y` dropped here while still borrowed | = note: values in a scope are dropped in the opposite order they are created @@ -11,9 +11,9 @@ error[E0597]: `y` does not live long enough error[E0597]: `y` does not live long enough --> $DIR/issue-23338-locals-die-before-temps-of-body.rs:27:9 | -27 | y.borrow().clone() +LL | y.borrow().clone() | ^ borrowed value does not live long enough -28 | }; +LL | }; | -- borrowed value needs to live until here | | | `y` dropped here while still borrowed diff --git a/src/test/ui/span/issue-23729.stderr b/src/test/ui/span/issue-23729.stderr index 60bf804ff30c4..f22b31039aa77 100644 --- a/src/test/ui/span/issue-23729.stderr +++ b/src/test/ui/span/issue-23729.stderr @@ -1,7 +1,7 @@ error[E0046]: not all trait items implemented, missing: `Item` --> $DIR/issue-23729.rs:20:9 | -20 | impl Iterator for Recurrence { +LL | impl Iterator for Recurrence { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ missing `Item` in implementation | = note: `Item` from trait: `type Item;` diff --git a/src/test/ui/span/issue-23827.stderr b/src/test/ui/span/issue-23827.stderr index d06d6c03616e3..8fff048d149a2 100644 --- a/src/test/ui/span/issue-23827.stderr +++ b/src/test/ui/span/issue-23827.stderr @@ -1,7 +1,7 @@ error[E0046]: not all trait items implemented, missing: `Output` --> $DIR/issue-23827.rs:36:1 | -36 | impl FnOnce<(C,)> for Prototype { +LL | impl FnOnce<(C,)> for Prototype { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ missing `Output` in implementation | = note: `Output` from trait: `type Output;` diff --git a/src/test/ui/span/issue-24356.stderr b/src/test/ui/span/issue-24356.stderr index 58fb943fef827..3a58268be251e 100644 --- a/src/test/ui/span/issue-24356.stderr +++ b/src/test/ui/span/issue-24356.stderr @@ -1,7 +1,7 @@ error[E0046]: not all trait items implemented, missing: `Target` --> $DIR/issue-24356.rs:30:9 | -30 | impl Deref for Thing { +LL | impl Deref for Thing { | ^^^^^^^^^^^^^^^^^^^^ missing `Target` in implementation | = note: `Target` from trait: `type Target;` diff --git a/src/test/ui/span/issue-24690.stderr b/src/test/ui/span/issue-24690.stderr index 31728dbf08db2..6a4ec73b27a66 100644 --- a/src/test/ui/span/issue-24690.stderr +++ b/src/test/ui/span/issue-24690.stderr @@ -1,20 +1,20 @@ warning: unused variable: `theOtherTwo` --> $DIR/issue-24690.rs:23:9 | -23 | let theOtherTwo = 2; //~ WARN should have a snake case name +LL | let theOtherTwo = 2; //~ WARN should have a snake case name | ^^^^^^^^^^^ help: consider using `_theOtherTwo` instead | note: lint level defined here --> $DIR/issue-24690.rs:18:9 | -18 | #![warn(unused)] +LL | #![warn(unused)] | ^^^^^^ = note: #[warn(unused_variables)] implied by #[warn(unused)] warning: variable `theTwo` should have a snake case name such as `the_two` --> $DIR/issue-24690.rs:22:9 | -22 | let theTwo = 2; //~ WARN should have a snake case name +LL | let theTwo = 2; //~ WARN should have a snake case name | ^^^^^^ | = note: #[warn(non_snake_case)] on by default @@ -22,17 +22,17 @@ warning: variable `theTwo` should have a snake case name such as `the_two` warning: variable `theOtherTwo` should have a snake case name such as `the_other_two` --> $DIR/issue-24690.rs:23:9 | -23 | let theOtherTwo = 2; //~ WARN should have a snake case name +LL | let theOtherTwo = 2; //~ WARN should have a snake case name | ^^^^^^^^^^^ error: compilation successful --> $DIR/issue-24690.rs:21:1 | -21 | / fn main() { //~ ERROR compilation successful -22 | | let theTwo = 2; //~ WARN should have a snake case name -23 | | let theOtherTwo = 2; //~ WARN should have a snake case name -24 | | //~^ WARN unused variable -25 | | println!("{}", theTwo); -26 | | } +LL | / fn main() { //~ ERROR compilation successful +LL | | let theTwo = 2; //~ WARN should have a snake case name +LL | | let theOtherTwo = 2; //~ WARN should have a snake case name +LL | | //~^ WARN unused variable +LL | | println!("{}", theTwo); +LL | | } | |_^ diff --git a/src/test/ui/span/issue-24805-dropck-child-has-items-via-parent.stderr b/src/test/ui/span/issue-24805-dropck-child-has-items-via-parent.stderr index f61a091950173..d7f6eaa86a378 100644 --- a/src/test/ui/span/issue-24805-dropck-child-has-items-via-parent.stderr +++ b/src/test/ui/span/issue-24805-dropck-child-has-items-via-parent.stderr @@ -1,10 +1,10 @@ error[E0597]: `d1` does not live long enough --> $DIR/issue-24805-dropck-child-has-items-via-parent.rs:38:19 | -38 | _d = D_Child(&d1); +LL | _d = D_Child(&d1); | ^^ borrowed value does not live long enough ... -43 | } +LL | } | - `d1` dropped here while still borrowed | = note: values in a scope are dropped in the opposite order they are created diff --git a/src/test/ui/span/issue-24805-dropck-trait-has-items.stderr b/src/test/ui/span/issue-24805-dropck-trait-has-items.stderr index 662ec58805d90..f9f5dd54fc0bf 100644 --- a/src/test/ui/span/issue-24805-dropck-trait-has-items.stderr +++ b/src/test/ui/span/issue-24805-dropck-trait-has-items.stderr @@ -1,9 +1,9 @@ error[E0597]: `d1` does not live long enough --> $DIR/issue-24805-dropck-trait-has-items.rs:47:27 | -47 | _d = D_HasSelfMethod(&d1); +LL | _d = D_HasSelfMethod(&d1); | ^^ borrowed value does not live long enough -48 | } +LL | } | - `d1` dropped here while still borrowed | = note: values in a scope are dropped in the opposite order they are created @@ -11,9 +11,9 @@ error[E0597]: `d1` does not live long enough error[E0597]: `d1` does not live long enough --> $DIR/issue-24805-dropck-trait-has-items.rs:53:34 | -53 | _d = D_HasMethodWithSelfArg(&d1); +LL | _d = D_HasMethodWithSelfArg(&d1); | ^^ borrowed value does not live long enough -54 | } +LL | } | - `d1` dropped here while still borrowed | = note: values in a scope are dropped in the opposite order they are created @@ -21,9 +21,9 @@ error[E0597]: `d1` does not live long enough error[E0597]: `d1` does not live long enough --> $DIR/issue-24805-dropck-trait-has-items.rs:59:21 | -59 | _d = D_HasType(&d1); +LL | _d = D_HasType(&d1); | ^^ borrowed value does not live long enough -60 | } +LL | } | - `d1` dropped here while still borrowed | = note: values in a scope are dropped in the opposite order they are created diff --git a/src/test/ui/span/issue-24895-copy-clone-dropck.stderr b/src/test/ui/span/issue-24895-copy-clone-dropck.stderr index 1c68cacad7c99..de1907d85c5f3 100644 --- a/src/test/ui/span/issue-24895-copy-clone-dropck.stderr +++ b/src/test/ui/span/issue-24895-copy-clone-dropck.stderr @@ -1,9 +1,9 @@ error[E0597]: `d1` does not live long enough --> $DIR/issue-24895-copy-clone-dropck.rs:37:15 | -37 | d2 = D(S(&d1, "inner"), "d2"); +LL | d2 = D(S(&d1, "inner"), "d2"); | ^^ borrowed value does not live long enough -38 | } +LL | } | - `d1` dropped here while still borrowed | = note: values in a scope are dropped in the opposite order they are created diff --git a/src/test/ui/span/issue-25199.stderr b/src/test/ui/span/issue-25199.stderr index af02e9d6d54f1..9bc778e6030d2 100644 --- a/src/test/ui/span/issue-25199.stderr +++ b/src/test/ui/span/issue-25199.stderr @@ -1,10 +1,10 @@ error[E0597]: `container` does not live long enough --> $DIR/issue-25199.rs:80:28 | -80 | let test = Test{test: &container}; +LL | let test = Test{test: &container}; | ^^^^^^^^^ borrowed value does not live long enough ... -85 | } +LL | } | - `container` dropped here while still borrowed | = note: values in a scope are dropped in the opposite order they are created @@ -12,10 +12,10 @@ error[E0597]: `container` does not live long enough error[E0597]: `container` does not live long enough --> $DIR/issue-25199.rs:83:5 | -83 | container.store(test); +LL | container.store(test); | ^^^^^^^^^ borrowed value does not live long enough -84 | //~^ ERROR `container` does not live long enough -85 | } +LL | //~^ ERROR `container` does not live long enough +LL | } | - `container` dropped here while still borrowed | = note: values in a scope are dropped in the opposite order they are created diff --git a/src/test/ui/span/issue-26656.stderr b/src/test/ui/span/issue-26656.stderr index 1d632271f8144..bde4bdd58c97a 100644 --- a/src/test/ui/span/issue-26656.stderr +++ b/src/test/ui/span/issue-26656.stderr @@ -1,9 +1,9 @@ error[E0597]: `ticking` does not live long enough --> $DIR/issue-26656.rs:50:36 | -50 | zook.button = B::BigRedButton(&ticking); +LL | zook.button = B::BigRedButton(&ticking); | ^^^^^^^ borrowed value does not live long enough -51 | } +LL | } | - `ticking` dropped here while still borrowed | = note: values in a scope are dropped in the opposite order they are created diff --git a/src/test/ui/span/issue-27522.stderr b/src/test/ui/span/issue-27522.stderr index dc02ad73ee2bc..b7b48cd87fcbd 100644 --- a/src/test/ui/span/issue-27522.stderr +++ b/src/test/ui/span/issue-27522.stderr @@ -1,7 +1,7 @@ error[E0307]: invalid `self` type: &SomeType --> $DIR/issue-27522.rs:16:22 | -16 | fn handler(self: &SomeType); //~ ERROR invalid `self` type +LL | fn handler(self: &SomeType); //~ ERROR invalid `self` type | ^^^^^^^^^ | = note: type must be `Self` or a type that dereferences to it` diff --git a/src/test/ui/span/issue-29106.stderr b/src/test/ui/span/issue-29106.stderr index 24042e23fef01..14b04b1db5db7 100644 --- a/src/test/ui/span/issue-29106.stderr +++ b/src/test/ui/span/issue-29106.stderr @@ -1,9 +1,9 @@ error[E0597]: `x` does not live long enough --> $DIR/issue-29106.rs:26:27 | -26 | y = Arc::new(Foo(&x)); +LL | y = Arc::new(Foo(&x)); | ^ borrowed value does not live long enough -27 | } +LL | } | - `x` dropped here while still borrowed | = note: values in a scope are dropped in the opposite order they are created @@ -11,9 +11,9 @@ error[E0597]: `x` does not live long enough error[E0597]: `x` does not live long enough --> $DIR/issue-29106.rs:33:26 | -33 | y = Rc::new(Foo(&x)); +LL | y = Rc::new(Foo(&x)); | ^ borrowed value does not live long enough -34 | } +LL | } | - `x` dropped here while still borrowed | = note: values in a scope are dropped in the opposite order they are created diff --git a/src/test/ui/span/issue-29595.stderr b/src/test/ui/span/issue-29595.stderr index 9046b90f0e9c3..158ce3c82c67a 100644 --- a/src/test/ui/span/issue-29595.stderr +++ b/src/test/ui/span/issue-29595.stderr @@ -1,13 +1,13 @@ error[E0277]: the trait bound `u8: Tr` is not satisfied --> $DIR/issue-29595.rs:17:17 | -17 | let a: u8 = Tr::C; //~ ERROR the trait bound `u8: Tr` is not satisfied +LL | let a: u8 = Tr::C; //~ ERROR the trait bound `u8: Tr` is not satisfied | ^^^^^ the trait `Tr` is not implemented for `u8` | note: required by `Tr::C` --> $DIR/issue-29595.rs:13:5 | -13 | const C: Self; +LL | const C: Self; | ^^^^^^^^^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/span/issue-33884.stderr b/src/test/ui/span/issue-33884.stderr index 5a9c2051a715d..528d491cac160 100644 --- a/src/test/ui/span/issue-33884.stderr +++ b/src/test/ui/span/issue-33884.stderr @@ -1,7 +1,7 @@ error[E0308]: mismatched types --> $DIR/issue-33884.rs:18:22 | -18 | stream.write_fmt(format!("message received")) +LL | stream.write_fmt(format!("message received")) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected struct `std::fmt::Arguments`, found struct `std::string::String` | = note: expected type `std::fmt::Arguments<'_>` diff --git a/src/test/ui/span/issue-34264.stderr b/src/test/ui/span/issue-34264.stderr index 18860a7456eac..d893b1894b2c7 100644 --- a/src/test/ui/span/issue-34264.stderr +++ b/src/test/ui/span/issue-34264.stderr @@ -1,34 +1,34 @@ error: expected one of `:` or `@`, found `<` --> $DIR/issue-34264.rs:11:14 | -11 | fn foo(Option, String) {} //~ ERROR expected one of +LL | fn foo(Option, String) {} //~ ERROR expected one of | ^ expected one of `:` or `@` here error: expected one of `:` or `@`, found `)` --> $DIR/issue-34264.rs:11:27 | -11 | fn foo(Option, String) {} //~ ERROR expected one of +LL | fn foo(Option, String) {} //~ ERROR expected one of | ^ expected one of `:` or `@` here error: expected one of `:` or `@`, found `,` --> $DIR/issue-34264.rs:13:9 | -13 | fn bar(x, y: usize) {} //~ ERROR expected one of +LL | fn bar(x, y: usize) {} //~ ERROR expected one of | ^ expected one of `:` or `@` here error[E0061]: this function takes 2 parameters but 3 parameters were supplied --> $DIR/issue-34264.rs:17:5 | -11 | fn foo(Option, String) {} //~ ERROR expected one of +LL | fn foo(Option, String) {} //~ ERROR expected one of | --------------------------- defined here ... -17 | foo(Some(42), 2, ""); //~ ERROR this function takes +LL | foo(Some(42), 2, ""); //~ ERROR this function takes | ^^^^^^^^^^^^^^^^^^^^ expected 2 parameters error[E0308]: mismatched types --> $DIR/issue-34264.rs:18:13 | -18 | bar("", ""); //~ ERROR mismatched types +LL | bar("", ""); //~ ERROR mismatched types | ^^ expected usize, found reference | = note: expected type `usize` @@ -37,10 +37,10 @@ error[E0308]: mismatched types error[E0061]: this function takes 2 parameters but 3 parameters were supplied --> $DIR/issue-34264.rs:20:5 | -13 | fn bar(x, y: usize) {} //~ ERROR expected one of +LL | fn bar(x, y: usize) {} //~ ERROR expected one of | ------------------- defined here ... -20 | bar(1, 2, 3); //~ ERROR this function takes +LL | bar(1, 2, 3); //~ ERROR this function takes | ^^^^^^^^^^^^ expected 2 parameters error: aborting due to 6 previous errors diff --git a/src/test/ui/span/issue-35987.stderr b/src/test/ui/span/issue-35987.stderr index 5e7a492ca2ada..d3267d0cc1579 100644 --- a/src/test/ui/span/issue-35987.stderr +++ b/src/test/ui/span/issue-35987.stderr @@ -1,11 +1,11 @@ error[E0404]: expected trait, found type parameter `Add` --> $DIR/issue-35987.rs:15:21 | -15 | impl Add for Foo { +LL | impl Add for Foo { | ^^^ not a trait help: possible better candidate is found in another module, you can import it into scope | -13 | use std::ops::Add; +LL | use std::ops::Add; | error[E0601]: main function not found diff --git a/src/test/ui/span/issue-36530.stderr b/src/test/ui/span/issue-36530.stderr index 7f392104393ad..68826a5f571a0 100644 --- a/src/test/ui/span/issue-36530.stderr +++ b/src/test/ui/span/issue-36530.stderr @@ -1,7 +1,7 @@ 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 +LL | #[foo] //~ ERROR is currently unknown to the compiler | ^^^^^^ | = help: add #![feature(custom_attribute)] to the crate attributes to enable @@ -9,7 +9,7 @@ error[E0658]: The attribute `foo` is currently unknown to the compiler and may h 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 +LL | #![foo] //~ ERROR is currently unknown to the compiler | ^^^^^^^ | = help: add #![feature(custom_attribute)] to the crate attributes to enable diff --git a/src/test/ui/span/issue-36537.stderr b/src/test/ui/span/issue-36537.stderr index 255700a55f335..430535f9a70a4 100644 --- a/src/test/ui/span/issue-36537.stderr +++ b/src/test/ui/span/issue-36537.stderr @@ -1,10 +1,10 @@ error[E0597]: `a` does not live long enough --> $DIR/issue-36537.rs:14:10 | -14 | p = &a; +LL | p = &a; | ^ borrowed value does not live long enough -15 | //~^ ERROR `a` does not live long enough -16 | } +LL | //~^ ERROR `a` does not live long enough +LL | } | - `a` dropped here while still borrowed | = note: values in a scope are dropped in the opposite order they are created diff --git a/src/test/ui/span/issue-37767.stderr b/src/test/ui/span/issue-37767.stderr index e9a1fe82f142a..fb95f49e2e9de 100644 --- a/src/test/ui/span/issue-37767.stderr +++ b/src/test/ui/span/issue-37767.stderr @@ -1,57 +1,57 @@ error[E0034]: multiple applicable items in scope --> $DIR/issue-37767.rs:20:7 | -20 | a.foo() //~ ERROR multiple applicable items +LL | a.foo() //~ ERROR multiple applicable items | ^^^ multiple `foo` found | note: candidate #1 is defined in the trait `A` --> $DIR/issue-37767.rs:12:5 | -12 | fn foo(&mut self) {} +LL | fn foo(&mut self) {} | ^^^^^^^^^^^^^^^^^ = help: to disambiguate the method call, write `A::foo(&a)` instead note: candidate #2 is defined in the trait `B` --> $DIR/issue-37767.rs:16:5 | -16 | fn foo(&mut self) {} +LL | fn foo(&mut self) {} | ^^^^^^^^^^^^^^^^^ = help: to disambiguate the method call, write `B::foo(&a)` instead error[E0034]: multiple applicable items in scope --> $DIR/issue-37767.rs:32:7 | -32 | a.foo() //~ ERROR multiple applicable items +LL | a.foo() //~ ERROR multiple applicable items | ^^^ multiple `foo` found | note: candidate #1 is defined in the trait `C` --> $DIR/issue-37767.rs:24:5 | -24 | fn foo(&self) {} +LL | fn foo(&self) {} | ^^^^^^^^^^^^^ = help: to disambiguate the method call, write `C::foo(&a)` instead note: candidate #2 is defined in the trait `D` --> $DIR/issue-37767.rs:28:5 | -28 | fn foo(&self) {} +LL | fn foo(&self) {} | ^^^^^^^^^^^^^ = help: to disambiguate the method call, write `D::foo(&a)` instead error[E0034]: multiple applicable items in scope --> $DIR/issue-37767.rs:44:7 | -44 | a.foo() //~ ERROR multiple applicable items +LL | a.foo() //~ ERROR multiple applicable items | ^^^ multiple `foo` found | note: candidate #1 is defined in the trait `E` --> $DIR/issue-37767.rs:36:5 | -36 | fn foo(self) {} +LL | fn foo(self) {} | ^^^^^^^^^^^^ = help: to disambiguate the method call, write `E::foo(a)` instead note: candidate #2 is defined in the trait `F` --> $DIR/issue-37767.rs:40:5 | -40 | fn foo(self) {} +LL | fn foo(self) {} | ^^^^^^^^^^^^ = help: to disambiguate the method call, write `F::foo(a)` instead diff --git a/src/test/ui/span/issue-39018.stderr b/src/test/ui/span/issue-39018.stderr index 70f8ecf42cb2d..9bd4454c78334 100644 --- a/src/test/ui/span/issue-39018.stderr +++ b/src/test/ui/span/issue-39018.stderr @@ -1,17 +1,17 @@ error[E0369]: binary operation `+` cannot be applied to type `&str` --> $DIR/issue-39018.rs:12:13 | -12 | let x = "Hello " + "World!"; +LL | let x = "Hello " + "World!"; | ^^^^^^^^^^^^^^^^^^^ `+` can't be used to concatenate two `&str` strings help: `to_owned()` can be used to create an owned `String` from a string reference. String concatenation appends the string on the right to the string on the left and may require reallocation. This requires ownership of the string on the left | -12 | let x = "Hello ".to_owned() + "World!"; +LL | let x = "Hello ".to_owned() + "World!"; | ^^^^^^^^^^^^^^^^^^^ error[E0369]: binary operation `+` cannot be applied to type `World` --> $DIR/issue-39018.rs:18:13 | -18 | let y = World::Hello + World::Goodbye; +LL | let y = World::Hello + World::Goodbye; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = note: an implementation of `std::ops::Add` might be missing for `World` diff --git a/src/test/ui/span/issue-39698.stderr b/src/test/ui/span/issue-39698.stderr index 97d802f839831..de85722c79f63 100644 --- a/src/test/ui/span/issue-39698.stderr +++ b/src/test/ui/span/issue-39698.stderr @@ -1,7 +1,7 @@ error[E0408]: variable `a` is not bound in all patterns --> $DIR/issue-39698.rs:20:23 | -20 | T::T1(a, d) | T::T2(d, b) | T::T3(c) | T::T4(a) => { println!("{:?}", a); } +LL | T::T1(a, d) | T::T2(d, b) | T::T3(c) | T::T4(a) => { println!("{:?}", a); } | - ^^^^^^^^^^^ ^^^^^^^^ - variable not in all patterns | | | | | | | pattern doesn't bind `a` @@ -11,7 +11,7 @@ error[E0408]: variable `a` is not bound in all patterns error[E0408]: variable `d` is not bound in all patterns --> $DIR/issue-39698.rs:20:37 | -20 | T::T1(a, d) | T::T2(d, b) | T::T3(c) | T::T4(a) => { println!("{:?}", a); } +LL | T::T1(a, d) | T::T2(d, b) | T::T3(c) | T::T4(a) => { println!("{:?}", a); } | - - ^^^^^^^^ ^^^^^^^^ pattern doesn't bind `d` | | | | | | | pattern doesn't bind `d` @@ -21,7 +21,7 @@ error[E0408]: variable `d` is not bound in all patterns error[E0408]: variable `b` is not bound in all patterns --> $DIR/issue-39698.rs:20:9 | -20 | T::T1(a, d) | T::T2(d, b) | T::T3(c) | T::T4(a) => { println!("{:?}", a); } +LL | T::T1(a, d) | T::T2(d, b) | T::T3(c) | T::T4(a) => { println!("{:?}", a); } | ^^^^^^^^^^^ - ^^^^^^^^ ^^^^^^^^ pattern doesn't bind `b` | | | | | | | pattern doesn't bind `b` @@ -31,7 +31,7 @@ error[E0408]: variable `b` is not bound in all patterns error[E0408]: variable `c` is not bound in all patterns --> $DIR/issue-39698.rs:20:9 | -20 | T::T1(a, d) | T::T2(d, b) | T::T3(c) | T::T4(a) => { println!("{:?}", a); } +LL | T::T1(a, d) | T::T2(d, b) | T::T3(c) | T::T4(a) => { println!("{:?}", a); } | ^^^^^^^^^^^ ^^^^^^^^^^^ - ^^^^^^^^ pattern doesn't bind `c` | | | | | | | variable not in all patterns diff --git a/src/test/ui/span/issue-40157.stderr b/src/test/ui/span/issue-40157.stderr index cf33ccf8095b5..87138a41a973d 100644 --- a/src/test/ui/span/issue-40157.stderr +++ b/src/test/ui/span/issue-40157.stderr @@ -1,7 +1,7 @@ error[E0597]: `foo` does not live long enough --> $DIR/issue-40157.rs:12:53 | -12 | {println!("{:?}", match { let foo = vec![1, 2]; foo.get(1) } { x => x });} +LL | {println!("{:?}", match { let foo = vec![1, 2]; foo.get(1) } { x => x });} | -----------------------------------------------^^^---------------------- | | | | | | | `foo` dropped here while still borrowed diff --git a/src/test/ui/span/issue-42234-unknown-receiver-type.stderr b/src/test/ui/span/issue-42234-unknown-receiver-type.stderr index d87cec642f18e..296f55e157402 100644 --- a/src/test/ui/span/issue-42234-unknown-receiver-type.stderr +++ b/src/test/ui/span/issue-42234-unknown-receiver-type.stderr @@ -1,16 +1,16 @@ error[E0282]: type annotations needed --> $DIR/issue-42234-unknown-receiver-type.rs:17:5 | -16 | let x: Option<_> = None; +LL | let x: Option<_> = None; | - consider giving `x` a type -17 | x.unwrap().method_that_could_exist_on_some_type(); +LL | x.unwrap().method_that_could_exist_on_some_type(); | ^^^^^^^^^^ cannot infer type for `T` error[E0282]: type annotations needed --> $DIR/issue-42234-unknown-receiver-type.rs:22:5 | -22 | / data.iter() //~ ERROR 22:5: 23:20: type annotations needed -23 | | .sum::<_>() +LL | / data.iter() //~ ERROR 22:5: 23:20: type annotations needed +LL | | .sum::<_>() | |___________________^ cannot infer type for `_` error: aborting due to 2 previous errors diff --git a/src/test/ui/span/issue-43927-non-ADT-derive.stderr b/src/test/ui/span/issue-43927-non-ADT-derive.stderr index a0485bed2f416..e3575c03ff250 100644 --- a/src/test/ui/span/issue-43927-non-ADT-derive.stderr +++ b/src/test/ui/span/issue-43927-non-ADT-derive.stderr @@ -1,7 +1,7 @@ error: `derive` may only be applied to structs, enums and unions --> $DIR/issue-43927-non-ADT-derive.rs:13:1 | -13 | #![derive(Debug, PartialEq, Eq)] // should be an outer attribute! +LL | #![derive(Debug, PartialEq, Eq)] // should be an outer attribute! | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try an outer attribute: `#[derive(Debug, PartialEq, Eq)]` error: aborting due to previous error diff --git a/src/test/ui/span/issue-7575.stderr b/src/test/ui/span/issue-7575.stderr index aeb98e4cabc26..2cc5051460cd9 100644 --- a/src/test/ui/span/issue-7575.stderr +++ b/src/test/ui/span/issue-7575.stderr @@ -1,7 +1,7 @@ error[E0599]: no method named `f9` found for type `usize` in the current scope --> $DIR/issue-7575.rs:74:18 | -74 | u.f8(42) + u.f9(342) + m.fff(42) +LL | u.f8(42) + u.f9(342) + m.fff(42) | ^^ | = note: found the following associated functions; to be used as methods, functions must have a `self` parameter @@ -9,19 +9,19 @@ error[E0599]: no method named `f9` found for type `usize` in the current scope note: candidate #1 is defined in the trait `CtxtFn` --> $DIR/issue-7575.rs:16:5 | -16 | fn f9(_: usize) -> usize; +LL | fn f9(_: usize) -> usize; | ^^^^^^^^^^^^^^^^^^^^^^^^^ = help: to disambiguate the method call, write `CtxtFn::f9(u, 342)` instead note: candidate #2 is defined in the trait `OtherTrait` --> $DIR/issue-7575.rs:20:5 | -20 | fn f9(_: usize) -> usize; +LL | fn f9(_: usize) -> usize; | ^^^^^^^^^^^^^^^^^^^^^^^^^ = help: to disambiguate the method call, write `OtherTrait::f9(u, 342)` instead note: candidate #3 is defined in the trait `UnusedTrait` --> $DIR/issue-7575.rs:29:5 | -29 | fn f9(_: usize) -> usize; +LL | fn f9(_: usize) -> usize; | ^^^^^^^^^^^^^^^^^^^^^^^^^ = help: to disambiguate the method call, write `UnusedTrait::f9(u, 342)` instead = help: items from traits can only be used if the trait is implemented and in scope @@ -33,10 +33,10 @@ note: candidate #3 is defined in the trait `UnusedTrait` error[E0599]: no method named `fff` found for type `Myisize` in the current scope --> $DIR/issue-7575.rs:74:30 | -48 | struct Myisize(isize); +LL | struct Myisize(isize); | ---------------------- method `fff` not found for this ... -74 | u.f8(42) + u.f9(342) + m.fff(42) +LL | u.f8(42) + u.f9(342) + m.fff(42) | ^^^ | = note: found the following associated functions; to be used as methods, functions must have a `self` parameter @@ -44,13 +44,13 @@ error[E0599]: no method named `fff` found for type `Myisize` in the current scop note: candidate #1 is defined in an impl for the type `Myisize` --> $DIR/issue-7575.rs:51:5 | -51 | fn fff(i: isize) -> isize { +LL | fn fff(i: isize) -> isize { | ^^^^^^^^^^^^^^^^^^^^^^^^^ error[E0599]: no method named `is_str` found for type `T` in the current scope --> $DIR/issue-7575.rs:82:7 | -82 | t.is_str() +LL | t.is_str() | ^^^^^^ | = note: found the following associated functions; to be used as methods, functions must have a `self` parameter @@ -58,7 +58,7 @@ error[E0599]: no method named `is_str` found for type `T` in the current scope note: candidate #1 is defined in the trait `ManyImplTrait` --> $DIR/issue-7575.rs:57:5 | -57 | fn is_str() -> bool { +LL | fn is_str() -> bool { | ^^^^^^^^^^^^^^^^^^^ = help: to disambiguate the method call, write `ManyImplTrait::is_str(t)` instead = help: items from traits can only be used if the trait is implemented and in scope diff --git a/src/test/ui/span/issue28498-reject-ex1.stderr b/src/test/ui/span/issue28498-reject-ex1.stderr index 8ade2f38eee3e..9ecaf170d1c0b 100644 --- a/src/test/ui/span/issue28498-reject-ex1.stderr +++ b/src/test/ui/span/issue28498-reject-ex1.stderr @@ -1,10 +1,10 @@ error[E0597]: `foo.data` does not live long enough --> $DIR/issue28498-reject-ex1.rs:44:29 | -44 | foo.data[0].1.set(Some(&foo.data[1])); +LL | foo.data[0].1.set(Some(&foo.data[1])); | ^^^^^^^^ borrowed value does not live long enough ... -48 | } +LL | } | - `foo.data` dropped here while still borrowed | = note: values in a scope are dropped in the opposite order they are created @@ -12,10 +12,10 @@ error[E0597]: `foo.data` does not live long enough error[E0597]: `foo.data` does not live long enough --> $DIR/issue28498-reject-ex1.rs:46:29 | -46 | foo.data[1].1.set(Some(&foo.data[0])); +LL | foo.data[1].1.set(Some(&foo.data[0])); | ^^^^^^^^ borrowed value does not live long enough -47 | //~^ ERROR `foo.data` does not live long enough -48 | } +LL | //~^ ERROR `foo.data` does not live long enough +LL | } | - `foo.data` dropped here while still borrowed | = note: values in a scope are dropped in the opposite order they are created diff --git a/src/test/ui/span/issue28498-reject-lifetime-param.stderr b/src/test/ui/span/issue28498-reject-lifetime-param.stderr index eb287265dac2e..ea40d50ab2c62 100644 --- a/src/test/ui/span/issue28498-reject-lifetime-param.stderr +++ b/src/test/ui/span/issue28498-reject-lifetime-param.stderr @@ -1,10 +1,10 @@ error[E0597]: `last_dropped` does not live long enough --> $DIR/issue28498-reject-lifetime-param.rs:42:20 | -42 | foo0 = Foo(0, &last_dropped); +LL | foo0 = Foo(0, &last_dropped); | ^^^^^^^^^^^^ borrowed value does not live long enough ... -48 | } +LL | } | - `last_dropped` dropped here while still borrowed | = note: values in a scope are dropped in the opposite order they are created @@ -12,10 +12,10 @@ error[E0597]: `last_dropped` does not live long enough error[E0597]: `first_dropped` does not live long enough --> $DIR/issue28498-reject-lifetime-param.rs:44:20 | -44 | foo1 = Foo(1, &first_dropped); +LL | foo1 = Foo(1, &first_dropped); | ^^^^^^^^^^^^^ borrowed value does not live long enough ... -48 | } +LL | } | - `first_dropped` dropped here while still borrowed | = note: values in a scope are dropped in the opposite order they are created diff --git a/src/test/ui/span/issue28498-reject-passed-to-fn.stderr b/src/test/ui/span/issue28498-reject-passed-to-fn.stderr index 53e0e02319f6f..f1d5ba69b2202 100644 --- a/src/test/ui/span/issue28498-reject-passed-to-fn.stderr +++ b/src/test/ui/span/issue28498-reject-passed-to-fn.stderr @@ -1,10 +1,10 @@ error[E0597]: `last_dropped` does not live long enough --> $DIR/issue28498-reject-passed-to-fn.rs:44:20 | -44 | foo0 = Foo(0, &last_dropped, Box::new(callback)); +LL | foo0 = Foo(0, &last_dropped, Box::new(callback)); | ^^^^^^^^^^^^ borrowed value does not live long enough ... -50 | } +LL | } | - `last_dropped` dropped here while still borrowed | = note: values in a scope are dropped in the opposite order they are created @@ -12,10 +12,10 @@ error[E0597]: `last_dropped` does not live long enough error[E0597]: `first_dropped` does not live long enough --> $DIR/issue28498-reject-passed-to-fn.rs:46:20 | -46 | foo1 = Foo(1, &first_dropped, Box::new(callback)); +LL | foo1 = Foo(1, &first_dropped, Box::new(callback)); | ^^^^^^^^^^^^^ borrowed value does not live long enough ... -50 | } +LL | } | - `first_dropped` dropped here while still borrowed | = note: values in a scope are dropped in the opposite order they are created diff --git a/src/test/ui/span/issue28498-reject-trait-bound.stderr b/src/test/ui/span/issue28498-reject-trait-bound.stderr index 6b53745bbc86b..e269287e6bab8 100644 --- a/src/test/ui/span/issue28498-reject-trait-bound.stderr +++ b/src/test/ui/span/issue28498-reject-trait-bound.stderr @@ -1,10 +1,10 @@ error[E0597]: `last_dropped` does not live long enough --> $DIR/issue28498-reject-trait-bound.rs:44:20 | -44 | foo0 = Foo(0, &last_dropped); +LL | foo0 = Foo(0, &last_dropped); | ^^^^^^^^^^^^ borrowed value does not live long enough ... -50 | } +LL | } | - `last_dropped` dropped here while still borrowed | = note: values in a scope are dropped in the opposite order they are created @@ -12,10 +12,10 @@ error[E0597]: `last_dropped` does not live long enough error[E0597]: `first_dropped` does not live long enough --> $DIR/issue28498-reject-trait-bound.rs:46:20 | -46 | foo1 = Foo(1, &first_dropped); +LL | foo1 = Foo(1, &first_dropped); | ^^^^^^^^^^^^^ borrowed value does not live long enough ... -50 | } +LL | } | - `first_dropped` dropped here while still borrowed | = note: values in a scope are dropped in the opposite order they are created diff --git a/src/test/ui/span/lint-unused-unsafe.stderr b/src/test/ui/span/lint-unused-unsafe.stderr index 8a8b104098e40..f85ca4ef00f8d 100644 --- a/src/test/ui/span/lint-unused-unsafe.stderr +++ b/src/test/ui/span/lint-unused-unsafe.stderr @@ -1,25 +1,25 @@ error: unnecessary `unsafe` block --> $DIR/lint-unused-unsafe.rs:26:13 | -26 | fn bad1() { unsafe {} } //~ ERROR: unnecessary `unsafe` block +LL | fn bad1() { unsafe {} } //~ ERROR: unnecessary `unsafe` block | ^^^^^^ unnecessary `unsafe` block | note: lint level defined here --> $DIR/lint-unused-unsafe.rs:14:9 | -14 | #![deny(unused_unsafe)] +LL | #![deny(unused_unsafe)] | ^^^^^^^^^^^^^ error: unnecessary `unsafe` block --> $DIR/lint-unused-unsafe.rs:27:13 | -27 | fn bad2() { unsafe { bad1() } } //~ ERROR: unnecessary `unsafe` block +LL | fn bad2() { unsafe { bad1() } } //~ ERROR: unnecessary `unsafe` block | ^^^^^^ unnecessary `unsafe` block error: unnecessary `unsafe` block --> $DIR/lint-unused-unsafe.rs:28:20 | -28 | unsafe fn bad3() { unsafe {} } //~ ERROR: unnecessary `unsafe` block +LL | unsafe fn bad3() { unsafe {} } //~ ERROR: unnecessary `unsafe` block | ---------------- ^^^^^^ unnecessary `unsafe` block | | | because it's nested under this `unsafe` fn @@ -27,13 +27,13 @@ error: unnecessary `unsafe` block error: unnecessary `unsafe` block --> $DIR/lint-unused-unsafe.rs:29:13 | -29 | fn bad4() { unsafe { callback(||{}) } } //~ ERROR: unnecessary `unsafe` block +LL | fn bad4() { unsafe { callback(||{}) } } //~ ERROR: unnecessary `unsafe` block | ^^^^^^ unnecessary `unsafe` block error: unnecessary `unsafe` block --> $DIR/lint-unused-unsafe.rs:30:20 | -30 | unsafe fn bad5() { unsafe { unsf() } } //~ ERROR: unnecessary `unsafe` block +LL | unsafe fn bad5() { unsafe { unsf() } } //~ ERROR: unnecessary `unsafe` block | ---------------- ^^^^^^ unnecessary `unsafe` block | | | because it's nested under this `unsafe` fn @@ -41,26 +41,26 @@ error: unnecessary `unsafe` block error: unnecessary `unsafe` block --> $DIR/lint-unused-unsafe.rs:33:9 | -32 | unsafe { // don't put the warning here +LL | unsafe { // don't put the warning here | ------ because it's nested under this `unsafe` block -33 | unsafe { //~ ERROR: unnecessary `unsafe` block +LL | unsafe { //~ ERROR: unnecessary `unsafe` block | ^^^^^^ unnecessary `unsafe` block error: unnecessary `unsafe` block --> $DIR/lint-unused-unsafe.rs:39:5 | -38 | unsafe fn bad7() { +LL | unsafe fn bad7() { | ---------------- because it's nested under this `unsafe` fn -39 | unsafe { //~ ERROR: unnecessary `unsafe` block +LL | unsafe { //~ ERROR: unnecessary `unsafe` block | ^^^^^^ unnecessary `unsafe` block error: unnecessary `unsafe` block --> $DIR/lint-unused-unsafe.rs:40:9 | -38 | unsafe fn bad7() { +LL | unsafe fn bad7() { | ---------------- because it's nested under this `unsafe` fn -39 | unsafe { //~ ERROR: unnecessary `unsafe` block -40 | unsafe { //~ ERROR: unnecessary `unsafe` block +LL | unsafe { //~ ERROR: unnecessary `unsafe` block +LL | unsafe { //~ ERROR: unnecessary `unsafe` block | ^^^^^^ unnecessary `unsafe` block error: aborting due to 8 previous errors diff --git a/src/test/ui/span/macro-span-replacement.stderr b/src/test/ui/span/macro-span-replacement.stderr index 728cd12e2c685..bb59fa206df1d 100644 --- a/src/test/ui/span/macro-span-replacement.stderr +++ b/src/test/ui/span/macro-span-replacement.stderr @@ -1,16 +1,16 @@ warning: struct is never used: `S` --> $DIR/macro-span-replacement.rs:17:14 | -17 | $b $a; //~ WARN struct is never used +LL | $b $a; //~ WARN struct is never used | ^ ... -22 | m!(S struct); +LL | m!(S struct); | ------------- in this macro invocation | note: lint level defined here --> $DIR/macro-span-replacement.rs:13:9 | -13 | #![warn(unused)] +LL | #![warn(unused)] | ^^^^^^ = note: #[warn(dead_code)] implied by #[warn(unused)] diff --git a/src/test/ui/span/macro-ty-params.stderr b/src/test/ui/span/macro-ty-params.stderr index 2ac132f708c0f..3988dec88d5a8 100644 --- a/src/test/ui/span/macro-ty-params.stderr +++ b/src/test/ui/span/macro-ty-params.stderr @@ -1,25 +1,25 @@ error: unexpected generic arguments in path --> $DIR/macro-ty-params.rs:20:8 | -20 | m!(MyTrait<>); //~ ERROR generic arguments in macro path +LL | m!(MyTrait<>); //~ ERROR generic arguments in macro path | ^^^^^^^^^ error: generic arguments in macro path --> $DIR/macro-ty-params.rs:18:8 | -18 | foo::!(); //~ ERROR generic arguments in macro path +LL | foo::!(); //~ ERROR generic arguments in macro path | ^^^^^ error: generic arguments in macro path --> $DIR/macro-ty-params.rs:19:8 | -19 | foo::<>!(); //~ ERROR generic arguments in macro path +LL | foo::<>!(); //~ ERROR generic arguments in macro path | ^^^^ error: generic arguments in macro path --> $DIR/macro-ty-params.rs:20:15 | -20 | m!(MyTrait<>); //~ ERROR generic arguments in macro path +LL | m!(MyTrait<>); //~ ERROR generic arguments in macro path | ^^ error: aborting due to 4 previous errors diff --git a/src/test/ui/span/missing-unit-argument.stderr b/src/test/ui/span/missing-unit-argument.stderr index 77d037d497bfc..d87e0d575bd7a 100644 --- a/src/test/ui/span/missing-unit-argument.stderr +++ b/src/test/ui/span/missing-unit-argument.stderr @@ -1,68 +1,68 @@ error[E0061]: this function takes 1 parameter but 0 parameters were supplied --> $DIR/missing-unit-argument.rs:21:33 | -21 | let _: Result<(), String> = Ok(); //~ ERROR this function takes +LL | let _: Result<(), String> = Ok(); //~ ERROR this function takes | ^^^^ help: expected the unit value `()`; create it with empty parentheses | -21 | let _: Result<(), String> = Ok(()); //~ ERROR this function takes +LL | let _: Result<(), String> = Ok(()); //~ ERROR this function takes | ^^ error[E0061]: this function takes 2 parameters but 0 parameters were supplied --> $DIR/missing-unit-argument.rs:22:5 | -11 | fn foo(():(), ():()) {} +LL | fn foo(():(), ():()) {} | -------------------- defined here ... -22 | foo(); //~ ERROR this function takes +LL | foo(); //~ ERROR this function takes | ^^^^^ expected 2 parameters error[E0061]: this function takes 2 parameters but 1 parameter was supplied --> $DIR/missing-unit-argument.rs:23:5 | -11 | fn foo(():(), ():()) {} +LL | fn foo(():(), ():()) {} | -------------------- defined here ... -23 | foo(()); //~ ERROR this function takes +LL | foo(()); //~ ERROR this function takes | ^^^^^^^ expected 2 parameters error[E0061]: this function takes 1 parameter but 0 parameters were supplied --> $DIR/missing-unit-argument.rs:24:5 | -12 | fn bar(():()) {} +LL | fn bar(():()) {} | ------------- defined here ... -24 | bar(); //~ ERROR this function takes +LL | bar(); //~ ERROR this function takes | ^^^^^ help: expected the unit value `()`; create it with empty parentheses | -24 | bar(()); //~ ERROR this function takes +LL | bar(()); //~ ERROR this function takes | ^^ error[E0061]: this function takes 1 parameter but 0 parameters were supplied --> $DIR/missing-unit-argument.rs:25:7 | -16 | fn baz(self, (): ()) { } +LL | fn baz(self, (): ()) { } | -------------------- defined here ... -25 | S.baz(); //~ ERROR this function takes +LL | S.baz(); //~ ERROR this function takes | ^^^ help: expected the unit value `()`; create it with empty parentheses | -25 | S.baz(()); //~ ERROR this function takes +LL | S.baz(()); //~ ERROR this function takes | ^^ error[E0061]: this function takes 1 parameter but 0 parameters were supplied --> $DIR/missing-unit-argument.rs:26:7 | -17 | fn generic(self, _: T) { } +LL | fn generic(self, _: T) { } | ------------------------- defined here ... -26 | S.generic::<()>(); //~ ERROR this function takes +LL | S.generic::<()>(); //~ ERROR this function takes | ^^^^^^^ help: expected the unit value `()`; create it with empty parentheses | -26 | S.generic::<()>(()); //~ ERROR this function takes +LL | S.generic::<()>(()); //~ ERROR this function takes | ^^ error: aborting due to 6 previous errors diff --git a/src/test/ui/span/move-closure.stderr b/src/test/ui/span/move-closure.stderr index 9135a26bbaf77..70cb93863f42a 100644 --- a/src/test/ui/span/move-closure.stderr +++ b/src/test/ui/span/move-closure.stderr @@ -1,7 +1,7 @@ error[E0308]: mismatched types --> $DIR/move-closure.rs:15:17 | -15 | let x: () = move || (); //~ ERROR mismatched types +LL | let x: () = move || (); //~ ERROR mismatched types | ^^^^^^^^^^ expected (), found closure | = note: expected type `()` diff --git a/src/test/ui/span/multiline-span-E0072.stderr b/src/test/ui/span/multiline-span-E0072.stderr index 124a53219a9dc..ceee61425a9c3 100644 --- a/src/test/ui/span/multiline-span-E0072.stderr +++ b/src/test/ui/span/multiline-span-E0072.stderr @@ -1,13 +1,13 @@ error[E0072]: recursive type `ListNode` has infinite size --> $DIR/multiline-span-E0072.rs:12:1 | -12 | / struct //~ ERROR has infinite size -13 | | ListNode -14 | | { -15 | | head: u8, -16 | | tail: Option, +LL | / struct //~ ERROR has infinite size +LL | | ListNode +LL | | { +LL | | head: u8, +LL | | tail: Option, | | ---------------------- recursive without indirection -17 | | } +LL | | } | |_^ recursive type has infinite size | = help: insert indirection (e.g., a `Box`, `Rc`, or `&`) at some point to make `ListNode` representable diff --git a/src/test/ui/span/multiline-span-simple.stderr b/src/test/ui/span/multiline-span-simple.stderr index a18dfeb31d9ef..78eaeebba1e73 100644 --- a/src/test/ui/span/multiline-span-simple.stderr +++ b/src/test/ui/span/multiline-span-simple.stderr @@ -1,7 +1,7 @@ error[E0277]: cannot add `()` to `u32` --> $DIR/multiline-span-simple.rs:23:18 | -23 | foo(1 as u32 + //~ ERROR cannot add `()` to `u32` +LL | foo(1 as u32 + //~ ERROR cannot add `()` to `u32` | ^ no implementation for `u32 + ()` | = help: the trait `std::ops::Add<()>` is not implemented for `u32` diff --git a/src/test/ui/span/multispan-import-lint.stderr b/src/test/ui/span/multispan-import-lint.stderr index e2c1d9cdc79ad..da22b217b82c5 100644 --- a/src/test/ui/span/multispan-import-lint.stderr +++ b/src/test/ui/span/multispan-import-lint.stderr @@ -1,13 +1,13 @@ warning: unused imports: `Eq`, `Ord`, `PartialEq`, `PartialOrd` --> $DIR/multispan-import-lint.rs:15:16 | -15 | use std::cmp::{Eq, Ord, min, PartialEq, PartialOrd}; +LL | use std::cmp::{Eq, Ord, min, PartialEq, PartialOrd}; | ^^ ^^^ ^^^^^^^^^ ^^^^^^^^^^ | note: lint level defined here --> $DIR/multispan-import-lint.rs:13:9 | -13 | #![warn(unused)] +LL | #![warn(unused)] | ^^^^^^ = note: #[warn(unused_imports)] implied by #[warn(unused)] diff --git a/src/test/ui/span/mut-arg-hint.stderr b/src/test/ui/span/mut-arg-hint.stderr index 02c607ddc3775..ed562728fce70 100644 --- a/src/test/ui/span/mut-arg-hint.stderr +++ b/src/test/ui/span/mut-arg-hint.stderr @@ -1,25 +1,25 @@ error[E0596]: cannot borrow immutable borrowed content `*a` as mutable --> $DIR/mut-arg-hint.rs:13:9 | -12 | fn foo(mut a: &String) { +LL | fn foo(mut a: &String) { | ------- use `&mut String` here to make mutable -13 | a.push_str("bar"); //~ ERROR cannot borrow immutable borrowed content +LL | a.push_str("bar"); //~ ERROR cannot borrow immutable borrowed content | ^ cannot borrow as mutable error[E0596]: cannot borrow immutable borrowed content `*a` as mutable --> $DIR/mut-arg-hint.rs:18:5 | -17 | pub fn foo<'a>(mut a: &'a String) { +LL | pub fn foo<'a>(mut a: &'a String) { | ---------- use `&'a mut String` here to make mutable -18 | a.push_str("foo"); //~ ERROR cannot borrow immutable borrowed content +LL | a.push_str("foo"); //~ ERROR cannot borrow immutable borrowed content | ^ cannot borrow as mutable error[E0596]: cannot borrow immutable borrowed content `*a` as mutable --> $DIR/mut-arg-hint.rs:25:9 | -24 | pub fn foo(mut a: &String) { +LL | pub fn foo(mut a: &String) { | ------- use `&mut String` here to make mutable -25 | a.push_str("foo"); //~ ERROR cannot borrow immutable borrowed content +LL | a.push_str("foo"); //~ ERROR cannot borrow immutable borrowed content | ^ cannot borrow as mutable error: aborting due to 3 previous errors diff --git a/src/test/ui/span/mut-ptr-cant-outlive-ref.stderr b/src/test/ui/span/mut-ptr-cant-outlive-ref.stderr index e39af8501742d..e9ec300eed31d 100644 --- a/src/test/ui/span/mut-ptr-cant-outlive-ref.stderr +++ b/src/test/ui/span/mut-ptr-cant-outlive-ref.stderr @@ -1,12 +1,12 @@ error[E0597]: `b` does not live long enough --> $DIR/mut-ptr-cant-outlive-ref.rs:18:15 | -18 | p = &*b; +LL | p = &*b; | ^ borrowed value does not live long enough -19 | } +LL | } | - `b` dropped here while still borrowed -20 | //~^^ ERROR `b` does not live long enough -21 | } +LL | //~^^ ERROR `b` does not live long enough +LL | } | - borrowed value needs to live until here error: aborting due to previous error diff --git a/src/test/ui/span/non-existing-module-import.stderr b/src/test/ui/span/non-existing-module-import.stderr index 74f5dac493772..8cfaf26177dfd 100644 --- a/src/test/ui/span/non-existing-module-import.stderr +++ b/src/test/ui/span/non-existing-module-import.stderr @@ -1,7 +1,7 @@ error[E0432]: unresolved import `std::bar` --> $DIR/non-existing-module-import.rs:11:10 | -11 | use std::bar::{foo1, foo2}; //~ ERROR unresolved import +LL | use std::bar::{foo1, foo2}; //~ ERROR unresolved import | ^^^ Could not find `bar` in `std` error: aborting due to previous error diff --git a/src/test/ui/span/pub-struct-field.stderr b/src/test/ui/span/pub-struct-field.stderr index 5b303758d2bac..c73db76c47faf 100644 --- a/src/test/ui/span/pub-struct-field.stderr +++ b/src/test/ui/span/pub-struct-field.stderr @@ -1,18 +1,18 @@ error[E0124]: field `bar` is already declared --> $DIR/pub-struct-field.rs:16:5 | -15 | bar: u8, +LL | bar: u8, | ------- `bar` first declared here -16 | pub bar: u8, //~ ERROR is already declared +LL | pub bar: u8, //~ ERROR is already declared | ^^^^^^^^^^^ field already declared error[E0124]: field `bar` is already declared --> $DIR/pub-struct-field.rs:17:5 | -15 | bar: u8, +LL | bar: u8, | ------- `bar` first declared here -16 | pub bar: u8, //~ ERROR is already declared -17 | pub(crate) bar: u8, //~ ERROR is already declared +LL | pub bar: u8, //~ ERROR is already declared +LL | pub(crate) bar: u8, //~ ERROR is already declared | ^^^^^^^^^^^^^^^^^^ field already declared error: aborting due to 2 previous errors diff --git a/src/test/ui/span/range-2.stderr b/src/test/ui/span/range-2.stderr index 106a8a7667fb4..3ba3a4462a060 100644 --- a/src/test/ui/span/range-2.stderr +++ b/src/test/ui/span/range-2.stderr @@ -1,23 +1,23 @@ error[E0597]: `a` does not live long enough --> $DIR/range-2.rs:17:10 | -17 | &a..&b +LL | &a..&b | ^ borrowed value does not live long enough -18 | }; +LL | }; | - `a` dropped here while still borrowed ... -21 | } +LL | } | - borrowed value needs to live until here error[E0597]: `b` does not live long enough --> $DIR/range-2.rs:17:14 | -17 | &a..&b +LL | &a..&b | ^ borrowed value does not live long enough -18 | }; +LL | }; | - `b` dropped here while still borrowed ... -21 | } +LL | } | - borrowed value needs to live until here error: aborting due to 2 previous errors diff --git a/src/test/ui/span/recursive-type-field.stderr b/src/test/ui/span/recursive-type-field.stderr index bd9f5f032ef37..3f7cd0ae32c33 100644 --- a/src/test/ui/span/recursive-type-field.stderr +++ b/src/test/ui/span/recursive-type-field.stderr @@ -1,9 +1,9 @@ error[E0072]: recursive type `Foo` has infinite size --> $DIR/recursive-type-field.rs:13:1 | -13 | struct Foo<'a> { //~ ERROR recursive type +LL | struct Foo<'a> { //~ ERROR recursive type | ^^^^^^^^^^^^^^ recursive type has infinite size -14 | bar: Bar<'a>, +LL | bar: Bar<'a>, | ------------ recursive without indirection | = help: insert indirection (e.g., a `Box`, `Rc`, or `&`) at some point to make `Foo` representable @@ -11,18 +11,18 @@ error[E0072]: recursive type `Foo` has infinite size error[E0072]: recursive type `Bar` has infinite size --> $DIR/recursive-type-field.rs:18:1 | -18 | struct Bar<'a> { //~ ERROR recursive type +LL | struct Bar<'a> { //~ ERROR recursive type | ^^^^^^^^^^^^^^ recursive type has infinite size -19 | y: (Foo<'a>, Foo<'a>), +LL | y: (Foo<'a>, Foo<'a>), | --------------------- recursive without indirection -20 | z: Option>, +LL | z: Option>, | ------------------ recursive without indirection ... -23 | d: [Bar<'a>; 1], +LL | d: [Bar<'a>; 1], | --------------- recursive without indirection -24 | e: Foo<'a>, +LL | e: Foo<'a>, | ---------- recursive without indirection -25 | x: Bar<'a>, +LL | x: Bar<'a>, | ---------- recursive without indirection | = help: insert indirection (e.g., a `Box`, `Rc`, or `&`) at some point to make `Bar` representable diff --git a/src/test/ui/span/regionck-unboxed-closure-lifetimes.stderr b/src/test/ui/span/regionck-unboxed-closure-lifetimes.stderr index ca453c22cce4f..b1f6dd5eb5e60 100644 --- a/src/test/ui/span/regionck-unboxed-closure-lifetimes.stderr +++ b/src/test/ui/span/regionck-unboxed-closure-lifetimes.stderr @@ -1,12 +1,12 @@ error[E0597]: `c` does not live long enough --> $DIR/regionck-unboxed-closure-lifetimes.rs:17:22 | -17 | let c_ref = &c; +LL | let c_ref = &c; | ^ borrowed value does not live long enough ... -20 | } +LL | } | - `c` dropped here while still borrowed -21 | } +LL | } | - borrowed value needs to live until here error: aborting due to previous error diff --git a/src/test/ui/span/regions-close-over-borrowed-ref-in-obj.stderr b/src/test/ui/span/regions-close-over-borrowed-ref-in-obj.stderr index 12f70676220b7..d44b0a9f66781 100644 --- a/src/test/ui/span/regions-close-over-borrowed-ref-in-obj.stderr +++ b/src/test/ui/span/regions-close-over-borrowed-ref-in-obj.stderr @@ -1,12 +1,12 @@ error[E0597]: borrowed value does not live long enough --> $DIR/regions-close-over-borrowed-ref-in-obj.rs:22:27 | -22 | let ss: &isize = &id(1); +LL | let ss: &isize = &id(1); | ^^^^^ temporary value does not live long enough ... -25 | } +LL | } | - temporary value dropped here while still borrowed -26 | } +LL | } | - temporary value needs to live until here error: aborting due to previous error diff --git a/src/test/ui/span/regions-close-over-type-parameter-2.stderr b/src/test/ui/span/regions-close-over-type-parameter-2.stderr index b90e67d5a3cee..b5af84d8efaa7 100644 --- a/src/test/ui/span/regions-close-over-type-parameter-2.stderr +++ b/src/test/ui/span/regions-close-over-type-parameter-2.stderr @@ -1,10 +1,10 @@ error[E0597]: `tmp0` does not live long enough --> $DIR/regions-close-over-type-parameter-2.rs:33:21 | -33 | let tmp1 = &tmp0; +LL | let tmp1 = &tmp0; | ^^^^ borrowed value does not live long enough -34 | repeater3(tmp1) -35 | }; +LL | repeater3(tmp1) +LL | }; | -- borrowed value needs to live until here | | | `tmp0` dropped here while still borrowed diff --git a/src/test/ui/span/regions-escape-loop-via-variable.stderr b/src/test/ui/span/regions-escape-loop-via-variable.stderr index 8cdf4e2d8226f..7bd43903ec180 100644 --- a/src/test/ui/span/regions-escape-loop-via-variable.stderr +++ b/src/test/ui/span/regions-escape-loop-via-variable.stderr @@ -1,12 +1,12 @@ error[E0597]: `x` does not live long enough --> $DIR/regions-escape-loop-via-variable.rs:21:14 | -21 | p = &x; +LL | p = &x; | ^ borrowed value does not live long enough -22 | } +LL | } | - `x` dropped here while still borrowed -23 | //~^^ ERROR `x` does not live long enough -24 | } +LL | //~^^ ERROR `x` does not live long enough +LL | } | - borrowed value needs to live until here error: aborting due to previous error diff --git a/src/test/ui/span/regions-escape-loop-via-vec.stderr b/src/test/ui/span/regions-escape-loop-via-vec.stderr index 73ff449b2b532..970a123bb4c21 100644 --- a/src/test/ui/span/regions-escape-loop-via-vec.stderr +++ b/src/test/ui/span/regions-escape-loop-via-vec.stderr @@ -1,38 +1,38 @@ error[E0597]: `z` does not live long enough --> $DIR/regions-escape-loop-via-vec.rs:17:22 | -17 | _y.push(&mut z); +LL | _y.push(&mut z); | ^ borrowed value does not live long enough ... -20 | } +LL | } | - `z` dropped here while still borrowed -21 | } +LL | } | - borrowed value needs to live until here error[E0503]: cannot use `x` because it was mutably borrowed --> $DIR/regions-escape-loop-via-vec.rs:15:11 | -14 | let mut _y = vec![&mut x]; +LL | let mut _y = vec![&mut x]; | - borrow of `x` occurs here -15 | while x < 10 { //~ ERROR cannot use `x` because it was mutably borrowed +LL | while x < 10 { //~ ERROR cannot use `x` because it was mutably borrowed | ^ use of borrowed `x` error[E0503]: cannot use `x` because it was mutably borrowed --> $DIR/regions-escape-loop-via-vec.rs:16:13 | -14 | let mut _y = vec![&mut x]; +LL | let mut _y = vec![&mut x]; | - borrow of `x` occurs here -15 | while x < 10 { //~ ERROR cannot use `x` because it was mutably borrowed -16 | let mut z = x; //~ ERROR cannot use `x` because it was mutably borrowed +LL | while x < 10 { //~ ERROR cannot use `x` because it was mutably borrowed +LL | let mut z = x; //~ ERROR cannot use `x` because it was mutably borrowed | ^^^^^ use of borrowed `x` error[E0506]: cannot assign to `x` because it is borrowed --> $DIR/regions-escape-loop-via-vec.rs:19:9 | -14 | let mut _y = vec![&mut x]; +LL | let mut _y = vec![&mut x]; | - borrow of `x` occurs here ... -19 | x += 1; //~ ERROR cannot assign +LL | x += 1; //~ ERROR cannot assign | ^^^^^^ assignment to borrowed `x` occurs here error: aborting due to 4 previous errors diff --git a/src/test/ui/span/regions-infer-borrow-scope-within-loop.stderr b/src/test/ui/span/regions-infer-borrow-scope-within-loop.stderr index 1fc7e05f496ba..edaf2b61aa352 100644 --- a/src/test/ui/span/regions-infer-borrow-scope-within-loop.stderr +++ b/src/test/ui/span/regions-infer-borrow-scope-within-loop.stderr @@ -1,13 +1,13 @@ error[E0597]: `*x` does not live long enough --> $DIR/regions-infer-borrow-scope-within-loop.rs:24:21 | -24 | y = borrow(&*x); +LL | y = borrow(&*x); | ^^ borrowed value does not live long enough ... -29 | } +LL | } | - `*x` dropped here while still borrowed -30 | assert!(*y != 0); -31 | } +LL | assert!(*y != 0); +LL | } | - borrowed value needs to live until here error: aborting due to previous error diff --git a/src/test/ui/span/send-is-not-static-ensures-scoping.stderr b/src/test/ui/span/send-is-not-static-ensures-scoping.stderr index 657682d962d15..582e095163789 100644 --- a/src/test/ui/span/send-is-not-static-ensures-scoping.stderr +++ b/src/test/ui/span/send-is-not-static-ensures-scoping.stderr @@ -1,27 +1,27 @@ error[E0597]: `x` does not live long enough --> $DIR/send-is-not-static-ensures-scoping.rs:26:18 | -26 | let y = &x; +LL | let y = &x; | ^ borrowed value does not live long enough ... -33 | }; +LL | }; | - `x` dropped here while still borrowed ... -36 | } +LL | } | - borrowed value needs to live until here error[E0597]: `y` does not live long enough --> $DIR/send-is-not-static-ensures-scoping.rs:30:22 | -29 | scoped(|| { +LL | scoped(|| { | -- capture occurs here -30 | let _z = y; +LL | let _z = y; | ^ borrowed value does not live long enough ... -33 | }; +LL | }; | - borrowed value only lives until here ... -36 | } +LL | } | - borrowed value needs to live until here error: aborting due to 2 previous errors diff --git a/src/test/ui/span/send-is-not-static-std-sync-2.stderr b/src/test/ui/span/send-is-not-static-std-sync-2.stderr index af8b7aeaa6357..af01f90106b10 100644 --- a/src/test/ui/span/send-is-not-static-std-sync-2.stderr +++ b/src/test/ui/span/send-is-not-static-std-sync-2.stderr @@ -1,35 +1,35 @@ error[E0597]: `x` does not live long enough --> $DIR/send-is-not-static-std-sync-2.rs:21:21 | -21 | Mutex::new(&x) +LL | Mutex::new(&x) | ^ borrowed value does not live long enough -22 | }; +LL | }; | - `x` dropped here while still borrowed ... -26 | } +LL | } | - borrowed value needs to live until here error[E0597]: `x` does not live long enough --> $DIR/send-is-not-static-std-sync-2.rs:31:22 | -31 | RwLock::new(&x) +LL | RwLock::new(&x) | ^ borrowed value does not live long enough -32 | }; +LL | }; | - `x` dropped here while still borrowed ... -35 | } +LL | } | - borrowed value needs to live until here error[E0597]: `x` does not live long enough --> $DIR/send-is-not-static-std-sync-2.rs:41:26 | -41 | let _ = tx.send(&x); +LL | let _ = tx.send(&x); | ^ borrowed value does not live long enough -42 | (tx, rx) -43 | }; +LL | (tx, rx) +LL | }; | - `x` dropped here while still borrowed ... -47 | } +LL | } | - borrowed value needs to live until here error: aborting due to 3 previous errors diff --git a/src/test/ui/span/send-is-not-static-std-sync.stderr b/src/test/ui/span/send-is-not-static-std-sync.stderr index 7c61398a8640e..4cef3a0742303 100644 --- a/src/test/ui/span/send-is-not-static-std-sync.stderr +++ b/src/test/ui/span/send-is-not-static-std-sync.stderr @@ -1,58 +1,58 @@ error[E0597]: `z` does not live long enough --> $DIR/send-is-not-static-std-sync.rs:26:34 | -26 | *lock.lock().unwrap() = &z; +LL | *lock.lock().unwrap() = &z; | ^ borrowed value does not live long enough -27 | } +LL | } | - `z` dropped here while still borrowed -28 | //~^^ ERROR `z` does not live long enough -29 | } +LL | //~^^ ERROR `z` does not live long enough +LL | } | - borrowed value needs to live until here error[E0505]: cannot move out of `y` because it is borrowed --> $DIR/send-is-not-static-std-sync.rs:23:10 | -22 | *lock.lock().unwrap() = &*y; +LL | *lock.lock().unwrap() = &*y; | -- borrow of `*y` occurs here -23 | drop(y); //~ ERROR cannot move out +LL | drop(y); //~ ERROR cannot move out | ^ move out of `y` occurs here error[E0597]: `z` does not live long enough --> $DIR/send-is-not-static-std-sync.rs:39:35 | -39 | *lock.write().unwrap() = &z; +LL | *lock.write().unwrap() = &z; | ^ borrowed value does not live long enough -40 | } +LL | } | - `z` dropped here while still borrowed -41 | //~^^ ERROR `z` does not live long enough -42 | } +LL | //~^^ ERROR `z` does not live long enough +LL | } | - borrowed value needs to live until here error[E0505]: cannot move out of `y` because it is borrowed --> $DIR/send-is-not-static-std-sync.rs:36:10 | -35 | *lock.write().unwrap() = &*y; +LL | *lock.write().unwrap() = &*y; | -- borrow of `*y` occurs here -36 | drop(y); //~ ERROR cannot move out +LL | drop(y); //~ ERROR cannot move out | ^ move out of `y` occurs here error[E0597]: `z` does not live long enough --> $DIR/send-is-not-static-std-sync.rs:54:18 | -54 | tx.send(&z).unwrap(); +LL | tx.send(&z).unwrap(); | ^ borrowed value does not live long enough -55 | } +LL | } | - `z` dropped here while still borrowed -56 | //~^^ ERROR `z` does not live long enough -57 | } +LL | //~^^ ERROR `z` does not live long enough +LL | } | - borrowed value needs to live until here error[E0505]: cannot move out of `y` because it is borrowed --> $DIR/send-is-not-static-std-sync.rs:51:10 | -50 | tx.send(&*y); +LL | tx.send(&*y); | -- borrow of `*y` occurs here -51 | drop(y); //~ ERROR cannot move out +LL | drop(y); //~ ERROR cannot move out | ^ move out of `y` occurs here error: aborting due to 6 previous errors diff --git a/src/test/ui/span/slice-borrow.stderr b/src/test/ui/span/slice-borrow.stderr index 540aae0983a26..6d8f8627e723f 100644 --- a/src/test/ui/span/slice-borrow.stderr +++ b/src/test/ui/span/slice-borrow.stderr @@ -1,12 +1,12 @@ error[E0597]: borrowed value does not live long enough --> $DIR/slice-borrow.rs:16:28 | -16 | let x: &[isize] = &vec![1, 2, 3, 4, 5]; +LL | let x: &[isize] = &vec![1, 2, 3, 4, 5]; | ^^^^^^^^^^^^^^^^^^^ temporary value does not live long enough -17 | y = &x[1..]; -18 | } +LL | y = &x[1..]; +LL | } | - temporary value dropped here while still borrowed -19 | } +LL | } | - temporary value needs to live until here | = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info) diff --git a/src/test/ui/span/suggestion-non-ascii.stderr b/src/test/ui/span/suggestion-non-ascii.stderr index 9ee8ccb01d0f1..8a7eba0ef9fe6 100644 --- a/src/test/ui/span/suggestion-non-ascii.stderr +++ b/src/test/ui/span/suggestion-non-ascii.stderr @@ -1,7 +1,7 @@ error[E0608]: cannot index into a value of type `({integer},)` --> $DIR/suggestion-non-ascii.rs:14:21 | -14 | println!("☃{}", tup[0]); //~ ERROR cannot index into a value of type +LL | println!("☃{}", tup[0]); //~ ERROR cannot index into a value of type | ^^^^^^ help: to access tuple elements, use: `tup.0` error: aborting due to previous error diff --git a/src/test/ui/span/type-binding.stderr b/src/test/ui/span/type-binding.stderr index dc37acaf3f98e..a5fcd0fdda079 100644 --- a/src/test/ui/span/type-binding.stderr +++ b/src/test/ui/span/type-binding.stderr @@ -1,7 +1,7 @@ error[E0220]: associated type `Trget` not found for `std::ops::Deref` --> $DIR/type-binding.rs:16:20 | -16 | fn homura>(_: T) {} +LL | fn homura>(_: T) {} | ^^^^^^^^^^^ associated type `Trget` not found error: aborting due to previous error diff --git a/src/test/ui/span/typo-suggestion.stderr b/src/test/ui/span/typo-suggestion.stderr index 2a084b1ae67ff..0a76e0b85eb72 100644 --- a/src/test/ui/span/typo-suggestion.stderr +++ b/src/test/ui/span/typo-suggestion.stderr @@ -1,13 +1,13 @@ error[E0425]: cannot find value `bar` in this scope --> $DIR/typo-suggestion.rs:15:26 | -15 | println!("Hello {}", bar); //~ ERROR cannot find value +LL | println!("Hello {}", bar); //~ ERROR cannot find value | ^^^ not found in this scope error[E0425]: cannot find value `fob` in this scope --> $DIR/typo-suggestion.rs:18:26 | -18 | println!("Hello {}", fob); //~ ERROR cannot find value +LL | println!("Hello {}", fob); //~ ERROR cannot find value | ^^^ did you mean `foo`? error: aborting due to 2 previous errors diff --git a/src/test/ui/span/unused-warning-point-at-signature.stderr b/src/test/ui/span/unused-warning-point-at-signature.stderr index ed36bd1780178..de234344d8409 100644 --- a/src/test/ui/span/unused-warning-point-at-signature.stderr +++ b/src/test/ui/span/unused-warning-point-at-signature.stderr @@ -1,36 +1,36 @@ warning: enum is never used: `Enum` --> $DIR/unused-warning-point-at-signature.rs:15:1 | -15 | enum Enum { //~ WARN enum is never used +LL | enum Enum { //~ WARN enum is never used | ^^^^^^^^^ | note: lint level defined here --> $DIR/unused-warning-point-at-signature.rs:13:9 | -13 | #![warn(unused)] +LL | #![warn(unused)] | ^^^^^^ = note: #[warn(dead_code)] implied by #[warn(unused)] warning: struct is never used: `Struct` --> $DIR/unused-warning-point-at-signature.rs:22:1 | -22 | struct Struct { //~ WARN struct is never used +LL | struct Struct { //~ WARN struct is never used | ^^^^^^^^^^^^^ warning: function is never used: `func` --> $DIR/unused-warning-point-at-signature.rs:29:1 | -29 | fn func() -> usize { //~ WARN function is never used +LL | fn func() -> usize { //~ WARN function is never used | ^^^^^^^^^^^^^^^^^^ warning: function is never used: `func_complete_span` --> $DIR/unused-warning-point-at-signature.rs:33:1 | -33 | / fn //~ WARN function is never used -34 | | func_complete_span() -35 | | -> usize -36 | | { -37 | | 3 -38 | | } +LL | / fn //~ WARN function is never used +LL | | func_complete_span() +LL | | -> usize +LL | | { +LL | | 3 +LL | | } | |_^ diff --git a/src/test/ui/span/vec-must-not-hide-type-from-dropck.stderr b/src/test/ui/span/vec-must-not-hide-type-from-dropck.stderr index cc8e58179ed4f..8ee8f0c2936d6 100644 --- a/src/test/ui/span/vec-must-not-hide-type-from-dropck.stderr +++ b/src/test/ui/span/vec-must-not-hide-type-from-dropck.stderr @@ -1,24 +1,24 @@ error[E0597]: `c2` does not live long enough - --> $DIR/vec-must-not-hide-type-from-dropck.rs:127:25 - | -127 | c1.v[0].v.set(Some(&c2)); - | ^^ borrowed value does not live long enough + --> $DIR/vec-must-not-hide-type-from-dropck.rs:127:25 + | +LL | c1.v[0].v.set(Some(&c2)); + | ^^ borrowed value does not live long enough ... -131 | } - | - `c2` dropped here while still borrowed - | - = note: values in a scope are dropped in the opposite order they are created +LL | } + | - `c2` dropped here while still borrowed + | + = note: values in a scope are dropped in the opposite order they are created error[E0597]: `c1` does not live long enough - --> $DIR/vec-must-not-hide-type-from-dropck.rs:129:25 - | -129 | c2.v[0].v.set(Some(&c1)); - | ^^ borrowed value does not live long enough -130 | //~^ ERROR `c1` does not live long enough -131 | } - | - `c1` dropped here while still borrowed - | - = note: values in a scope are dropped in the opposite order they are created + --> $DIR/vec-must-not-hide-type-from-dropck.rs:129:25 + | +LL | c2.v[0].v.set(Some(&c1)); + | ^^ borrowed value does not live long enough +LL | //~^ ERROR `c1` does not live long enough +LL | } + | - `c1` dropped here while still borrowed + | + = note: values in a scope are dropped in the opposite order they are created error: aborting due to 2 previous errors diff --git a/src/test/ui/span/vec_refs_data_with_early_death.stderr b/src/test/ui/span/vec_refs_data_with_early_death.stderr index acfc7babe01f7..a6130322939c5 100644 --- a/src/test/ui/span/vec_refs_data_with_early_death.stderr +++ b/src/test/ui/span/vec_refs_data_with_early_death.stderr @@ -1,10 +1,10 @@ error[E0597]: `x` does not live long enough --> $DIR/vec_refs_data_with_early_death.rs:27:13 | -27 | v.push(&x); +LL | v.push(&x); | ^ borrowed value does not live long enough ... -33 | } +LL | } | - `x` dropped here while still borrowed | = note: values in a scope are dropped in the opposite order they are created @@ -12,10 +12,10 @@ error[E0597]: `x` does not live long enough error[E0597]: `y` does not live long enough --> $DIR/vec_refs_data_with_early_death.rs:29:13 | -29 | v.push(&y); +LL | v.push(&y); | ^ borrowed value does not live long enough ... -33 | } +LL | } | - `y` dropped here while still borrowed | = note: values in a scope are dropped in the opposite order they are created diff --git a/src/test/ui/span/visibility-ty-params.stderr b/src/test/ui/span/visibility-ty-params.stderr index 8460f81af8335..7719bd48c85bb 100644 --- a/src/test/ui/span/visibility-ty-params.stderr +++ b/src/test/ui/span/visibility-ty-params.stderr @@ -1,13 +1,13 @@ error: unexpected generic arguments in path --> $DIR/visibility-ty-params.rs:16:5 | -16 | m!{ S } //~ ERROR unexpected generic arguments in path +LL | m!{ S } //~ ERROR unexpected generic arguments in path | ^^^^^ error: unexpected generic arguments in path --> $DIR/visibility-ty-params.rs:19:9 | -19 | m!{ m<> } //~ ERROR unexpected generic arguments in path +LL | m!{ m<> } //~ ERROR unexpected generic arguments in path | ^^^ error: aborting due to 2 previous errors diff --git a/src/test/ui/span/wf-method-late-bound-regions.stderr b/src/test/ui/span/wf-method-late-bound-regions.stderr index 8dd772590356c..97ae94cfc191b 100644 --- a/src/test/ui/span/wf-method-late-bound-regions.stderr +++ b/src/test/ui/span/wf-method-late-bound-regions.stderr @@ -1,12 +1,12 @@ error[E0597]: `pointer` does not live long enough --> $DIR/wf-method-late-bound-regions.rs:30:19 | -30 | f2.xmute(&pointer) +LL | f2.xmute(&pointer) | ^^^^^^^ borrowed value does not live long enough -31 | }; +LL | }; | - `pointer` dropped here while still borrowed ... -34 | } +LL | } | - borrowed value needs to live until here error: aborting due to previous error diff --git a/src/test/ui/specialization-feature-gate-default.stderr b/src/test/ui/specialization-feature-gate-default.stderr index 96e0fe13dc96e..b2bafdffde8af 100644 --- a/src/test/ui/specialization-feature-gate-default.stderr +++ b/src/test/ui/specialization-feature-gate-default.stderr @@ -1,7 +1,7 @@ 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 +LL | default fn foo(&self) {} //~ ERROR specialization is unstable | ^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(specialization)] to the crate attributes to enable diff --git a/src/test/ui/specialization-feature-gate-overlap.stderr b/src/test/ui/specialization-feature-gate-overlap.stderr index 6ff261c696d30..04c335c80a042 100644 --- a/src/test/ui/specialization-feature-gate-overlap.stderr +++ b/src/test/ui/specialization-feature-gate-overlap.stderr @@ -1,10 +1,10 @@ error[E0119]: conflicting implementations of trait `Foo` for type `u8`: --> $DIR/specialization-feature-gate-overlap.rs:23:1 | -19 | impl Foo for T { +LL | impl Foo for T { | ----------------- first implementation here ... -23 | impl Foo for u8 { //~ ERROR E0119 +LL | impl Foo for u8 { //~ ERROR E0119 | ^^^^^^^^^^^^^^^ conflicting implementation for `u8` error: aborting due to previous error diff --git a/src/test/ui/static-lifetime.stderr b/src/test/ui/static-lifetime.stderr index 24ba27b27ad36..d6c77b7a6b128 100644 --- a/src/test/ui/static-lifetime.stderr +++ b/src/test/ui/static-lifetime.stderr @@ -1,13 +1,13 @@ error[E0478]: lifetime bound not satisfied --> $DIR/static-lifetime.rs:13:20 | -13 | impl<'a, A: Clone> Arbitrary for ::std::borrow::Cow<'a, A> {} //~ ERROR lifetime bound +LL | impl<'a, A: Clone> Arbitrary for ::std::borrow::Cow<'a, A> {} //~ ERROR lifetime bound | ^^^^^^^^^ | note: lifetime parameter instantiated with the lifetime 'a as defined on the impl at 13:1 --> $DIR/static-lifetime.rs:13:1 | -13 | impl<'a, A: Clone> Arbitrary for ::std::borrow::Cow<'a, A> {} //~ ERROR lifetime bound +LL | impl<'a, A: Clone> Arbitrary for ::std::borrow::Cow<'a, A> {} //~ ERROR lifetime bound | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ = note: but lifetime parameter must outlive the static lifetime diff --git a/src/test/ui/str-concat-on-double-ref.stderr b/src/test/ui/str-concat-on-double-ref.stderr index 15d578133016f..9beb0bb63b2d2 100644 --- a/src/test/ui/str-concat-on-double-ref.stderr +++ b/src/test/ui/str-concat-on-double-ref.stderr @@ -1,7 +1,7 @@ error[E0369]: binary operation `+` cannot be applied to type `&std::string::String` --> $DIR/str-concat-on-double-ref.rs:14:13 | -14 | let c = a + b; +LL | let c = a + b; | ^^^^^ | = note: an implementation of `std::ops::Add` might be missing for `&std::string::String` diff --git a/src/test/ui/str-lit-type-mismatch.stderr b/src/test/ui/str-lit-type-mismatch.stderr index b232bf74666b1..5d6a222391039 100644 --- a/src/test/ui/str-lit-type-mismatch.stderr +++ b/src/test/ui/str-lit-type-mismatch.stderr @@ -1,7 +1,7 @@ error[E0308]: mismatched types --> $DIR/str-lit-type-mismatch.rs:13:20 | -13 | let x: &[u8] = "foo"; //~ ERROR mismatched types +LL | let x: &[u8] = "foo"; //~ ERROR mismatched types | ^^^^^ | | | expected slice, found str @@ -13,7 +13,7 @@ error[E0308]: mismatched types error[E0308]: mismatched types --> $DIR/str-lit-type-mismatch.rs:14:23 | -14 | let y: &[u8; 4] = "baaa"; //~ ERROR mismatched types +LL | let y: &[u8; 4] = "baaa"; //~ ERROR mismatched types | ^^^^^^ | | | expected array of 4 elements, found str @@ -25,7 +25,7 @@ error[E0308]: mismatched types error[E0308]: mismatched types --> $DIR/str-lit-type-mismatch.rs:15:19 | -15 | let z: &str = b"foo"; //~ ERROR mismatched types +LL | let z: &str = b"foo"; //~ ERROR mismatched types | ^^^^^^ | | | expected str, found array of 3 elements diff --git a/src/test/ui/struct-field-init-syntax.stderr b/src/test/ui/struct-field-init-syntax.stderr index 0bca3f83eb1a3..2c4ae0e472bd5 100644 --- a/src/test/ui/struct-field-init-syntax.stderr +++ b/src/test/ui/struct-field-init-syntax.stderr @@ -1,7 +1,7 @@ error: cannot use a comma after the base struct --> $DIR/struct-field-init-syntax.rs:18:9 | -18 | ..Foo::default(), +LL | ..Foo::default(), | ^^^^^^^^^^^^^^^^- help: remove this comma | = note: the base struct must always be the last field @@ -9,7 +9,7 @@ error: cannot use a comma after the base struct error: cannot use a comma after the base struct --> $DIR/struct-field-init-syntax.rs:23:9 | -23 | ..Foo::default(), +LL | ..Foo::default(), | ^^^^^^^^^^^^^^^^- help: remove this comma | = note: the base struct must always be the last field diff --git a/src/test/ui/struct-fields-decl-dupe.stderr b/src/test/ui/struct-fields-decl-dupe.stderr index 8f2180716c904..8492ade4ceec5 100644 --- a/src/test/ui/struct-fields-decl-dupe.stderr +++ b/src/test/ui/struct-fields-decl-dupe.stderr @@ -1,9 +1,9 @@ error[E0124]: field `foo` is already declared --> $DIR/struct-fields-decl-dupe.rs:13:5 | -12 | foo: isize, +LL | foo: isize, | ---------- `foo` first declared here -13 | foo: isize, +LL | foo: isize, | ^^^^^^^^^^ field already declared error: aborting due to previous error diff --git a/src/test/ui/struct-fields-hints-no-dupe.stderr b/src/test/ui/struct-fields-hints-no-dupe.stderr index 93cbe1f5afa80..75340a6756911 100644 --- a/src/test/ui/struct-fields-hints-no-dupe.stderr +++ b/src/test/ui/struct-fields-hints-no-dupe.stderr @@ -1,7 +1,7 @@ error[E0560]: struct `A` has no field named `bar` --> $DIR/struct-fields-hints-no-dupe.rs:20:9 | -20 | bar : 42, +LL | bar : 42, | ^^^^^ field does not exist - did you mean `barr`? error: aborting due to previous error diff --git a/src/test/ui/struct-fields-hints.stderr b/src/test/ui/struct-fields-hints.stderr index a7c77103e7357..407600ec69aff 100644 --- a/src/test/ui/struct-fields-hints.stderr +++ b/src/test/ui/struct-fields-hints.stderr @@ -1,7 +1,7 @@ error[E0560]: struct `A` has no field named `bar` --> $DIR/struct-fields-hints.rs:20:9 | -20 | bar : 42, +LL | bar : 42, | ^^^^^ field does not exist - did you mean `car`? error: aborting due to previous error diff --git a/src/test/ui/struct-fields-too-many.stderr b/src/test/ui/struct-fields-too-many.stderr index ec353d00aa7ee..9e0e9f979b13e 100644 --- a/src/test/ui/struct-fields-too-many.stderr +++ b/src/test/ui/struct-fields-too-many.stderr @@ -1,7 +1,7 @@ error[E0560]: struct `BuildData` has no field named `bar` --> $DIR/struct-fields-too-many.rs:18:9 | -18 | bar: 0 +LL | bar: 0 | ^^^^ `BuildData` does not have this field | = note: available fields are: `foo` diff --git a/src/test/ui/struct-path-self-type-mismatch.stderr b/src/test/ui/struct-path-self-type-mismatch.stderr index a98ec0ec4b2be..1fbbcf834686e 100644 --- a/src/test/ui/struct-path-self-type-mismatch.stderr +++ b/src/test/ui/struct-path-self-type-mismatch.stderr @@ -1,13 +1,13 @@ error[E0308]: mismatched types --> $DIR/struct-path-self-type-mismatch.rs:17:23 | -17 | Self { inner: 1.5f32 }; //~ ERROR mismatched types +LL | Self { inner: 1.5f32 }; //~ ERROR mismatched types | ^^^^^^ expected i32, found f32 error[E0308]: mismatched types --> $DIR/struct-path-self-type-mismatch.rs:25:20 | -25 | inner: u +LL | inner: u | ^ expected type parameter, found a different type parameter | = note: expected type `T` @@ -16,13 +16,13 @@ error[E0308]: mismatched types error[E0308]: mismatched types --> $DIR/struct-path-self-type-mismatch.rs:23:9 | -22 | fn new(u: U) -> Foo { +LL | fn new(u: U) -> Foo { | ------ expected `Foo` because of return type -23 | / Self { -24 | | //~^ ERROR mismatched types -25 | | inner: u -26 | | //~^ ERROR mismatched types -27 | | } +LL | / Self { +LL | | //~^ ERROR mismatched types +LL | | inner: u +LL | | //~^ ERROR mismatched types +LL | | } | |_________^ expected type parameter, found a different type parameter | = note: expected type `Foo` diff --git a/src/test/ui/suggest-private-fields.stderr b/src/test/ui/suggest-private-fields.stderr index d32d85f6e3fd1..732d56c4df5e3 100644 --- a/src/test/ui/suggest-private-fields.stderr +++ b/src/test/ui/suggest-private-fields.stderr @@ -1,13 +1,13 @@ error[E0560]: struct `xc::B` has no field named `aa` --> $DIR/suggest-private-fields.rs:25:9 | -25 | aa: 20, +LL | aa: 20, | ^^^ field does not exist - did you mean `a`? error[E0560]: struct `xc::B` has no field named `bb` --> $DIR/suggest-private-fields.rs:27:9 | -27 | bb: 20, +LL | bb: 20, | ^^^ `xc::B` does not have this field | = note: available fields are: `a` @@ -15,13 +15,13 @@ error[E0560]: struct `xc::B` has no field named `bb` error[E0560]: struct `A` has no field named `aa` --> $DIR/suggest-private-fields.rs:32:9 | -32 | aa: 20, +LL | aa: 20, | ^^^ field does not exist - did you mean `a`? error[E0560]: struct `A` has no field named `bb` --> $DIR/suggest-private-fields.rs:34:9 | -34 | bb: 20, +LL | bb: 20, | ^^^ field does not exist - did you mean `b`? error: aborting due to 4 previous errors diff --git a/src/test/ui/suggestions/closure-immutable-outer-variable.stderr b/src/test/ui/suggestions/closure-immutable-outer-variable.stderr index f272a3582c619..5827942220be7 100644 --- a/src/test/ui/suggestions/closure-immutable-outer-variable.stderr +++ b/src/test/ui/suggestions/closure-immutable-outer-variable.stderr @@ -1,9 +1,9 @@ error[E0594]: cannot assign to captured outer variable in an `FnMut` closure --> $DIR/closure-immutable-outer-variable.rs:19:26 | -18 | let y = true; +LL | let y = true; | - help: consider making `y` mutable: `mut y` -19 | foo(Box::new(move || y = false) as Box<_>); //~ ERROR cannot assign to captured outer variable +LL | foo(Box::new(move || y = false) as Box<_>); //~ ERROR cannot assign to captured outer variable | ^^^^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/suggestions/confuse-field-and-method/issue-18343.stderr b/src/test/ui/suggestions/confuse-field-and-method/issue-18343.stderr index bbe8fe7345aa0..78b79f0fbcd32 100644 --- a/src/test/ui/suggestions/confuse-field-and-method/issue-18343.stderr +++ b/src/test/ui/suggestions/confuse-field-and-method/issue-18343.stderr @@ -1,10 +1,10 @@ error[E0599]: no method named `closure` found for type `Obj<[closure@$DIR/issue-18343.rs:16:28: 16:33]>` in the current scope --> $DIR/issue-18343.rs:17:7 | -11 | struct Obj where F: FnMut() -> u32 { +LL | struct Obj where F: FnMut() -> u32 { | ------------------------------------- method `closure` not found for this ... -17 | o.closure(); +LL | o.closure(); | ^^^^^^^ field, not a method | = help: use `(o.closure)(...)` if you meant to call the function stored in the `closure` field diff --git a/src/test/ui/suggestions/confuse-field-and-method/issue-2392.stderr b/src/test/ui/suggestions/confuse-field-and-method/issue-2392.stderr index 083245f0b8e80..4a39eac3bec8f 100644 --- a/src/test/ui/suggestions/confuse-field-and-method/issue-2392.stderr +++ b/src/test/ui/suggestions/confuse-field-and-method/issue-2392.stderr @@ -1,10 +1,10 @@ error[E0599]: no method named `closure` found for type `Obj<[closure@$DIR/issue-2392.rs:49:36: 49:41]>` in the current scope --> $DIR/issue-2392.rs:50:15 | -25 | struct Obj where F: FnOnce() -> u32 { +LL | struct Obj where F: FnOnce() -> u32 { | -------------------------------------- method `closure` not found for this ... -50 | o_closure.closure(); //~ ERROR no method named `closure` found +LL | o_closure.closure(); //~ ERROR no method named `closure` found | ^^^^^^^ field, not a method | = help: use `(o_closure.closure)(...)` if you meant to call the function stored in the `closure` field @@ -12,10 +12,10 @@ error[E0599]: no method named `closure` found for type `Obj<[closure@$DIR/issue- error[E0599]: no method named `not_closure` found for type `Obj<[closure@$DIR/issue-2392.rs:49:36: 49:41]>` in the current scope --> $DIR/issue-2392.rs:52:15 | -25 | struct Obj where F: FnOnce() -> u32 { +LL | struct Obj where F: FnOnce() -> u32 { | -------------------------------------- method `not_closure` not found for this ... -52 | o_closure.not_closure(); +LL | o_closure.not_closure(); | ^^^^^^^^^^^ field, not a method | = help: did you mean to write `o_closure.not_closure` instead of `o_closure.not_closure(...)`? @@ -23,10 +23,10 @@ error[E0599]: no method named `not_closure` found for type `Obj<[closure@$DIR/is error[E0599]: no method named `closure` found for type `Obj u32 {func}>` in the current scope --> $DIR/issue-2392.rs:56:12 | -25 | struct Obj where F: FnOnce() -> u32 { +LL | struct Obj where F: FnOnce() -> u32 { | -------------------------------------- method `closure` not found for this ... -56 | o_func.closure(); //~ ERROR no method named `closure` found +LL | o_func.closure(); //~ ERROR no method named `closure` found | ^^^^^^^ field, not a method | = help: use `(o_func.closure)(...)` if you meant to call the function stored in the `closure` field @@ -34,10 +34,10 @@ error[E0599]: no method named `closure` found for type `Obj u32 {func}>` error[E0599]: no method named `boxed_closure` found for type `BoxedObj` in the current scope --> $DIR/issue-2392.rs:59:14 | -30 | struct BoxedObj { +LL | struct BoxedObj { | --------------- method `boxed_closure` not found for this ... -59 | boxed_fn.boxed_closure();//~ ERROR no method named `boxed_closure` found +LL | boxed_fn.boxed_closure();//~ ERROR no method named `boxed_closure` found | ^^^^^^^^^^^^^ field, not a method | = help: use `(boxed_fn.boxed_closure)(...)` if you meant to call the function stored in the `boxed_closure` field @@ -45,10 +45,10 @@ error[E0599]: no method named `boxed_closure` found for type `BoxedObj` in the c error[E0599]: no method named `boxed_closure` found for type `BoxedObj` in the current scope --> $DIR/issue-2392.rs:62:19 | -30 | struct BoxedObj { +LL | struct BoxedObj { | --------------- method `boxed_closure` not found for this ... -62 | boxed_closure.boxed_closure();//~ ERROR no method named `boxed_closure` found +LL | boxed_closure.boxed_closure();//~ ERROR no method named `boxed_closure` found | ^^^^^^^^^^^^^ field, not a method | = help: use `(boxed_closure.boxed_closure)(...)` if you meant to call the function stored in the `boxed_closure` field @@ -56,10 +56,10 @@ error[E0599]: no method named `boxed_closure` found for type `BoxedObj` in the c error[E0599]: no method named `closure` found for type `Obj u32 {func}>` in the current scope --> $DIR/issue-2392.rs:67:12 | -25 | struct Obj where F: FnOnce() -> u32 { +LL | struct Obj where F: FnOnce() -> u32 { | -------------------------------------- method `closure` not found for this ... -67 | w.wrap.closure();//~ ERROR no method named `closure` found +LL | w.wrap.closure();//~ ERROR no method named `closure` found | ^^^^^^^ field, not a method | = help: use `(w.wrap.closure)(...)` if you meant to call the function stored in the `closure` field @@ -67,10 +67,10 @@ error[E0599]: no method named `closure` found for type `Obj u32 {func}>` error[E0599]: no method named `not_closure` found for type `Obj u32 {func}>` in the current scope --> $DIR/issue-2392.rs:69:12 | -25 | struct Obj where F: FnOnce() -> u32 { +LL | struct Obj where F: FnOnce() -> u32 { | -------------------------------------- method `not_closure` not found for this ... -69 | w.wrap.not_closure(); +LL | w.wrap.not_closure(); | ^^^^^^^^^^^ field, not a method | = help: did you mean to write `w.wrap.not_closure` instead of `w.wrap.not_closure(...)`? @@ -78,10 +78,10 @@ error[E0599]: no method named `not_closure` found for type `Obj u32 {fun error[E0599]: no method named `closure` found for type `Obj + 'static>>` in the current scope --> $DIR/issue-2392.rs:72:24 | -25 | struct Obj where F: FnOnce() -> u32 { +LL | struct Obj where F: FnOnce() -> u32 { | -------------------------------------- method `closure` not found for this ... -72 | check_expression().closure();//~ ERROR no method named `closure` found +LL | check_expression().closure();//~ ERROR no method named `closure` found | ^^^^^^^ field, not a method | = help: use `(check_expression().closure)(...)` if you meant to call the function stored in the `closure` field @@ -89,10 +89,10 @@ error[E0599]: no method named `closure` found for type `Obj $DIR/issue-2392.rs:78:31 | -15 | struct FuncContainer { +LL | struct FuncContainer { | -------------------- method `f1` not found for this ... -78 | (*self.container).f1(1); //~ ERROR no method named `f1` found +LL | (*self.container).f1(1); //~ ERROR no method named `f1` found | ^^ field, not a method | = help: use `((*self.container).f1)(...)` if you meant to call the function stored in the `f1` field @@ -100,10 +100,10 @@ error[E0599]: no method named `f1` found for type `FuncContainer` in the current error[E0599]: no method named `f2` found for type `FuncContainer` in the current scope --> $DIR/issue-2392.rs:79:31 | -15 | struct FuncContainer { +LL | struct FuncContainer { | -------------------- method `f2` not found for this ... -79 | (*self.container).f2(1); //~ ERROR no method named `f2` found +LL | (*self.container).f2(1); //~ ERROR no method named `f2` found | ^^ field, not a method | = help: use `((*self.container).f2)(...)` if you meant to call the function stored in the `f2` field @@ -111,10 +111,10 @@ error[E0599]: no method named `f2` found for type `FuncContainer` in the current error[E0599]: no method named `f3` found for type `FuncContainer` in the current scope --> $DIR/issue-2392.rs:80:31 | -15 | struct FuncContainer { +LL | struct FuncContainer { | -------------------- method `f3` not found for this ... -80 | (*self.container).f3(1); //~ ERROR no method named `f3` found +LL | (*self.container).f3(1); //~ ERROR no method named `f3` found | ^^ field, not a method | = help: use `((*self.container).f3)(...)` if you meant to call the function stored in the `f3` field diff --git a/src/test/ui/suggestions/confuse-field-and-method/issue-32128.stderr b/src/test/ui/suggestions/confuse-field-and-method/issue-32128.stderr index d6a837a17ae1c..78eada810c455 100644 --- a/src/test/ui/suggestions/confuse-field-and-method/issue-32128.stderr +++ b/src/test/ui/suggestions/confuse-field-and-method/issue-32128.stderr @@ -1,10 +1,10 @@ error[E0599]: no method named `example` found for type `Example` in the current scope --> $DIR/issue-32128.rs:22:10 | -11 | struct Example { +LL | struct Example { | -------------- method `example` not found for this ... -22 | demo.example(1); +LL | demo.example(1); | ^^^^^^^ field, not a method | = help: use `(demo.example)(...)` if you meant to call the function stored in the `example` field diff --git a/src/test/ui/suggestions/confuse-field-and-method/issue-33784.stderr b/src/test/ui/suggestions/confuse-field-and-method/issue-33784.stderr index 28e21610214ef..916f0a6618b41 100644 --- a/src/test/ui/suggestions/confuse-field-and-method/issue-33784.stderr +++ b/src/test/ui/suggestions/confuse-field-and-method/issue-33784.stderr @@ -1,7 +1,7 @@ error[E0599]: no method named `closure` found for type `&Obj<[closure@$DIR/issue-33784.rs:35:43: 35:48]>` in the current scope --> $DIR/issue-33784.rs:37:7 | -37 | p.closure(); //~ ERROR no method named `closure` found +LL | p.closure(); //~ ERROR no method named `closure` found | ^^^^^^^ field, not a method | = help: use `(p.closure)(...)` if you meant to call the function stored in the `closure` field @@ -9,7 +9,7 @@ error[E0599]: no method named `closure` found for type `&Obj<[closure@$DIR/issue error[E0599]: no method named `fn_ptr` found for type `&&Obj<[closure@$DIR/issue-33784.rs:35:43: 35:48]>` in the current scope --> $DIR/issue-33784.rs:39:7 | -39 | q.fn_ptr(); //~ ERROR no method named `fn_ptr` found +LL | q.fn_ptr(); //~ ERROR no method named `fn_ptr` found | ^^^^^^ field, not a method | = help: use `(q.fn_ptr)(...)` if you meant to call the function stored in the `fn_ptr` field @@ -17,7 +17,7 @@ error[E0599]: no method named `fn_ptr` found for type `&&Obj<[closure@$DIR/issue error[E0599]: no method named `c_fn_ptr` found for type `&D` in the current scope --> $DIR/issue-33784.rs:42:7 | -42 | s.c_fn_ptr(); //~ ERROR no method named `c_fn_ptr` found +LL | s.c_fn_ptr(); //~ ERROR no method named `c_fn_ptr` found | ^^^^^^^^ field, not a method | = help: use `(s.c_fn_ptr)(...)` if you meant to call the function stored in the `c_fn_ptr` field diff --git a/src/test/ui/suggestions/confuse-field-and-method/private-field.stderr b/src/test/ui/suggestions/confuse-field-and-method/private-field.stderr index caf78af6eb9f9..b62ef146bf420 100644 --- a/src/test/ui/suggestions/confuse-field-and-method/private-field.stderr +++ b/src/test/ui/suggestions/confuse-field-and-method/private-field.stderr @@ -1,10 +1,10 @@ error[E0599]: no method named `dog_age` found for type `animal::Dog` in the current scope --> $DIR/private-field.rs:26:23 | -12 | pub struct Dog { +LL | pub struct Dog { | -------------- method `dog_age` not found for this ... -26 | let dog_age = dog.dog_age(); //~ ERROR no method +LL | let dog_age = dog.dog_age(); //~ ERROR no method | ^^^^^^^ private field, not a method error: aborting due to previous error diff --git a/src/test/ui/suggestions/conversion-methods.stderr b/src/test/ui/suggestions/conversion-methods.stderr index 96fdc29d952cb..f25149c57ad10 100644 --- a/src/test/ui/suggestions/conversion-methods.stderr +++ b/src/test/ui/suggestions/conversion-methods.stderr @@ -1,7 +1,7 @@ error[E0308]: mismatched types --> $DIR/conversion-methods.rs:15:41 | -15 | let _tis_an_instants_play: String = "'Tis a fond Ambush—"; //~ ERROR mismatched types +LL | let _tis_an_instants_play: String = "'Tis a fond Ambush—"; //~ ERROR mismatched types | ^^^^^^^^^^^^^^^^^^^^^ | | | expected struct `std::string::String`, found reference @@ -13,7 +13,7 @@ error[E0308]: mismatched types error[E0308]: mismatched types --> $DIR/conversion-methods.rs:16:40 | -16 | let _just_to_make_bliss: PathBuf = Path::new("/ern/her/own/surprise"); +LL | let _just_to_make_bliss: PathBuf = Path::new("/ern/her/own/surprise"); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | | | expected struct `std::path::PathBuf`, found reference @@ -25,7 +25,7 @@ error[E0308]: mismatched types error[E0308]: mismatched types --> $DIR/conversion-methods.rs:19:40 | -19 | let _but_should_the_play: String = 2; // Perhaps surprisingly, we suggest .to_string() here +LL | let _but_should_the_play: String = 2; // Perhaps surprisingly, we suggest .to_string() here | ^ | | | expected struct `std::string::String`, found integral variable @@ -37,7 +37,7 @@ error[E0308]: mismatched types error[E0308]: mismatched types --> $DIR/conversion-methods.rs:22:47 | -22 | let _prove_piercing_earnest: Vec = &[1, 2, 3]; //~ ERROR mismatched types +LL | let _prove_piercing_earnest: Vec = &[1, 2, 3]; //~ ERROR mismatched types | ^^^^^^^^^^ | | | expected struct `std::vec::Vec`, found reference 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 5413dcddcd7f3..192d01dfbbe45 100644 --- a/src/test/ui/suggestions/dont-suggest-dereference-on-arg.stderr +++ b/src/test/ui/suggestions/dont-suggest-dereference-on-arg.stderr @@ -1,7 +1,7 @@ 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)) +LL | .filter(|&(ref a, _)| foo(a)) | ^^^^^^^^^^^ help: consider using a reference: `&&(ref a, _)` | = help: add #![feature(match_default_bindings)] to the crate attributes to enable diff --git a/src/test/ui/suggestions/dont-suggest-private-trait-method.stderr b/src/test/ui/suggestions/dont-suggest-private-trait-method.stderr index 97f424f9fbf6d..3988eb6dd7fdb 100644 --- a/src/test/ui/suggestions/dont-suggest-private-trait-method.stderr +++ b/src/test/ui/suggestions/dont-suggest-private-trait-method.stderr @@ -1,10 +1,10 @@ error[E0599]: no function or associated item named `new` found for type `T` in the current scope --> $DIR/dont-suggest-private-trait-method.rs:14:5 | -11 | struct T; +LL | struct T; | --------- function or associated item `new` not found for this ... -14 | T::new(); +LL | T::new(); | ^^^^^^ function or associated item not found in `T` error: aborting due to previous error diff --git a/src/test/ui/suggestions/extern-crate-rename.stderr b/src/test/ui/suggestions/extern-crate-rename.stderr index 6268935b08cca..3a0e255252578 100644 --- a/src/test/ui/suggestions/extern-crate-rename.stderr +++ b/src/test/ui/suggestions/extern-crate-rename.stderr @@ -1,9 +1,9 @@ error[E0259]: the name `m1` is defined multiple times --> $DIR/extern-crate-rename.rs:16:1 | -15 | extern crate m1; +LL | extern crate m1; | ---------------- previous import of the extern crate `m1` here -16 | extern crate m2 as m1; //~ ERROR is defined multiple times +LL | extern crate m2 as m1; //~ ERROR is defined multiple times | ^^^^^^^^^^^^^^^^^^^^^^ | | | `m1` reimported here diff --git a/src/test/ui/suggestions/fn-closure-mutable-capture.stderr b/src/test/ui/suggestions/fn-closure-mutable-capture.stderr index 6c79e447a3c39..ac657dde5edc2 100644 --- a/src/test/ui/suggestions/fn-closure-mutable-capture.stderr +++ b/src/test/ui/suggestions/fn-closure-mutable-capture.stderr @@ -1,14 +1,14 @@ error[E0594]: cannot assign to captured outer variable in an `Fn` closure --> $DIR/fn-closure-mutable-capture.rs:15:17 | -15 | bar(move || x = 1); +LL | bar(move || x = 1); | ^^^^^ | = note: `Fn` closures cannot capture their enclosing environment for modifications help: consider changing this closure to take self by mutable reference --> $DIR/fn-closure-mutable-capture.rs:15:9 | -15 | bar(move || x = 1); +LL | bar(move || x = 1); | ^^^^^^^^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/suggestions/for-c-in-str.stderr b/src/test/ui/suggestions/for-c-in-str.stderr index 88a7b1b49d62d..a309fa4d0abd9 100644 --- a/src/test/ui/suggestions/for-c-in-str.stderr +++ b/src/test/ui/suggestions/for-c-in-str.stderr @@ -1,7 +1,7 @@ error[E0277]: the trait bound `&str: std::iter::Iterator` is not satisfied --> $DIR/for-c-in-str.rs:14:14 | -14 | for c in "asdf" { +LL | for c in "asdf" { | ^^^^^^ `&str` is not an iterator; try calling `.chars()` or `.bytes()` | = help: the trait `std::iter::Iterator` is not implemented for `&str` diff --git a/src/test/ui/suggestions/issue-32354-suggest-import-rename.stderr b/src/test/ui/suggestions/issue-32354-suggest-import-rename.stderr index ae892db364ba7..170809bb95391 100644 --- a/src/test/ui/suggestions/issue-32354-suggest-import-rename.stderr +++ b/src/test/ui/suggestions/issue-32354-suggest-import-rename.stderr @@ -1,15 +1,15 @@ error[E0252]: the name `ConstructorExtension` is defined multiple times --> $DIR/issue-32354-suggest-import-rename.rs:20:5 | -19 | use extension1::ConstructorExtension; +LL | use extension1::ConstructorExtension; | -------------------------------- previous import of the trait `ConstructorExtension` here -20 | use extension2::ConstructorExtension; //~ ERROR is defined multiple times +LL | use extension2::ConstructorExtension; //~ ERROR is defined multiple times | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `ConstructorExtension` reimported here | = note: `ConstructorExtension` must be defined only once in the type namespace of this module help: You can use `as` to change the binding name of the import | -20 | use extension2::ConstructorExtension as OtherConstructorExtension; //~ ERROR is defined multiple times +LL | use extension2::ConstructorExtension as OtherConstructorExtension; //~ ERROR is defined multiple times | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/suggestions/issue-43420-no-over-suggest.stderr b/src/test/ui/suggestions/issue-43420-no-over-suggest.stderr index c3f64fef50c66..956ecdaf754ee 100644 --- a/src/test/ui/suggestions/issue-43420-no-over-suggest.stderr +++ b/src/test/ui/suggestions/issue-43420-no-over-suggest.stderr @@ -1,7 +1,7 @@ error[E0308]: mismatched types --> $DIR/issue-43420-no-over-suggest.rs:18:9 | -18 | foo(&a); //~ ERROR mismatched types +LL | foo(&a); //~ ERROR mismatched types | ^^ expected slice, found struct `std::vec::Vec` | = note: expected type `&[u16]` diff --git a/src/test/ui/suggestions/issue-45562.stderr b/src/test/ui/suggestions/issue-45562.stderr index 2f8c4cd3f2e72..d6960dca0546f 100644 --- a/src/test/ui/suggestions/issue-45562.stderr +++ b/src/test/ui/suggestions/issue-45562.stderr @@ -1,7 +1,7 @@ error: const items should never be #[no_mangle] --> $DIR/issue-45562.rs:11:14 | -11 | #[no_mangle] pub const RAH: usize = 5; +LL | #[no_mangle] pub const RAH: usize = 5; | ---------^^^^^^^^^^^^^^^^ | | | help: try a static value: `pub static` diff --git a/src/test/ui/suggestions/issue-45799-bad-extern-crate-rename-suggestion-formatting.stderr b/src/test/ui/suggestions/issue-45799-bad-extern-crate-rename-suggestion-formatting.stderr index 01dba62a8511d..10339d12740b2 100644 --- a/src/test/ui/suggestions/issue-45799-bad-extern-crate-rename-suggestion-formatting.stderr +++ b/src/test/ui/suggestions/issue-45799-bad-extern-crate-rename-suggestion-formatting.stderr @@ -1,13 +1,13 @@ error[E0259]: the name `std` is defined multiple times --> $DIR/issue-45799-bad-extern-crate-rename-suggestion-formatting.rs:11:1 | -11 | extern crate std; +LL | extern crate std; | ^^^^^^^^^^^^^^^^^ `std` reimported here | = note: `std` must be defined only once in the type namespace of this module help: You can use `as` to change the binding name of the import | -11 | extern crate std as other_std; +LL | extern crate std as other_std; | error: aborting due to previous error diff --git a/src/test/ui/suggestions/issue-46756-consider-borrowing-cast-or-binexpr.stderr b/src/test/ui/suggestions/issue-46756-consider-borrowing-cast-or-binexpr.stderr index 4b3e8a32025c9..121b22bc29c59 100644 --- a/src/test/ui/suggestions/issue-46756-consider-borrowing-cast-or-binexpr.stderr +++ b/src/test/ui/suggestions/issue-46756-consider-borrowing-cast-or-binexpr.stderr @@ -1,7 +1,7 @@ error[E0308]: mismatched types --> $DIR/issue-46756-consider-borrowing-cast-or-binexpr.rs:20:42 | -20 | light_flows_our_war_of_mocking_words(behold as usize); +LL | light_flows_our_war_of_mocking_words(behold as usize); | ^^^^^^^^^^^^^^^ | | | expected &usize, found usize @@ -13,7 +13,7 @@ error[E0308]: mismatched types error[E0308]: mismatched types --> $DIR/issue-46756-consider-borrowing-cast-or-binexpr.rs:22:42 | -22 | light_flows_our_war_of_mocking_words(with_tears + 4); +LL | light_flows_our_war_of_mocking_words(with_tears + 4); | ^^^^^^^^^^^^^^ | | | expected &usize, found usize diff --git a/src/test/ui/suggestions/method-on-ambiguous-numeric-type.stderr b/src/test/ui/suggestions/method-on-ambiguous-numeric-type.stderr index c2b292c642caf..62e7b5345ac0d 100644 --- a/src/test/ui/suggestions/method-on-ambiguous-numeric-type.stderr +++ b/src/test/ui/suggestions/method-on-ambiguous-numeric-type.stderr @@ -1,21 +1,21 @@ error[E0689]: can't call method `powi` on ambiguous numeric type `{float}` --> $DIR/method-on-ambiguous-numeric-type.rs:12:17 | -12 | let x = 2.0.powi(2); +LL | let x = 2.0.powi(2); | ^^^^ help: you must specify a concrete type for this numeric value, like `f32` | -12 | let x = 2.0_f32.powi(2); +LL | let x = 2.0_f32.powi(2); | ^^^^^^^ error[E0689]: can't call method `powi` on ambiguous numeric type `{float}` --> $DIR/method-on-ambiguous-numeric-type.rs:15:15 | -15 | let x = y.powi(2); +LL | let x = y.powi(2); | ^^^^ help: you must specify a type for this binding, like `f32` | -14 | let y: f32 = 2.0; +LL | let y: f32 = 2.0; | ^^^^^^ error: aborting due to 2 previous errors diff --git a/src/test/ui/suggestions/numeric-cast-2.stderr b/src/test/ui/suggestions/numeric-cast-2.stderr index 90086d247d6e9..ec634a7aa68bd 100644 --- a/src/test/ui/suggestions/numeric-cast-2.stderr +++ b/src/test/ui/suggestions/numeric-cast-2.stderr @@ -1,19 +1,19 @@ error[E0308]: mismatched types --> $DIR/numeric-cast-2.rs:15:18 | -15 | let x: u16 = foo(); +LL | let x: u16 = foo(); | ^^^^^ expected u16, found i32 error[E0308]: mismatched types --> $DIR/numeric-cast-2.rs:17:18 | -17 | let y: i64 = x + x; +LL | let y: i64 = x + x; | ^^^^^ expected i64, found u16 error[E0308]: mismatched types --> $DIR/numeric-cast-2.rs:19:18 | -19 | let z: i32 = x + x; +LL | let z: i32 = x + x; | ^^^^^ expected i32, found u16 error: aborting due to 3 previous errors diff --git a/src/test/ui/suggestions/numeric-cast.stderr b/src/test/ui/suggestions/numeric-cast.stderr index cef22ad922e84..186a2ed98ff3a 100644 --- a/src/test/ui/suggestions/numeric-cast.stderr +++ b/src/test/ui/suggestions/numeric-cast.stderr @@ -1,906 +1,906 @@ error[E0308]: mismatched types --> $DIR/numeric-cast.rs:29:18 | -29 | foo::(x_u64); +LL | foo::(x_u64); | ^^^^^ expected usize, found u64 error[E0308]: mismatched types --> $DIR/numeric-cast.rs:31:18 | -31 | foo::(x_u32); +LL | foo::(x_u32); | ^^^^^ expected usize, found u32 error[E0308]: mismatched types --> $DIR/numeric-cast.rs:33:18 | -33 | foo::(x_u16); +LL | foo::(x_u16); | ^^^^^ expected usize, found u16 error[E0308]: mismatched types --> $DIR/numeric-cast.rs:35:18 | -35 | foo::(x_u8); +LL | foo::(x_u8); | ^^^^ expected usize, found u8 error[E0308]: mismatched types --> $DIR/numeric-cast.rs:37:18 | -37 | foo::(x_isize); +LL | foo::(x_isize); | ^^^^^^^ expected usize, found isize error[E0308]: mismatched types --> $DIR/numeric-cast.rs:39:18 | -39 | foo::(x_i64); +LL | foo::(x_i64); | ^^^^^ expected usize, found i64 error[E0308]: mismatched types --> $DIR/numeric-cast.rs:41:18 | -41 | foo::(x_i32); +LL | foo::(x_i32); | ^^^^^ expected usize, found i32 error[E0308]: mismatched types --> $DIR/numeric-cast.rs:43:18 | -43 | foo::(x_i16); +LL | foo::(x_i16); | ^^^^^ expected usize, found i16 error[E0308]: mismatched types --> $DIR/numeric-cast.rs:45:18 | -45 | foo::(x_i8); +LL | foo::(x_i8); | ^^^^ expected usize, found i8 error[E0308]: mismatched types --> $DIR/numeric-cast.rs:47:18 | -47 | foo::(x_f64); +LL | foo::(x_f64); | ^^^^^ expected usize, found f64 error[E0308]: mismatched types --> $DIR/numeric-cast.rs:49:18 | -49 | foo::(x_f32); +LL | foo::(x_f32); | ^^^^^ expected usize, found f32 error[E0308]: mismatched types --> $DIR/numeric-cast.rs:52:18 | -52 | foo::(x_usize); +LL | foo::(x_usize); | ^^^^^^^ expected isize, found usize error[E0308]: mismatched types --> $DIR/numeric-cast.rs:54:18 | -54 | foo::(x_u64); +LL | foo::(x_u64); | ^^^^^ expected isize, found u64 error[E0308]: mismatched types --> $DIR/numeric-cast.rs:56:18 | -56 | foo::(x_u32); +LL | foo::(x_u32); | ^^^^^ expected isize, found u32 error[E0308]: mismatched types --> $DIR/numeric-cast.rs:58:18 | -58 | foo::(x_u16); +LL | foo::(x_u16); | ^^^^^ expected isize, found u16 error[E0308]: mismatched types --> $DIR/numeric-cast.rs:60:18 | -60 | foo::(x_u8); +LL | foo::(x_u8); | ^^^^ expected isize, found u8 error[E0308]: mismatched types --> $DIR/numeric-cast.rs:63:18 | -63 | foo::(x_i64); +LL | foo::(x_i64); | ^^^^^ expected isize, found i64 error[E0308]: mismatched types --> $DIR/numeric-cast.rs:65:18 | -65 | foo::(x_i32); +LL | foo::(x_i32); | ^^^^^ expected isize, found i32 error[E0308]: mismatched types --> $DIR/numeric-cast.rs:67:18 | -67 | foo::(x_i16); +LL | foo::(x_i16); | ^^^^^ expected isize, found i16 error[E0308]: mismatched types --> $DIR/numeric-cast.rs:69:18 | -69 | foo::(x_i8); +LL | foo::(x_i8); | ^^^^ expected isize, found i8 error[E0308]: mismatched types --> $DIR/numeric-cast.rs:71:18 | -71 | foo::(x_f64); +LL | foo::(x_f64); | ^^^^^ expected isize, found f64 error[E0308]: mismatched types --> $DIR/numeric-cast.rs:73:18 | -73 | foo::(x_f32); +LL | foo::(x_f32); | ^^^^^ expected isize, found f32 error[E0308]: mismatched types --> $DIR/numeric-cast.rs:76:16 | -76 | foo::(x_usize); +LL | foo::(x_usize); | ^^^^^^^ expected u64, found usize error[E0308]: mismatched types --> $DIR/numeric-cast.rs:79:16 | -79 | foo::(x_u32); +LL | foo::(x_u32); | ^^^^^ expected u64, found u32 help: you can cast an `u32` to `u64`, which will zero-extend the source value | -79 | foo::(x_u32.into()); +LL | foo::(x_u32.into()); | ^^^^^^^^^^^^ error[E0308]: mismatched types --> $DIR/numeric-cast.rs:81:16 | -81 | foo::(x_u16); +LL | foo::(x_u16); | ^^^^^ expected u64, found u16 help: you can cast an `u16` to `u64`, which will zero-extend the source value | -81 | foo::(x_u16.into()); +LL | foo::(x_u16.into()); | ^^^^^^^^^^^^ error[E0308]: mismatched types --> $DIR/numeric-cast.rs:83:16 | -83 | foo::(x_u8); +LL | foo::(x_u8); | ^^^^ expected u64, found u8 help: you can cast an `u8` to `u64`, which will zero-extend the source value | -83 | foo::(x_u8.into()); +LL | foo::(x_u8.into()); | ^^^^^^^^^^^ error[E0308]: mismatched types --> $DIR/numeric-cast.rs:85:16 | -85 | foo::(x_isize); +LL | foo::(x_isize); | ^^^^^^^ expected u64, found isize error[E0308]: mismatched types --> $DIR/numeric-cast.rs:87:16 | -87 | foo::(x_i64); +LL | foo::(x_i64); | ^^^^^ expected u64, found i64 error[E0308]: mismatched types --> $DIR/numeric-cast.rs:89:16 | -89 | foo::(x_i32); +LL | foo::(x_i32); | ^^^^^ expected u64, found i32 error[E0308]: mismatched types --> $DIR/numeric-cast.rs:91:16 | -91 | foo::(x_i16); +LL | foo::(x_i16); | ^^^^^ expected u64, found i16 error[E0308]: mismatched types --> $DIR/numeric-cast.rs:93:16 | -93 | foo::(x_i8); +LL | foo::(x_i8); | ^^^^ expected u64, found i8 error[E0308]: mismatched types --> $DIR/numeric-cast.rs:95:16 | -95 | foo::(x_f64); +LL | foo::(x_f64); | ^^^^^ expected u64, found f64 error[E0308]: mismatched types --> $DIR/numeric-cast.rs:97:16 | -97 | foo::(x_f32); +LL | foo::(x_f32); | ^^^^^ expected u64, found f32 error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:100:16 - | -100 | foo::(x_usize); - | ^^^^^^^ expected i64, found usize + --> $DIR/numeric-cast.rs:100:16 + | +LL | foo::(x_usize); + | ^^^^^^^ expected i64, found usize error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:102:16 - | -102 | foo::(x_u64); - | ^^^^^ expected i64, found u64 + --> $DIR/numeric-cast.rs:102:16 + | +LL | foo::(x_u64); + | ^^^^^ expected i64, found u64 error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:104:16 - | -104 | foo::(x_u32); - | ^^^^^ expected i64, found u32 + --> $DIR/numeric-cast.rs:104:16 + | +LL | foo::(x_u32); + | ^^^^^ expected i64, found u32 error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:106:16 - | -106 | foo::(x_u16); - | ^^^^^ expected i64, found u16 + --> $DIR/numeric-cast.rs:106:16 + | +LL | foo::(x_u16); + | ^^^^^ expected i64, found u16 error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:108:16 - | -108 | foo::(x_u8); - | ^^^^ expected i64, found u8 + --> $DIR/numeric-cast.rs:108:16 + | +LL | foo::(x_u8); + | ^^^^ expected i64, found u8 error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:110:16 - | -110 | foo::(x_isize); - | ^^^^^^^ expected i64, found isize + --> $DIR/numeric-cast.rs:110:16 + | +LL | foo::(x_isize); + | ^^^^^^^ expected i64, found isize error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:113:16 - | -113 | foo::(x_i32); - | ^^^^^ expected i64, found i32 + --> $DIR/numeric-cast.rs:113:16 + | +LL | foo::(x_i32); + | ^^^^^ expected i64, found i32 help: you can cast an `i32` to `i64`, which will sign-extend the source value - | -113 | foo::(x_i32.into()); - | ^^^^^^^^^^^^ + | +LL | foo::(x_i32.into()); + | ^^^^^^^^^^^^ error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:115:16 - | -115 | foo::(x_i16); - | ^^^^^ expected i64, found i16 + --> $DIR/numeric-cast.rs:115:16 + | +LL | foo::(x_i16); + | ^^^^^ expected i64, found i16 help: you can cast an `i16` to `i64`, which will sign-extend the source value - | -115 | foo::(x_i16.into()); - | ^^^^^^^^^^^^ + | +LL | foo::(x_i16.into()); + | ^^^^^^^^^^^^ error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:117:16 - | -117 | foo::(x_i8); - | ^^^^ expected i64, found i8 + --> $DIR/numeric-cast.rs:117:16 + | +LL | foo::(x_i8); + | ^^^^ expected i64, found i8 help: you can cast an `i8` to `i64`, which will sign-extend the source value - | -117 | foo::(x_i8.into()); - | ^^^^^^^^^^^ + | +LL | foo::(x_i8.into()); + | ^^^^^^^^^^^ error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:119:16 - | -119 | foo::(x_f64); - | ^^^^^ expected i64, found f64 + --> $DIR/numeric-cast.rs:119:16 + | +LL | foo::(x_f64); + | ^^^^^ expected i64, found f64 error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:121:16 - | -121 | foo::(x_f32); - | ^^^^^ expected i64, found f32 + --> $DIR/numeric-cast.rs:121:16 + | +LL | foo::(x_f32); + | ^^^^^ expected i64, found f32 error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:124:16 - | -124 | foo::(x_usize); - | ^^^^^^^ expected u32, found usize + --> $DIR/numeric-cast.rs:124:16 + | +LL | foo::(x_usize); + | ^^^^^^^ expected u32, found usize error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:126:16 - | -126 | foo::(x_u64); - | ^^^^^ expected u32, found u64 + --> $DIR/numeric-cast.rs:126:16 + | +LL | foo::(x_u64); + | ^^^^^ expected u32, found u64 error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:129:16 - | -129 | foo::(x_u16); - | ^^^^^ expected u32, found u16 + --> $DIR/numeric-cast.rs:129:16 + | +LL | foo::(x_u16); + | ^^^^^ expected u32, found u16 help: you can cast an `u16` to `u32`, which will zero-extend the source value - | -129 | foo::(x_u16.into()); - | ^^^^^^^^^^^^ + | +LL | foo::(x_u16.into()); + | ^^^^^^^^^^^^ error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:131:16 - | -131 | foo::(x_u8); - | ^^^^ expected u32, found u8 + --> $DIR/numeric-cast.rs:131:16 + | +LL | foo::(x_u8); + | ^^^^ expected u32, found u8 help: you can cast an `u8` to `u32`, which will zero-extend the source value - | -131 | foo::(x_u8.into()); - | ^^^^^^^^^^^ + | +LL | foo::(x_u8.into()); + | ^^^^^^^^^^^ error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:133:16 - | -133 | foo::(x_isize); - | ^^^^^^^ expected u32, found isize + --> $DIR/numeric-cast.rs:133:16 + | +LL | foo::(x_isize); + | ^^^^^^^ expected u32, found isize error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:135:16 - | -135 | foo::(x_i64); - | ^^^^^ expected u32, found i64 + --> $DIR/numeric-cast.rs:135:16 + | +LL | foo::(x_i64); + | ^^^^^ expected u32, found i64 error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:137:16 - | -137 | foo::(x_i32); - | ^^^^^ expected u32, found i32 + --> $DIR/numeric-cast.rs:137:16 + | +LL | foo::(x_i32); + | ^^^^^ expected u32, found i32 error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:139:16 - | -139 | foo::(x_i16); - | ^^^^^ expected u32, found i16 + --> $DIR/numeric-cast.rs:139:16 + | +LL | foo::(x_i16); + | ^^^^^ expected u32, found i16 error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:141:16 - | -141 | foo::(x_i8); - | ^^^^ expected u32, found i8 + --> $DIR/numeric-cast.rs:141:16 + | +LL | foo::(x_i8); + | ^^^^ expected u32, found i8 error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:143:16 - | -143 | foo::(x_f64); - | ^^^^^ expected u32, found f64 + --> $DIR/numeric-cast.rs:143:16 + | +LL | foo::(x_f64); + | ^^^^^ expected u32, found f64 error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:145:16 - | -145 | foo::(x_f32); - | ^^^^^ expected u32, found f32 + --> $DIR/numeric-cast.rs:145:16 + | +LL | foo::(x_f32); + | ^^^^^ expected u32, found f32 error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:148:16 - | -148 | foo::(x_usize); - | ^^^^^^^ expected i32, found usize + --> $DIR/numeric-cast.rs:148:16 + | +LL | foo::(x_usize); + | ^^^^^^^ expected i32, found usize error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:150:16 - | -150 | foo::(x_u64); - | ^^^^^ expected i32, found u64 + --> $DIR/numeric-cast.rs:150:16 + | +LL | foo::(x_u64); + | ^^^^^ expected i32, found u64 error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:152:16 - | -152 | foo::(x_u32); - | ^^^^^ expected i32, found u32 + --> $DIR/numeric-cast.rs:152:16 + | +LL | foo::(x_u32); + | ^^^^^ expected i32, found u32 error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:154:16 - | -154 | foo::(x_u16); - | ^^^^^ expected i32, found u16 + --> $DIR/numeric-cast.rs:154:16 + | +LL | foo::(x_u16); + | ^^^^^ expected i32, found u16 error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:156:16 - | -156 | foo::(x_u8); - | ^^^^ expected i32, found u8 + --> $DIR/numeric-cast.rs:156:16 + | +LL | foo::(x_u8); + | ^^^^ expected i32, found u8 error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:158:16 - | -158 | foo::(x_isize); - | ^^^^^^^ expected i32, found isize + --> $DIR/numeric-cast.rs:158:16 + | +LL | foo::(x_isize); + | ^^^^^^^ expected i32, found isize error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:160:16 - | -160 | foo::(x_i64); - | ^^^^^ expected i32, found i64 + --> $DIR/numeric-cast.rs:160:16 + | +LL | foo::(x_i64); + | ^^^^^ expected i32, found i64 error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:163:16 - | -163 | foo::(x_i16); - | ^^^^^ expected i32, found i16 + --> $DIR/numeric-cast.rs:163:16 + | +LL | foo::(x_i16); + | ^^^^^ expected i32, found i16 help: you can cast an `i16` to `i32`, which will sign-extend the source value - | -163 | foo::(x_i16.into()); - | ^^^^^^^^^^^^ + | +LL | foo::(x_i16.into()); + | ^^^^^^^^^^^^ error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:165:16 - | -165 | foo::(x_i8); - | ^^^^ expected i32, found i8 + --> $DIR/numeric-cast.rs:165:16 + | +LL | foo::(x_i8); + | ^^^^ expected i32, found i8 help: you can cast an `i8` to `i32`, which will sign-extend the source value - | -165 | foo::(x_i8.into()); - | ^^^^^^^^^^^ + | +LL | foo::(x_i8.into()); + | ^^^^^^^^^^^ error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:167:16 - | -167 | foo::(x_f64); - | ^^^^^ expected i32, found f64 + --> $DIR/numeric-cast.rs:167:16 + | +LL | foo::(x_f64); + | ^^^^^ expected i32, found f64 error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:169:16 - | -169 | foo::(x_f32); - | ^^^^^ expected i32, found f32 + --> $DIR/numeric-cast.rs:169:16 + | +LL | foo::(x_f32); + | ^^^^^ expected i32, found f32 error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:172:16 - | -172 | foo::(x_usize); - | ^^^^^^^ expected u16, found usize + --> $DIR/numeric-cast.rs:172:16 + | +LL | foo::(x_usize); + | ^^^^^^^ expected u16, found usize error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:174:16 - | -174 | foo::(x_u64); - | ^^^^^ expected u16, found u64 + --> $DIR/numeric-cast.rs:174:16 + | +LL | foo::(x_u64); + | ^^^^^ expected u16, found u64 error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:176:16 - | -176 | foo::(x_u32); - | ^^^^^ expected u16, found u32 + --> $DIR/numeric-cast.rs:176:16 + | +LL | foo::(x_u32); + | ^^^^^ expected u16, found u32 error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:179:16 - | -179 | foo::(x_u8); - | ^^^^ expected u16, found u8 + --> $DIR/numeric-cast.rs:179:16 + | +LL | foo::(x_u8); + | ^^^^ expected u16, found u8 help: you can cast an `u8` to `u16`, which will zero-extend the source value - | -179 | foo::(x_u8.into()); - | ^^^^^^^^^^^ + | +LL | foo::(x_u8.into()); + | ^^^^^^^^^^^ error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:181:16 - | -181 | foo::(x_isize); - | ^^^^^^^ expected u16, found isize + --> $DIR/numeric-cast.rs:181:16 + | +LL | foo::(x_isize); + | ^^^^^^^ expected u16, found isize error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:183:16 - | -183 | foo::(x_i64); - | ^^^^^ expected u16, found i64 + --> $DIR/numeric-cast.rs:183:16 + | +LL | foo::(x_i64); + | ^^^^^ expected u16, found i64 error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:185:16 - | -185 | foo::(x_i32); - | ^^^^^ expected u16, found i32 + --> $DIR/numeric-cast.rs:185:16 + | +LL | foo::(x_i32); + | ^^^^^ expected u16, found i32 error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:187:16 - | -187 | foo::(x_i16); - | ^^^^^ expected u16, found i16 + --> $DIR/numeric-cast.rs:187:16 + | +LL | foo::(x_i16); + | ^^^^^ expected u16, found i16 error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:189:16 - | -189 | foo::(x_i8); - | ^^^^ expected u16, found i8 + --> $DIR/numeric-cast.rs:189:16 + | +LL | foo::(x_i8); + | ^^^^ expected u16, found i8 error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:191:16 - | -191 | foo::(x_f64); - | ^^^^^ expected u16, found f64 + --> $DIR/numeric-cast.rs:191:16 + | +LL | foo::(x_f64); + | ^^^^^ expected u16, found f64 error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:193:16 - | -193 | foo::(x_f32); - | ^^^^^ expected u16, found f32 + --> $DIR/numeric-cast.rs:193:16 + | +LL | foo::(x_f32); + | ^^^^^ expected u16, found f32 error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:196:16 - | -196 | foo::(x_usize); - | ^^^^^^^ expected i16, found usize + --> $DIR/numeric-cast.rs:196:16 + | +LL | foo::(x_usize); + | ^^^^^^^ expected i16, found usize error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:198:16 - | -198 | foo::(x_u64); - | ^^^^^ expected i16, found u64 + --> $DIR/numeric-cast.rs:198:16 + | +LL | foo::(x_u64); + | ^^^^^ expected i16, found u64 error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:200:16 - | -200 | foo::(x_u32); - | ^^^^^ expected i16, found u32 + --> $DIR/numeric-cast.rs:200:16 + | +LL | foo::(x_u32); + | ^^^^^ expected i16, found u32 error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:202:16 - | -202 | foo::(x_u16); - | ^^^^^ expected i16, found u16 + --> $DIR/numeric-cast.rs:202:16 + | +LL | foo::(x_u16); + | ^^^^^ expected i16, found u16 error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:204:16 - | -204 | foo::(x_u8); - | ^^^^ expected i16, found u8 + --> $DIR/numeric-cast.rs:204:16 + | +LL | foo::(x_u8); + | ^^^^ expected i16, found u8 error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:206:16 - | -206 | foo::(x_isize); - | ^^^^^^^ expected i16, found isize + --> $DIR/numeric-cast.rs:206:16 + | +LL | foo::(x_isize); + | ^^^^^^^ expected i16, found isize error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:208:16 - | -208 | foo::(x_i64); - | ^^^^^ expected i16, found i64 + --> $DIR/numeric-cast.rs:208:16 + | +LL | foo::(x_i64); + | ^^^^^ expected i16, found i64 error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:210:16 - | -210 | foo::(x_i32); - | ^^^^^ expected i16, found i32 + --> $DIR/numeric-cast.rs:210:16 + | +LL | foo::(x_i32); + | ^^^^^ expected i16, found i32 error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:213:16 - | -213 | foo::(x_i8); - | ^^^^ expected i16, found i8 + --> $DIR/numeric-cast.rs:213:16 + | +LL | foo::(x_i8); + | ^^^^ expected i16, found i8 help: you can cast an `i8` to `i16`, which will sign-extend the source value - | -213 | foo::(x_i8.into()); - | ^^^^^^^^^^^ + | +LL | foo::(x_i8.into()); + | ^^^^^^^^^^^ error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:215:16 - | -215 | foo::(x_f64); - | ^^^^^ expected i16, found f64 + --> $DIR/numeric-cast.rs:215:16 + | +LL | foo::(x_f64); + | ^^^^^ expected i16, found f64 error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:217:16 - | -217 | foo::(x_f32); - | ^^^^^ expected i16, found f32 + --> $DIR/numeric-cast.rs:217:16 + | +LL | foo::(x_f32); + | ^^^^^ expected i16, found f32 error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:220:15 - | -220 | foo::(x_usize); - | ^^^^^^^ expected u8, found usize + --> $DIR/numeric-cast.rs:220:15 + | +LL | foo::(x_usize); + | ^^^^^^^ expected u8, found usize error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:222:15 - | -222 | foo::(x_u64); - | ^^^^^ expected u8, found u64 + --> $DIR/numeric-cast.rs:222:15 + | +LL | foo::(x_u64); + | ^^^^^ expected u8, found u64 error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:224:15 - | -224 | foo::(x_u32); - | ^^^^^ expected u8, found u32 + --> $DIR/numeric-cast.rs:224:15 + | +LL | foo::(x_u32); + | ^^^^^ expected u8, found u32 error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:226:15 - | -226 | foo::(x_u16); - | ^^^^^ expected u8, found u16 + --> $DIR/numeric-cast.rs:226:15 + | +LL | foo::(x_u16); + | ^^^^^ expected u8, found u16 error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:229:15 - | -229 | foo::(x_isize); - | ^^^^^^^ expected u8, found isize + --> $DIR/numeric-cast.rs:229:15 + | +LL | foo::(x_isize); + | ^^^^^^^ expected u8, found isize error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:231:15 - | -231 | foo::(x_i64); - | ^^^^^ expected u8, found i64 + --> $DIR/numeric-cast.rs:231:15 + | +LL | foo::(x_i64); + | ^^^^^ expected u8, found i64 error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:233:15 - | -233 | foo::(x_i32); - | ^^^^^ expected u8, found i32 + --> $DIR/numeric-cast.rs:233:15 + | +LL | foo::(x_i32); + | ^^^^^ expected u8, found i32 error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:235:15 - | -235 | foo::(x_i16); - | ^^^^^ expected u8, found i16 + --> $DIR/numeric-cast.rs:235:15 + | +LL | foo::(x_i16); + | ^^^^^ expected u8, found i16 error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:237:15 - | -237 | foo::(x_i8); - | ^^^^ expected u8, found i8 + --> $DIR/numeric-cast.rs:237:15 + | +LL | foo::(x_i8); + | ^^^^ expected u8, found i8 error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:239:15 - | -239 | foo::(x_f64); - | ^^^^^ expected u8, found f64 + --> $DIR/numeric-cast.rs:239:15 + | +LL | foo::(x_f64); + | ^^^^^ expected u8, found f64 error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:241:15 - | -241 | foo::(x_f32); - | ^^^^^ expected u8, found f32 + --> $DIR/numeric-cast.rs:241:15 + | +LL | foo::(x_f32); + | ^^^^^ expected u8, found f32 error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:244:15 - | -244 | foo::(x_usize); - | ^^^^^^^ expected i8, found usize + --> $DIR/numeric-cast.rs:244:15 + | +LL | foo::(x_usize); + | ^^^^^^^ expected i8, found usize error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:246:15 - | -246 | foo::(x_u64); - | ^^^^^ expected i8, found u64 + --> $DIR/numeric-cast.rs:246:15 + | +LL | foo::(x_u64); + | ^^^^^ expected i8, found u64 error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:248:15 - | -248 | foo::(x_u32); - | ^^^^^ expected i8, found u32 + --> $DIR/numeric-cast.rs:248:15 + | +LL | foo::(x_u32); + | ^^^^^ expected i8, found u32 error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:250:15 - | -250 | foo::(x_u16); - | ^^^^^ expected i8, found u16 + --> $DIR/numeric-cast.rs:250:15 + | +LL | foo::(x_u16); + | ^^^^^ expected i8, found u16 error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:252:15 - | -252 | foo::(x_u8); - | ^^^^ expected i8, found u8 + --> $DIR/numeric-cast.rs:252:15 + | +LL | foo::(x_u8); + | ^^^^ expected i8, found u8 error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:254:15 - | -254 | foo::(x_isize); - | ^^^^^^^ expected i8, found isize + --> $DIR/numeric-cast.rs:254:15 + | +LL | foo::(x_isize); + | ^^^^^^^ expected i8, found isize error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:256:15 - | -256 | foo::(x_i64); - | ^^^^^ expected i8, found i64 + --> $DIR/numeric-cast.rs:256:15 + | +LL | foo::(x_i64); + | ^^^^^ expected i8, found i64 error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:258:15 - | -258 | foo::(x_i32); - | ^^^^^ expected i8, found i32 + --> $DIR/numeric-cast.rs:258:15 + | +LL | foo::(x_i32); + | ^^^^^ expected i8, found i32 error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:260:15 - | -260 | foo::(x_i16); - | ^^^^^ expected i8, found i16 + --> $DIR/numeric-cast.rs:260:15 + | +LL | foo::(x_i16); + | ^^^^^ expected i8, found i16 error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:263:15 - | -263 | foo::(x_f64); - | ^^^^^ expected i8, found f64 + --> $DIR/numeric-cast.rs:263:15 + | +LL | foo::(x_f64); + | ^^^^^ expected i8, found f64 error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:265:15 - | -265 | foo::(x_f32); - | ^^^^^ expected i8, found f32 + --> $DIR/numeric-cast.rs:265:15 + | +LL | foo::(x_f32); + | ^^^^^ expected i8, found f32 error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:268:16 - | -268 | foo::(x_usize); - | ^^^^^^^ expected f64, found usize + --> $DIR/numeric-cast.rs:268:16 + | +LL | foo::(x_usize); + | ^^^^^^^ expected f64, found usize error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:270:16 - | -270 | foo::(x_u64); - | ^^^^^ expected f64, found u64 + --> $DIR/numeric-cast.rs:270:16 + | +LL | foo::(x_u64); + | ^^^^^ expected f64, found u64 error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:272:16 - | -272 | foo::(x_u32); - | ^^^^^ expected f64, found u32 + --> $DIR/numeric-cast.rs:272:16 + | +LL | foo::(x_u32); + | ^^^^^ expected f64, found u32 help: you can cast an `u32` to `f64`, producing the floating point representation of the integer - | -272 | foo::(x_u32.into()); - | ^^^^^^^^^^^^ + | +LL | foo::(x_u32.into()); + | ^^^^^^^^^^^^ error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:274:16 - | -274 | foo::(x_u16); - | ^^^^^ expected f64, found u16 + --> $DIR/numeric-cast.rs:274:16 + | +LL | foo::(x_u16); + | ^^^^^ expected f64, found u16 help: you can cast an `u16` to `f64`, producing the floating point representation of the integer - | -274 | foo::(x_u16.into()); - | ^^^^^^^^^^^^ + | +LL | foo::(x_u16.into()); + | ^^^^^^^^^^^^ error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:276:16 - | -276 | foo::(x_u8); - | ^^^^ expected f64, found u8 + --> $DIR/numeric-cast.rs:276:16 + | +LL | foo::(x_u8); + | ^^^^ expected f64, found u8 help: you can cast an `u8` to `f64`, producing the floating point representation of the integer - | -276 | foo::(x_u8.into()); - | ^^^^^^^^^^^ + | +LL | foo::(x_u8.into()); + | ^^^^^^^^^^^ error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:278:16 - | -278 | foo::(x_isize); - | ^^^^^^^ expected f64, found isize + --> $DIR/numeric-cast.rs:278:16 + | +LL | foo::(x_isize); + | ^^^^^^^ expected f64, found isize error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:280:16 - | -280 | foo::(x_i64); - | ^^^^^ expected f64, found i64 + --> $DIR/numeric-cast.rs:280:16 + | +LL | foo::(x_i64); + | ^^^^^ expected f64, found i64 error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:282:16 - | -282 | foo::(x_i32); - | ^^^^^ expected f64, found i32 + --> $DIR/numeric-cast.rs:282:16 + | +LL | foo::(x_i32); + | ^^^^^ expected f64, found i32 help: you can cast an `i32` to `f64`, producing the floating point representation of the integer - | -282 | foo::(x_i32.into()); - | ^^^^^^^^^^^^ + | +LL | foo::(x_i32.into()); + | ^^^^^^^^^^^^ error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:284:16 - | -284 | foo::(x_i16); - | ^^^^^ expected f64, found i16 + --> $DIR/numeric-cast.rs:284:16 + | +LL | foo::(x_i16); + | ^^^^^ expected f64, found i16 help: you can cast an `i16` to `f64`, producing the floating point representation of the integer - | -284 | foo::(x_i16.into()); - | ^^^^^^^^^^^^ + | +LL | foo::(x_i16.into()); + | ^^^^^^^^^^^^ error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:286:16 - | -286 | foo::(x_i8); - | ^^^^ expected f64, found i8 + --> $DIR/numeric-cast.rs:286:16 + | +LL | foo::(x_i8); + | ^^^^ expected f64, found i8 help: you can cast an `i8` to `f64`, producing the floating point representation of the integer - | -286 | foo::(x_i8.into()); - | ^^^^^^^^^^^ + | +LL | foo::(x_i8.into()); + | ^^^^^^^^^^^ error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:289:16 - | -289 | foo::(x_f32); - | ^^^^^ expected f64, found f32 + --> $DIR/numeric-cast.rs:289:16 + | +LL | foo::(x_f32); + | ^^^^^ expected f64, found f32 help: you can cast an `f32` to `f64` in a lossless way - | -289 | foo::(x_f32.into()); - | ^^^^^^^^^^^^ + | +LL | foo::(x_f32.into()); + | ^^^^^^^^^^^^ error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:292:16 - | -292 | foo::(x_usize); - | ^^^^^^^ expected f32, found usize + --> $DIR/numeric-cast.rs:292:16 + | +LL | foo::(x_usize); + | ^^^^^^^ expected f32, found usize error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:294:16 - | -294 | foo::(x_u64); - | ^^^^^ expected f32, found u64 + --> $DIR/numeric-cast.rs:294:16 + | +LL | foo::(x_u64); + | ^^^^^ expected f32, found u64 error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:296:16 - | -296 | foo::(x_u32); - | ^^^^^ expected f32, found u32 + --> $DIR/numeric-cast.rs:296:16 + | +LL | foo::(x_u32); + | ^^^^^ expected f32, found u32 error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:298:16 - | -298 | foo::(x_u16); - | ^^^^^ expected f32, found u16 + --> $DIR/numeric-cast.rs:298:16 + | +LL | foo::(x_u16); + | ^^^^^ expected f32, found u16 help: you can cast an `u16` to `f32`, producing the floating point representation of the integer - | -298 | foo::(x_u16.into()); - | ^^^^^^^^^^^^ + | +LL | foo::(x_u16.into()); + | ^^^^^^^^^^^^ error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:300:16 - | -300 | foo::(x_u8); - | ^^^^ expected f32, found u8 + --> $DIR/numeric-cast.rs:300:16 + | +LL | foo::(x_u8); + | ^^^^ expected f32, found u8 help: you can cast an `u8` to `f32`, producing the floating point representation of the integer - | -300 | foo::(x_u8.into()); - | ^^^^^^^^^^^ + | +LL | foo::(x_u8.into()); + | ^^^^^^^^^^^ error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:302:16 - | -302 | foo::(x_isize); - | ^^^^^^^ expected f32, found isize + --> $DIR/numeric-cast.rs:302:16 + | +LL | foo::(x_isize); + | ^^^^^^^ expected f32, found isize error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:304:16 - | -304 | foo::(x_i64); - | ^^^^^ expected f32, found i64 + --> $DIR/numeric-cast.rs:304:16 + | +LL | foo::(x_i64); + | ^^^^^ expected f32, found i64 error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:306:16 - | -306 | foo::(x_i32); - | ^^^^^ expected f32, found i32 + --> $DIR/numeric-cast.rs:306:16 + | +LL | foo::(x_i32); + | ^^^^^ expected f32, found i32 error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:308:16 - | -308 | foo::(x_i16); - | ^^^^^ expected f32, found i16 + --> $DIR/numeric-cast.rs:308:16 + | +LL | foo::(x_i16); + | ^^^^^ expected f32, found i16 help: you can cast an `i16` to `f32`, producing the floating point representation of the integer - | -308 | foo::(x_i16.into()); - | ^^^^^^^^^^^^ + | +LL | foo::(x_i16.into()); + | ^^^^^^^^^^^^ error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:310:16 - | -310 | foo::(x_i8); - | ^^^^ expected f32, found i8 + --> $DIR/numeric-cast.rs:310:16 + | +LL | foo::(x_i8); + | ^^^^ expected f32, found i8 help: you can cast an `i8` to `f32`, producing the floating point representation of the integer - | -310 | foo::(x_i8.into()); - | ^^^^^^^^^^^ + | +LL | foo::(x_i8.into()); + | ^^^^^^^^^^^ error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:312:16 - | -312 | foo::(x_f64); - | ^^^^^ expected f32, found f64 + --> $DIR/numeric-cast.rs:312:16 + | +LL | foo::(x_f64); + | ^^^^^ expected f32, found f64 error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:316:16 - | -316 | foo::(x_u8 as u16); - | ^^^^^^^^^^^ expected u32, found u16 + --> $DIR/numeric-cast.rs:316:16 + | +LL | foo::(x_u8 as u16); + | ^^^^^^^^^^^ expected u32, found u16 help: you can cast an `u16` to `u32`, which will zero-extend the source value - | -316 | foo::((x_u8 as u16).into()); - | ^^^^^^^^^^^^^^^^^^^^ + | +LL | foo::((x_u8 as u16).into()); + | ^^^^^^^^^^^^^^^^^^^^ error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:318:16 - | -318 | foo::(-x_i8); - | ^^^^^ expected i32, found i8 + --> $DIR/numeric-cast.rs:318:16 + | +LL | foo::(-x_i8); + | ^^^^^ expected i32, found i8 help: you can cast an `i8` to `i32`, which will sign-extend the source value - | -318 | foo::((-x_i8).into()); - | ^^^^^^^^^^^^^^ + | +LL | foo::((-x_i8).into()); + | ^^^^^^^^^^^^^^ error: aborting due to 134 previous errors diff --git a/src/test/ui/suggestions/pub-ident-fn-2.stderr b/src/test/ui/suggestions/pub-ident-fn-2.stderr index 7d3abceb11b58..bbbb3df876986 100644 --- a/src/test/ui/suggestions/pub-ident-fn-2.stderr +++ b/src/test/ui/suggestions/pub-ident-fn-2.stderr @@ -1,11 +1,11 @@ error: missing `fn` for method definition --> $DIR/pub-ident-fn-2.rs:11:4 | -11 | pub foo(s: usize) { bar() } +LL | pub foo(s: usize) { bar() } | ^ help: add `fn` here to parse `foo` as a public method | -11 | pub fn foo(s: usize) { bar() } +LL | pub fn foo(s: usize) { bar() } | ^^ error: aborting due to previous error diff --git a/src/test/ui/suggestions/pub-ident-fn-or-struct-2.stderr b/src/test/ui/suggestions/pub-ident-fn-or-struct-2.stderr index 68dea2aec3a54..c945033ad74ab 100644 --- a/src/test/ui/suggestions/pub-ident-fn-or-struct-2.stderr +++ b/src/test/ui/suggestions/pub-ident-fn-or-struct-2.stderr @@ -1,7 +1,7 @@ error: missing `fn` or `struct` for method or struct definition --> $DIR/pub-ident-fn-or-struct-2.rs:11:4 | -11 | pub S(); +LL | pub S(); | ---^- help: if you meant to call a macro, write instead: `S!` error: aborting due to previous error diff --git a/src/test/ui/suggestions/pub-ident-fn-or-struct.stderr b/src/test/ui/suggestions/pub-ident-fn-or-struct.stderr index 0c19f776bd18e..9528c15dfa18f 100644 --- a/src/test/ui/suggestions/pub-ident-fn-or-struct.stderr +++ b/src/test/ui/suggestions/pub-ident-fn-or-struct.stderr @@ -1,7 +1,7 @@ error: missing `fn` or `struct` for method or struct definition --> $DIR/pub-ident-fn-or-struct.rs:11:4 | -11 | pub S (foo) bar +LL | pub S (foo) bar | ---^- help: if you meant to call a macro, write instead: `S!` error: aborting due to previous error diff --git a/src/test/ui/suggestions/pub-ident-fn.stderr b/src/test/ui/suggestions/pub-ident-fn.stderr index d36b9b127e0c1..de7ee71d1b40f 100644 --- a/src/test/ui/suggestions/pub-ident-fn.stderr +++ b/src/test/ui/suggestions/pub-ident-fn.stderr @@ -1,11 +1,11 @@ error: missing `fn` for method definition --> $DIR/pub-ident-fn.rs:11:4 | -11 | pub foo(s: usize) -> bool { true } +LL | pub foo(s: usize) -> bool { true } | ^^^ help: add `fn` here to parse `foo` as a public method | -11 | pub fn foo(s: usize) -> bool { true } +LL | pub fn foo(s: usize) -> bool { true } | ^^ error: aborting due to previous error diff --git a/src/test/ui/suggestions/pub-ident-struct.stderr b/src/test/ui/suggestions/pub-ident-struct.stderr index 36ef307272231..cd53cea721297 100644 --- a/src/test/ui/suggestions/pub-ident-struct.stderr +++ b/src/test/ui/suggestions/pub-ident-struct.stderr @@ -1,11 +1,11 @@ error: missing `struct` for struct definition --> $DIR/pub-ident-struct.rs:11:4 | -11 | pub S { +LL | pub S { | ^ help: add `struct` here to parse `S` as a public struct | -11 | pub struct S { +LL | pub struct S { | ^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/suggestions/return-type.stderr b/src/test/ui/suggestions/return-type.stderr index 19c5d72dd7b36..70b639d0bb681 100644 --- a/src/test/ui/suggestions/return-type.stderr +++ b/src/test/ui/suggestions/return-type.stderr @@ -1,18 +1,18 @@ error[E0308]: mismatched types --> $DIR/return-type.rs:20:5 | -20 | foo(4 as usize) +LL | foo(4 as usize) | ^^^^^^^^^^^^^^^ expected (), found struct `S` | = note: expected type `()` found type `S` help: try adding a semicolon | -20 | foo(4 as usize); +LL | foo(4 as usize); | ^ help: try adding a return type | -19 | fn bar() -> S { +LL | fn bar() -> S { | ^^^^^^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/suggestions/str-array-assignment.stderr b/src/test/ui/suggestions/str-array-assignment.stderr index 4ef18e640a755..0e20f4e9706fd 100644 --- a/src/test/ui/suggestions/str-array-assignment.stderr +++ b/src/test/ui/suggestions/str-array-assignment.stderr @@ -1,7 +1,7 @@ error[E0308]: if and else have incompatible types --> $DIR/str-array-assignment.rs:13:11 | -13 | let t = if true { s[..2] } else { s }; +LL | let t = if true { s[..2] } else { s }; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected str, found &str | = note: expected type `str` @@ -10,10 +10,10 @@ error[E0308]: if and else have incompatible types error[E0308]: mismatched types --> $DIR/str-array-assignment.rs:15:27 | -11 | fn main() { +LL | fn main() { | - expected `()` because of default return type ... -15 | let u: &str = if true { s[..2] } else { s }; +LL | let u: &str = if true { s[..2] } else { s }; | ^^^^^^ expected &str, found str | = note: expected type `&str` @@ -22,7 +22,7 @@ error[E0308]: mismatched types error[E0277]: the trait bound `str: std::marker::Sized` is not satisfied --> $DIR/str-array-assignment.rs:17:7 | -17 | let v = s[..2]; +LL | let v = s[..2]; | ^ ------ help: consider borrowing here: `&s[..2]` | | | `str` does not have a constant size known at compile-time @@ -33,7 +33,7 @@ error[E0277]: the trait bound `str: std::marker::Sized` is not satisfied error[E0308]: mismatched types --> $DIR/str-array-assignment.rs:19:17 | -19 | let w: &str = s[..2]; +LL | let w: &str = s[..2]; | ^^^^^^ | | | expected &str, found str diff --git a/src/test/ui/suggestions/str-as-char.stderr b/src/test/ui/suggestions/str-as-char.stderr index bf975053ffafd..d881becf00c9e 100644 --- a/src/test/ui/suggestions/str-as-char.stderr +++ b/src/test/ui/suggestions/str-as-char.stderr @@ -1,11 +1,11 @@ error: character literal may only contain one codepoint --> $DIR/str-as-char.rs:12:14 | -12 | println!('●●'); +LL | println!('●●'); | ^^^^ help: if you meant to write a `str` literal, use double quotes | -12 | println!("●●"); +LL | println!("●●"); | ^^^^ error: aborting due to previous error diff --git a/src/test/ui/suggestions/suggest-labels.stderr b/src/test/ui/suggestions/suggest-labels.stderr index c82b5decfd839..1d0a36292e98f 100644 --- a/src/test/ui/suggestions/suggest-labels.stderr +++ b/src/test/ui/suggestions/suggest-labels.stderr @@ -1,19 +1,19 @@ error[E0426]: use of undeclared label `'fo` --> $DIR/suggest-labels.rs:14:15 | -14 | break 'fo; //~ ERROR use of undeclared label +LL | break 'fo; //~ ERROR use of undeclared label | ^^^ did you mean `'foo`? error[E0426]: use of undeclared label `'bor` --> $DIR/suggest-labels.rs:18:18 | -18 | continue 'bor; //~ ERROR use of undeclared label +LL | continue 'bor; //~ ERROR use of undeclared label | ^^^^ did you mean `'bar`? error[E0426]: use of undeclared label `'longlable` --> $DIR/suggest-labels.rs:23:19 | -23 | break 'longlable; //~ ERROR use of undeclared label +LL | break 'longlable; //~ ERROR use of undeclared label | ^^^^^^^^^^ did you mean `'longlabel1`? error: aborting due to 3 previous errors diff --git a/src/test/ui/suggestions/suggest-methods.stderr b/src/test/ui/suggestions/suggest-methods.stderr index d3d8d302c70c4..cb2b179025356 100644 --- a/src/test/ui/suggestions/suggest-methods.stderr +++ b/src/test/ui/suggestions/suggest-methods.stderr @@ -1,10 +1,10 @@ error[E0599]: no method named `bat` found for type `Foo` in the current scope --> $DIR/suggest-methods.rs:28:7 | -11 | struct Foo; +LL | struct Foo; | ----------- method `bat` not found for this ... -28 | f.bat(1.0); //~ ERROR no method named +LL | f.bat(1.0); //~ ERROR no method named | ^^^ | = help: did you mean `bar`? @@ -12,7 +12,7 @@ error[E0599]: no method named `bat` found for type `Foo` in the current scope error[E0599]: no method named `is_emtpy` found for type `std::string::String` in the current scope --> $DIR/suggest-methods.rs:31:15 | -31 | let _ = s.is_emtpy(); //~ ERROR no method named +LL | let _ = s.is_emtpy(); //~ ERROR no method named | ^^^^^^^^ | = help: did you mean `is_empty`? @@ -20,7 +20,7 @@ error[E0599]: no method named `is_emtpy` found for type `std::string::String` in error[E0599]: no method named `count_eos` found for type `u32` in the current scope --> $DIR/suggest-methods.rs:35:19 | -35 | let _ = 63u32.count_eos(); //~ ERROR no method named +LL | let _ = 63u32.count_eos(); //~ ERROR no method named | ^^^^^^^^^ | = help: did you mean `count_zeros`? @@ -28,7 +28,7 @@ error[E0599]: no method named `count_eos` found for type `u32` in the current sc error[E0599]: no method named `count_o` found for type `u32` in the current scope --> $DIR/suggest-methods.rs:38:19 | -38 | let _ = 63u32.count_o(); //~ ERROR no method named +LL | let _ = 63u32.count_o(); //~ ERROR no method named | ^^^^^^^ error: aborting due to 4 previous errors diff --git a/src/test/ui/suggestions/try-on-option.stderr b/src/test/ui/suggestions/try-on-option.stderr index dfe950818e7e6..26e303e01c0c1 100644 --- a/src/test/ui/suggestions/try-on-option.stderr +++ b/src/test/ui/suggestions/try-on-option.stderr @@ -1,7 +1,7 @@ error[E0277]: the trait bound `(): std::convert::From` is not satisfied --> $DIR/try-on-option.rs:17:5 | -17 | x?; //~ the trait bound +LL | x?; //~ the trait bound | ^^ the trait `std::convert::From` is not implemented for `()` | = note: required by `std::convert::From::from` @@ -9,7 +9,7 @@ error[E0277]: the trait bound `(): std::convert::From` i error[E0277]: the `?` operator can only be used in a function that returns `Result` (or another type that implements `std::ops::Try`) --> $DIR/try-on-option.rs:23:5 | -23 | x?; //~ the `?` operator +LL | x?; //~ the `?` operator | ^^ cannot use the `?` operator in a function that returns `u32` | = help: the trait `std::ops::Try` is not implemented for `u32` diff --git a/src/test/ui/suggestions/try-operator-on-main.stderr b/src/test/ui/suggestions/try-operator-on-main.stderr index e97823a3d5d5b..449f52f5f2cf2 100644 --- a/src/test/ui/suggestions/try-operator-on-main.stderr +++ b/src/test/ui/suggestions/try-operator-on-main.stderr @@ -1,7 +1,7 @@ error[E0277]: the `?` operator can only be used in a function that returns `Result` (or another type that implements `std::ops::Try`) --> $DIR/try-operator-on-main.rs:19:5 | -19 | std::fs::File::open("foo")?; //~ ERROR the `?` operator can only +LL | std::fs::File::open("foo")?; //~ ERROR the `?` operator can only | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ cannot use the `?` operator in a function that returns `()` | = help: the trait `std::ops::Try` is not implemented for `()` @@ -10,7 +10,7 @@ error[E0277]: the `?` operator can only be used in a function that returns `Resu error[E0277]: the `?` operator can only be applied to values that implement `std::ops::Try` --> $DIR/try-operator-on-main.rs:22:5 | -22 | ()?; //~ ERROR the `?` operator can only +LL | ()?; //~ ERROR the `?` operator can only | ^^^ the `?` operator cannot be applied to type `()` | = help: the trait `std::ops::Try` is not implemented for `()` @@ -19,19 +19,19 @@ error[E0277]: the `?` operator can only be applied to values that implement `std error[E0277]: the trait bound `(): std::ops::Try` is not satisfied --> $DIR/try-operator-on-main.rs:25:5 | -25 | try_trait_generic::<()>(); //~ ERROR the trait bound +LL | try_trait_generic::<()>(); //~ ERROR the trait bound | ^^^^^^^^^^^^^^^^^^^^^^^ the trait `std::ops::Try` is not implemented for `()` | note: required by `try_trait_generic` --> $DIR/try-operator-on-main.rs:30:1 | -30 | fn try_trait_generic() -> T { +LL | fn try_trait_generic() -> T { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error[E0277]: the `?` operator can only be applied to values that implement `std::ops::Try` --> $DIR/try-operator-on-main.rs:32:5 | -32 | ()?; //~ ERROR the `?` operator can only +LL | ()?; //~ ERROR the `?` operator can only | ^^^ the `?` operator cannot be applied to type `()` | = help: the trait `std::ops::Try` is not implemented for `()` diff --git a/src/test/ui/suggestions/tuple-float-index.stderr b/src/test/ui/suggestions/tuple-float-index.stderr index 7d133f11cbb60..4a1e34890f484 100644 --- a/src/test/ui/suggestions/tuple-float-index.stderr +++ b/src/test/ui/suggestions/tuple-float-index.stderr @@ -1,7 +1,7 @@ error: unexpected token: `1.1` --> $DIR/tuple-float-index.rs:14:17 | -14 | (1, (2, 3)).1.1; //~ ERROR unexpected token: `1.1` +LL | (1, (2, 3)).1.1; //~ ERROR unexpected token: `1.1` | ------------^^^ | | | | | unexpected token diff --git a/src/test/ui/suggestions/type-ascription-instead-of-initializer.stderr b/src/test/ui/suggestions/type-ascription-instead-of-initializer.stderr index b14d233acd6d4..9a9f3826ed802 100644 --- a/src/test/ui/suggestions/type-ascription-instead-of-initializer.stderr +++ b/src/test/ui/suggestions/type-ascription-instead-of-initializer.stderr @@ -1,7 +1,7 @@ error: expected type, found `10` --> $DIR/type-ascription-instead-of-initializer.rs:12:31 | -12 | let x: Vec::with_capacity(10, 20); //~ ERROR expected type, found `10` +LL | let x: Vec::with_capacity(10, 20); //~ ERROR expected type, found `10` | -- ^^ | || | |help: use `=` if you meant to assign @@ -10,7 +10,7 @@ error: expected type, found `10` error[E0061]: this function takes 1 parameter but 2 parameters were supplied --> $DIR/type-ascription-instead-of-initializer.rs:12:12 | -12 | let x: Vec::with_capacity(10, 20); //~ ERROR expected type, found `10` +LL | let x: Vec::with_capacity(10, 20); //~ ERROR expected type, found `10` | ^^^^^^^^^^^^^^^^^^^^^^^^^^ expected 1 parameter error: aborting due to 2 previous errors diff --git a/src/test/ui/suggestions/type-ascription-instead-of-statement-end.stderr b/src/test/ui/suggestions/type-ascription-instead-of-statement-end.stderr index 9d26d00467480..02a80d86c846d 100644 --- a/src/test/ui/suggestions/type-ascription-instead-of-statement-end.stderr +++ b/src/test/ui/suggestions/type-ascription-instead-of-statement-end.stderr @@ -1,15 +1,15 @@ error: expected type, found `0` --> $DIR/type-ascription-instead-of-statement-end.rs:15:5 | -14 | println!("test"): +LL | println!("test"): | - help: did you mean to use `;` here? -15 | 0; //~ ERROR expected type, found `0` +LL | 0; //~ ERROR expected type, found `0` | ^ expecting a type here because of type ascription error: expected type, found `0` --> $DIR/type-ascription-instead-of-statement-end.rs:19:23 | -19 | println!("test"): 0; //~ ERROR expected type, found `0` +LL | println!("test"): 0; //~ ERROR expected type, found `0` | ^ expecting a type here because of type ascription error: aborting due to 2 previous errors diff --git a/src/test/ui/suggestions/type-ascription-with-fn-call.stderr b/src/test/ui/suggestions/type-ascription-with-fn-call.stderr index d5e0b00f3dff0..efe41acf66347 100644 --- a/src/test/ui/suggestions/type-ascription-with-fn-call.stderr +++ b/src/test/ui/suggestions/type-ascription-with-fn-call.stderr @@ -1,9 +1,9 @@ error[E0573]: expected type, found function `f` --> $DIR/type-ascription-with-fn-call.rs:15:5 | -14 | f() : +LL | f() : | - help: did you mean to use `;` here instead? -15 | f(); //~ ERROR expected type, found function +LL | f(); //~ ERROR expected type, found function | ^^^ | | | not a type diff --git a/src/test/ui/svh-change-lit.stderr b/src/test/ui/svh-change-lit.stderr index 94e845c527c6a..b983012ee32e1 100644 --- a/src/test/ui/svh-change-lit.stderr +++ b/src/test/ui/svh-change-lit.stderr @@ -1,7 +1,7 @@ error[E0460]: found possibly newer version of crate `a` which `b` depends on --> $DIR/svh-change-lit.rs:20:1 | -20 | extern crate b; //~ ERROR: found possibly newer version of crate `a` which `b` depends on +LL | extern crate b; //~ ERROR: found possibly newer version of crate `a` which `b` depends on | ^^^^^^^^^^^^^^^ | = note: perhaps that crate needs to be recompiled? diff --git a/src/test/ui/svh-change-significant-cfg.stderr b/src/test/ui/svh-change-significant-cfg.stderr index d2744771ec7a3..d40d0dac8bb10 100644 --- a/src/test/ui/svh-change-significant-cfg.stderr +++ b/src/test/ui/svh-change-significant-cfg.stderr @@ -1,7 +1,7 @@ error[E0460]: found possibly newer version of crate `a` which `b` depends on --> $DIR/svh-change-significant-cfg.rs:20:1 | -20 | extern crate b; //~ ERROR: found possibly newer version of crate `a` which `b` depends on +LL | extern crate b; //~ ERROR: found possibly newer version of crate `a` which `b` depends on | ^^^^^^^^^^^^^^^ | = note: perhaps that crate needs to be recompiled? diff --git a/src/test/ui/svh-change-trait-bound.stderr b/src/test/ui/svh-change-trait-bound.stderr index e272f399f797f..fbf990d83d177 100644 --- a/src/test/ui/svh-change-trait-bound.stderr +++ b/src/test/ui/svh-change-trait-bound.stderr @@ -1,7 +1,7 @@ error[E0460]: found possibly newer version of crate `a` which `b` depends on --> $DIR/svh-change-trait-bound.rs:20:1 | -20 | extern crate b; //~ ERROR: found possibly newer version of crate `a` which `b` depends on +LL | extern crate b; //~ ERROR: found possibly newer version of crate `a` which `b` depends on | ^^^^^^^^^^^^^^^ | = note: perhaps that crate needs to be recompiled? diff --git a/src/test/ui/svh-change-type-arg.stderr b/src/test/ui/svh-change-type-arg.stderr index d94dd5e522e1d..dbedf374c51f5 100644 --- a/src/test/ui/svh-change-type-arg.stderr +++ b/src/test/ui/svh-change-type-arg.stderr @@ -1,7 +1,7 @@ error[E0460]: found possibly newer version of crate `a` which `b` depends on --> $DIR/svh-change-type-arg.rs:20:1 | -20 | extern crate b; //~ ERROR: found possibly newer version of crate `a` which `b` depends on +LL | extern crate b; //~ ERROR: found possibly newer version of crate `a` which `b` depends on | ^^^^^^^^^^^^^^^ | = note: perhaps that crate needs to be recompiled? diff --git a/src/test/ui/svh-change-type-ret.stderr b/src/test/ui/svh-change-type-ret.stderr index 4484faabbf45b..f814eb67ea6c3 100644 --- a/src/test/ui/svh-change-type-ret.stderr +++ b/src/test/ui/svh-change-type-ret.stderr @@ -1,7 +1,7 @@ error[E0460]: found possibly newer version of crate `a` which `b` depends on --> $DIR/svh-change-type-ret.rs:20:1 | -20 | extern crate b; //~ ERROR: found possibly newer version of crate `a` which `b` depends on +LL | extern crate b; //~ ERROR: found possibly newer version of crate `a` which `b` depends on | ^^^^^^^^^^^^^^^ | = note: perhaps that crate needs to be recompiled? diff --git a/src/test/ui/svh-change-type-static.stderr b/src/test/ui/svh-change-type-static.stderr index 24c5acbf6f2aa..d65e697e6be40 100644 --- a/src/test/ui/svh-change-type-static.stderr +++ b/src/test/ui/svh-change-type-static.stderr @@ -1,7 +1,7 @@ error[E0460]: found possibly newer version of crate `a` which `b` depends on --> $DIR/svh-change-type-static.rs:20:1 | -20 | extern crate b; //~ ERROR: found possibly newer version of crate `a` which `b` depends on +LL | extern crate b; //~ ERROR: found possibly newer version of crate `a` which `b` depends on | ^^^^^^^^^^^^^^^ | = note: perhaps that crate needs to be recompiled? diff --git a/src/test/ui/svh-use-trait.stderr b/src/test/ui/svh-use-trait.stderr index e695d60e2a127..1eb42124e7739 100644 --- a/src/test/ui/svh-use-trait.stderr +++ b/src/test/ui/svh-use-trait.stderr @@ -1,7 +1,7 @@ error[E0460]: found possibly newer version of crate `uta` which `utb` depends on --> $DIR/svh-use-trait.rs:25:1 | -25 | extern crate utb; //~ ERROR: found possibly newer version of crate `uta` which `utb` depends +LL | extern crate utb; //~ ERROR: found possibly newer version of crate `uta` which `utb` depends | ^^^^^^^^^^^^^^^^^ | = note: perhaps that crate needs to be recompiled? diff --git a/src/test/ui/switched-expectations.stderr b/src/test/ui/switched-expectations.stderr index 822ffeb0d32de..008e668b038f9 100644 --- a/src/test/ui/switched-expectations.stderr +++ b/src/test/ui/switched-expectations.stderr @@ -1,7 +1,7 @@ error[E0308]: mismatched types --> $DIR/switched-expectations.rs:13:30 | -13 | let ref string: String = var; //~ ERROR mismatched types [E0308] +LL | let ref string: String = var; //~ ERROR mismatched types [E0308] | ^^^ expected struct `std::string::String`, found i32 | = note: expected type `std::string::String` diff --git a/src/test/ui/target-feature-wrong.stderr b/src/test/ui/target-feature-wrong.stderr index c5534bf147d5c..07bad48259111 100644 --- a/src/test/ui/target-feature-wrong.stderr +++ b/src/test/ui/target-feature-wrong.stderr @@ -1,31 +1,31 @@ warning: #[target_feature = ".."] is deprecated and will eventually be removed, use #[target_feature(enable = "..")] instead --> $DIR/target-feature-wrong.rs:18:1 | -18 | #[target_feature = "+sse2"] +LL | #[target_feature = "+sse2"] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: the feature named `foo` is not valid for this target --> $DIR/target-feature-wrong.rs:20:18 | -20 | #[target_feature(enable = "foo")] +LL | #[target_feature(enable = "foo")] | ^^^^^^^^^^^^^^ error: #[target_feature(..)] only accepts sub-keys of `enable` currently --> $DIR/target-feature-wrong.rs:22:18 | -22 | #[target_feature(bar)] +LL | #[target_feature(bar)] | ^^^ error: #[target_feature(..)] only accepts sub-keys of `enable` currently --> $DIR/target-feature-wrong.rs:24:18 | -24 | #[target_feature(disable = "baz")] +LL | #[target_feature(disable = "baz")] | ^^^^^^^^^^^^^^^ error: #[target_feature(..)] can only be applied to `unsafe` function --> $DIR/target-feature-wrong.rs:28:1 | -28 | #[target_feature(enable = "sse2")] +LL | #[target_feature(enable = "sse2")] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: aborting due to 4 previous errors diff --git a/src/test/ui/test-should-panic-attr.stderr b/src/test/ui/test-should-panic-attr.stderr index 6f143b6cbeeba..09bd54698083b 100644 --- a/src/test/ui/test-should-panic-attr.stderr +++ b/src/test/ui/test-should-panic-attr.stderr @@ -1,7 +1,7 @@ warning: attribute must be of the form: `#[should_panic]` or `#[should_panic(expected = "error message")]` --> $DIR/test-should-panic-attr.rs:15:1 | -15 | #[should_panic = "foo"] +LL | #[should_panic = "foo"] | ^^^^^^^^^^^^^^^^^^^^^^^ | = note: Errors in this attribute were erroneously allowed and will become a hard error in a future release. @@ -9,7 +9,7 @@ warning: attribute must be of the form: `#[should_panic]` or `#[should_panic(exp warning: argument must be of the form: `expected = "error message"` --> $DIR/test-should-panic-attr.rs:22:1 | -22 | #[should_panic(expected)] +LL | #[should_panic(expected)] | ^^^^^^^^^^^^^^^^^^^^^^^^^ | = note: Errors in this attribute were erroneously allowed and will become a hard error in a future release. @@ -17,7 +17,7 @@ warning: argument must be of the form: `expected = "error message"` warning: argument must be of the form: `expected = "error message"` --> $DIR/test-should-panic-attr.rs:29:1 | -29 | #[should_panic(expect)] +LL | #[should_panic(expect)] | ^^^^^^^^^^^^^^^^^^^^^^^ | = note: Errors in this attribute were erroneously allowed and will become a hard error in a future release. @@ -25,7 +25,7 @@ warning: argument must be of the form: `expected = "error message"` warning: argument must be of the form: `expected = "error message"` --> $DIR/test-should-panic-attr.rs:36:1 | -36 | #[should_panic(expected(foo, bar))] +LL | #[should_panic(expected(foo, bar))] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = note: Errors in this attribute were erroneously allowed and will become a hard error in a future release. @@ -33,7 +33,7 @@ warning: argument must be of the form: `expected = "error message"` warning: argument must be of the form: `expected = "error message"` --> $DIR/test-should-panic-attr.rs:43:1 | -43 | #[should_panic(expected = "foo", bar)] +LL | #[should_panic(expected = "foo", bar)] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = note: Errors in this attribute were erroneously allowed and will become a hard error in a future release. diff --git a/src/test/ui/token/bounds-obj-parens.stderr b/src/test/ui/token/bounds-obj-parens.stderr index 4d60be15ecaf0..67dcbc4541941 100644 --- a/src/test/ui/token/bounds-obj-parens.stderr +++ b/src/test/ui/token/bounds-obj-parens.stderr @@ -1,7 +1,7 @@ error: expected one of `!` or `::`, found `` --> $DIR/bounds-obj-parens.rs:15:1 | -15 | FAIL +LL | FAIL | ^^^^ expected one of `!` or `::` here error: aborting due to previous error diff --git a/src/test/ui/token/issue-10636-2.stderr b/src/test/ui/token/issue-10636-2.stderr index b4f0f30c6c19f..56299173e7777 100644 --- a/src/test/ui/token/issue-10636-2.stderr +++ b/src/test/ui/token/issue-10636-2.stderr @@ -1,25 +1,25 @@ error: incorrect close delimiter: `}` --> $DIR/issue-10636-2.rs:18:1 | -18 | } //~ ERROR: incorrect close delimiter +LL | } //~ ERROR: incorrect close delimiter | ^ | note: unclosed delimiter --> $DIR/issue-10636-2.rs:15:15 | -15 | option.map(|some| 42; +LL | option.map(|some| 42; | ^ error: expected one of `,`, `.`, `?`, or an operator, found `;` --> $DIR/issue-10636-2.rs:15:25 | -15 | option.map(|some| 42; +LL | option.map(|some| 42; | ^ expected one of `,`, `.`, `?`, or an operator here error: expected expression, found `)` --> $DIR/issue-10636-2.rs:18:1 | -18 | } //~ ERROR: incorrect close delimiter +LL | } //~ ERROR: incorrect close delimiter | ^ error[E0601]: main function not found diff --git a/src/test/ui/token/issue-15980.stderr b/src/test/ui/token/issue-15980.stderr index 71cd4b28da711..900b8dea297e2 100644 --- a/src/test/ui/token/issue-15980.stderr +++ b/src/test/ui/token/issue-15980.stderr @@ -1,25 +1,25 @@ error: expected identifier, found keyword `return` --> $DIR/issue-15980.rs:20:13 | -18 | Err(ref e) if e.kind == io::EndOfFile { +LL | Err(ref e) if e.kind == io::EndOfFile { | ------------- while parsing this struct -19 | //~^ NOTE while parsing this struct -20 | return +LL | //~^ NOTE while parsing this struct +LL | return | ^^^^^^ expected identifier, found keyword error: expected one of `.`, `=>`, `?`, or an operator, found `_` --> $DIR/issue-15980.rs:25:9 | -23 | } +LL | } | - expected one of `.`, `=>`, `?`, or an operator here -24 | //~^ NOTE expected one of `.`, `=>`, `?`, or an operator here -25 | _ => {} +LL | //~^ NOTE expected one of `.`, `=>`, `?`, or an operator here +LL | _ => {} | ^ unexpected token error[E0412]: cannot find type `IoResult` in module `io` --> $DIR/issue-15980.rs:14:16 | -14 | let x: io::IoResult<()> = Ok(()); +LL | let x: io::IoResult<()> = Ok(()); | ^^^^^^^^ did you mean `Result`? error: aborting due to 3 previous errors diff --git a/src/test/ui/token/issue-41155.stderr b/src/test/ui/token/issue-41155.stderr index 707784272ede8..2cab279e91f80 100644 --- a/src/test/ui/token/issue-41155.stderr +++ b/src/test/ui/token/issue-41155.stderr @@ -1,15 +1,15 @@ error: expected one of `(`, `const`, `default`, `extern`, `fn`, `type`, or `unsafe`, found `}` --> $DIR/issue-41155.rs:13:1 | -12 | pub +LL | pub | - expected one of 7 possible tokens here -13 | } //~ ERROR expected one of +LL | } //~ ERROR expected one of | ^ unexpected token error[E0412]: cannot find type `S` in this scope --> $DIR/issue-41155.rs:11:6 | -11 | impl S { //~ ERROR cannot find type +LL | impl S { //~ ERROR cannot find type | ^ not found in this scope error[E0601]: main function not found diff --git a/src/test/ui/token/macro-incomplete-parse.stderr b/src/test/ui/token/macro-incomplete-parse.stderr index 28ba6cc37c3dd..198730dc07a99 100644 --- a/src/test/ui/token/macro-incomplete-parse.stderr +++ b/src/test/ui/token/macro-incomplete-parse.stderr @@ -1,34 +1,34 @@ error: macro expansion ignores token `,` and any following --> $DIR/macro-incomplete-parse.rs:17:9 | -17 | , //~ ERROR macro expansion ignores token `,` +LL | , //~ ERROR macro expansion ignores token `,` | ^ | note: caused by the macro expansion here; the usage of `ignored_item!` is likely invalid in item context --> $DIR/macro-incomplete-parse.rs:31:1 | -31 | ignored_item!(); +LL | ignored_item!(); | ^^^^^^^^^^^^^^^^ error: expected one of `.`, `;`, `?`, `}`, or an operator, found `,` --> $DIR/macro-incomplete-parse.rs:22:14 | -22 | () => ( 1, //~ ERROR expected one of `.`, `;`, `?`, `}`, or an operator, found `,` +LL | () => ( 1, //~ ERROR expected one of `.`, `;`, `?`, `}`, or an operator, found `,` | ^ expected one of `.`, `;`, `?`, `}`, or an operator here ... -34 | ignored_expr!(); +LL | ignored_expr!(); | ---------------- in this macro invocation error: macro expansion ignores token `,` and any following --> $DIR/macro-incomplete-parse.rs:28:14 | -28 | () => ( 1, 2 ) //~ ERROR macro expansion ignores token `,` +LL | () => ( 1, 2 ) //~ ERROR macro expansion ignores token `,` | ^ | note: caused by the macro expansion here; the usage of `ignored_pat!` is likely invalid in pattern context --> $DIR/macro-incomplete-parse.rs:36:9 | -36 | ignored_pat!() => (), +LL | ignored_pat!() => (), | ^^^^^^^^^^^^^^ error: aborting due to 3 previous errors diff --git a/src/test/ui/token/trailing-plus-in-bounds.stderr b/src/test/ui/token/trailing-plus-in-bounds.stderr index c765a434b8ac6..1719b1d5e08a3 100644 --- a/src/test/ui/token/trailing-plus-in-bounds.stderr +++ b/src/test/ui/token/trailing-plus-in-bounds.stderr @@ -1,7 +1,7 @@ error: expected one of `!` or `::`, found `` --> $DIR/trailing-plus-in-bounds.rs:19:1 | -19 | FAIL +LL | FAIL | ^^^^ expected one of `!` or `::` here error: aborting due to previous error diff --git a/src/test/ui/trait-alias.stderr b/src/test/ui/trait-alias.stderr index ad299dc84145c..a5eb44ce1f7c8 100644 --- a/src/test/ui/trait-alias.stderr +++ b/src/test/ui/trait-alias.stderr @@ -1,37 +1,37 @@ error[E0645]: trait aliases are not yet implemented (see issue #41517) --> $DIR/trait-alias.rs:13:1 | -13 | trait SimpleAlias = Default; //~ERROR E0645 +LL | trait SimpleAlias = Default; //~ERROR E0645 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error[E0645]: trait aliases are not yet implemented (see issue #41517) --> $DIR/trait-alias.rs:14:1 | -14 | trait GenericAlias = Iterator; //~ERROR E0645 +LL | trait GenericAlias = Iterator; //~ERROR E0645 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error[E0645]: trait aliases are not yet implemented (see issue #41517) --> $DIR/trait-alias.rs:15:1 | -15 | trait Partial = IntoIterator; //~ERROR E0645 +LL | trait Partial = IntoIterator; //~ERROR E0645 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error[E0645]: trait aliases are not yet implemented (see issue #41517) --> $DIR/trait-alias.rs:24:1 | -24 | trait WithWhere = Romeo + Romeo where Fore<(Art, Thou)>: Romeo; //~ERROR E0645 +LL | trait WithWhere = Romeo + Romeo where Fore<(Art, Thou)>: Romeo; //~ERROR E0645 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error[E0645]: trait aliases are not yet implemented (see issue #41517) --> $DIR/trait-alias.rs:25:1 | -25 | trait BareWhere = where The: Things; //~ERROR E0645 +LL | trait BareWhere = where The: Things; //~ERROR E0645 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error[E0645]: trait aliases are not yet implemented (see issue #41517) --> $DIR/trait-alias.rs:27:1 | -27 | trait CD = Clone + Default; //~ERROR E0645 +LL | trait CD = Clone + Default; //~ERROR E0645 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: aborting due to 6 previous errors diff --git a/src/test/ui/trait-duplicate-methods.stderr b/src/test/ui/trait-duplicate-methods.stderr index 5f796777c418c..65f1d11226367 100644 --- a/src/test/ui/trait-duplicate-methods.stderr +++ b/src/test/ui/trait-duplicate-methods.stderr @@ -1,9 +1,9 @@ error[E0428]: the name `orange` is defined multiple times --> $DIR/trait-duplicate-methods.rs:13:5 | -12 | fn orange(&self); +LL | fn orange(&self); | ----------------- previous definition of the value `orange` here -13 | fn orange(&self); //~ ERROR the name `orange` is defined multiple times +LL | fn orange(&self); //~ ERROR the name `orange` is defined multiple times | ^^^^^^^^^^^^^^^^^ `orange` redefined here | = note: `orange` must be defined only once in the value namespace of this trait diff --git a/src/test/ui/trait-method-private.stderr b/src/test/ui/trait-method-private.stderr index 7406541a9da55..148cdd5820a78 100644 --- a/src/test/ui/trait-method-private.stderr +++ b/src/test/ui/trait-method-private.stderr @@ -1,13 +1,13 @@ error[E0624]: method `method` is private --> $DIR/trait-method-private.rs:29:9 | -29 | foo.method(); //~ ERROR is private +LL | foo.method(); //~ ERROR is private | ^^^^^^ | = help: items from traits can only be used if the trait is in scope help: the following trait is implemented but not in scope, perhaps add a `use` for it: | -11 | use inner::Bar; +LL | use inner::Bar; | error: aborting due to previous error diff --git a/src/test/ui/trait-safety-fn-body.stderr b/src/test/ui/trait-safety-fn-body.stderr index ab8793f8a7403..06479c3f64204 100644 --- a/src/test/ui/trait-safety-fn-body.stderr +++ b/src/test/ui/trait-safety-fn-body.stderr @@ -1,7 +1,7 @@ error[E0133]: dereference of raw pointer requires unsafe function or block --> $DIR/trait-safety-fn-body.rs:21:9 | -21 | *self += 1; +LL | *self += 1; | ^^^^^^^^^^ dereference of raw pointer error: aborting due to previous error diff --git a/src/test/ui/trait-suggest-where-clause.stderr b/src/test/ui/trait-suggest-where-clause.stderr index 57d2b9aae789f..f0168b4f60b0e 100644 --- a/src/test/ui/trait-suggest-where-clause.stderr +++ b/src/test/ui/trait-suggest-where-clause.stderr @@ -1,7 +1,7 @@ error[E0277]: the trait bound `U: std::marker::Sized` is not satisfied --> $DIR/trait-suggest-where-clause.rs:17:5 | -17 | mem::size_of::(); +LL | mem::size_of::(); | ^^^^^^^^^^^^^^^^^ `U` does not have a constant size known at compile-time | = help: the trait `std::marker::Sized` is not implemented for `U` @@ -11,7 +11,7 @@ error[E0277]: the trait bound `U: std::marker::Sized` is not satisfied error[E0277]: the trait bound `U: std::marker::Sized` is not satisfied in `Misc` --> $DIR/trait-suggest-where-clause.rs:20:5 | -20 | mem::size_of::>(); +LL | mem::size_of::>(); | ^^^^^^^^^^^^^^^^^^^^^^^ `U` does not have a constant size known at compile-time | = help: within `Misc`, the trait `std::marker::Sized` is not implemented for `U` @@ -22,7 +22,7 @@ error[E0277]: the trait bound `U: std::marker::Sized` is not satisfied in `Misc< error[E0277]: the trait bound `u64: std::convert::From` is not satisfied --> $DIR/trait-suggest-where-clause.rs:25:5 | -25 | >::from; +LL | >::from; | ^^^^^^^^^^^^^^^^^^^^^^ the trait `std::convert::From` is not implemented for `u64` | = help: consider adding a `where u64: std::convert::From` bound @@ -31,7 +31,7 @@ error[E0277]: the trait bound `u64: std::convert::From` is not satisfied error[E0277]: the trait bound `u64: std::convert::From<::Item>` is not satisfied --> $DIR/trait-suggest-where-clause.rs:28:5 | -28 | ::Item>>::from; +LL | ::Item>>::from; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `std::convert::From<::Item>` is not implemented for `u64` | = help: consider adding a `where u64: std::convert::From<::Item>` bound @@ -40,7 +40,7 @@ error[E0277]: the trait bound `u64: std::convert::From<: std::convert::From` is not satisfied --> $DIR/trait-suggest-where-clause.rs:33:5 | -33 | as From>::from; +LL | as From>::from; | ^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `std::convert::From` is not implemented for `Misc<_>` | = note: required by `std::convert::From::from` @@ -48,7 +48,7 @@ error[E0277]: the trait bound `Misc<_>: std::convert::From` is not satisfied error[E0277]: the trait bound `[T]: std::marker::Sized` is not satisfied --> $DIR/trait-suggest-where-clause.rs:38:5 | -38 | mem::size_of::<[T]>(); +LL | mem::size_of::<[T]>(); | ^^^^^^^^^^^^^^^^^^^ `[T]` does not have a constant size known at compile-time | = help: the trait `std::marker::Sized` is not implemented for `[T]` @@ -57,7 +57,7 @@ error[E0277]: the trait bound `[T]: std::marker::Sized` is not satisfied error[E0277]: the trait bound `[&U]: std::marker::Sized` is not satisfied --> $DIR/trait-suggest-where-clause.rs:41:5 | -41 | mem::size_of::<[&U]>(); +LL | mem::size_of::<[&U]>(); | ^^^^^^^^^^^^^^^^^^^^ `[&U]` does not have a constant size known at compile-time | = help: the trait `std::marker::Sized` is not implemented for `[&U]` diff --git a/src/test/ui/traits-multidispatch-convert-ambig-dest.stderr b/src/test/ui/traits-multidispatch-convert-ambig-dest.stderr index 8304fb3b7972a..12a6be30c10d2 100644 --- a/src/test/ui/traits-multidispatch-convert-ambig-dest.stderr +++ b/src/test/ui/traits-multidispatch-convert-ambig-dest.stderr @@ -1,7 +1,7 @@ error[E0282]: type annotations needed --> $DIR/traits-multidispatch-convert-ambig-dest.rs:36:5 | -36 | test(22, std::default::Default::default()); +LL | test(22, std::default::Default::default()); | ^^^^ cannot infer type for `U` error: aborting due to previous error diff --git a/src/test/ui/transmute/main.stderr b/src/test/ui/transmute/main.stderr index b7e34d3e0bc46..2576b1c9566b3 100644 --- a/src/test/ui/transmute/main.stderr +++ b/src/test/ui/transmute/main.stderr @@ -1,7 +1,7 @@ error[E0512]: transmute called with types of different sizes --> $DIR/main.rs:26:5 | -26 | transmute(x) //~ ERROR transmute called with types of different sizes +LL | transmute(x) //~ ERROR transmute called with types of different sizes | ^^^^^^^^^ | = note: source type: >::T (size can vary because of ::T) @@ -10,7 +10,7 @@ error[E0512]: transmute called with types of different sizes error[E0512]: transmute called with types of different sizes --> $DIR/main.rs:30:17 | -30 | let x: u8 = transmute(10u16); //~ ERROR transmute called with types of different sizes +LL | let x: u8 = transmute(10u16); //~ ERROR transmute called with types of different sizes | ^^^^^^^^^ | = note: source type: u16 (16 bits) @@ -19,7 +19,7 @@ error[E0512]: transmute called with types of different sizes error[E0512]: transmute called with types of different sizes --> $DIR/main.rs:34:17 | -34 | let x: u8 = transmute("test"); //~ ERROR transmute called with types of different sizes +LL | let x: u8 = transmute("test"); //~ ERROR transmute called with types of different sizes | ^^^^^^^^^ | = note: source type: &str ($STR bits) @@ -28,7 +28,7 @@ error[E0512]: transmute called with types of different sizes error[E0512]: transmute called with types of different sizes --> $DIR/main.rs:39:18 | -39 | let x: Foo = transmute(10); //~ ERROR transmute called with types of different sizes +LL | let x: Foo = transmute(10); //~ ERROR transmute called with types of different sizes | ^^^^^^^^^ | = note: source type: i32 (32 bits) diff --git a/src/test/ui/transmute/transmute-from-fn-item-types-error.stderr b/src/test/ui/transmute/transmute-from-fn-item-types-error.stderr index 197daf1b79596..0695455296125 100644 --- a/src/test/ui/transmute/transmute-from-fn-item-types-error.stderr +++ b/src/test/ui/transmute/transmute-from-fn-item-types-error.stderr @@ -1,7 +1,7 @@ error[E0512]: transmute called with types of different sizes --> $DIR/transmute-from-fn-item-types-error.rs:14:13 | -14 | let i = mem::transmute(bar); +LL | let i = mem::transmute(bar); | ^^^^^^^^^^^^^^ | = note: source type: unsafe fn() {bar} (0 bits) @@ -10,7 +10,7 @@ error[E0512]: transmute called with types of different sizes error[E0591]: can't transmute zero-sized type --> $DIR/transmute-from-fn-item-types-error.rs:18:13 | -18 | let p = mem::transmute(foo); +LL | let p = mem::transmute(foo); | ^^^^^^^^^^^^^^ | = note: source type: unsafe fn() -> (i8, *const (), std::option::Option) {foo} @@ -20,7 +20,7 @@ error[E0591]: can't transmute zero-sized type error[E0591]: can't transmute zero-sized type --> $DIR/transmute-from-fn-item-types-error.rs:22:14 | -22 | let of = mem::transmute(main); +LL | let of = mem::transmute(main); | ^^^^^^^^^^^^^^ | = note: source type: fn() {main} @@ -30,7 +30,7 @@ error[E0591]: can't transmute zero-sized type error[E0512]: transmute called with types of different sizes --> $DIR/transmute-from-fn-item-types-error.rs:31:5 | -31 | mem::transmute::<_, u8>(main); +LL | mem::transmute::<_, u8>(main); | ^^^^^^^^^^^^^^^^^^^^^^^ | = note: source type: fn() {main} (0 bits) @@ -39,7 +39,7 @@ error[E0512]: transmute called with types of different sizes error[E0591]: can't transmute zero-sized type --> $DIR/transmute-from-fn-item-types-error.rs:35:5 | -35 | mem::transmute::<_, *mut ()>(foo); +LL | mem::transmute::<_, *mut ()>(foo); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = note: source type: unsafe fn() -> (i8, *const (), std::option::Option) {foo} @@ -49,7 +49,7 @@ error[E0591]: can't transmute zero-sized type error[E0591]: can't transmute zero-sized type --> $DIR/transmute-from-fn-item-types-error.rs:39:5 | -39 | mem::transmute::<_, fn()>(bar); +LL | mem::transmute::<_, fn()>(bar); | ^^^^^^^^^^^^^^^^^^^^^^^^^ | = note: source type: unsafe fn() {bar} @@ -59,7 +59,7 @@ error[E0591]: can't transmute zero-sized type error[E0591]: can't transmute zero-sized type --> $DIR/transmute-from-fn-item-types-error.rs:48:5 | -48 | mem::transmute::<_, *mut ()>(Some(foo)); +LL | mem::transmute::<_, *mut ()>(Some(foo)); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = note: source type: unsafe fn() -> (i8, *const (), std::option::Option) {foo} @@ -69,7 +69,7 @@ error[E0591]: can't transmute zero-sized type error[E0591]: can't transmute zero-sized type --> $DIR/transmute-from-fn-item-types-error.rs:52:5 | -52 | mem::transmute::<_, fn()>(Some(bar)); +LL | mem::transmute::<_, fn()>(Some(bar)); | ^^^^^^^^^^^^^^^^^^^^^^^^^ | = note: source type: unsafe fn() {bar} @@ -79,7 +79,7 @@ error[E0591]: can't transmute zero-sized type error[E0591]: can't transmute zero-sized type --> $DIR/transmute-from-fn-item-types-error.rs:56:5 | -56 | mem::transmute::<_, Option>(Some(baz)); +LL | mem::transmute::<_, Option>(Some(baz)); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = note: source type: unsafe fn() {baz} diff --git a/src/test/ui/transmute/transmute-type-parameters.stderr b/src/test/ui/transmute/transmute-type-parameters.stderr index 816c62812f31f..c551e1312a30b 100644 --- a/src/test/ui/transmute/transmute-type-parameters.stderr +++ b/src/test/ui/transmute/transmute-type-parameters.stderr @@ -1,7 +1,7 @@ error[E0512]: transmute called with types of different sizes --> $DIR/transmute-type-parameters.rs:21:18 | -21 | let _: i32 = transmute(x); +LL | let _: i32 = transmute(x); | ^^^^^^^^^ | = note: source type: T (this type's size can vary) @@ -10,7 +10,7 @@ error[E0512]: transmute called with types of different sizes error[E0512]: transmute called with types of different sizes --> $DIR/transmute-type-parameters.rs:26:18 | -26 | let _: i32 = transmute(x); +LL | let _: i32 = transmute(x); | ^^^^^^^^^ | = note: source type: (T, i32) (size can vary because of T) @@ -19,7 +19,7 @@ error[E0512]: transmute called with types of different sizes error[E0512]: transmute called with types of different sizes --> $DIR/transmute-type-parameters.rs:31:18 | -31 | let _: i32 = transmute(x); +LL | let _: i32 = transmute(x); | ^^^^^^^^^ | = note: source type: [T; 10] (size can vary because of T) @@ -28,7 +28,7 @@ error[E0512]: transmute called with types of different sizes error[E0512]: transmute called with types of different sizes --> $DIR/transmute-type-parameters.rs:40:18 | -40 | let _: i32 = transmute(x); +LL | let _: i32 = transmute(x); | ^^^^^^^^^ | = note: source type: Bad (size can vary because of T) @@ -37,7 +37,7 @@ error[E0512]: transmute called with types of different sizes error[E0512]: transmute called with types of different sizes --> $DIR/transmute-type-parameters.rs:50:18 | -50 | let _: i32 = transmute(x); +LL | let _: i32 = transmute(x); | ^^^^^^^^^ | = note: source type: Worse (size can vary because of T) @@ -46,7 +46,7 @@ error[E0512]: transmute called with types of different sizes error[E0512]: transmute called with types of different sizes --> $DIR/transmute-type-parameters.rs:55:18 | -55 | let _: i32 = transmute(x); +LL | let _: i32 = transmute(x); | ^^^^^^^^^ | = note: source type: std::option::Option (size can vary because of T) diff --git a/src/test/ui/type-annotation-needed.stderr b/src/test/ui/type-annotation-needed.stderr index 7d49afbaff8af..19709b987fc23 100644 --- a/src/test/ui/type-annotation-needed.stderr +++ b/src/test/ui/type-annotation-needed.stderr @@ -1,13 +1,13 @@ error[E0283]: type annotations required: cannot resolve `_: std::convert::Into` --> $DIR/type-annotation-needed.rs:15:5 | -15 | foo(42); +LL | foo(42); | ^^^ | note: required by `foo` --> $DIR/type-annotation-needed.rs:11:1 | -11 | fn foo>(x: i32) {} +LL | fn foo>(x: i32) {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/type-check/assignment-in-if.stderr b/src/test/ui/type-check/assignment-in-if.stderr index fffdca17d843b..b7ce6e133bad4 100644 --- a/src/test/ui/type-check/assignment-in-if.stderr +++ b/src/test/ui/type-check/assignment-in-if.stderr @@ -1,7 +1,7 @@ error[E0308]: mismatched types --> $DIR/assignment-in-if.rs:25:8 | -25 | if x = x { +LL | if x = x { | ^^^^^ | | | expected bool, found () @@ -13,7 +13,7 @@ error[E0308]: mismatched types error[E0308]: mismatched types --> $DIR/assignment-in-if.rs:30:8 | -30 | if (x = x) { +LL | if (x = x) { | ^^^^^^^ | | | expected bool, found () @@ -25,7 +25,7 @@ error[E0308]: mismatched types error[E0308]: mismatched types --> $DIR/assignment-in-if.rs:35:8 | -35 | if y = (Foo { foo: x }) { +LL | if y = (Foo { foo: x }) { | ^^^^^^^^^^^^^^^^^^^^ | | | expected bool, found () @@ -37,7 +37,7 @@ error[E0308]: mismatched types error[E0308]: mismatched types --> $DIR/assignment-in-if.rs:40:8 | -40 | if 3 = x { +LL | if 3 = x { | ^^^^^ | | | expected bool, found () @@ -49,7 +49,7 @@ error[E0308]: mismatched types error[E0308]: mismatched types --> $DIR/assignment-in-if.rs:44:8 | -44 | if (if true { x = 4 } else { x = 5 }) { +LL | if (if true { x = 4 } else { x = 5 }) { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected bool, found () | = note: expected type `bool` diff --git a/src/test/ui/type-check/cannot_infer_local_or_array.stderr b/src/test/ui/type-check/cannot_infer_local_or_array.stderr index 19369f5ca60fe..b05ae19b0fbe6 100644 --- a/src/test/ui/type-check/cannot_infer_local_or_array.stderr +++ b/src/test/ui/type-check/cannot_infer_local_or_array.stderr @@ -1,7 +1,7 @@ error[E0282]: type annotations needed --> $DIR/cannot_infer_local_or_array.rs:12:13 | -12 | let x = []; //~ ERROR type annotations needed +LL | let x = []; //~ ERROR type annotations needed | - ^^ cannot infer type for `_` | | | consider giving `x` a type diff --git a/src/test/ui/type-check/cannot_infer_local_or_vec.stderr b/src/test/ui/type-check/cannot_infer_local_or_vec.stderr index bbbcb9158ae5e..bbb88fa895e0e 100644 --- a/src/test/ui/type-check/cannot_infer_local_or_vec.stderr +++ b/src/test/ui/type-check/cannot_infer_local_or_vec.stderr @@ -1,7 +1,7 @@ error[E0282]: type annotations needed --> $DIR/cannot_infer_local_or_vec.rs:12:13 | -12 | let x = vec![]; +LL | let x = vec![]; | - ^^^^^^ cannot infer type for `T` | | | consider giving `x` a type diff --git a/src/test/ui/type-check/cannot_infer_local_or_vec_in_tuples.stderr b/src/test/ui/type-check/cannot_infer_local_or_vec_in_tuples.stderr index 6c47624d6dcfc..816ef2b05068b 100644 --- a/src/test/ui/type-check/cannot_infer_local_or_vec_in_tuples.stderr +++ b/src/test/ui/type-check/cannot_infer_local_or_vec_in_tuples.stderr @@ -1,7 +1,7 @@ error[E0282]: type annotations needed --> $DIR/cannot_infer_local_or_vec_in_tuples.rs:12:18 | -12 | let (x, ) = (vec![], ); +LL | let (x, ) = (vec![], ); | ----- ^^^^^^ cannot infer type for `T` | | | consider giving the pattern a type diff --git a/src/test/ui/type-check/issue-22897.stderr b/src/test/ui/type-check/issue-22897.stderr index 5ee350746bee8..19807d69491f3 100644 --- a/src/test/ui/type-check/issue-22897.stderr +++ b/src/test/ui/type-check/issue-22897.stderr @@ -1,7 +1,7 @@ error[E0282]: type annotations needed --> $DIR/issue-22897.rs:14:5 | -14 | []; //~ ERROR type annotations needed +LL | []; //~ ERROR type annotations needed | ^^ cannot infer type for `[_; 0]` error: aborting due to previous error diff --git a/src/test/ui/type-check/issue-40294.stderr b/src/test/ui/type-check/issue-40294.stderr index cf270afdeb173..58908c17974cb 100644 --- a/src/test/ui/type-check/issue-40294.stderr +++ b/src/test/ui/type-check/issue-40294.stderr @@ -1,19 +1,19 @@ error[E0283]: type annotations required: cannot resolve `&'a T: Foo` --> $DIR/issue-40294.rs:15:1 | -15 | / fn foo<'a,'b,T>(x: &'a T, y: &'b T) //~ ERROR type annotations required -16 | | where &'a T : Foo, -17 | | &'b T : Foo -18 | | { -19 | | x.foo(); -20 | | y.foo(); -21 | | } +LL | / fn foo<'a,'b,T>(x: &'a T, y: &'b T) //~ ERROR type annotations required +LL | | where &'a T : Foo, +LL | | &'b T : Foo +LL | | { +LL | | x.foo(); +LL | | y.foo(); +LL | | } | |_^ | note: required by `Foo` --> $DIR/issue-40294.rs:11:1 | -11 | trait Foo: Sized { +LL | trait Foo: Sized { | ^^^^^^^^^^^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/type-check/issue-41314.stderr b/src/test/ui/type-check/issue-41314.stderr index 569924da6f446..e78f3ac970348 100644 --- a/src/test/ui/type-check/issue-41314.stderr +++ b/src/test/ui/type-check/issue-41314.stderr @@ -1,13 +1,13 @@ error[E0026]: variant `X::Y` does not have a field named `number` --> $DIR/issue-41314.rs:17:16 | -17 | X::Y { number } => {} //~ ERROR does not have a field named `number` +LL | X::Y { number } => {} //~ ERROR does not have a field named `number` | ^^^^^^ variant `X::Y` does not have field `number` error[E0027]: pattern does not mention field `0` --> $DIR/issue-41314.rs:17:9 | -17 | X::Y { number } => {} //~ ERROR does not have a field named `number` +LL | X::Y { number } => {} //~ ERROR does not have a field named `number` | ^^^^^^^^^^^^^^^ missing field `0` | = note: trying to match a tuple variant with a struct variant pattern diff --git a/src/test/ui/type-check/missing_trait_impl.stderr b/src/test/ui/type-check/missing_trait_impl.stderr index 64f8167eb1d01..afcf8535a12ee 100644 --- a/src/test/ui/type-check/missing_trait_impl.stderr +++ b/src/test/ui/type-check/missing_trait_impl.stderr @@ -1,7 +1,7 @@ error[E0369]: binary operation `+` cannot be applied to type `T` --> $DIR/missing_trait_impl.rs:15:13 | -15 | let z = x + y; //~ ERROR binary operation `+` cannot be applied to type `T` +LL | let z = x + y; //~ ERROR binary operation `+` cannot be applied to type `T` | ^^^^^ | = note: `T` might need a bound for `std::ops::Add` diff --git a/src/test/ui/type-check/unknown_type_for_closure.stderr b/src/test/ui/type-check/unknown_type_for_closure.stderr index 1d8c0ddc8b601..de960d1ad60c8 100644 --- a/src/test/ui/type-check/unknown_type_for_closure.stderr +++ b/src/test/ui/type-check/unknown_type_for_closure.stderr @@ -1,7 +1,7 @@ error[E0282]: type annotations needed --> $DIR/unknown_type_for_closure.rs:12:14 | -12 | let x = |_| { }; //~ ERROR type annotations needed +LL | let x = |_| { }; //~ ERROR type annotations needed | ^ consider giving this closure parameter a type error: aborting due to previous error diff --git a/src/test/ui/type-recursive.stderr b/src/test/ui/type-recursive.stderr index 4c76452979712..d9a22cd283b2d 100644 --- a/src/test/ui/type-recursive.stderr +++ b/src/test/ui/type-recursive.stderr @@ -1,10 +1,10 @@ error[E0072]: recursive type `t1` has infinite size --> $DIR/type-recursive.rs:11:1 | -11 | struct t1 { //~ ERROR E0072 +LL | struct t1 { //~ ERROR E0072 | ^^^^^^^^^ recursive type has infinite size -12 | foo: isize, -13 | foolish: t1 +LL | foo: isize, +LL | foolish: t1 | ----------- recursive without indirection | = help: insert indirection (e.g., a `Box`, `Rc`, or `&`) at some point to make `t1` representable diff --git a/src/test/ui/typeck-builtin-bound-type-parameters.stderr b/src/test/ui/typeck-builtin-bound-type-parameters.stderr index cf280bf1cd324..bfa8bf526866b 100644 --- a/src/test/ui/typeck-builtin-bound-type-parameters.stderr +++ b/src/test/ui/typeck-builtin-bound-type-parameters.stderr @@ -1,37 +1,37 @@ error[E0244]: wrong number of type arguments: expected 0, found 1 --> $DIR/typeck-builtin-bound-type-parameters.rs:11:11 | -11 | fn foo1, U>(x: T) {} +LL | fn foo1, U>(x: T) {} | ^^^^^^^ expected no type arguments error[E0244]: wrong number of type arguments: expected 0, found 1 --> $DIR/typeck-builtin-bound-type-parameters.rs:14:14 | -14 | trait Trait: Copy {} +LL | trait Trait: Copy {} | ^^^^^^^^^^ expected no type arguments error[E0244]: wrong number of type arguments: expected 0, found 1 --> $DIR/typeck-builtin-bound-type-parameters.rs:17:21 | -17 | struct MyStruct1>; +LL | struct MyStruct1>; | ^^^^^^^ expected no type arguments error[E0107]: wrong number of lifetime parameters: expected 0, found 1 --> $DIR/typeck-builtin-bound-type-parameters.rs:20:25 | -20 | struct MyStruct2<'a, T: Copy<'a>>; +LL | struct MyStruct2<'a, T: Copy<'a>>; | ^^^^^^^^ unexpected lifetime parameter error[E0107]: wrong number of lifetime parameters: expected 0, found 1 --> $DIR/typeck-builtin-bound-type-parameters.rs:24:15 | -24 | fn foo2<'a, T:Copy<'a, U>, U>(x: T) {} +LL | fn foo2<'a, T:Copy<'a, U>, U>(x: T) {} | ^^^^^^^^^^^ unexpected lifetime parameter error[E0244]: wrong number of type arguments: expected 0, found 1 --> $DIR/typeck-builtin-bound-type-parameters.rs:24:15 | -24 | fn foo2<'a, T:Copy<'a, U>, U>(x: T) {} +LL | fn foo2<'a, T:Copy<'a, U>, U>(x: T) {} | ^^^^^^^^^^^ expected no type arguments error: aborting due to 6 previous errors diff --git a/src/test/ui/typeck_type_placeholder_item.stderr b/src/test/ui/typeck_type_placeholder_item.stderr index 39e4273157671..ccd7f8e91715f 100644 --- a/src/test/ui/typeck_type_placeholder_item.stderr +++ b/src/test/ui/typeck_type_placeholder_item.stderr @@ -1,206 +1,206 @@ error[E0121]: the type placeholder `_` is not allowed within types on item signatures --> $DIR/typeck_type_placeholder_item.rs:14:14 | -14 | fn test() -> _ { 5 } +LL | fn test() -> _ { 5 } | ^ not allowed in type signatures error[E0121]: the type placeholder `_` is not allowed within types on item signatures --> $DIR/typeck_type_placeholder_item.rs:17:16 | -17 | fn test2() -> (_, _) { (5, 5) } +LL | fn test2() -> (_, _) { (5, 5) } | ^ not allowed in type signatures error[E0121]: the type placeholder `_` is not allowed within types on item signatures --> $DIR/typeck_type_placeholder_item.rs:17:19 | -17 | fn test2() -> (_, _) { (5, 5) } +LL | fn test2() -> (_, _) { (5, 5) } | ^ not allowed in type signatures error[E0121]: the type placeholder `_` is not allowed within types on item signatures --> $DIR/typeck_type_placeholder_item.rs:21:15 | -21 | static TEST3: _ = "test"; +LL | static TEST3: _ = "test"; | ^ not allowed in type signatures error[E0121]: the type placeholder `_` is not allowed within types on item signatures --> $DIR/typeck_type_placeholder_item.rs:24:15 | -24 | static TEST4: _ = 145; +LL | static TEST4: _ = 145; | ^ not allowed in type signatures error[E0121]: the type placeholder `_` is not allowed within types on item signatures --> $DIR/typeck_type_placeholder_item.rs:27:16 | -27 | static TEST5: (_, _) = (1, 2); +LL | static TEST5: (_, _) = (1, 2); | ^ not allowed in type signatures error[E0121]: the type placeholder `_` is not allowed within types on item signatures --> $DIR/typeck_type_placeholder_item.rs:27:19 | -27 | static TEST5: (_, _) = (1, 2); +LL | static TEST5: (_, _) = (1, 2); | ^ not allowed in type signatures error[E0121]: the type placeholder `_` is not allowed within types on item signatures --> $DIR/typeck_type_placeholder_item.rs:31:13 | -31 | fn test6(_: _) { } +LL | fn test6(_: _) { } | ^ not allowed in type signatures error[E0121]: the type placeholder `_` is not allowed within types on item signatures --> $DIR/typeck_type_placeholder_item.rs:34:13 | -34 | fn test7(x: _) { let _x: usize = x; } +LL | fn test7(x: _) { let _x: usize = x; } | ^ not allowed in type signatures error[E0121]: the type placeholder `_` is not allowed within types on item signatures --> $DIR/typeck_type_placeholder_item.rs:37:22 | -37 | fn test8(_f: fn() -> _) { } +LL | fn test8(_f: fn() -> _) { } | ^ not allowed in type signatures error[E0121]: the type placeholder `_` is not allowed within types on item signatures --> $DIR/typeck_type_placeholder_item.rs:59:8 | -59 | a: _, +LL | a: _, | ^ not allowed in type signatures error[E0121]: the type placeholder `_` is not allowed within types on item signatures --> $DIR/typeck_type_placeholder_item.rs:61:9 | -61 | b: (_, _), +LL | b: (_, _), | ^ not allowed in type signatures error[E0121]: the type placeholder `_` is not allowed within types on item signatures --> $DIR/typeck_type_placeholder_item.rs:61:12 | -61 | b: (_, _), +LL | b: (_, _), | ^ not allowed in type signatures error[E0121]: the type placeholder `_` is not allowed within types on item signatures --> $DIR/typeck_type_placeholder_item.rs:67:21 | -67 | fn fn_test() -> _ { 5 } +LL | fn fn_test() -> _ { 5 } | ^ not allowed in type signatures error[E0121]: the type placeholder `_` is not allowed within types on item signatures --> $DIR/typeck_type_placeholder_item.rs:70:23 | -70 | fn fn_test2() -> (_, _) { (5, 5) } +LL | fn fn_test2() -> (_, _) { (5, 5) } | ^ not allowed in type signatures error[E0121]: the type placeholder `_` is not allowed within types on item signatures --> $DIR/typeck_type_placeholder_item.rs:70:26 | -70 | fn fn_test2() -> (_, _) { (5, 5) } +LL | fn fn_test2() -> (_, _) { (5, 5) } | ^ not allowed in type signatures error[E0121]: the type placeholder `_` is not allowed within types on item signatures --> $DIR/typeck_type_placeholder_item.rs:74:22 | -74 | static FN_TEST3: _ = "test"; +LL | static FN_TEST3: _ = "test"; | ^ not allowed in type signatures error[E0121]: the type placeholder `_` is not allowed within types on item signatures --> $DIR/typeck_type_placeholder_item.rs:77:22 | -77 | static FN_TEST4: _ = 145; +LL | static FN_TEST4: _ = 145; | ^ not allowed in type signatures error[E0121]: the type placeholder `_` is not allowed within types on item signatures --> $DIR/typeck_type_placeholder_item.rs:80:23 | -80 | static FN_TEST5: (_, _) = (1, 2); +LL | static FN_TEST5: (_, _) = (1, 2); | ^ not allowed in type signatures error[E0121]: the type placeholder `_` is not allowed within types on item signatures --> $DIR/typeck_type_placeholder_item.rs:80:26 | -80 | static FN_TEST5: (_, _) = (1, 2); +LL | static FN_TEST5: (_, _) = (1, 2); | ^ not allowed in type signatures error[E0121]: the type placeholder `_` is not allowed within types on item signatures --> $DIR/typeck_type_placeholder_item.rs:84:20 | -84 | fn fn_test6(_: _) { } +LL | fn fn_test6(_: _) { } | ^ not allowed in type signatures error[E0121]: the type placeholder `_` is not allowed within types on item signatures --> $DIR/typeck_type_placeholder_item.rs:87:20 | -87 | fn fn_test7(x: _) { let _x: usize = x; } +LL | fn fn_test7(x: _) { let _x: usize = x; } | ^ not allowed in type signatures error[E0121]: the type placeholder `_` is not allowed within types on item signatures --> $DIR/typeck_type_placeholder_item.rs:90:29 | -90 | fn fn_test8(_f: fn() -> _) { } +LL | fn fn_test8(_f: fn() -> _) { } | ^ not allowed in type signatures error[E0121]: the type placeholder `_` is not allowed within types on item signatures - --> $DIR/typeck_type_placeholder_item.rs:112:12 - | -112 | a: _, - | ^ not allowed in type signatures + --> $DIR/typeck_type_placeholder_item.rs:112:12 + | +LL | a: _, + | ^ not allowed in type signatures error[E0121]: the type placeholder `_` is not allowed within types on item signatures - --> $DIR/typeck_type_placeholder_item.rs:114:13 - | -114 | b: (_, _), - | ^ not allowed in type signatures + --> $DIR/typeck_type_placeholder_item.rs:114:13 + | +LL | b: (_, _), + | ^ not allowed in type signatures error[E0121]: the type placeholder `_` is not allowed within types on item signatures - --> $DIR/typeck_type_placeholder_item.rs:114:16 - | -114 | b: (_, _), - | ^ not allowed in type signatures + --> $DIR/typeck_type_placeholder_item.rs:114:16 + | +LL | b: (_, _), + | ^ not allowed in type signatures error[E0121]: the type placeholder `_` is not allowed within types on item signatures --> $DIR/typeck_type_placeholder_item.rs:43:24 | -43 | fn test9(&self) -> _ { () } +LL | fn test9(&self) -> _ { () } | ^ not allowed in type signatures error[E0121]: the type placeholder `_` is not allowed within types on item signatures --> $DIR/typeck_type_placeholder_item.rs:46:27 | -46 | fn test10(&self, _x : _) { } +LL | fn test10(&self, _x : _) { } | ^ not allowed in type signatures error[E0121]: the type placeholder `_` is not allowed within types on item signatures --> $DIR/typeck_type_placeholder_item.rs:51:24 | -51 | fn clone(&self) -> _ { Test9 } +LL | fn clone(&self) -> _ { Test9 } | ^ not allowed in type signatures error[E0121]: the type placeholder `_` is not allowed within types on item signatures --> $DIR/typeck_type_placeholder_item.rs:54:37 | -54 | fn clone_from(&mut self, other: _) { *self = Test9; } +LL | fn clone_from(&mut self, other: _) { *self = Test9; } | ^ not allowed in type signatures error[E0121]: the type placeholder `_` is not allowed within types on item signatures --> $DIR/typeck_type_placeholder_item.rs:96:31 | -96 | fn fn_test9(&self) -> _ { () } +LL | fn fn_test9(&self) -> _ { () } | ^ not allowed in type signatures error[E0121]: the type placeholder `_` is not allowed within types on item signatures --> $DIR/typeck_type_placeholder_item.rs:99:34 | -99 | fn fn_test10(&self, _x : _) { } +LL | fn fn_test10(&self, _x : _) { } | ^ not allowed in type signatures error[E0121]: the type placeholder `_` is not allowed within types on item signatures - --> $DIR/typeck_type_placeholder_item.rs:104:28 - | -104 | fn clone(&self) -> _ { FnTest9 } - | ^ not allowed in type signatures + --> $DIR/typeck_type_placeholder_item.rs:104:28 + | +LL | fn clone(&self) -> _ { FnTest9 } + | ^ not allowed in type signatures error[E0121]: the type placeholder `_` is not allowed within types on item signatures - --> $DIR/typeck_type_placeholder_item.rs:107:41 - | -107 | fn clone_from(&mut self, other: _) { *self = FnTest9; } - | ^ not allowed in type signatures + --> $DIR/typeck_type_placeholder_item.rs:107:41 + | +LL | fn clone_from(&mut self, other: _) { *self = FnTest9; } + | ^ not allowed in type signatures error: aborting due to 34 previous errors diff --git a/src/test/ui/typeck_type_placeholder_lifetime_1.stderr b/src/test/ui/typeck_type_placeholder_lifetime_1.stderr index 8f017e6d9a2dc..52f68ede588ca 100644 --- a/src/test/ui/typeck_type_placeholder_lifetime_1.stderr +++ b/src/test/ui/typeck_type_placeholder_lifetime_1.stderr @@ -1,7 +1,7 @@ error[E0244]: wrong number of type arguments: expected 1, found 2 --> $DIR/typeck_type_placeholder_lifetime_1.rs:19:12 | -19 | let c: Foo<_, _> = Foo { r: &5 }; +LL | let c: Foo<_, _> = Foo { r: &5 }; | ^^^^^^^^^ expected 1 type argument error: aborting due to previous error diff --git a/src/test/ui/typeck_type_placeholder_lifetime_2.stderr b/src/test/ui/typeck_type_placeholder_lifetime_2.stderr index 396715f57ab7c..7a9fefb419bca 100644 --- a/src/test/ui/typeck_type_placeholder_lifetime_2.stderr +++ b/src/test/ui/typeck_type_placeholder_lifetime_2.stderr @@ -1,7 +1,7 @@ error[E0244]: wrong number of type arguments: expected 1, found 2 --> $DIR/typeck_type_placeholder_lifetime_2.rs:19:12 | -19 | let c: Foo<_, usize> = Foo { r: &5 }; +LL | let c: Foo<_, usize> = Foo { r: &5 }; | ^^^^^^^^^^^^^ expected 1 type argument error: aborting due to previous error diff --git a/src/test/ui/ui-testing-optout.rs b/src/test/ui/ui-testing-optout.rs new file mode 100644 index 0000000000000..3072bd64a2c7e --- /dev/null +++ b/src/test/ui/ui-testing-optout.rs @@ -0,0 +1,104 @@ +// disable-ui-testing-normalization + +// Line number < 10 +type A = B; //~ ERROR + +// 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. + +// Line number >=10, <100 +type C = D; //~ ERROR + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +// Line num >=100 +type E = F; //~ ERROR + +fn main() {} diff --git a/src/test/ui/ui-testing-optout.stderr b/src/test/ui/ui-testing-optout.stderr new file mode 100644 index 0000000000000..c9960f999b3c2 --- /dev/null +++ b/src/test/ui/ui-testing-optout.stderr @@ -0,0 +1,20 @@ +error[E0412]: cannot find type `B` in this scope + --> $DIR/ui-testing-optout.rs:4:10 + | +4 | type A = B; //~ ERROR + | ^ did you mean `A`? + +error[E0412]: cannot find type `D` in this scope + --> $DIR/ui-testing-optout.rs:17:10 + | +17 | type C = D; //~ ERROR + | ^ did you mean `A`? + +error[E0412]: cannot find type `F` in this scope + --> $DIR/ui-testing-optout.rs:102:10 + | +102 | type E = F; //~ ERROR + | ^ did you mean `A`? + +error: aborting due to 3 previous errors + diff --git a/src/test/ui/unboxed-closure-no-cyclic-sig.stderr b/src/test/ui/unboxed-closure-no-cyclic-sig.stderr index 75a87f70660d5..a330f206c9fcf 100644 --- a/src/test/ui/unboxed-closure-no-cyclic-sig.stderr +++ b/src/test/ui/unboxed-closure-no-cyclic-sig.stderr @@ -1,7 +1,7 @@ error[E0644]: closure/generator type that references itself --> $DIR/unboxed-closure-no-cyclic-sig.rs:18:7 | -18 | g(|_| { }); //~ ERROR closure/generator type that references itself +LL | g(|_| { }); //~ ERROR closure/generator type that references itself | ^^^^^^^^ cyclic type of infinite size | = note: closures cannot capture themselves or take themselves as argument; diff --git a/src/test/ui/unboxed-closure-sugar-wrong-trait.stderr b/src/test/ui/unboxed-closure-sugar-wrong-trait.stderr index 544d4b74bb7e6..3318dd4bf6f7c 100644 --- a/src/test/ui/unboxed-closure-sugar-wrong-trait.stderr +++ b/src/test/ui/unboxed-closure-sugar-wrong-trait.stderr @@ -1,13 +1,13 @@ error[E0244]: wrong number of type arguments: expected 0, found 1 --> $DIR/unboxed-closure-sugar-wrong-trait.rs:15:8 | -15 | fn f isize>(x: F) {} +LL | fn f isize>(x: F) {} | ^^^^^^^^^^^^^^^^^^^^^ expected no type arguments error[E0220]: associated type `Output` not found for `Trait` --> $DIR/unboxed-closure-sugar-wrong-trait.rs:15:24 | -15 | fn f isize>(x: F) {} +LL | fn f isize>(x: F) {} | ^^^^^ associated type `Output` not found error: aborting due to 2 previous errors diff --git a/src/test/ui/unboxed-closures-infer-fn-once-move-from-projection.stderr b/src/test/ui/unboxed-closures-infer-fn-once-move-from-projection.stderr index 2c16c5b619a8b..082f949497e1b 100644 --- a/src/test/ui/unboxed-closures-infer-fn-once-move-from-projection.stderr +++ b/src/test/ui/unboxed-closures-infer-fn-once-move-from-projection.stderr @@ -1,12 +1,12 @@ error[E0525]: expected a closure that implements the `Fn` trait, but this closure only implements `FnOnce` --> $DIR/unboxed-closures-infer-fn-once-move-from-projection.rs:24:13 | -24 | let c = || drop(y.0); //~ ERROR expected a closure that implements the `Fn` trait +LL | let c = || drop(y.0); //~ ERROR expected a closure that implements the `Fn` trait | ^^^^^^^^-^^^ | | | | | closure is `FnOnce` because it moves the variable `y` out of its environment | this closure implements `FnOnce`, not `Fn` -25 | foo(c); +LL | foo(c); | --- the requirement to implement `Fn` derives from here error: aborting due to previous error diff --git a/src/test/ui/unconstrained-none.stderr b/src/test/ui/unconstrained-none.stderr index 0f70cc5fd1093..cd25a345c21c3 100644 --- a/src/test/ui/unconstrained-none.stderr +++ b/src/test/ui/unconstrained-none.stderr @@ -1,7 +1,7 @@ error[E0282]: type annotations needed --> $DIR/unconstrained-none.rs:14:5 | -14 | None; //~ ERROR type annotations needed [E0282] +LL | None; //~ ERROR type annotations needed [E0282] | ^^^^ cannot infer type for `T` error: aborting due to previous error diff --git a/src/test/ui/unconstrained-ref.stderr b/src/test/ui/unconstrained-ref.stderr index 96d9b8396a4f9..08870cb22509a 100644 --- a/src/test/ui/unconstrained-ref.stderr +++ b/src/test/ui/unconstrained-ref.stderr @@ -1,7 +1,7 @@ error[E0282]: type annotations needed --> $DIR/unconstrained-ref.rs:16:5 | -16 | S { o: &None }; //~ ERROR type annotations needed [E0282] +LL | S { o: &None }; //~ ERROR type annotations needed [E0282] | ^ cannot infer type for `T` error: aborting due to previous error diff --git a/src/test/ui/union/union-const-eval.stderr b/src/test/ui/union/union-const-eval.stderr index 3c98b5cdc6cdc..75a0213f0a187 100644 --- a/src/test/ui/union/union-const-eval.stderr +++ b/src/test/ui/union/union-const-eval.stderr @@ -1,7 +1,7 @@ warning: constant evaluation error: nonexistent struct field --> $DIR/union-const-eval.rs:21:21 | -21 | let b: [u8; C.b]; //~ ERROR constant evaluation error +LL | let b: [u8; C.b]; //~ ERROR constant evaluation error | ^^^ | = note: #[warn(const_err)] on by default @@ -9,7 +9,7 @@ warning: constant evaluation error: nonexistent struct field error[E0080]: constant evaluation error --> $DIR/union-const-eval.rs:21:21 | -21 | let b: [u8; C.b]; //~ ERROR constant evaluation error +LL | let b: [u8; C.b]; //~ ERROR constant evaluation error | ^^^ nonexistent struct field error: aborting due to previous error diff --git a/src/test/ui/union/union-derive-eq.stderr b/src/test/ui/union/union-derive-eq.stderr index 569191ca6e7b5..bcbca0c6cde2e 100644 --- a/src/test/ui/union/union-derive-eq.stderr +++ b/src/test/ui/union/union-derive-eq.stderr @@ -1,7 +1,7 @@ error[E0277]: the trait bound `PartialEqNotEq: std::cmp::Eq` is not satisfied --> $DIR/union-derive-eq.rs:25:5 | -25 | a: PartialEqNotEq, //~ ERROR the trait bound `PartialEqNotEq: std::cmp::Eq` is not satisfied +LL | a: PartialEqNotEq, //~ ERROR the trait bound `PartialEqNotEq: std::cmp::Eq` is not satisfied | ^^^^^^^^^^^^^^^^^ the trait `std::cmp::Eq` is not implemented for `PartialEqNotEq` | = note: required by `std::cmp::AssertParamIsEq` diff --git a/src/test/ui/union/union-fields-1.stderr b/src/test/ui/union/union-fields-1.stderr index 5204a13f6f209..e337ea9d7eeac 100644 --- a/src/test/ui/union/union-fields-1.stderr +++ b/src/test/ui/union/union-fields-1.stderr @@ -1,31 +1,31 @@ error: field is never used: `c` --> $DIR/union-fields-1.rs:16:5 | -16 | c: u8, //~ ERROR field is never used +LL | c: u8, //~ ERROR field is never used | ^^^^^ | note: lint level defined here --> $DIR/union-fields-1.rs:11:9 | -11 | #![deny(dead_code)] +LL | #![deny(dead_code)] | ^^^^^^^^^ error: field is never used: `a` --> $DIR/union-fields-1.rs:19:5 | -19 | a: u8, //~ ERROR field is never used +LL | a: u8, //~ ERROR field is never used | ^^^^^ error: field is never used: `a` --> $DIR/union-fields-1.rs:23:20 | -23 | union NoDropLike { a: u8 } //~ ERROR field is never used +LL | union NoDropLike { a: u8 } //~ ERROR field is never used | ^^^^^ error: field is never used: `c` --> $DIR/union-fields-1.rs:28:5 | -28 | c: u8, //~ ERROR field is never used +LL | c: u8, //~ ERROR field is never used | ^^^^^ error: aborting due to 4 previous errors diff --git a/src/test/ui/union/union-fields-2.stderr b/src/test/ui/union/union-fields-2.stderr index f6c64dcabd74c..6ae946fdbaf0a 100644 --- a/src/test/ui/union/union-fields-2.stderr +++ b/src/test/ui/union/union-fields-2.stderr @@ -1,19 +1,19 @@ error: union expressions should have exactly one field --> $DIR/union-fields-2.rs:17:13 | -17 | let u = U {}; //~ ERROR union expressions should have exactly one field +LL | let u = U {}; //~ ERROR union expressions should have exactly one field | ^ error: union expressions should have exactly one field --> $DIR/union-fields-2.rs:19:13 | -19 | let u = U { a: 0, b: 1 }; //~ ERROR union expressions should have exactly one field +LL | let u = U { a: 0, b: 1 }; //~ ERROR union expressions should have exactly one field | ^ error[E0560]: union `U` has no field named `c` --> $DIR/union-fields-2.rs:20:29 | -20 | let u = U { a: 0, b: 1, c: 2 }; //~ ERROR union expressions should have exactly one field +LL | let u = U { a: 0, b: 1, c: 2 }; //~ ERROR union expressions should have exactly one field | ^^ `U` does not have this field | = note: available fields are: `a`, `b` @@ -21,61 +21,61 @@ error[E0560]: union `U` has no field named `c` error: union expressions should have exactly one field --> $DIR/union-fields-2.rs:20:13 | -20 | let u = U { a: 0, b: 1, c: 2 }; //~ ERROR union expressions should have exactly one field +LL | let u = U { a: 0, b: 1, c: 2 }; //~ ERROR union expressions should have exactly one field | ^ error: union expressions should have exactly one field --> $DIR/union-fields-2.rs:22:13 | -22 | let u = U { ..u }; //~ ERROR union expressions should have exactly one field +LL | let u = U { ..u }; //~ ERROR union expressions should have exactly one field | ^ error[E0436]: functional record update syntax requires a struct --> $DIR/union-fields-2.rs:22:19 | -22 | let u = U { ..u }; //~ ERROR union expressions should have exactly one field +LL | let u = U { ..u }; //~ ERROR union expressions should have exactly one field | ^ error: union patterns should have exactly one field --> $DIR/union-fields-2.rs:25:9 | -25 | let U {} = u; //~ ERROR union patterns should have exactly one field +LL | let U {} = u; //~ ERROR union patterns should have exactly one field | ^^^^ error: union patterns should have exactly one field --> $DIR/union-fields-2.rs:27:9 | -27 | let U { a, b } = u; //~ ERROR union patterns should have exactly one field +LL | let U { a, b } = u; //~ ERROR union patterns should have exactly one field | ^^^^^^^^^^ error[E0026]: union `U` does not have a field named `c` --> $DIR/union-fields-2.rs:28:19 | -28 | let U { a, b, c } = u; //~ ERROR union patterns should have exactly one field +LL | let U { a, b, c } = u; //~ ERROR union patterns should have exactly one field | ^ union `U` does not have field `c` error: union patterns should have exactly one field --> $DIR/union-fields-2.rs:28:9 | -28 | let U { a, b, c } = u; //~ ERROR union patterns should have exactly one field +LL | let U { a, b, c } = u; //~ ERROR union patterns should have exactly one field | ^^^^^^^^^^^^^ error: union patterns should have exactly one field --> $DIR/union-fields-2.rs:30:9 | -30 | let U { .. } = u; //~ ERROR union patterns should have exactly one field +LL | let U { .. } = u; //~ ERROR union patterns should have exactly one field | ^^^^^^^^ error: `..` cannot be used in union patterns --> $DIR/union-fields-2.rs:30:9 | -30 | let U { .. } = u; //~ ERROR union patterns should have exactly one field +LL | let U { .. } = u; //~ ERROR union patterns should have exactly one field | ^^^^^^^^ error: `..` cannot be used in union patterns --> $DIR/union-fields-2.rs:32:9 | -32 | let U { a, .. } = u; //~ ERROR `..` cannot be used in union patterns +LL | let U { a, .. } = u; //~ ERROR `..` cannot be used in union patterns | ^^^^^^^^^^^ error: aborting due to 13 previous errors diff --git a/src/test/ui/union/union-sized-field.stderr b/src/test/ui/union/union-sized-field.stderr index 9586f9507391f..ccf83d85cbc2f 100644 --- a/src/test/ui/union/union-sized-field.stderr +++ b/src/test/ui/union/union-sized-field.stderr @@ -1,7 +1,7 @@ error[E0277]: the trait bound `T: std::marker::Sized` is not satisfied --> $DIR/union-sized-field.rs:14:5 | -14 | value: T, //~ ERROR the trait bound `T: std::marker::Sized` is not satisfied +LL | value: T, //~ ERROR the trait bound `T: std::marker::Sized` is not satisfied | ^^^^^^^^ `T` does not have a constant size known at compile-time | = help: the trait `std::marker::Sized` is not implemented for `T` @@ -11,7 +11,7 @@ error[E0277]: the trait bound `T: std::marker::Sized` is not satisfied error[E0277]: the trait bound `T: std::marker::Sized` is not satisfied --> $DIR/union-sized-field.rs:18:5 | -18 | value: T, //~ ERROR the trait bound `T: std::marker::Sized` is not satisfied +LL | value: T, //~ ERROR the trait bound `T: std::marker::Sized` is not satisfied | ^^^^^^^^ `T` does not have a constant size known at compile-time | = help: the trait `std::marker::Sized` is not implemented for `T` @@ -21,7 +21,7 @@ error[E0277]: the trait bound `T: std::marker::Sized` is not satisfied error[E0277]: the trait bound `T: std::marker::Sized` is not satisfied --> $DIR/union-sized-field.rs:23:11 | -23 | Value(T), //~ ERROR the trait bound `T: std::marker::Sized` is not satisfied +LL | Value(T), //~ ERROR the trait bound `T: std::marker::Sized` is not satisfied | ^^ `T` does not have a constant size known at compile-time | = help: the trait `std::marker::Sized` is not implemented for `T` diff --git a/src/test/ui/union/union-suggest-field.stderr b/src/test/ui/union/union-suggest-field.stderr index d2ea09553bcc1..c005d617948f6 100644 --- a/src/test/ui/union/union-suggest-field.stderr +++ b/src/test/ui/union/union-suggest-field.stderr @@ -1,19 +1,19 @@ error[E0560]: union `U` has no field named `principle` --> $DIR/union-suggest-field.rs:20:17 | -20 | let u = U { principle: 0 }; +LL | let u = U { principle: 0 }; | ^^^^^^^^^^ field does not exist - did you mean `principal`? error[E0609]: no field `principial` on type `U` --> $DIR/union-suggest-field.rs:22:15 | -22 | let w = u.principial; //~ ERROR no field `principial` on type `U` +LL | let w = u.principial; //~ ERROR no field `principial` on type `U` | ^^^^^^^^^^ did you mean `principal`? error[E0615]: attempted to take value of method `calculate` on type `U` --> $DIR/union-suggest-field.rs:25:15 | -25 | let y = u.calculate; //~ ERROR attempted to take value of method `calculate` on type `U` +LL | let y = u.calculate; //~ ERROR attempted to take value of method `calculate` on type `U` | ^^^^^^^^^ | = help: maybe a `()` to call it is missing? diff --git a/src/test/ui/unknown-language-item.stderr b/src/test/ui/unknown-language-item.stderr index c4b4a789c3dcc..4066605b2730e 100644 --- a/src/test/ui/unknown-language-item.stderr +++ b/src/test/ui/unknown-language-item.stderr @@ -1,7 +1,7 @@ error[E0522]: definition of an unknown language item: `foo` --> $DIR/unknown-language-item.rs:14:1 | -14 | #[lang = "foo"] +LL | #[lang = "foo"] | ^^^^^^^^^^^^^^^ definition of unknown language item `foo` error: aborting due to previous error diff --git a/src/test/ui/unsafe-block-without-braces.stderr b/src/test/ui/unsafe-block-without-braces.stderr index fc6ddba382395..e6d2403ac4cec 100644 --- a/src/test/ui/unsafe-block-without-braces.stderr +++ b/src/test/ui/unsafe-block-without-braces.stderr @@ -1,9 +1,9 @@ error: expected one of `extern`, `fn`, or `{`, found `std` --> $DIR/unsafe-block-without-braces.rs:13:9 | -12 | unsafe //{ +LL | unsafe //{ | - expected one of `extern`, `fn`, or `{` here -13 | std::mem::transmute::(1.0); +LL | std::mem::transmute::(1.0); | ^^^ unexpected token error: aborting due to previous error diff --git a/src/test/ui/unsafe-const-fn.stderr b/src/test/ui/unsafe-const-fn.stderr index f3923244aba85..3ca8f00751c04 100644 --- a/src/test/ui/unsafe-const-fn.stderr +++ b/src/test/ui/unsafe-const-fn.stderr @@ -1,7 +1,7 @@ error[E0133]: call to unsafe function requires unsafe function or block --> $DIR/unsafe-const-fn.rs:19:18 | -19 | const VAL: u32 = dummy(0xFFFF); +LL | const VAL: u32 = dummy(0xFFFF); | ^^^^^^^^^^^^^ call to unsafe function error: aborting due to previous error diff --git a/src/test/ui/unsized-enum2.stderr b/src/test/ui/unsized-enum2.stderr index 97a83456bb4c7..c042adf547ddf 100644 --- a/src/test/ui/unsized-enum2.stderr +++ b/src/test/ui/unsized-enum2.stderr @@ -1,7 +1,7 @@ error[E0277]: the trait bound `W: std::marker::Sized` is not satisfied --> $DIR/unsized-enum2.rs:33:8 | -33 | VA(W), //~ ERROR `W: std::marker::Sized` is not satisfied +LL | VA(W), //~ ERROR `W: std::marker::Sized` is not satisfied | ^^ `W` does not have a constant size known at compile-time | = help: the trait `std::marker::Sized` is not implemented for `W` @@ -11,7 +11,7 @@ error[E0277]: the trait bound `W: std::marker::Sized` is not satisfied error[E0277]: the trait bound `X: std::marker::Sized` is not satisfied --> $DIR/unsized-enum2.rs:34:8 | -34 | VB{x: X}, //~ ERROR `X: std::marker::Sized` is not satisfied +LL | VB{x: X}, //~ ERROR `X: std::marker::Sized` is not satisfied | ^^^^ `X` does not have a constant size known at compile-time | = help: the trait `std::marker::Sized` is not implemented for `X` @@ -21,7 +21,7 @@ error[E0277]: the trait bound `X: std::marker::Sized` is not satisfied error[E0277]: the trait bound `Y: std::marker::Sized` is not satisfied --> $DIR/unsized-enum2.rs:35:15 | -35 | VC(isize, Y), //~ ERROR `Y: std::marker::Sized` is not satisfied +LL | VC(isize, Y), //~ ERROR `Y: std::marker::Sized` is not satisfied | ^^ `Y` does not have a constant size known at compile-time | = help: the trait `std::marker::Sized` is not implemented for `Y` @@ -31,7 +31,7 @@ error[E0277]: the trait bound `Y: std::marker::Sized` is not satisfied error[E0277]: the trait bound `Z: std::marker::Sized` is not satisfied --> $DIR/unsized-enum2.rs:36:18 | -36 | VD{u: isize, x: Z}, //~ ERROR `Z: std::marker::Sized` is not satisfied +LL | VD{u: isize, x: Z}, //~ ERROR `Z: std::marker::Sized` is not satisfied | ^^^^ `Z` does not have a constant size known at compile-time | = help: the trait `std::marker::Sized` is not implemented for `Z` @@ -41,7 +41,7 @@ error[E0277]: the trait bound `Z: std::marker::Sized` is not satisfied error[E0277]: the trait bound `[u8]: std::marker::Sized` is not satisfied --> $DIR/unsized-enum2.rs:39:8 | -39 | VE([u8]), //~ ERROR `[u8]: std::marker::Sized` is not satisfied +LL | VE([u8]), //~ ERROR `[u8]: std::marker::Sized` is not satisfied | ^^^^^ `[u8]` does not have a constant size known at compile-time | = help: the trait `std::marker::Sized` is not implemented for `[u8]` @@ -50,7 +50,7 @@ error[E0277]: the trait bound `[u8]: std::marker::Sized` is not satisfied error[E0277]: the trait bound `str: std::marker::Sized` is not satisfied --> $DIR/unsized-enum2.rs:40:8 | -40 | VF{x: str}, //~ ERROR `str: std::marker::Sized` is not satisfied +LL | VF{x: str}, //~ ERROR `str: std::marker::Sized` is not satisfied | ^^^^^^ `str` does not have a constant size known at compile-time | = help: the trait `std::marker::Sized` is not implemented for `str` @@ -59,7 +59,7 @@ error[E0277]: the trait bound `str: std::marker::Sized` is not satisfied error[E0277]: the trait bound `[f32]: std::marker::Sized` is not satisfied --> $DIR/unsized-enum2.rs:41:15 | -41 | VG(isize, [f32]), //~ ERROR `[f32]: std::marker::Sized` is not satisfied +LL | VG(isize, [f32]), //~ ERROR `[f32]: std::marker::Sized` is not satisfied | ^^^^^^ `[f32]` does not have a constant size known at compile-time | = help: the trait `std::marker::Sized` is not implemented for `[f32]` @@ -68,7 +68,7 @@ error[E0277]: the trait bound `[f32]: std::marker::Sized` is not satisfied error[E0277]: the trait bound `[u32]: std::marker::Sized` is not satisfied --> $DIR/unsized-enum2.rs:42:18 | -42 | VH{u: isize, x: [u32]}, //~ ERROR `[u32]: std::marker::Sized` is not satisfied +LL | VH{u: isize, x: [u32]}, //~ ERROR `[u32]: std::marker::Sized` is not satisfied | ^^^^^^^^ `[u32]` does not have a constant size known at compile-time | = help: the trait `std::marker::Sized` is not implemented for `[u32]` @@ -77,7 +77,7 @@ error[E0277]: the trait bound `[u32]: std::marker::Sized` is not satisfied error[E0277]: the trait bound `Foo + 'static: std::marker::Sized` is not satisfied --> $DIR/unsized-enum2.rs:51:8 | -51 | VM(Foo), //~ ERROR `Foo + 'static: std::marker::Sized` is not satisfied +LL | VM(Foo), //~ ERROR `Foo + 'static: std::marker::Sized` is not satisfied | ^^^^ `Foo + 'static` does not have a constant size known at compile-time | = help: the trait `std::marker::Sized` is not implemented for `Foo + 'static` @@ -86,7 +86,7 @@ error[E0277]: the trait bound `Foo + 'static: std::marker::Sized` is not satisfi error[E0277]: the trait bound `Bar + 'static: std::marker::Sized` is not satisfied --> $DIR/unsized-enum2.rs:52:8 | -52 | VN{x: Bar}, //~ ERROR `Bar + 'static: std::marker::Sized` is not satisfied +LL | VN{x: Bar}, //~ ERROR `Bar + 'static: std::marker::Sized` is not satisfied | ^^^^^^ `Bar + 'static` does not have a constant size known at compile-time | = help: the trait `std::marker::Sized` is not implemented for `Bar + 'static` @@ -95,7 +95,7 @@ error[E0277]: the trait bound `Bar + 'static: std::marker::Sized` is not satisfi error[E0277]: the trait bound `FooBar + 'static: std::marker::Sized` is not satisfied --> $DIR/unsized-enum2.rs:53:15 | -53 | VO(isize, FooBar), //~ ERROR `FooBar + 'static: std::marker::Sized` is not satisfied +LL | VO(isize, FooBar), //~ ERROR `FooBar + 'static: std::marker::Sized` is not satisfied | ^^^^^^^ `FooBar + 'static` does not have a constant size known at compile-time | = help: the trait `std::marker::Sized` is not implemented for `FooBar + 'static` @@ -104,7 +104,7 @@ error[E0277]: the trait bound `FooBar + 'static: std::marker::Sized` is not sati error[E0277]: the trait bound `BarFoo + 'static: std::marker::Sized` is not satisfied --> $DIR/unsized-enum2.rs:54:18 | -54 | VP{u: isize, x: BarFoo}, //~ ERROR `BarFoo + 'static: std::marker::Sized` is not satisfied +LL | VP{u: isize, x: BarFoo}, //~ ERROR `BarFoo + 'static: std::marker::Sized` is not satisfied | ^^^^^^^^^ `BarFoo + 'static` does not have a constant size known at compile-time | = help: the trait `std::marker::Sized` is not implemented for `BarFoo + 'static` @@ -113,7 +113,7 @@ error[E0277]: the trait bound `BarFoo + 'static: std::marker::Sized` is not sati error[E0277]: the trait bound `[i8]: std::marker::Sized` is not satisfied --> $DIR/unsized-enum2.rs:57:8 | -57 | VQ(<&'static [i8] as Deref>::Target), //~ ERROR `[i8]: std::marker::Sized` is not satisfied +LL | VQ(<&'static [i8] as Deref>::Target), //~ ERROR `[i8]: std::marker::Sized` is not satisfied | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `[i8]` does not have a constant size known at compile-time | = help: the trait `std::marker::Sized` is not implemented for `[i8]` @@ -122,7 +122,7 @@ error[E0277]: the trait bound `[i8]: std::marker::Sized` is not satisfied error[E0277]: the trait bound `[char]: std::marker::Sized` is not satisfied --> $DIR/unsized-enum2.rs:58:8 | -58 | VR{x: <&'static [char] as Deref>::Target}, +LL | VR{x: <&'static [char] as Deref>::Target}, | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `[char]` does not have a constant size known at compile-time | = help: the trait `std::marker::Sized` is not implemented for `[char]` @@ -131,7 +131,7 @@ error[E0277]: the trait bound `[char]: std::marker::Sized` is not satisfied error[E0277]: the trait bound `[f64]: std::marker::Sized` is not satisfied --> $DIR/unsized-enum2.rs:60:15 | -60 | VS(isize, <&'static [f64] as Deref>::Target), +LL | VS(isize, <&'static [f64] as Deref>::Target), | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `[f64]` does not have a constant size known at compile-time | = help: the trait `std::marker::Sized` is not implemented for `[f64]` @@ -140,7 +140,7 @@ error[E0277]: the trait bound `[f64]: std::marker::Sized` is not satisfied error[E0277]: the trait bound `[i32]: std::marker::Sized` is not satisfied --> $DIR/unsized-enum2.rs:62:18 | -62 | VT{u: isize, x: <&'static [i32] as Deref>::Target}, +LL | VT{u: isize, x: <&'static [i32] as Deref>::Target}, | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `[i32]` does not have a constant size known at compile-time | = help: the trait `std::marker::Sized` is not implemented for `[i32]` @@ -149,7 +149,7 @@ error[E0277]: the trait bound `[i32]: std::marker::Sized` is not satisfied error[E0277]: the trait bound `PathHelper1 + 'static: std::marker::Sized` is not satisfied in `Path1` --> $DIR/unsized-enum2.rs:45:8 | -45 | VI(Path1), //~ ERROR `PathHelper1 + 'static: std::marker::Sized` is not satisfied +LL | VI(Path1), //~ ERROR `PathHelper1 + 'static: std::marker::Sized` is not satisfied | ^^^^^^ `PathHelper1 + 'static` does not have a constant size known at compile-time | = help: within `Path1`, the trait `std::marker::Sized` is not implemented for `PathHelper1 + 'static` @@ -159,7 +159,7 @@ error[E0277]: the trait bound `PathHelper1 + 'static: std::marker::Sized` is not error[E0277]: the trait bound `PathHelper2 + 'static: std::marker::Sized` is not satisfied in `Path2` --> $DIR/unsized-enum2.rs:46:8 | -46 | VJ{x: Path2}, //~ ERROR `PathHelper2 + 'static: std::marker::Sized` is not satisfied +LL | VJ{x: Path2}, //~ ERROR `PathHelper2 + 'static: std::marker::Sized` is not satisfied | ^^^^^^^^ `PathHelper2 + 'static` does not have a constant size known at compile-time | = help: within `Path2`, the trait `std::marker::Sized` is not implemented for `PathHelper2 + 'static` @@ -169,7 +169,7 @@ error[E0277]: the trait bound `PathHelper2 + 'static: std::marker::Sized` is not error[E0277]: the trait bound `PathHelper3 + 'static: std::marker::Sized` is not satisfied in `Path3` --> $DIR/unsized-enum2.rs:47:15 | -47 | VK(isize, Path3), //~ ERROR `PathHelper3 + 'static: std::marker::Sized` is not satisfied +LL | VK(isize, Path3), //~ ERROR `PathHelper3 + 'static: std::marker::Sized` is not satisfied | ^^^^^^ `PathHelper3 + 'static` does not have a constant size known at compile-time | = help: within `Path3`, the trait `std::marker::Sized` is not implemented for `PathHelper3 + 'static` @@ -179,7 +179,7 @@ error[E0277]: the trait bound `PathHelper3 + 'static: std::marker::Sized` is not error[E0277]: the trait bound `PathHelper4 + 'static: std::marker::Sized` is not satisfied in `Path4` --> $DIR/unsized-enum2.rs:48:18 | -48 | VL{u: isize, x: Path4}, //~ ERROR `PathHelper4 + 'static: std::marker::Sized` is not satisfied +LL | VL{u: isize, x: Path4}, //~ ERROR `PathHelper4 + 'static: std::marker::Sized` is not satisfied | ^^^^^^^^ `PathHelper4 + 'static` does not have a constant size known at compile-time | = help: within `Path4`, the trait `std::marker::Sized` is not implemented for `PathHelper4 + 'static` diff --git a/src/test/ui/use-mod.stderr b/src/test/ui/use-mod.stderr index 1c9f306f493db..a720f2dc2b94d 100644 --- a/src/test/ui/use-mod.stderr +++ b/src/test/ui/use-mod.stderr @@ -1,31 +1,31 @@ error[E0430]: `self` import can only appear once in an import list --> $DIR/use-mod.rs:12:5 | -12 | self, +LL | self, | ^^^^ can only appear once in an import list ... -15 | self +LL | self | ---- another `self` import appears here error[E0431]: `self` import can only appear in an import list with a non-empty prefix --> $DIR/use-mod.rs:19:6 | -19 | use {self}; +LL | use {self}; | ^^^^ can only appear in an import list with a non-empty prefix error[E0252]: the name `bar` is defined multiple times --> $DIR/use-mod.rs:15:5 | -12 | self, +LL | self, | ---- previous import of the module `bar` here ... -15 | self +LL | self | ^^^^ `bar` reimported here | = note: `bar` must be defined only once in the type namespace of this module help: You can use `as` to change the binding name of the import | -15 | self as other_bar +LL | self as other_bar | error: aborting due to 3 previous errors diff --git a/src/test/ui/use-nested-groups-error.stderr b/src/test/ui/use-nested-groups-error.stderr index c4edb626be0bb..d121416e61599 100644 --- a/src/test/ui/use-nested-groups-error.stderr +++ b/src/test/ui/use-nested-groups-error.stderr @@ -1,7 +1,7 @@ error[E0432]: unresolved import `a::b1::C1` --> $DIR/use-nested-groups-error.rs:19:14 | -19 | use a::{b1::{C1, C2}, B2}; +LL | use a::{b1::{C1, C2}, B2}; | ^^ no `C1` in `a::b1`. Did you mean to use `C2`? error: aborting due to previous error diff --git a/src/test/ui/use-nested-groups-unused-imports.stderr b/src/test/ui/use-nested-groups-unused-imports.stderr index 0686310dbf53a..e339664f3747c 100644 --- a/src/test/ui/use-nested-groups-unused-imports.stderr +++ b/src/test/ui/use-nested-groups-unused-imports.stderr @@ -1,25 +1,25 @@ error: unused imports: `*`, `Foo`, `baz::{}`, `foobar::*` --> $DIR/use-nested-groups-unused-imports.rs:26:11 | -26 | use foo::{Foo, bar::{baz::{}, foobar::*}, *}; +LL | use foo::{Foo, bar::{baz::{}, foobar::*}, *}; | ^^^ ^^^^^^^ ^^^^^^^^^ ^ | note: lint level defined here --> $DIR/use-nested-groups-unused-imports.rs:13:9 | -13 | #![deny(unused_imports)] +LL | #![deny(unused_imports)] | ^^^^^^^^^^^^^^ error: unused import: `*` --> $DIR/use-nested-groups-unused-imports.rs:28:24 | -28 | use foo::bar::baz::{*, *}; +LL | use foo::bar::baz::{*, *}; | ^ error: unused import: `use foo::{};` --> $DIR/use-nested-groups-unused-imports.rs:30:1 | -30 | use foo::{}; +LL | use foo::{}; | ^^^^^^^^^^^^ error: aborting due to 3 previous errors diff --git a/src/test/ui/variadic-ffi-3.stderr b/src/test/ui/variadic-ffi-3.stderr index 54275fbc4f29f..268d096ce0bd1 100644 --- a/src/test/ui/variadic-ffi-3.stderr +++ b/src/test/ui/variadic-ffi-3.stderr @@ -1,25 +1,25 @@ error[E0060]: this function takes at least 2 parameters but 0 parameters were supplied --> $DIR/variadic-ffi-3.rs:21:9 | -12 | fn foo(f: isize, x: u8, ...); +LL | fn foo(f: isize, x: u8, ...); | ----------------------------- defined here ... -21 | foo(); //~ ERROR: this function takes at least 2 parameters but 0 parameters were supplied +LL | foo(); //~ ERROR: this function takes at least 2 parameters but 0 parameters were supplied | ^^^^^ expected at least 2 parameters error[E0060]: this function takes at least 2 parameters but 1 parameter was supplied --> $DIR/variadic-ffi-3.rs:22:9 | -12 | fn foo(f: isize, x: u8, ...); +LL | fn foo(f: isize, x: u8, ...); | ----------------------------- defined here ... -22 | foo(1); //~ ERROR: this function takes at least 2 parameters but 1 parameter was supplied +LL | foo(1); //~ ERROR: this function takes at least 2 parameters but 1 parameter was supplied | ^^^^^^ expected at least 2 parameters error[E0308]: mismatched types --> $DIR/variadic-ffi-3.rs:24:56 | -24 | let x: unsafe extern "C" fn(f: isize, x: u8) = foo; +LL | let x: unsafe extern "C" fn(f: isize, x: u8) = foo; | ^^^ expected non-variadic fn, found variadic function | = note: expected type `unsafe extern "C" fn(isize, u8)` @@ -28,7 +28,7 @@ error[E0308]: mismatched types error[E0308]: mismatched types --> $DIR/variadic-ffi-3.rs:29:54 | -29 | let y: extern "C" fn(f: isize, x: u8, ...) = bar; +LL | let y: extern "C" fn(f: isize, x: u8, ...) = bar; | ^^^ expected variadic fn, found non-variadic function | = note: expected type `extern "C" fn(isize, u8, ...)` @@ -37,37 +37,37 @@ error[E0308]: mismatched types error[E0617]: can't pass `f32` to variadic function --> $DIR/variadic-ffi-3.rs:34:19 | -34 | foo(1, 2, 3f32); //~ ERROR can't pass `f32` to variadic function +LL | foo(1, 2, 3f32); //~ ERROR can't pass `f32` to variadic function | ^^^^ help: cast the value to `c_double`: `3f32 as c_double` error[E0617]: can't pass `bool` to variadic function --> $DIR/variadic-ffi-3.rs:35:19 | -35 | foo(1, 2, true); //~ ERROR can't pass `bool` to variadic function +LL | foo(1, 2, true); //~ ERROR can't pass `bool` to variadic function | ^^^^ help: cast the value to `c_int`: `true as c_int` error[E0617]: can't pass `i8` to variadic function --> $DIR/variadic-ffi-3.rs:36:19 | -36 | foo(1, 2, 1i8); //~ ERROR can't pass `i8` to variadic function +LL | foo(1, 2, 1i8); //~ ERROR can't pass `i8` to variadic function | ^^^ help: cast the value to `c_int`: `1i8 as c_int` error[E0617]: can't pass `u8` to variadic function --> $DIR/variadic-ffi-3.rs:37:19 | -37 | foo(1, 2, 1u8); //~ ERROR can't pass `u8` to variadic function +LL | foo(1, 2, 1u8); //~ ERROR can't pass `u8` to variadic function | ^^^ help: cast the value to `c_uint`: `1u8 as c_uint` error[E0617]: can't pass `i16` to variadic function --> $DIR/variadic-ffi-3.rs:38:19 | -38 | foo(1, 2, 1i16); //~ ERROR can't pass `i16` to variadic function +LL | foo(1, 2, 1i16); //~ ERROR can't pass `i16` to variadic function | ^^^^ help: cast the value to `c_int`: `1i16 as c_int` error[E0617]: can't pass `u16` to variadic function --> $DIR/variadic-ffi-3.rs:39:19 | -39 | foo(1, 2, 1u16); //~ ERROR can't pass `u16` to variadic function +LL | foo(1, 2, 1u16); //~ ERROR can't pass `u16` to variadic function | ^^^^ help: cast the value to `c_uint`: `1u16 as c_uint` error: aborting due to 10 previous errors diff --git a/src/test/ui/variance-unused-type-param.stderr b/src/test/ui/variance-unused-type-param.stderr index 0b07ac38cb65d..1cec20202c74e 100644 --- a/src/test/ui/variance-unused-type-param.stderr +++ b/src/test/ui/variance-unused-type-param.stderr @@ -1,7 +1,7 @@ error[E0392]: parameter `A` is never used --> $DIR/variance-unused-type-param.rs:16:19 | -16 | struct SomeStruct { x: u32 } +LL | struct SomeStruct { x: u32 } | ^ unused type parameter | = help: consider removing `A` or using a marker such as `std::marker::PhantomData` @@ -9,7 +9,7 @@ error[E0392]: parameter `A` is never used error[E0392]: parameter `A` is never used --> $DIR/variance-unused-type-param.rs:19:15 | -19 | enum SomeEnum { Nothing } +LL | enum SomeEnum { Nothing } | ^ unused type parameter | = help: consider removing `A` or using a marker such as `std::marker::PhantomData` @@ -17,7 +17,7 @@ error[E0392]: parameter `A` is never used error[E0392]: parameter `T` is never used --> $DIR/variance-unused-type-param.rs:23:15 | -23 | enum ListCell { +LL | enum ListCell { | ^ unused type parameter | = help: consider removing `T` or using a marker such as `std::marker::PhantomData` diff --git a/src/test/ui/vector-no-ann.stderr b/src/test/ui/vector-no-ann.stderr index e788ea125ad40..19c356ec94b2e 100644 --- a/src/test/ui/vector-no-ann.stderr +++ b/src/test/ui/vector-no-ann.stderr @@ -1,7 +1,7 @@ error[E0282]: type annotations needed --> $DIR/vector-no-ann.rs:13:16 | -13 | let _foo = Vec::new(); +LL | let _foo = Vec::new(); | ---- ^^^^^^^^ cannot infer type for `T` | | | consider giving `_foo` a type diff --git a/src/tools/build-manifest/src/main.rs b/src/tools/build-manifest/src/main.rs index 4113f8fd124c7..49b054f8b9e50 100644 --- a/src/tools/build-manifest/src/main.rs +++ b/src/tools/build-manifest/src/main.rs @@ -83,9 +83,11 @@ static TARGETS: &'static [&'static str] = &[ "mipsel-unknown-linux-gnu", "mipsel-unknown-linux-musl", "powerpc-unknown-linux-gnu", + "powerpc-unknown-linux-gnuspe", "powerpc64-unknown-linux-gnu", "powerpc64le-unknown-linux-gnu", "s390x-unknown-linux-gnu", + "sparc-unknown-linux-gnu", "sparc64-unknown-linux-gnu", "sparcv9-sun-solaris", "wasm32-unknown-emscripten", diff --git a/src/tools/compiletest/src/header.rs b/src/tools/compiletest/src/header.rs index d4d3d6c6e9a18..e48f42705f16a 100644 --- a/src/tools/compiletest/src/header.rs +++ b/src/tools/compiletest/src/header.rs @@ -226,9 +226,10 @@ pub struct TestProps { pub must_compile_successfully: bool, // rustdoc will test the output of the `--test` option pub check_test_line_numbers_match: bool, - // The test must be compiled and run successfully. Only used in UI tests for - // now. + // The test must be compiled and run successfully. Only used in UI tests for now. pub run_pass: bool, + // Do not pass `-Z ui-testing` to UI tests + pub disable_ui_testing_normalization: bool, // customized normalization rules pub normalize_stdout: Vec<(String, String)>, pub normalize_stderr: Vec<(String, String)>, @@ -259,6 +260,7 @@ impl TestProps { must_compile_successfully: false, check_test_line_numbers_match: false, run_pass: false, + disable_ui_testing_normalization: false, normalize_stdout: vec![], normalize_stderr: vec![], failure_status: 101, @@ -379,6 +381,11 @@ impl TestProps { config.parse_must_compile_successfully(ln) || self.run_pass; } + if !self.disable_ui_testing_normalization { + self.disable_ui_testing_normalization = + config.parse_disable_ui_testing_normalization(ln); + } + if let Some(rule) = config.parse_custom_normalization(ln, "normalize-stdout") { self.normalize_stdout.push(rule); } @@ -505,6 +512,10 @@ impl Config { self.parse_name_directive(line, "must-compile-successfully") } + fn parse_disable_ui_testing_normalization(&self, line: &str) -> bool { + self.parse_name_directive(line, "disable-ui-testing-normalization") + } + fn parse_check_test_line_numbers_match(&self, line: &str) -> bool { self.parse_name_directive(line, "check-test-line-numbers-match") } diff --git a/src/tools/compiletest/src/runtest.rs b/src/tools/compiletest/src/runtest.rs index c0f82d56d8031..c92a4f3f0e3b8 100644 --- a/src/tools/compiletest/src/runtest.rs +++ b/src/tools/compiletest/src/runtest.rs @@ -1624,13 +1624,14 @@ impl<'test> TestCx<'test> { rustc.args(&["--error-format", "json"]); } } - Ui => if !self.props - .compile_flags - .iter() - .any(|s| s.starts_with("--error-format")) - { - rustc.args(&["--error-format", "json"]); - }, + Ui => { + if !self.props.disable_ui_testing_normalization { + rustc.arg("-Zui-testing"); + } + if !self.props.compile_flags.iter().any(|s| s.starts_with("--error-format")) { + rustc.args(&["--error-format", "json"]); + } + } MirOpt => { rustc.args(&[ "-Zdump-mir=all",