diff --git a/Cargo.lock b/Cargo.lock index b62c7ff90970e..d5952cddb6b00 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -250,8 +250,8 @@ dependencies = [ "crates-io 0.25.0", "crossbeam-utils 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", "crypto-hash 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", - "curl 0.4.19 (registry+https://github.com/rust-lang/crates.io-index)", - "curl-sys 0.4.15 (registry+https://github.com/rust-lang/crates.io-index)", + "curl 0.4.21 (registry+https://github.com/rust-lang/crates.io-index)", + "curl-sys 0.4.18 (registry+https://github.com/rust-lang/crates.io-index)", "env_logger 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", "failure 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", "filetime 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)", @@ -540,7 +540,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" name = "crates-io" version = "0.25.0" dependencies = [ - "curl 0.4.19 (registry+https://github.com/rust-lang/crates.io-index)", + "curl 0.4.21 (registry+https://github.com/rust-lang/crates.io-index)", "failure 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", "http 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.82 (registry+https://github.com/rust-lang/crates.io-index)", @@ -651,14 +651,14 @@ dependencies = [ [[package]] name = "curl" -version = "0.4.19" +version = "0.4.21" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "curl-sys 0.4.15 (registry+https://github.com/rust-lang/crates.io-index)", + "curl-sys 0.4.18 (registry+https://github.com/rust-lang/crates.io-index)", "kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)", "openssl-probe 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "openssl-sys 0.9.40 (registry+https://github.com/rust-lang/crates.io-index)", + "openssl-sys 0.9.43 (registry+https://github.com/rust-lang/crates.io-index)", "schannel 0.1.14 (registry+https://github.com/rust-lang/crates.io-index)", "socket2 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", @@ -666,14 +666,14 @@ dependencies = [ [[package]] name = "curl-sys" -version = "0.4.15" +version = "0.4.18" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "cc 1.0.35 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)", "libnghttp2-sys 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", "libz-sys 1.0.25 (registry+https://github.com/rust-lang/crates.io-index)", - "openssl-sys 0.9.40 (registry+https://github.com/rust-lang/crates.io-index)", + "openssl-sys 0.9.43 (registry+https://github.com/rust-lang/crates.io-index)", "pkg-config 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)", "vcpkg 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)", "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", @@ -999,7 +999,7 @@ dependencies = [ "libgit2-sys 0.7.11 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "openssl-probe 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "openssl-sys 0.9.40 (registry+https://github.com/rust-lang/crates.io-index)", + "openssl-sys 0.9.43 (registry+https://github.com/rust-lang/crates.io-index)", "url 1.7.2 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1008,7 +1008,7 @@ name = "git2-curl" version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "curl 0.4.19 (registry+https://github.com/rust-lang/crates.io-index)", + "curl 0.4.21 (registry+https://github.com/rust-lang/crates.io-index)", "git2 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "url 1.7.2 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1285,11 +1285,11 @@ version = "0.7.11" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "cc 1.0.35 (registry+https://github.com/rust-lang/crates.io-index)", - "curl-sys 0.4.15 (registry+https://github.com/rust-lang/crates.io-index)", + "curl-sys 0.4.18 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)", "libssh2-sys 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", "libz-sys 1.0.25 (registry+https://github.com/rust-lang/crates.io-index)", - "openssl-sys 0.9.40 (registry+https://github.com/rust-lang/crates.io-index)", + "openssl-sys 0.9.43 (registry+https://github.com/rust-lang/crates.io-index)", "pkg-config 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1310,7 +1310,7 @@ dependencies = [ "cc 1.0.35 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)", "libz-sys 1.0.25 (registry+https://github.com/rust-lang/crates.io-index)", - "openssl-sys 0.9.40 (registry+https://github.com/rust-lang/crates.io-index)", + "openssl-sys 0.9.43 (registry+https://github.com/rust-lang/crates.io-index)", "pkg-config 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)", "vcpkg 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1705,7 +1705,7 @@ dependencies = [ "foreign-types 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)", - "openssl-sys 0.9.40 (registry+https://github.com/rust-lang/crates.io-index)", + "openssl-sys 0.9.43 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1723,13 +1723,14 @@ dependencies = [ [[package]] name = "openssl-sys" -version = "0.9.40" +version = "0.9.43" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "cc 1.0.35 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)", "openssl-src 111.1.0+1.1.1a (registry+https://github.com/rust-lang/crates.io-index)", "pkg-config 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)", + "rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", "vcpkg 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -4058,8 +4059,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" "checksum crossbeam-utils 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "2760899e32a1d58d5abb31129f8fae5de75220bc2176e77ff7c627ae45c918d9" "checksum crossbeam-utils 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)" = "e07fc155212827475223f0bcfae57e945e694fc90950ddf3f6695bbfd5555c72" "checksum crypto-hash 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "09de9ee0fc255ace04c7fa0763c9395a945c37c8292bb554f8d48361d1dcf1b4" -"checksum curl 0.4.19 (registry+https://github.com/rust-lang/crates.io-index)" = "c7c9d851c825e0c033979d4516c9173bc19a78a96eb4d6ae51d4045440eafa16" -"checksum curl-sys 0.4.15 (registry+https://github.com/rust-lang/crates.io-index)" = "721c204978be2143fab0a84b708c49d79d1f6100b8785610f456043a90708870" +"checksum curl 0.4.21 (registry+https://github.com/rust-lang/crates.io-index)" = "a85f2f95f2bd277d316d1aa8a477687ab4a6942258c7db7c89c187534669979c" +"checksum curl-sys 0.4.18 (registry+https://github.com/rust-lang/crates.io-index)" = "9d91a0052d5b982887d8e829bee0faffc7218ea3c6ebd3d6c2c8f678a93c9a42" "checksum datafrog 2.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "a0afaad2b26fa326569eb264b1363e8ae3357618c43982b3f285f0774ce76b69" "checksum derive-new 0.5.6 (registry+https://github.com/rust-lang/crates.io-index)" = "6ca414e896ae072546f4d789f452daaecf60ddee4c9df5dc6d5936d769e3d87c" "checksum derive_more 0.13.0 (registry+https://github.com/rust-lang/crates.io-index)" = "3f57d78cf3bd45270dad4e70c21ec77a960b36c7a841ff9db76aaa775a8fb871" @@ -4169,7 +4170,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" "checksum openssl 0.10.16 (registry+https://github.com/rust-lang/crates.io-index)" = "ec7bd7ca4cce6dbdc77e7c1230682740d307d1218a87fb0349a571272be749f9" "checksum openssl-probe 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "77af24da69f9d9341038eba93a073b1fdaaa1b788221b00a69bce9e762cb32de" "checksum openssl-src 111.1.0+1.1.1a (registry+https://github.com/rust-lang/crates.io-index)" = "26bb632127731bf4ac49bf86a5dde12d2ca0918c2234fc39d79d4da2ccbc6da7" -"checksum openssl-sys 0.9.40 (registry+https://github.com/rust-lang/crates.io-index)" = "1bb974e77de925ef426b6bc82fce15fd45bdcbeb5728bffcfc7cdeeb7ce1c2d6" +"checksum openssl-sys 0.9.43 (registry+https://github.com/rust-lang/crates.io-index)" = "33c86834957dd5b915623e94f2f4ab2c70dd8f6b70679824155d5ae21dbd495d" "checksum ordermap 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)" = "a86ed3f5f244b372d6b1a00b72ef7f8876d0bc6a78a4c9985c53614041512063" "checksum ordslice 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "dd20eec3dbe4376829cb7d80ae6ac45e0a766831dca50202ff2d40db46a8a024" "checksum owning_ref 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "cdf84f41639e037b484f93433aa3897863b561ed65c6e59c7073d7c561710f37" diff --git a/src/ci/docker/dist-various-1/install-x86_64-redox.sh b/src/ci/docker/dist-various-1/install-x86_64-redox.sh index 339042bb6729a..dad9792233847 100755 --- a/src/ci/docker/dist-various-1/install-x86_64-redox.sh +++ b/src/ci/docker/dist-various-1/install-x86_64-redox.sh @@ -1,5 +1,4 @@ #!/usr/bin/env bash -# ignore-tidy-linelength set -ex diff --git a/src/ci/docker/dist-various-2/build-fuchsia-toolchain.sh b/src/ci/docker/dist-various-2/build-fuchsia-toolchain.sh index ef486075ff9d8..3b91918288a2b 100755 --- a/src/ci/docker/dist-various-2/build-fuchsia-toolchain.sh +++ b/src/ci/docker/dist-various-2/build-fuchsia-toolchain.sh @@ -1,7 +1,5 @@ #!/usr/bin/env bash -# ignore-tidy-linelength - set -ex source shared.sh diff --git a/src/ci/docker/scripts/android-sdk.sh b/src/ci/docker/scripts/android-sdk.sh index 0b86a2f2dff97..e35be697a8df0 100755 --- a/src/ci/docker/scripts/android-sdk.sh +++ b/src/ci/docker/scripts/android-sdk.sh @@ -26,4 +26,3 @@ abi="$(echo "${details}" | awk '{print($2)}')" echo no | avdmanager create avd \ -n "$abi-$api" \ -k "system-images;android-$api;default;$abi" - diff --git a/src/ci/docker/scripts/musl-toolchain.sh b/src/ci/docker/scripts/musl-toolchain.sh index 3caf2852ede42..8cdbfebea4dd9 100644 --- a/src/ci/docker/scripts/musl-toolchain.sh +++ b/src/ci/docker/scripts/musl-toolchain.sh @@ -71,4 +71,3 @@ cmake ../libunwind-release_$LLVM \ hide_output make -j$(nproc) cp lib/libunwind.a $OUTPUT/$TARGET/lib cd - && rm -rf libunwind-build - diff --git a/src/doc/book b/src/doc/book index b93ec30bbc7b1..db919bc6bb907 160000 --- a/src/doc/book +++ b/src/doc/book @@ -1 +1 @@ -Subproject commit b93ec30bbc7b1b5c2f44223249ab359bed2ed5a6 +Subproject commit db919bc6bb9071566e9c4f05053672133eaac33e diff --git a/src/doc/edition-guide b/src/doc/edition-guide index b56ddb1154845..c413d42a207bd 160000 --- a/src/doc/edition-guide +++ b/src/doc/edition-guide @@ -1 +1 @@ -Subproject commit b56ddb11548450a6df4edd1ed571b2bc304eb9e6 +Subproject commit c413d42a207bd082f801ec0137c31b71e4bfed4c diff --git a/src/doc/embedded-book b/src/doc/embedded-book index 7989c723607ef..de3d55f521e65 160000 --- a/src/doc/embedded-book +++ b/src/doc/embedded-book @@ -1 +1 @@ -Subproject commit 7989c723607ef5b13b57208022259e6c771e11d0 +Subproject commit de3d55f521e657863df45260ebbca1b10527f662 diff --git a/src/doc/nomicon b/src/doc/nomicon index c02e0e7754a76..fb29b147be4d9 160000 --- a/src/doc/nomicon +++ b/src/doc/nomicon @@ -1 +1 @@ -Subproject commit c02e0e7754a76886e55b976a3a4fac20100cd35d +Subproject commit fb29b147be4d9a1f8e24aba753a7e1de537abf61 diff --git a/src/doc/reference b/src/doc/reference index 98f90ff4de8e5..2a2de9ce09597 160000 --- a/src/doc/reference +++ b/src/doc/reference @@ -1 +1 @@ -Subproject commit 98f90ff4de8e588f651f0fb493b5c7496551cd59 +Subproject commit 2a2de9ce095979978ad7b582daecf94e4070b916 diff --git a/src/doc/rust-by-example b/src/doc/rust-by-example index f68ef3d0f4959..1ff0f8e018838 160000 --- a/src/doc/rust-by-example +++ b/src/doc/rust-by-example @@ -1 +1 @@ -Subproject commit f68ef3d0f4959f6a7d92a08d9994b117f0f4d32d +Subproject commit 1ff0f8e018838a710ebc0cc1a7bf74ebe73ad9f1 diff --git a/src/doc/rustc-guide b/src/doc/rustc-guide index 464cb5b166378..99e1b1d53656b 160000 --- a/src/doc/rustc-guide +++ b/src/doc/rustc-guide @@ -1 +1 @@ -Subproject commit 464cb5b166378dff64619081dd4c42533a1eb989 +Subproject commit 99e1b1d53656be08654df399fc200584aebb50e4 diff --git a/src/liballoc/str.rs b/src/liballoc/str.rs index f10a01d44c8ee..e5d4e1c533c7b 100644 --- a/src/liballoc/str.rs +++ b/src/liballoc/str.rs @@ -573,4 +573,3 @@ impl str { pub unsafe fn from_boxed_utf8_unchecked(v: Box<[u8]>) -> Box { Box::from_raw(Box::into_raw(v) as *mut str) } - diff --git a/src/libcore/iter/adapters/chain.rs b/src/libcore/iter/adapters/chain.rs index 11e13149bc2c9..76239ebc0abaf 100644 --- a/src/libcore/iter/adapters/chain.rs +++ b/src/libcore/iter/adapters/chain.rs @@ -258,4 +258,3 @@ impl FusedIterator for Chain unsafe impl TrustedLen for Chain where A: TrustedLen, B: TrustedLen, {} - diff --git a/src/libcore/iter/traits/exact_size.rs b/src/libcore/iter/traits/exact_size.rs index 8fc4ac93daa68..4a7db348b1851 100644 --- a/src/libcore/iter/traits/exact_size.rs +++ b/src/libcore/iter/traits/exact_size.rs @@ -140,4 +140,3 @@ impl ExactSizeIterator for &mut I { (**self).is_empty() } } - diff --git a/src/libcore/num/flt2dec/decoder.rs b/src/libcore/num/flt2dec/decoder.rs index 6c75d00f6b24a..ee0f18ba295e9 100644 --- a/src/libcore/num/flt2dec/decoder.rs +++ b/src/libcore/num/flt2dec/decoder.rs @@ -86,4 +86,3 @@ pub fn decode(v: T) -> (/*negative?*/ bool, FullDecoded) { }; (sign < 0, decoded) } - diff --git a/src/libcore/num/mod.rs b/src/libcore/num/mod.rs index c8a4ff7ca61e7..f1325f383eedb 100644 --- a/src/libcore/num/mod.rs +++ b/src/libcore/num/mod.rs @@ -377,6 +377,8 @@ let m = ", $rot_result, "; assert_eq!(n.rotate_left(", $rot, "), m); ```"), #[stable(feature = "rust1", since = "1.0.0")] + #[must_use = "this returns the result of the operation, \ + without modifying the original"] #[inline] pub const fn rotate_left(self, n: u32) -> Self { (self as $UnsignedT).rotate_left(n) as Self @@ -401,6 +403,8 @@ let m = ", $rot_op, "; assert_eq!(n.rotate_right(", $rot, "), m); ```"), #[stable(feature = "rust1", since = "1.0.0")] + #[must_use = "this returns the result of the operation, \ + without modifying the original"] #[inline] pub const fn rotate_right(self, n: u32) -> Self { (self as $UnsignedT).rotate_right(n) as Self @@ -598,6 +602,8 @@ assert_eq!((", stringify!($SelfT), "::max_value() - 2).checked_add(3), None);", $EndFeature, " ```"), #[stable(feature = "rust1", since = "1.0.0")] + #[must_use = "this returns the result of the operation, \ + without modifying the original"] #[inline] pub fn checked_add(self, rhs: Self) -> Option { let (a, b) = self.overflowing_add(rhs); @@ -620,6 +626,8 @@ assert_eq!((", stringify!($SelfT), "::min_value() + 2).checked_sub(3), None);", $EndFeature, " ```"), #[stable(feature = "rust1", since = "1.0.0")] + #[must_use = "this returns the result of the operation, \ + without modifying the original"] #[inline] pub fn checked_sub(self, rhs: Self) -> Option { let (a, b) = self.overflowing_sub(rhs); @@ -642,6 +650,8 @@ assert_eq!(", stringify!($SelfT), "::max_value().checked_mul(2), None);", $EndFeature, " ```"), #[stable(feature = "rust1", since = "1.0.0")] + #[must_use = "this returns the result of the operation, \ + without modifying the original"] #[inline] pub fn checked_mul(self, rhs: Self) -> Option { let (a, b) = self.overflowing_mul(rhs); @@ -665,6 +675,8 @@ assert_eq!((1", stringify!($SelfT), ").checked_div(0), None);", $EndFeature, " ```"), #[stable(feature = "rust1", since = "1.0.0")] + #[must_use = "this returns the result of the operation, \ + without modifying the original"] #[inline] pub fn checked_div(self, rhs: Self) -> Option { if rhs == 0 || (self == Self::min_value() && rhs == -1) { @@ -691,6 +703,8 @@ assert_eq!(", stringify!($SelfT), "::min_value().checked_div_euclid(-1), None); assert_eq!((1", stringify!($SelfT), ").checked_div_euclid(0), None); ```"), #[unstable(feature = "euclidean_division", issue = "49048")] + #[must_use = "this returns the result of the operation, \ + without modifying the original"] #[inline] pub fn checked_div_euclid(self, rhs: Self) -> Option { if rhs == 0 || (self == Self::min_value() && rhs == -1) { @@ -718,6 +732,8 @@ assert_eq!(", stringify!($SelfT), "::MIN.checked_rem(-1), None);", $EndFeature, " ```"), #[stable(feature = "wrapping", since = "1.7.0")] + #[must_use = "this returns the result of the operation, \ + without modifying the original"] #[inline] pub fn checked_rem(self, rhs: Self) -> Option { if rhs == 0 || (self == Self::min_value() && rhs == -1) { @@ -745,6 +761,8 @@ assert_eq!(5", stringify!($SelfT), ".checked_rem_euclid(0), None); assert_eq!(", stringify!($SelfT), "::MIN.checked_rem_euclid(-1), None); ```"), #[unstable(feature = "euclidean_division", issue = "49048")] + #[must_use = "this returns the result of the operation, \ + without modifying the original"] #[inline] pub fn checked_rem_euclid(self, rhs: Self) -> Option { if rhs == 0 || (self == Self::min_value() && rhs == -1) { @@ -791,6 +809,8 @@ assert_eq!(0x1", stringify!($SelfT), ".checked_shl(129), None);", $EndFeature, " ```"), #[stable(feature = "wrapping", since = "1.7.0")] + #[must_use = "this returns the result of the operation, \ + without modifying the original"] #[inline] pub fn checked_shl(self, rhs: u32) -> Option { let (a, b) = self.overflowing_shl(rhs); @@ -812,6 +832,8 @@ assert_eq!(0x10", stringify!($SelfT), ".checked_shr(128), None);", $EndFeature, " ```"), #[stable(feature = "wrapping", since = "1.7.0")] + #[must_use = "this returns the result of the operation, \ + without modifying the original"] #[inline] pub fn checked_shr(self, rhs: u32) -> Option { let (a, b) = self.overflowing_shr(rhs); @@ -860,6 +882,8 @@ $EndFeature, " ```"), #[stable(feature = "no_panic_pow", since = "1.34.0")] + #[must_use = "this returns the result of the operation, \ + without modifying the original"] #[inline] pub fn checked_pow(self, mut exp: u32) -> Option { let mut base = self; @@ -901,6 +925,8 @@ $EndFeature, " #[stable(feature = "rust1", since = "1.0.0")] #[rustc_const_unstable(feature = "const_saturating_int_methods")] + #[must_use = "this returns the result of the operation, \ + without modifying the original"] #[inline] pub const fn saturating_add(self, rhs: Self) -> Self { intrinsics::saturating_add(self, rhs) @@ -924,6 +950,8 @@ $EndFeature, " ```"), #[stable(feature = "rust1", since = "1.0.0")] #[rustc_const_unstable(feature = "const_saturating_int_methods")] + #[must_use = "this returns the result of the operation, \ + without modifying the original"] #[inline] pub const fn saturating_sub(self, rhs: Self) -> Self { intrinsics::saturating_sub(self, rhs) @@ -947,6 +975,8 @@ assert_eq!(", stringify!($SelfT), "::MIN.saturating_mul(10), ", stringify!($Self $EndFeature, " ```"), #[stable(feature = "wrapping", since = "1.7.0")] + #[must_use = "this returns the result of the operation, \ + without modifying the original"] #[inline] pub fn saturating_mul(self, rhs: Self) -> Self { self.checked_mul(rhs).unwrap_or_else(|| { @@ -976,6 +1006,8 @@ assert_eq!(", stringify!($SelfT), "::MIN.saturating_pow(3), ", stringify!($SelfT $EndFeature, " ```"), #[stable(feature = "no_panic_pow", since = "1.34.0")] + #[must_use = "this returns the result of the operation, \ + without modifying the original"] #[inline] pub fn saturating_pow(self, exp: u32) -> Self { match self.checked_pow(exp) { @@ -1001,6 +1033,8 @@ assert_eq!(", stringify!($SelfT), "::max_value().wrapping_add(2), ", stringify!( $EndFeature, " ```"), #[stable(feature = "rust1", since = "1.0.0")] + #[must_use = "this returns the result of the operation, \ + without modifying the original"] #[inline] pub const fn wrapping_add(self, rhs: Self) -> Self { intrinsics::overflowing_add(self, rhs) @@ -1022,6 +1056,8 @@ stringify!($SelfT), "::max_value());", $EndFeature, " ```"), #[stable(feature = "rust1", since = "1.0.0")] + #[must_use = "this returns the result of the operation, \ + without modifying the original"] #[inline] pub const fn wrapping_sub(self, rhs: Self) -> Self { intrinsics::overflowing_sub(self, rhs) @@ -1042,6 +1078,8 @@ assert_eq!(11i8.wrapping_mul(12), -124);", $EndFeature, " ```"), #[stable(feature = "rust1", since = "1.0.0")] + #[must_use = "this returns the result of the operation, \ + without modifying the original"] #[inline] pub const fn wrapping_mul(self, rhs: Self) -> Self { intrinsics::overflowing_mul(self, rhs) @@ -1070,6 +1108,8 @@ assert_eq!((-128i8).wrapping_div(-1), -128);", $EndFeature, " ```"), #[stable(feature = "num_wrapping", since = "1.2.0")] + #[must_use = "this returns the result of the operation, \ + without modifying the original"] #[inline] pub fn wrapping_div(self, rhs: Self) -> Self { self.overflowing_div(rhs).0 @@ -1098,6 +1138,8 @@ assert_eq!(100", stringify!($SelfT), ".wrapping_div_euclid(10), 10); assert_eq!((-128i8).wrapping_div_euclid(-1), -128); ```"), #[unstable(feature = "euclidean_division", issue = "49048")] + #[must_use = "this returns the result of the operation, \ + without modifying the original"] #[inline] pub fn wrapping_div_euclid(self, rhs: Self) -> Self { self.overflowing_div_euclid(rhs).0 @@ -1126,6 +1168,8 @@ assert_eq!((-128i8).wrapping_rem(-1), 0);", $EndFeature, " ```"), #[stable(feature = "num_wrapping", since = "1.2.0")] + #[must_use = "this returns the result of the operation, \ + without modifying the original"] #[inline] pub fn wrapping_rem(self, rhs: Self) -> Self { self.overflowing_rem(rhs).0 @@ -1153,6 +1197,8 @@ assert_eq!(100", stringify!($SelfT), ".wrapping_rem_euclid(10), 0); assert_eq!((-128i8).wrapping_rem_euclid(-1), 0); ```"), #[unstable(feature = "euclidean_division", issue = "49048")] + #[must_use = "this returns the result of the operation, \ + without modifying the original"] #[inline] pub fn wrapping_rem_euclid(self, rhs: Self) -> Self { self.overflowing_rem_euclid(rhs).0 @@ -1203,6 +1249,8 @@ assert_eq!((-1", stringify!($SelfT), ").wrapping_shl(128), -1);", $EndFeature, " ```"), #[stable(feature = "num_wrapping", since = "1.2.0")] + #[must_use = "this returns the result of the operation, \ + without modifying the original"] #[inline] pub const fn wrapping_shl(self, rhs: u32) -> Self { unsafe { @@ -1230,6 +1278,8 @@ assert_eq!((-128i16).wrapping_shr(64), -128);", $EndFeature, " ```"), #[stable(feature = "num_wrapping", since = "1.2.0")] + #[must_use = "this returns the result of the operation, \ + without modifying the original"] #[inline] pub const fn wrapping_shr(self, rhs: u32) -> Self { unsafe { @@ -1284,6 +1334,8 @@ assert_eq!(3i8.wrapping_pow(6), -39);", $EndFeature, " ```"), #[stable(feature = "no_panic_pow", since = "1.34.0")] + #[must_use = "this returns the result of the operation, \ + without modifying the original"] #[inline] pub fn wrapping_pow(self, mut exp: u32) -> Self { let mut base = self; @@ -1326,6 +1378,8 @@ assert_eq!(", stringify!($SelfT), "::MAX.overflowing_add(1), (", stringify!($Sel "::MIN, true));", $EndFeature, " ```"), #[stable(feature = "wrapping", since = "1.7.0")] + #[must_use = "this returns the result of the operation, \ + without modifying the original"] #[inline] pub const fn overflowing_add(self, rhs: Self) -> (Self, bool) { let (a, b) = intrinsics::add_with_overflow(self as $ActualT, rhs as $ActualT); @@ -1351,6 +1405,8 @@ assert_eq!(", stringify!($SelfT), "::MIN.overflowing_sub(1), (", stringify!($Sel "::MAX, true));", $EndFeature, " ```"), #[stable(feature = "wrapping", since = "1.7.0")] + #[must_use = "this returns the result of the operation, \ + without modifying the original"] #[inline] pub const fn overflowing_sub(self, rhs: Self) -> (Self, bool) { let (a, b) = intrinsics::sub_with_overflow(self as $ActualT, rhs as $ActualT); @@ -1374,6 +1430,8 @@ assert_eq!(1_000_000_000i32.overflowing_mul(10), (1410065408, true));", $EndFeature, " ```"), #[stable(feature = "wrapping", since = "1.7.0")] + #[must_use = "this returns the result of the operation, \ + without modifying the original"] #[inline] pub const fn overflowing_mul(self, rhs: Self) -> (Self, bool) { let (a, b) = intrinsics::mul_with_overflow(self as $ActualT, rhs as $ActualT); @@ -1405,6 +1463,8 @@ $EndFeature, " ```"), #[inline] #[stable(feature = "wrapping", since = "1.7.0")] + #[must_use = "this returns the result of the operation, \ + without modifying the original"] pub fn overflowing_div(self, rhs: Self) -> (Self, bool) { if self == Self::min_value() && rhs == -1 { (self, true) @@ -1438,6 +1498,8 @@ assert_eq!(", stringify!($SelfT), "::MIN.overflowing_div_euclid(-1), (", stringi ```"), #[inline] #[unstable(feature = "euclidean_division", issue = "49048")] + #[must_use = "this returns the result of the operation, \ + without modifying the original"] pub fn overflowing_div_euclid(self, rhs: Self) -> (Self, bool) { if self == Self::min_value() && rhs == -1 { (self, true) @@ -1470,6 +1532,8 @@ $EndFeature, " ```"), #[inline] #[stable(feature = "wrapping", since = "1.7.0")] + #[must_use = "this returns the result of the operation, \ + without modifying the original"] pub fn overflowing_rem(self, rhs: Self) -> (Self, bool) { if self == Self::min_value() && rhs == -1 { (0, true) @@ -1502,6 +1566,8 @@ assert_eq!(5", stringify!($SelfT), ".overflowing_rem_euclid(2), (1, false)); assert_eq!(", stringify!($SelfT), "::MIN.overflowing_rem_euclid(-1), (0, true)); ```"), #[unstable(feature = "euclidean_division", issue = "49048")] + #[must_use = "this returns the result of the operation, \ + without modifying the original"] #[inline] pub fn overflowing_rem_euclid(self, rhs: Self) -> (Self, bool) { if self == Self::min_value() && rhs == -1 { @@ -1555,6 +1621,8 @@ assert_eq!(0x1i32.overflowing_shl(36), (0x10, true));", $EndFeature, " ```"), #[stable(feature = "wrapping", since = "1.7.0")] + #[must_use = "this returns the result of the operation, \ + without modifying the original"] #[inline] pub const fn overflowing_shl(self, rhs: u32) -> (Self, bool) { (self.wrapping_shl(rhs), (rhs > ($BITS - 1))) @@ -1578,6 +1646,8 @@ assert_eq!(0x10i32.overflowing_shr(36), (0x1, true));", $EndFeature, " ```"), #[stable(feature = "wrapping", since = "1.7.0")] + #[must_use = "this returns the result of the operation, \ + without modifying the original"] #[inline] pub const fn overflowing_shr(self, rhs: u32) -> (Self, bool) { (self.wrapping_shr(rhs), (rhs > ($BITS - 1))) @@ -1630,6 +1700,8 @@ assert_eq!(3i8.overflowing_pow(5), (-13, true));", $EndFeature, " ```"), #[stable(feature = "no_panic_pow", since = "1.34.0")] + #[must_use = "this returns the result of the operation, \ + without modifying the original"] #[inline] pub fn overflowing_pow(self, mut exp: u32) -> (Self, bool) { let mut base = self; @@ -1677,6 +1749,8 @@ assert_eq!(x.pow(5), 32);", $EndFeature, " ```"), #[stable(feature = "rust1", since = "1.0.0")] + #[must_use = "this returns the result of the operation, \ + without modifying the original"] #[inline] #[rustc_inherit_overflow_checks] pub fn pow(self, mut exp: u32) -> Self { @@ -1732,6 +1806,8 @@ assert_eq!((-a).div_euclid(b), -2); // -7 >= 4 * -2 assert_eq!((-a).div_euclid(-b), 2); // -7 >= -4 * 2 ```"), #[unstable(feature = "euclidean_division", issue = "49048")] + #[must_use = "this returns the result of the operation, \ + without modifying the original"] #[inline] #[rustc_inherit_overflow_checks] pub fn div_euclid(self, rhs: Self) -> Self { @@ -1770,6 +1846,8 @@ assert_eq!(a.rem_euclid(-b), 3); assert_eq!((-a).rem_euclid(-b), 1); ```"), #[unstable(feature = "euclidean_division", issue = "49048")] + #[must_use = "this returns the result of the operation, \ + without modifying the original"] #[inline] #[rustc_inherit_overflow_checks] pub fn rem_euclid(self, rhs: Self) -> Self { @@ -2277,6 +2355,8 @@ let m = ", $rot_result, "; assert_eq!(n.rotate_left(", $rot, "), m); ```"), #[stable(feature = "rust1", since = "1.0.0")] + #[must_use = "this returns the result of the operation, \ + without modifying the original"] #[inline] pub const fn rotate_left(self, n: u32) -> Self { intrinsics::rotate_left(self, n as $SelfT) @@ -2301,6 +2381,8 @@ let m = ", $rot_op, "; assert_eq!(n.rotate_right(", $rot, "), m); ```"), #[stable(feature = "rust1", since = "1.0.0")] + #[must_use = "this returns the result of the operation, \ + without modifying the original"] #[inline] pub const fn rotate_right(self, n: u32) -> Self { intrinsics::rotate_right(self, n as $SelfT) @@ -2496,6 +2578,8 @@ Basic usage: assert_eq!((", stringify!($SelfT), "::max_value() - 2).checked_add(3), None);", $EndFeature, " ```"), #[stable(feature = "rust1", since = "1.0.0")] + #[must_use = "this returns the result of the operation, \ + without modifying the original"] #[inline] pub fn checked_add(self, rhs: Self) -> Option { let (a, b) = self.overflowing_add(rhs); @@ -2516,6 +2600,8 @@ Basic usage: assert_eq!(0", stringify!($SelfT), ".checked_sub(1), None);", $EndFeature, " ```"), #[stable(feature = "rust1", since = "1.0.0")] + #[must_use = "this returns the result of the operation, \ + without modifying the original"] #[inline] pub fn checked_sub(self, rhs: Self) -> Option { let (a, b) = self.overflowing_sub(rhs); @@ -2536,6 +2622,8 @@ Basic usage: assert_eq!(", stringify!($SelfT), "::max_value().checked_mul(2), None);", $EndFeature, " ```"), #[stable(feature = "rust1", since = "1.0.0")] + #[must_use = "this returns the result of the operation, \ + without modifying the original"] #[inline] pub fn checked_mul(self, rhs: Self) -> Option { let (a, b) = self.overflowing_mul(rhs); @@ -2556,6 +2644,8 @@ Basic usage: assert_eq!(1", stringify!($SelfT), ".checked_div(0), None);", $EndFeature, " ```"), #[stable(feature = "rust1", since = "1.0.0")] + #[must_use = "this returns the result of the operation, \ + without modifying the original"] #[inline] pub fn checked_div(self, rhs: Self) -> Option { match rhs { @@ -2579,6 +2669,8 @@ assert_eq!(128", stringify!($SelfT), ".checked_div_euclid(2), Some(64)); assert_eq!(1", stringify!($SelfT), ".checked_div_euclid(0), None); ```"), #[unstable(feature = "euclidean_division", issue = "49048")] + #[must_use = "this returns the result of the operation, \ + without modifying the original"] #[inline] pub fn checked_div_euclid(self, rhs: Self) -> Option { if rhs == 0 { @@ -2603,6 +2695,8 @@ Basic usage: assert_eq!(5", stringify!($SelfT), ".checked_rem(0), None);", $EndFeature, " ```"), #[stable(feature = "wrapping", since = "1.7.0")] + #[must_use = "this returns the result of the operation, \ + without modifying the original"] #[inline] pub fn checked_rem(self, rhs: Self) -> Option { if rhs == 0 { @@ -2627,6 +2721,8 @@ assert_eq!(5", stringify!($SelfT), ".checked_rem_euclid(2), Some(1)); assert_eq!(5", stringify!($SelfT), ".checked_rem_euclid(0), None); ```"), #[unstable(feature = "euclidean_division", issue = "49048")] + #[must_use = "this returns the result of the operation, \ + without modifying the original"] #[inline] pub fn checked_rem_euclid(self, rhs: Self) -> Option { if rhs == 0 { @@ -2672,6 +2768,8 @@ Basic usage: assert_eq!(0x10", stringify!($SelfT), ".checked_shl(129), None);", $EndFeature, " ```"), #[stable(feature = "wrapping", since = "1.7.0")] + #[must_use = "this returns the result of the operation, \ + without modifying the original"] #[inline] pub fn checked_shl(self, rhs: u32) -> Option { let (a, b) = self.overflowing_shl(rhs); @@ -2692,6 +2790,8 @@ Basic usage: assert_eq!(0x10", stringify!($SelfT), ".checked_shr(129), None);", $EndFeature, " ```"), #[stable(feature = "wrapping", since = "1.7.0")] + #[must_use = "this returns the result of the operation, \ + without modifying the original"] #[inline] pub fn checked_shr(self, rhs: u32) -> Option { let (a, b) = self.overflowing_shr(rhs); @@ -2712,6 +2812,8 @@ Basic usage: assert_eq!(", stringify!($SelfT), "::max_value().checked_pow(2), None);", $EndFeature, " ```"), #[stable(feature = "no_panic_pow", since = "1.34.0")] + #[must_use = "this returns the result of the operation, \ + without modifying the original"] #[inline] pub fn checked_pow(self, mut exp: u32) -> Option { let mut base = self; @@ -2750,6 +2852,8 @@ assert_eq!(200u8.saturating_add(127), 255);", $EndFeature, " ```"), #[stable(feature = "rust1", since = "1.0.0")] + #[must_use = "this returns the result of the operation, \ + without modifying the original"] #[rustc_const_unstable(feature = "const_saturating_int_methods")] #[inline] pub const fn saturating_add(self, rhs: Self) -> Self { @@ -2770,6 +2874,8 @@ Basic usage: assert_eq!(13", stringify!($SelfT), ".saturating_sub(127), 0);", $EndFeature, " ```"), #[stable(feature = "rust1", since = "1.0.0")] + #[must_use = "this returns the result of the operation, \ + without modifying the original"] #[rustc_const_unstable(feature = "const_saturating_int_methods")] #[inline] pub const fn saturating_sub(self, rhs: Self) -> Self { @@ -2793,6 +2899,8 @@ assert_eq!((", stringify!($SelfT), "::MAX).saturating_mul(10), ", stringify!($Se "::MAX);", $EndFeature, " ```"), #[stable(feature = "wrapping", since = "1.7.0")] + #[must_use = "this returns the result of the operation, \ + without modifying the original"] #[inline] pub fn saturating_mul(self, rhs: Self) -> Self { self.checked_mul(rhs).unwrap_or(Self::max_value()) @@ -2815,6 +2923,8 @@ assert_eq!(", stringify!($SelfT), "::MAX.saturating_pow(2), ", stringify!($SelfT $EndFeature, " ```"), #[stable(feature = "no_panic_pow", since = "1.34.0")] + #[must_use = "this returns the result of the operation, \ + without modifying the original"] #[inline] pub fn saturating_pow(self, exp: u32) -> Self { match self.checked_pow(exp) { @@ -2838,6 +2948,8 @@ assert_eq!(200", stringify!($SelfT), ".wrapping_add(", stringify!($SelfT), "::ma $EndFeature, " ```"), #[stable(feature = "rust1", since = "1.0.0")] + #[must_use = "this returns the result of the operation, \ + without modifying the original"] #[inline] pub const fn wrapping_add(self, rhs: Self) -> Self { intrinsics::overflowing_add(self, rhs) @@ -2858,6 +2970,8 @@ assert_eq!(100", stringify!($SelfT), ".wrapping_sub(", stringify!($SelfT), "::ma $EndFeature, " ```"), #[stable(feature = "rust1", since = "1.0.0")] + #[must_use = "this returns the result of the operation, \ + without modifying the original"] #[inline] pub const fn wrapping_sub(self, rhs: Self) -> Self { intrinsics::overflowing_sub(self, rhs) @@ -2879,6 +2993,8 @@ $EndFeature, " /// assert_eq!(25u8.wrapping_mul(12), 44); /// ``` #[stable(feature = "rust1", since = "1.0.0")] + #[must_use = "this returns the result of the operation, \ + without modifying the original"] #[inline] pub const fn wrapping_mul(self, rhs: Self) -> Self { intrinsics::overflowing_mul(self, rhs) @@ -2899,6 +3015,8 @@ Basic usage: ", $Feature, "assert_eq!(100", stringify!($SelfT), ".wrapping_div(10), 10);", $EndFeature, " ```"), #[stable(feature = "num_wrapping", since = "1.2.0")] + #[must_use = "this returns the result of the operation, \ + without modifying the original"] #[inline] pub fn wrapping_div(self, rhs: Self) -> Self { self / rhs @@ -2924,6 +3042,8 @@ Basic usage: assert_eq!(100", stringify!($SelfT), ".wrapping_div_euclid(10), 10); ```"), #[unstable(feature = "euclidean_division", issue = "49048")] + #[must_use = "this returns the result of the operation, \ + without modifying the original"] #[inline] pub fn wrapping_div_euclid(self, rhs: Self) -> Self { self / rhs @@ -2946,6 +3066,8 @@ Basic usage: ", $Feature, "assert_eq!(100", stringify!($SelfT), ".wrapping_rem(10), 0);", $EndFeature, " ```"), #[stable(feature = "num_wrapping", since = "1.2.0")] + #[must_use = "this returns the result of the operation, \ + without modifying the original"] #[inline] pub fn wrapping_rem(self, rhs: Self) -> Self { self % rhs @@ -2972,6 +3094,8 @@ Basic usage: assert_eq!(100", stringify!($SelfT), ".wrapping_rem_euclid(10), 0); ```"), #[unstable(feature = "euclidean_division", issue = "49048")] + #[must_use = "this returns the result of the operation, \ + without modifying the original"] #[inline] pub fn wrapping_rem_euclid(self, rhs: Self) -> Self { self % rhs @@ -3026,6 +3150,8 @@ Basic usage: assert_eq!(1", stringify!($SelfT), ".wrapping_shl(128), 1);", $EndFeature, " ```"), #[stable(feature = "num_wrapping", since = "1.2.0")] + #[must_use = "this returns the result of the operation, \ + without modifying the original"] #[inline] pub const fn wrapping_shl(self, rhs: u32) -> Self { unsafe { @@ -3055,6 +3181,8 @@ Basic usage: assert_eq!(128", stringify!($SelfT), ".wrapping_shr(128), 128);", $EndFeature, " ```"), #[stable(feature = "num_wrapping", since = "1.2.0")] + #[must_use = "this returns the result of the operation, \ + without modifying the original"] #[inline] pub const fn wrapping_shr(self, rhs: u32) -> Self { unsafe { @@ -3076,6 +3204,8 @@ Basic usage: assert_eq!(3u8.wrapping_pow(6), 217);", $EndFeature, " ```"), #[stable(feature = "no_panic_pow", since = "1.34.0")] + #[must_use = "this returns the result of the operation, \ + without modifying the original"] #[inline] pub fn wrapping_pow(self, mut exp: u32) -> Self { let mut base = self; @@ -3118,6 +3248,8 @@ assert_eq!(5", stringify!($SelfT), ".overflowing_add(2), (7, false)); assert_eq!(", stringify!($SelfT), "::MAX.overflowing_add(1), (0, true));", $EndFeature, " ```"), #[stable(feature = "wrapping", since = "1.7.0")] + #[must_use = "this returns the result of the operation, \ + without modifying the original"] #[inline] pub const fn overflowing_add(self, rhs: Self) -> (Self, bool) { let (a, b) = intrinsics::add_with_overflow(self as $ActualT, rhs as $ActualT); @@ -3144,6 +3276,8 @@ assert_eq!(0", stringify!($SelfT), ".overflowing_sub(1), (", stringify!($SelfT), $EndFeature, " ```"), #[stable(feature = "wrapping", since = "1.7.0")] + #[must_use = "this returns the result of the operation, \ + without modifying the original"] #[inline] pub const fn overflowing_sub(self, rhs: Self) -> (Self, bool) { let (a, b) = intrinsics::sub_with_overflow(self as $ActualT, rhs as $ActualT); @@ -3169,6 +3303,8 @@ $EndFeature, " /// assert_eq!(1_000_000_000u32.overflowing_mul(10), (1410065408, true)); /// ``` #[stable(feature = "wrapping", since = "1.7.0")] + #[must_use = "this returns the result of the operation, \ + without modifying the original"] #[inline] pub const fn overflowing_mul(self, rhs: Self) -> (Self, bool) { let (a, b) = intrinsics::mul_with_overflow(self as $ActualT, rhs as $ActualT); @@ -3196,6 +3332,8 @@ Basic usage ```"), #[inline] #[stable(feature = "wrapping", since = "1.7.0")] + #[must_use = "this returns the result of the operation, \ + without modifying the original"] pub fn overflowing_div(self, rhs: Self) -> (Self, bool) { (self / rhs, false) } @@ -3226,6 +3364,8 @@ assert_eq!(5", stringify!($SelfT), ".overflowing_div_euclid(2), (2, false)); ```"), #[inline] #[unstable(feature = "euclidean_division", issue = "49048")] + #[must_use = "this returns the result of the operation, \ + without modifying the original"] pub fn overflowing_div_euclid(self, rhs: Self) -> (Self, bool) { (self / rhs, false) } @@ -3252,6 +3392,8 @@ Basic usage ```"), #[inline] #[stable(feature = "wrapping", since = "1.7.0")] + #[must_use = "this returns the result of the operation, \ + without modifying the original"] pub fn overflowing_rem(self, rhs: Self) -> (Self, bool) { (self % rhs, false) } @@ -3282,6 +3424,8 @@ assert_eq!(5", stringify!($SelfT), ".overflowing_rem_euclid(2), (1, false)); ```"), #[inline] #[unstable(feature = "euclidean_division", issue = "49048")] + #[must_use = "this returns the result of the operation, \ + without modifying the original"] pub fn overflowing_rem_euclid(self, rhs: Self) -> (Self, bool) { (self % rhs, false) } @@ -3329,6 +3473,8 @@ Basic usage assert_eq!(0x1", stringify!($SelfT), ".overflowing_shl(132), (0x10, true));", $EndFeature, " ```"), #[stable(feature = "wrapping", since = "1.7.0")] + #[must_use = "this returns the result of the operation, \ + without modifying the original"] #[inline] pub const fn overflowing_shl(self, rhs: u32) -> (Self, bool) { (self.wrapping_shl(rhs), (rhs > ($BITS - 1))) @@ -3353,6 +3499,8 @@ Basic usage assert_eq!(0x10", stringify!($SelfT), ".overflowing_shr(132), (0x1, true));", $EndFeature, " ```"), #[stable(feature = "wrapping", since = "1.7.0")] + #[must_use = "this returns the result of the operation, \ + without modifying the original"] #[inline] pub const fn overflowing_shr(self, rhs: u32) -> (Self, bool) { (self.wrapping_shr(rhs), (rhs > ($BITS - 1))) @@ -3374,6 +3522,8 @@ Basic usage: assert_eq!(3u8.overflowing_pow(6), (217, true));", $EndFeature, " ```"), #[stable(feature = "no_panic_pow", since = "1.34.0")] + #[must_use = "this returns the result of the operation, \ + without modifying the original"] #[inline] pub fn overflowing_pow(self, mut exp: u32) -> (Self, bool) { let mut base = self; @@ -3418,6 +3568,8 @@ Basic usage: ", $Feature, "assert_eq!(2", stringify!($SelfT), ".pow(5), 32);", $EndFeature, " ```"), #[stable(feature = "rust1", since = "1.0.0")] + #[must_use = "this returns the result of the operation, \ + without modifying the original"] #[inline] #[rustc_inherit_overflow_checks] pub fn pow(self, mut exp: u32) -> Self { @@ -3459,6 +3611,8 @@ Basic usage: assert_eq!(7", stringify!($SelfT), ".div_euclid(4), 1); // or any other integer type ```"), #[unstable(feature = "euclidean_division", issue = "49048")] + #[must_use = "this returns the result of the operation, \ + without modifying the original"] #[inline] #[rustc_inherit_overflow_checks] pub fn div_euclid(self, rhs: Self) -> Self { @@ -3483,6 +3637,8 @@ Basic usage: assert_eq!(7", stringify!($SelfT), ".rem_euclid(4), 3); // or any other integer type ```"), #[unstable(feature = "euclidean_division", issue = "49048")] + #[must_use = "this returns the result of the operation, \ + without modifying the original"] #[inline] #[rustc_inherit_overflow_checks] pub fn rem_euclid(self, rhs: Self) -> Self { diff --git a/src/libcore/ops/unsize.rs b/src/libcore/ops/unsize.rs index 09231ee06ce89..7f81481ab5b1d 100644 --- a/src/libcore/ops/unsize.rs +++ b/src/libcore/ops/unsize.rs @@ -100,4 +100,3 @@ impl, U: ?Sized> DispatchFromDyn<*const U> for *const T {} // *mut T -> *mut U #[unstable(feature = "dispatch_from_dyn", issue = "0")] impl, U: ?Sized> DispatchFromDyn<*mut U> for *mut T {} - diff --git a/src/libcore/tests/num/bignum.rs b/src/libcore/tests/num/bignum.rs index b873f1dd0652f..b9e15ec5c0763 100644 --- a/src/libcore/tests/num/bignum.rs +++ b/src/libcore/tests/num/bignum.rs @@ -236,4 +236,3 @@ fn test_fmt() { assert_eq!(format!("{:?}", Big::from_u64(0x12345)), "0x1_23_45"); assert_eq!(format!("{:?}", Big::from_u64(0x123456)), "0x12_34_56"); } - diff --git a/src/libcore/tests/num/flt2dec/estimator.rs b/src/libcore/tests/num/flt2dec/estimator.rs index fb0888e2720a9..2dbb8e3a5f06e 100644 --- a/src/libcore/tests/num/flt2dec/estimator.rs +++ b/src/libcore/tests/num/flt2dec/estimator.rs @@ -47,4 +47,3 @@ fn test_estimate_scaling_factor() { assert_almost_eq!(estimate_scaling_factor(1, i as i16), expected as i16); } } - diff --git a/src/libcore/tests/num/flt2dec/mod.rs b/src/libcore/tests/num/flt2dec/mod.rs index d362c7994d806..f42f500c2df1d 100644 --- a/src/libcore/tests/num/flt2dec/mod.rs +++ b/src/libcore/tests/num/flt2dec/mod.rs @@ -1107,4 +1107,3 @@ pub fn to_exact_fixed_str_test(mut f_: F) format!("0.0000000000000000000099999999999999994515327145420957165172950370\ 2787392447107715776066783064379706047475337982177734375{:0>79881}", "")); } - diff --git a/src/libcore/tests/num/flt2dec/random.rs b/src/libcore/tests/num/flt2dec/random.rs index 1c36af6af0ee4..35e3fbcbb7870 100644 --- a/src/libcore/tests/num/flt2dec/random.rs +++ b/src/libcore/tests/num/flt2dec/random.rs @@ -152,4 +152,3 @@ fn exact_f64_random_equivalence_test() { |d, buf| fallback(d, buf, i16::MIN), k, 1_000); } } - diff --git a/src/libcore/tests/num/flt2dec/strategy/dragon.rs b/src/libcore/tests/num/flt2dec/strategy/dragon.rs index 1803e39b46df3..5e4cc23d33c8c 100644 --- a/src/libcore/tests/num/flt2dec/strategy/dragon.rs +++ b/src/libcore/tests/num/flt2dec/strategy/dragon.rs @@ -62,4 +62,3 @@ fn test_to_exact_exp_str() { fn test_to_exact_fixed_str() { to_exact_fixed_str_test(format_exact); } - diff --git a/src/libcore/tests/num/flt2dec/strategy/grisu.rs b/src/libcore/tests/num/flt2dec/strategy/grisu.rs index 53e9f12ae0f14..f1afd7d4bf86f 100644 --- a/src/libcore/tests/num/flt2dec/strategy/grisu.rs +++ b/src/libcore/tests/num/flt2dec/strategy/grisu.rs @@ -64,4 +64,3 @@ fn test_to_exact_exp_str() { fn test_to_exact_fixed_str() { to_exact_fixed_str_test(format_exact); } - diff --git a/src/librustc/ich/hcx.rs b/src/librustc/ich/hcx.rs index a8e5db26eadc1..6da2cb9ab57ea 100644 --- a/src/librustc/ich/hcx.rs +++ b/src/librustc/ich/hcx.rs @@ -435,4 +435,3 @@ pub fn hash_stable_trait_impls<'a, 'gcx, W>( } } } - diff --git a/src/librustc/ich/impls_hir.rs b/src/librustc/ich/impls_hir.rs index 9491a073b8f8c..65795d2b136b4 100644 --- a/src/librustc/ich/impls_hir.rs +++ b/src/librustc/ich/impls_hir.rs @@ -435,4 +435,3 @@ impl<'hir> HashStable> for attr::OptimizeAttr { mem::discriminant(self).hash_stable(hcx, hasher); } } - diff --git a/src/librustc/infer/error_reporting/nice_region_error/outlives_closure.rs b/src/librustc/infer/error_reporting/nice_region_error/outlives_closure.rs index 6432780de0670..af201886a00d5 100644 --- a/src/librustc/infer/error_reporting/nice_region_error/outlives_closure.rs +++ b/src/librustc/infer/error_reporting/nice_region_error/outlives_closure.rs @@ -109,4 +109,3 @@ impl<'a, 'gcx, 'tcx> NiceRegionError<'a, 'gcx, 'tcx> { None } } - diff --git a/src/librustc/infer/mod.rs b/src/librustc/infer/mod.rs index 747f0a6ae8723..f332503435131 100644 --- a/src/librustc/infer/mod.rs +++ b/src/librustc/infer/mod.rs @@ -111,31 +111,31 @@ pub struct InferCtxt<'a, 'gcx: 'a + 'tcx, 'tcx: 'a> { /// and for error reporting logic to read arbitrary node types. pub in_progress_tables: Option<&'a RefCell>>, - // Cache for projections. This cache is snapshotted along with the - // infcx. - // - // Public so that `traits::project` can use it. + /// Cache for projections. This cache is snapshotted along with the + /// infcx. + /// + /// Public so that `traits::project` can use it. pub projection_cache: RefCell>, - // We instantiate UnificationTable with bounds because the - // types that might instantiate a general type variable have an - // order, represented by its upper and lower bounds. + /// We instantiate `UnificationTable` with `bounds` because the + /// types that might instantiate a general type variable have an + /// order, represented by its upper and lower bounds. pub type_variables: RefCell>, - // Map from integral variable to the kind of integer it represents + /// Map from integral variable to the kind of integer it represents int_unification_table: RefCell>>, - // Map from floating variable to the kind of float it represents + /// Map from floating variable to the kind of float it represents float_unification_table: RefCell>>, - // Tracks the set of region variables and the constraints between - // them. This is initially `Some(_)` but when - // `resolve_regions_and_report_errors` is invoked, this gets set - // to `None` -- further attempts to perform unification etc may - // fail if new region constraints would've been added. + /// Tracks the set of region variables and the constraints between + /// them. This is initially `Some(_)` but when + /// `resolve_regions_and_report_errors` is invoked, this gets set + /// to `None` -- further attempts to perform unification etc may + /// fail if new region constraints would've been added. region_constraints: RefCell>>, - // Once region inference is done, the values for each variable. + /// Once region inference is done, the values for each variable. lexical_region_resolutions: RefCell>>, /// Caches the results of trait selection. This cache is used @@ -145,65 +145,65 @@ pub struct InferCtxt<'a, 'gcx: 'a + 'tcx, 'tcx: 'a> { /// Caches the results of trait evaluation. pub evaluation_cache: traits::EvaluationCache<'tcx>, - // the set of predicates on which errors have been reported, to - // avoid reporting the same error twice. + /// the set of predicates on which errors have been reported, to + /// avoid reporting the same error twice. pub reported_trait_errors: RefCell>>>, - // When an error occurs, we want to avoid reporting "derived" - // errors that are due to this original failure. Normally, we - // handle this with the `err_count_on_creation` count, which - // basically just tracks how many errors were reported when we - // started type-checking a fn and checks to see if any new errors - // have been reported since then. Not great, but it works. - // - // However, when errors originated in other passes -- notably - // resolve -- this heuristic breaks down. Therefore, we have this - // auxiliary flag that one can set whenever one creates a - // type-error that is due to an error in a prior pass. - // - // Don't read this flag directly, call `is_tainted_by_errors()` - // and `set_tainted_by_errors()`. + /// When an error occurs, we want to avoid reporting "derived" + /// errors that are due to this original failure. Normally, we + /// handle this with the `err_count_on_creation` count, which + /// basically just tracks how many errors were reported when we + /// started type-checking a fn and checks to see if any new errors + /// have been reported since then. Not great, but it works. + /// + /// However, when errors originated in other passes -- notably + /// resolve -- this heuristic breaks down. Therefore, we have this + /// auxiliary flag that one can set whenever one creates a + /// type-error that is due to an error in a prior pass. + /// + /// Don't read this flag directly, call `is_tainted_by_errors()` + /// and `set_tainted_by_errors()`. tainted_by_errors_flag: Cell, - // Track how many errors were reported when this infcx is created. - // If the number of errors increases, that's also a sign (line - // `tained_by_errors`) to avoid reporting certain kinds of errors. + /// Track how many errors were reported when this infcx is created. + /// If the number of errors increases, that's also a sign (line + /// `tained_by_errors`) to avoid reporting certain kinds of errors. err_count_on_creation: usize, - // This flag is true while there is an active snapshot. + /// This flag is true while there is an active snapshot. in_snapshot: Cell, - // A set of constraints that regionck must validate. Each - // constraint has the form `T:'a`, meaning "some type `T` must - // outlive the lifetime 'a". These constraints derive from - // instantiated type parameters. So if you had a struct defined - // like - // - // struct Foo { ... } - // - // then in some expression `let x = Foo { ... }` it will - // instantiate the type parameter `T` with a fresh type `$0`. At - // the same time, it will record a region obligation of - // `$0:'static`. This will get checked later by regionck. (We - // can't generally check these things right away because we have - // to wait until types are resolved.) - // - // These are stored in a map keyed to the id of the innermost - // enclosing fn body / static initializer expression. This is - // because the location where the obligation was incurred can be - // relevant with respect to which sublifetime assumptions are in - // place. The reason that we store under the fn-id, and not - // something more fine-grained, is so that it is easier for - // regionck to be sure that it has found *all* the region - // obligations (otherwise, it's easy to fail to walk to a - // particular node-id). - // - // Before running `resolve_regions_and_report_errors`, the creator - // of the inference context is expected to invoke - // `process_region_obligations` (defined in `self::region_obligations`) - // for each body-id in this map, which will process the - // obligations within. This is expected to be done 'late enough' - // that all type inference variables have been bound and so forth. + /// A set of constraints that regionck must validate. Each + /// constraint has the form `T:'a`, meaning "some type `T` must + /// outlive the lifetime 'a". These constraints derive from + /// instantiated type parameters. So if you had a struct defined + /// like + /// + /// struct Foo { ... } + /// + /// then in some expression `let x = Foo { ... }` it will + /// instantiate the type parameter `T` with a fresh type `$0`. At + /// the same time, it will record a region obligation of + /// `$0:'static`. This will get checked later by regionck. (We + /// can't generally check these things right away because we have + /// to wait until types are resolved.) + /// + /// These are stored in a map keyed to the id of the innermost + /// enclosing fn body / static initializer expression. This is + /// because the location where the obligation was incurred can be + /// relevant with respect to which sublifetime assumptions are in + /// place. The reason that we store under the fn-id, and not + /// something more fine-grained, is so that it is easier for + /// regionck to be sure that it has found *all* the region + /// obligations (otherwise, it's easy to fail to walk to a + /// particular node-id). + /// + /// Before running `resolve_regions_and_report_errors`, the creator + /// of the inference context is expected to invoke + /// `process_region_obligations` (defined in `self::region_obligations`) + /// for each body-id in this map, which will process the + /// obligations within. This is expected to be done 'late enough' + /// that all type inference variables have been bound and so forth. pub region_obligations: RefCell)>>, /// What is the innermost universe we have created? Starts out as @@ -247,85 +247,85 @@ pub struct TypeTrace<'tcx> { /// See `error_reporting` module for more details #[derive(Clone, Debug)] pub enum SubregionOrigin<'tcx> { - // Arose from a subtyping relation + /// Arose from a subtyping relation Subtype(TypeTrace<'tcx>), - // Stack-allocated closures cannot outlive innermost loop - // or function so as to ensure we only require finite stack + /// Stack-allocated closures cannot outlive innermost loop + /// or function so as to ensure we only require finite stack InfStackClosure(Span), - // Invocation of closure must be within its lifetime + /// Invocation of closure must be within its lifetime InvokeClosure(Span), - // Dereference of reference must be within its lifetime + /// Dereference of reference must be within its lifetime DerefPointer(Span), - // Closure bound must not outlive captured free variables + /// Closure bound must not outlive captured free variables FreeVariable(Span, ast::NodeId), - // Index into slice must be within its lifetime + /// Index into slice must be within its lifetime IndexSlice(Span), - // When casting `&'a T` to an `&'b Trait` object, - // relating `'a` to `'b` + /// When casting `&'a T` to an `&'b Trait` object, + /// relating `'a` to `'b` RelateObjectBound(Span), - // Some type parameter was instantiated with the given type, - // and that type must outlive some region. + /// Some type parameter was instantiated with the given type, + /// and that type must outlive some region. RelateParamBound(Span, Ty<'tcx>), - // The given region parameter was instantiated with a region - // that must outlive some other region. + /// The given region parameter was instantiated with a region + /// that must outlive some other region. RelateRegionParamBound(Span), - // A bound placed on type parameters that states that must outlive - // the moment of their instantiation. + /// A bound placed on type parameters that states that must outlive + /// the moment of their instantiation. RelateDefaultParamBound(Span, Ty<'tcx>), - // Creating a pointer `b` to contents of another reference + /// Creating a pointer `b` to contents of another reference Reborrow(Span), - // Creating a pointer `b` to contents of an upvar + /// Creating a pointer `b` to contents of an upvar ReborrowUpvar(Span, ty::UpvarId), - // Data with type `Ty<'tcx>` was borrowed + /// Data with type `Ty<'tcx>` was borrowed DataBorrowed(Ty<'tcx>, Span), - // (&'a &'b T) where a >= b + /// (&'a &'b T) where a >= b ReferenceOutlivesReferent(Ty<'tcx>, Span), - // Type or region parameters must be in scope. + /// Type or region parameters must be in scope. ParameterInScope(ParameterOrigin, Span), - // The type T of an expression E must outlive the lifetime for E. + /// The type T of an expression E must outlive the lifetime for E. ExprTypeIsNotInScope(Ty<'tcx>, Span), - // A `ref b` whose region does not enclose the decl site + /// A `ref b` whose region does not enclose the decl site BindingTypeIsNotValidAtDecl(Span), - // Regions appearing in a method receiver must outlive method call + /// Regions appearing in a method receiver must outlive method call CallRcvr(Span), - // Regions appearing in a function argument must outlive func call + /// Regions appearing in a function argument must outlive func call CallArg(Span), - // Region in return type of invoked fn must enclose call + /// Region in return type of invoked fn must enclose call CallReturn(Span), - // Operands must be in scope + /// Operands must be in scope Operand(Span), - // Region resulting from a `&` expr must enclose the `&` expr + /// Region resulting from a `&` expr must enclose the `&` expr AddrOf(Span), - // An auto-borrow that does not enclose the expr where it occurs + /// An auto-borrow that does not enclose the expr where it occurs AutoBorrow(Span), - // Region constraint arriving from destructor safety + /// Region constraint arriving from destructor safety SafeDestructor(Span), - // Comparing the signature and requirements of an impl method against - // the containing trait. + /// Comparing the signature and requirements of an impl method against + /// the containing trait. CompareImplMethodObligation { span: Span, item_name: ast::Name, @@ -361,35 +361,35 @@ pub enum LateBoundRegionConversionTime { /// See `error_reporting` module for more details #[derive(Copy, Clone, Debug)] pub enum RegionVariableOrigin { - // Region variables created for ill-categorized reasons, - // mostly indicates places in need of refactoring + /// Region variables created for ill-categorized reasons, + /// mostly indicates places in need of refactoring MiscVariable(Span), - // Regions created by a `&P` or `[...]` pattern + /// Regions created by a `&P` or `[...]` pattern PatternRegion(Span), - // Regions created by `&` operator + /// Regions created by `&` operator AddrOfRegion(Span), - // Regions created as part of an autoref of a method receiver + /// Regions created as part of an autoref of a method receiver Autoref(Span), - // Regions created as part of an automatic coercion + /// Regions created as part of an automatic coercion Coercion(Span), - // Region variables created as the values for early-bound regions + /// Region variables created as the values for early-bound regions EarlyBoundRegion(Span, InternedString), - // Region variables created for bound regions - // in a function or method that is called + /// Region variables created for bound regions + /// in a function or method that is called LateBoundRegion(Span, ty::BoundRegion, LateBoundRegionConversionTime), UpvarRegion(ty::UpvarId, Span), BoundRegionInCoherence(ast::Name), - // This origin is used for the inference variables that we create - // during NLL region processing. + /// This origin is used for the inference variables that we create + /// during NLL region processing. NLL(NLLRegionVariableOrigin), } @@ -686,22 +686,22 @@ impl<'a, 'gcx, 'tcx> InferCtxt<'a, 'gcx, 'tcx> { } } - // Clear the "currently in a snapshot" flag, invoke the closure, - // then restore the flag to its original value. This flag is a - // debugging measure designed to detect cases where we start a - // snapshot, create type variables, and register obligations - // which may involve those type variables in the fulfillment cx, - // potentially leaving "dangling type variables" behind. - // In such cases, an assertion will fail when attempting to - // register obligations, within a snapshot. Very useful, much - // better than grovelling through megabytes of RUST_LOG output. - // - // HOWEVER, in some cases the flag is unhelpful. In particular, we - // sometimes create a "mini-fulfilment-cx" in which we enroll - // obligations. As long as this fulfillment cx is fully drained - // before we return, this is not a problem, as there won't be any - // escaping obligations in the main cx. In those cases, you can - // use this function. + /// Clear the "currently in a snapshot" flag, invoke the closure, + /// then restore the flag to its original value. This flag is a + /// debugging measure designed to detect cases where we start a + /// snapshot, create type variables, and register obligations + /// which may involve those type variables in the fulfillment cx, + /// potentially leaving "dangling type variables" behind. + /// In such cases, an assertion will fail when attempting to + /// register obligations, within a snapshot. Very useful, much + /// better than grovelling through megabytes of `RUST_LOG` output. + /// + /// HOWEVER, in some cases the flag is unhelpful. In particular, we + /// sometimes create a "mini-fulfilment-cx" in which we enroll + /// obligations. As long as this fulfillment cx is fully drained + /// before we return, this is not a problem, as there won't be any + /// escaping obligations in the main cx. In those cases, you can + /// use this function. pub fn save_and_restore_in_snapshot_flag(&self, func: F) -> R where F: FnOnce(&Self) -> R, @@ -828,7 +828,7 @@ impl<'a, 'gcx, 'tcx> InferCtxt<'a, 'gcx, 'tcx> { r } - // Execute `f` in a snapshot, and commit the bindings it creates + /// Execute `f` in a snapshot, and commit the bindings it creates. pub fn in_snapshot(&self, f: F) -> T where F: FnOnce(&CombinedSnapshot<'a, 'tcx>) -> T, @@ -854,9 +854,9 @@ impl<'a, 'gcx, 'tcx> InferCtxt<'a, 'gcx, 'tcx> { /// Scan the constraints produced since `snapshot` began and returns: /// - /// - None -- if none of them involve "region outlives" constraints - /// - Some(true) -- if there are `'a: 'b` constraints where `'a` or `'b` is a placehodler - /// - Some(false) -- if there are `'a: 'b` constraints but none involve placeholders + /// - `None` -- if none of them involve "region outlives" constraints + /// - `Some(true)` -- if there are `'a: 'b` constraints where `'a` or `'b` is a placeholder + /// - `Some(false)` -- if there are `'a: 'b` constraints but none involve placeholders pub fn region_constraints_added_in_snapshot( &self, snapshot: &CombinedSnapshot<'a, 'tcx>, @@ -1292,19 +1292,16 @@ impl<'a, 'gcx, 'tcx> InferCtxt<'a, 'gcx, 'tcx> { self.type_variables.borrow_mut().root_var(var) } + /// Where possible, replaces type/int/float variables in + /// `value` with their final value. Note that region variables + /// are unaffected. If a type variable has not been unified, it + /// is left as is. This is an idempotent operation that does + /// not affect inference state in any way and so you can do it + /// at will. pub fn resolve_type_vars_if_possible(&self, value: &T) -> T where T: TypeFoldable<'tcx>, { - /*! - * Where possible, replaces type/int/float variables in - * `value` with their final value. Note that region variables - * are unaffected. If a type variable has not been unified, it - * is left as is. This is an idempotent operation that does - * not affect inference state in any way and so you can do it - * at will. - */ - if !value.needs_infer() { return value.clone(); // avoid duplicated subst-folding } diff --git a/src/librustc/infer/type_variable.rs b/src/librustc/infer/type_variable.rs index 8a719ff2bf31c..1393e4f67eb92 100644 --- a/src/librustc/infer/type_variable.rs +++ b/src/librustc/infer/type_variable.rs @@ -444,4 +444,3 @@ impl ut::UnifyKey for ty::TyVid { fn from_index(i: u32) -> ty::TyVid { ty::TyVid { index: i } } fn tag() -> &'static str { "TyVid" } } - diff --git a/src/librustc/macros.rs b/src/librustc/macros.rs index 8d9d1db5756b8..f8d7a5e29f6f6 100644 --- a/src/librustc/macros.rs +++ b/src/librustc/macros.rs @@ -509,4 +509,3 @@ macro_rules! EnumTypeFoldableImpl { ) }; } - diff --git a/src/librustc/middle/free_region.rs b/src/librustc/middle/free_region.rs index fc345df655150..dae33e34f305b 100644 --- a/src/librustc/middle/free_region.rs +++ b/src/librustc/middle/free_region.rs @@ -104,4 +104,3 @@ impl<'a, 'gcx, 'tcx> RegionRelations<'a, 'gcx, 'tcx> { self.free_regions.lub_free_regions(self.tcx, r_a, r_b) } } - diff --git a/src/librustc/session/search_paths.rs b/src/librustc/session/search_paths.rs index 1b6a1739b0248..3695f0a82f4b0 100644 --- a/src/librustc/session/search_paths.rs +++ b/src/librustc/session/search_paths.rs @@ -71,4 +71,3 @@ impl SearchPath { SearchPath { kind, dir, files } } } - diff --git a/src/librustc/ty/inhabitedness/def_id_forest.rs b/src/librustc/ty/inhabitedness/def_id_forest.rs index 3b393c3ca15bb..581fc41fda49d 100644 --- a/src/librustc/ty/inhabitedness/def_id_forest.rs +++ b/src/librustc/ty/inhabitedness/def_id_forest.rs @@ -118,4 +118,3 @@ impl<'a, 'gcx, 'tcx> DefIdForest { ret } } - diff --git a/src/librustc/ty/inhabitedness/mod.rs b/src/librustc/ty/inhabitedness/mod.rs index 963b4b439f84d..042f06e13a35a 100644 --- a/src/librustc/ty/inhabitedness/mod.rs +++ b/src/librustc/ty/inhabitedness/mod.rs @@ -203,4 +203,3 @@ impl<'a, 'gcx, 'tcx> TyS<'tcx> { } } } - diff --git a/src/librustc/ty/mod.rs b/src/librustc/ty/mod.rs index 56fafacd722be..67be228d232e1 100644 --- a/src/librustc/ty/mod.rs +++ b/src/librustc/ty/mod.rs @@ -438,12 +438,12 @@ bitflags! { // FIXME: Rename this to the actual property since it's used for generators too const HAS_TY_CLOSURE = 1 << 9; - // `true` if there are "names" of types and regions and so forth - // that are local to a particular fn + /// `true` if there are "names" of types and regions and so forth + /// that are local to a particular fn const HAS_FREE_LOCAL_NAMES = 1 << 10; - // Present if the type belongs in a local type context. - // Only set for Infer other than Fresh. + /// Present if the type belongs in a local type context. + /// Only set for Infer other than Fresh. const KEEP_IN_LOCAL_TCX = 1 << 11; // Is there a projection that does not involve a bound region? @@ -462,9 +462,9 @@ bitflags! { TypeFlags::HAS_SELF.bits | TypeFlags::HAS_RE_EARLY_BOUND.bits; - // Flags representing the nominal content of a type, - // computed by FlagsComputation. If you add a new nominal - // flag, it should be added here too. + /// Flags representing the nominal content of a type, + /// computed by FlagsComputation. If you add a new nominal + /// flag, it should be added here too. const NOMINAL_FLAGS = TypeFlags::HAS_PARAMS.bits | TypeFlags::HAS_SELF.bits | TypeFlags::HAS_TY_INFER.bits | diff --git a/src/librustc/ty/subst.rs b/src/librustc/ty/subst.rs index 3ba2c4cbf6c8c..b8ae0430502b5 100644 --- a/src/librustc/ty/subst.rs +++ b/src/librustc/ty/subst.rs @@ -439,16 +439,16 @@ struct SubstFolder<'a, 'gcx: 'a+'tcx, 'tcx: 'a> { tcx: TyCtxt<'a, 'gcx, 'tcx>, substs: &'a [Kind<'tcx>], - // The location for which the substitution is performed, if available. + /// The location for which the substitution is performed, if available. span: Option, - // The root type that is being substituted, if available. + /// The root type that is being substituted, if available. root_ty: Option>, - // Depth of type stack + /// Depth of type stack ty_stack_depth: usize, - // Number of region binders we have passed through while doing the substitution + /// Number of region binders we have passed through while doing the substitution binders_passed: u32, } diff --git a/src/librustc_codegen_llvm/va_arg.rs b/src/librustc_codegen_llvm/va_arg.rs index 7fc17d17f99df..410e00fe0b885 100644 --- a/src/librustc_codegen_llvm/va_arg.rs +++ b/src/librustc_codegen_llvm/va_arg.rs @@ -145,4 +145,3 @@ pub(super) fn emit_va_arg( } } } - diff --git a/src/librustc_mir/borrow_check/nll/invalidation.rs b/src/librustc_mir/borrow_check/nll/invalidation.rs index a5230e67b756a..8cbf68c476a7e 100644 --- a/src/librustc_mir/borrow_check/nll/invalidation.rs +++ b/src/librustc_mir/borrow_check/nll/invalidation.rs @@ -502,4 +502,3 @@ impl<'cg, 'cx, 'tcx, 'gcx> InvalidationGenerator<'cx, 'tcx, 'gcx> { } } } - diff --git a/src/librustc_mir/borrow_check/nll/region_infer/dump_mir.rs b/src/librustc_mir/borrow_check/nll/region_infer/dump_mir.rs index 419ee73b28ad3..4931005a4547a 100644 --- a/src/librustc_mir/borrow_check/nll/region_infer/dump_mir.rs +++ b/src/librustc_mir/borrow_check/nll/region_infer/dump_mir.rs @@ -92,4 +92,3 @@ impl<'tcx> RegionInferenceContext<'tcx> { Ok(()) } } - diff --git a/src/librustdoc/html/render.rs b/src/librustdoc/html/render.rs index d91b78c8416b8..487c57172d9b1 100644 --- a/src/librustdoc/html/render.rs +++ b/src/librustdoc/html/render.rs @@ -930,13 +930,13 @@ themePicker.onblur = handleThemeButtonsBlur; static_files::source_serif_pro::BOLD)?; write(cx.dst.join("SourceSerifPro-It.ttf.woff"), static_files::source_serif_pro::ITALIC)?; - write(cx.dst.join("SourceSerifPro-LICENSE.txt"), + write(cx.dst.join("SourceSerifPro-LICENSE.md"), static_files::source_serif_pro::LICENSE)?; write(cx.dst.join("SourceCodePro-Regular.woff"), static_files::source_code_pro::REGULAR)?; write(cx.dst.join("SourceCodePro-Semibold.woff"), static_files::source_code_pro::SEMIBOLD)?; - write(cx.dst.join("SourceCodePro-LICENSE.txt"), + write(cx.dst.join("SourceCodePro-LICENSE.md"), static_files::source_code_pro::LICENSE)?; write(cx.dst.join("LICENSE-MIT.txt"), static_files::LICENSE_MIT)?; diff --git a/src/librustdoc/html/static/FiraSans-LICENSE.txt b/src/librustdoc/html/static/FiraSans-LICENSE.txt index b4a39671ee94d..d444ea92b6f12 100644 --- a/src/librustdoc/html/static/FiraSans-LICENSE.txt +++ b/src/librustdoc/html/static/FiraSans-LICENSE.txt @@ -1,10 +1,5 @@ -Copyright (c) 2014, Mozilla Foundation https://mozilla.org/ -with Reserved Font Name Fira Sans. - -Copyright (c) 2014, Mozilla Foundation https://mozilla.org/ -with Reserved Font Name Fira Mono. - -Copyright (c) 2014, Telefonica S.A. +Digitized data copyright (c) 2012-2015, The Mozilla Foundation and Telefonica S.A. +with Reserved Font Name < Fira >, This Font Software is licensed under the SIL Open Font License, Version 1.1. This license is copied below, and is also available with a FAQ at: @@ -24,7 +19,7 @@ with others. The OFL allows the licensed fonts to be used, studied, modified and redistributed freely as long as they are not sold by themselves. The -fonts, including any derivative works, can be bundled, embedded, +fonts, including any derivative works, can be bundled, embedded, redistributed and/or sold with any software provided that any reserved names are not used by derivative works. The fonts and derivatives, however, cannot be released under any other type of license. The diff --git a/src/librustdoc/html/static/FiraSans-Medium.woff b/src/librustdoc/html/static/FiraSans-Medium.woff index 5627227744ae5..7d742c5fb7d45 100644 Binary files a/src/librustdoc/html/static/FiraSans-Medium.woff and b/src/librustdoc/html/static/FiraSans-Medium.woff differ diff --git a/src/librustdoc/html/static/FiraSans-Regular.woff b/src/librustdoc/html/static/FiraSans-Regular.woff index 9ff40445bf4a6..d8e0363f4e1a0 100644 Binary files a/src/librustdoc/html/static/FiraSans-Regular.woff and b/src/librustdoc/html/static/FiraSans-Regular.woff differ diff --git a/src/librustdoc/html/static/SourceCodePro-LICENSE.txt b/src/librustdoc/html/static/SourceCodePro-LICENSE.md similarity index 99% rename from src/librustdoc/html/static/SourceCodePro-LICENSE.txt rename to src/librustdoc/html/static/SourceCodePro-LICENSE.md index 07542572e33bd..1177330426de9 100644 --- a/src/librustdoc/html/static/SourceCodePro-LICENSE.txt +++ b/src/librustdoc/html/static/SourceCodePro-LICENSE.md @@ -18,7 +18,7 @@ with others. The OFL allows the licensed fonts to be used, studied, modified and redistributed freely as long as they are not sold by themselves. The -fonts, including any derivative works, can be bundled, embedded, +fonts, including any derivative works, can be bundled, embedded, redistributed and/or sold with any software provided that any reserved names are not used by derivative works. The fonts and derivatives, however, cannot be released under any other type of license. The diff --git a/src/librustdoc/html/static/SourceCodePro-Regular.woff b/src/librustdoc/html/static/SourceCodePro-Regular.woff index 5576670903aea..117c7e5142c38 100644 Binary files a/src/librustdoc/html/static/SourceCodePro-Regular.woff and b/src/librustdoc/html/static/SourceCodePro-Regular.woff differ diff --git a/src/librustdoc/html/static/SourceCodePro-Semibold.woff b/src/librustdoc/html/static/SourceCodePro-Semibold.woff index ca972a11dc428..270873a86a09b 100644 Binary files a/src/librustdoc/html/static/SourceCodePro-Semibold.woff and b/src/librustdoc/html/static/SourceCodePro-Semibold.woff differ diff --git a/src/librustdoc/html/static/SourceSerifPro-Bold.ttf.woff b/src/librustdoc/html/static/SourceSerifPro-Bold.ttf.woff index e283dae58de6b..ca254318fe9ea 100644 Binary files a/src/librustdoc/html/static/SourceSerifPro-Bold.ttf.woff and b/src/librustdoc/html/static/SourceSerifPro-Bold.ttf.woff differ diff --git a/src/librustdoc/html/static/SourceSerifPro-It.ttf.woff b/src/librustdoc/html/static/SourceSerifPro-It.ttf.woff index 4bd621c9bd0ba..a287bbe6ed3f8 100644 Binary files a/src/librustdoc/html/static/SourceSerifPro-It.ttf.woff and b/src/librustdoc/html/static/SourceSerifPro-It.ttf.woff differ diff --git a/src/librustdoc/html/static/SourceSerifPro-LICENSE.txt b/src/librustdoc/html/static/SourceSerifPro-LICENSE.md similarity index 95% rename from src/librustdoc/html/static/SourceSerifPro-LICENSE.txt rename to src/librustdoc/html/static/SourceSerifPro-LICENSE.md index b77d653ad4f0d..22cb755f2f1db 100644 --- a/src/librustdoc/html/static/SourceSerifPro-LICENSE.txt +++ b/src/librustdoc/html/static/SourceSerifPro-LICENSE.md @@ -1,4 +1,4 @@ -Copyright 2014 Adobe Systems Incorporated (http://www.adobe.com/), with Reserved Font Name 'Source'. All Rights Reserved. Source is a trademark of Adobe Systems Incorporated in the United States and/or other countries. +Copyright 2014-2018 Adobe (http://www.adobe.com/), with Reserved Font Name 'Source'. All Rights Reserved. Source is a trademark of Adobe in the United States and/or other countries. This Font Software is licensed under the SIL Open Font License, Version 1.1. diff --git a/src/librustdoc/html/static/SourceSerifPro-Regular.ttf.woff b/src/librustdoc/html/static/SourceSerifPro-Regular.ttf.woff index 96b36a0ed2366..a3d55cfdf2555 100644 Binary files a/src/librustdoc/html/static/SourceSerifPro-Regular.ttf.woff and b/src/librustdoc/html/static/SourceSerifPro-Regular.ttf.woff differ diff --git a/src/librustdoc/html/static_files.rs b/src/librustdoc/html/static_files.rs index a1d8cfacc54ad..24fe61e977a1e 100644 --- a/src/librustdoc/html/static_files.rs +++ b/src/librustdoc/html/static_files.rs @@ -91,7 +91,7 @@ pub mod source_serif_pro { pub static ITALIC: &'static [u8] = include_bytes!("static/SourceSerifPro-It.ttf.woff"); /// The file `SourceSerifPro-LICENSE.txt`, the license text for the Source Serif Pro font. - pub static LICENSE: &'static [u8] = include_bytes!("static/SourceSerifPro-LICENSE.txt"); + pub static LICENSE: &'static [u8] = include_bytes!("static/SourceSerifPro-LICENSE.md"); } /// Files related to the Source Code Pro font. @@ -103,7 +103,7 @@ pub mod source_code_pro { pub static SEMIBOLD: &'static [u8] = include_bytes!("static/SourceCodePro-Semibold.woff"); /// The file `SourceCodePro-LICENSE.txt`, the license text of the Source Code Pro font. - pub static LICENSE: &'static [u8] = include_bytes!("static/SourceCodePro-LICENSE.txt"); + pub static LICENSE: &'static [u8] = include_bytes!("static/SourceCodePro-LICENSE.md"); } /// Files related to the sidebar in rustdoc sources. diff --git a/src/libstd/os/android/fs.rs b/src/libstd/os/android/fs.rs index 9b24f86204bb6..90fdee567ae2c 100644 --- a/src/libstd/os/android/fs.rs +++ b/src/libstd/os/android/fs.rs @@ -116,4 +116,3 @@ impl MetadataExt for Metadata { self.as_inner().as_inner().st_blocks as u64 } } - diff --git a/src/libstd/os/android/raw.rs b/src/libstd/os/android/raw.rs index acf5ca1e4297b..946a77cbfd325 100644 --- a/src/libstd/os/android/raw.rs +++ b/src/libstd/os/android/raw.rs @@ -217,4 +217,3 @@ mod arch { __unused: [c_long; 3], } } - diff --git a/src/libstd/os/bitrig/fs.rs b/src/libstd/os/bitrig/fs.rs index 849d4aa67f204..b5c6903c41047 100644 --- a/src/libstd/os/bitrig/fs.rs +++ b/src/libstd/os/bitrig/fs.rs @@ -136,4 +136,3 @@ impl MetadataExt for Metadata { self.as_inner().as_inner().st_flags as u32 } } - diff --git a/src/libstd/os/dragonfly/fs.rs b/src/libstd/os/dragonfly/fs.rs index ba38660224f24..ba3d8d7867def 100644 --- a/src/libstd/os/dragonfly/fs.rs +++ b/src/libstd/os/dragonfly/fs.rs @@ -131,4 +131,3 @@ impl MetadataExt for Metadata { self.as_inner().as_inner().st_lspare as u32 } } - diff --git a/src/libstd/os/freebsd/fs.rs b/src/libstd/os/freebsd/fs.rs index 4cc3a4b91fbd8..cfe8d575c673e 100644 --- a/src/libstd/os/freebsd/fs.rs +++ b/src/libstd/os/freebsd/fs.rs @@ -141,4 +141,3 @@ impl MetadataExt for Metadata { self.as_inner().as_inner().st_lspare as u32 } } - diff --git a/src/libstd/os/ios/fs.rs b/src/libstd/os/ios/fs.rs index 7b625f5e3fe36..9bdfa8e690b09 100644 --- a/src/libstd/os/ios/fs.rs +++ b/src/libstd/os/ios/fs.rs @@ -141,4 +141,3 @@ impl MetadataExt for Metadata { self.as_inner().as_inner().st_lspare as u32 } } - diff --git a/src/libstd/os/macos/fs.rs b/src/libstd/os/macos/fs.rs index 1bd66ad4c764c..bf951ee18c9f9 100644 --- a/src/libstd/os/macos/fs.rs +++ b/src/libstd/os/macos/fs.rs @@ -147,4 +147,3 @@ impl MetadataExt for Metadata { [qspare[0] as u64, qspare[1] as u64] } } - diff --git a/src/libstd/os/netbsd/fs.rs b/src/libstd/os/netbsd/fs.rs index 6dffb70b5dc7b..dedfc6390ce20 100644 --- a/src/libstd/os/netbsd/fs.rs +++ b/src/libstd/os/netbsd/fs.rs @@ -136,4 +136,3 @@ impl MetadataExt for Metadata { self.as_inner().as_inner().st_flags as u32 } } - diff --git a/src/libstd/os/openbsd/fs.rs b/src/libstd/os/openbsd/fs.rs index 73f9757f3b794..1c019159be026 100644 --- a/src/libstd/os/openbsd/fs.rs +++ b/src/libstd/os/openbsd/fs.rs @@ -136,4 +136,3 @@ impl MetadataExt for Metadata { self.as_inner().as_inner().st_flags as u32 } } - diff --git a/src/libstd/sys_common/backtrace.rs b/src/libstd/sys_common/backtrace.rs index 1a80908779e1a..8d8d8169b4383 100644 --- a/src/libstd/sys_common/backtrace.rs +++ b/src/libstd/sys_common/backtrace.rs @@ -241,4 +241,3 @@ fn output_fileline(w: &mut dyn Write, w.write_all(b"\n") } - diff --git a/src/libsyntax/test_snippet.rs b/src/libsyntax/test_snippet.rs index cba429068fd5b..3cf6699538de0 100644 --- a/src/libsyntax/test_snippet.rs +++ b/src/libsyntax/test_snippet.rs @@ -1162,4 +1162,3 @@ error: foo "#); } - diff --git a/src/libsyntax_pos/hygiene.rs b/src/libsyntax_pos/hygiene.rs index 1ffecea44edf2..c806020039d26 100644 --- a/src/libsyntax_pos/hygiene.rs +++ b/src/libsyntax_pos/hygiene.rs @@ -24,11 +24,11 @@ struct SyntaxContextData { outer_mark: Mark, transparency: Transparency, prev_ctxt: SyntaxContext, - // This context, but with all transparent and semi-transparent marks filtered away. + /// This context, but with all transparent and semi-transparent marks filtered away. opaque: SyntaxContext, - // This context, but with all transparent marks filtered away. + /// This context, but with all transparent marks filtered away. opaque_and_semitransparent: SyntaxContext, - // Name of the crate to which `$crate` with this context would resolve. + /// Name of the crate to which `$crate` with this context would resolve. dollar_crate_name: Symbol, } diff --git a/src/test/assembly/nvptx-internalizing.rs b/src/test/assembly/nvptx-internalizing.rs index db82264263226..c9edc386959f8 100644 --- a/src/test/assembly/nvptx-internalizing.rs +++ b/src/test/assembly/nvptx-internalizing.rs @@ -24,4 +24,3 @@ pub unsafe extern "ptx-kernel" fn top_kernel(a: *const u32, b: *mut u32) { // Verify that no extra function definitions are here. // CHECK-NOT: .func // CHECK-NOT: .entry - diff --git a/src/test/codegen-units/item-collection/auxiliary/cgu_generic_function.rs b/src/test/codegen-units/item-collection/auxiliary/cgu_generic_function.rs index 976cbb2b44b68..3926f295742bc 100644 --- a/src/test/codegen-units/item-collection/auxiliary/cgu_generic_function.rs +++ b/src/test/codegen-units/item-collection/auxiliary/cgu_generic_function.rs @@ -24,4 +24,3 @@ pub fn exported_but_not_generic(x: i32) -> i64 { fn not_exported_and_not_generic(x: u32) -> u64 { x as u64 } - diff --git a/src/test/codegen-units/item-collection/cross-crate-closures.rs b/src/test/codegen-units/item-collection/cross-crate-closures.rs index bd04422c39f76..6af344fab1512 100644 --- a/src/test/codegen-units/item-collection/cross-crate-closures.rs +++ b/src/test/codegen-units/item-collection/cross-crate-closures.rs @@ -3,7 +3,6 @@ // ignoring this test until MIR codegen has taken over completely // ignore-test -// ignore-tidy-linelength // compile-flags:-Zprint-mono-items=eager #![deny(dead_code)] diff --git a/src/test/codegen-units/item-collection/cross-crate-generic-functions.rs b/src/test/codegen-units/item-collection/cross-crate-generic-functions.rs index cf7bde4a091d2..e1991046d4366 100644 --- a/src/test/codegen-units/item-collection/cross-crate-generic-functions.rs +++ b/src/test/codegen-units/item-collection/cross-crate-generic-functions.rs @@ -1,4 +1,3 @@ -// ignore-tidy-linelength // compile-flags:-Zprint-mono-items=eager #![deny(dead_code)] diff --git a/src/test/codegen-units/item-collection/cross-crate-trait-method.rs b/src/test/codegen-units/item-collection/cross-crate-trait-method.rs index 8a19a7bd9f8fa..442438b64b66f 100644 --- a/src/test/codegen-units/item-collection/cross-crate-trait-method.rs +++ b/src/test/codegen-units/item-collection/cross-crate-trait-method.rs @@ -1,4 +1,3 @@ -// ignore-tidy-linelength // compile-flags:-Zprint-mono-items=eager #![deny(dead_code)] diff --git a/src/test/codegen-units/item-collection/function-as-argument.rs b/src/test/codegen-units/item-collection/function-as-argument.rs index bdf6826f21aa8..3f61f124d2409 100644 --- a/src/test/codegen-units/item-collection/function-as-argument.rs +++ b/src/test/codegen-units/item-collection/function-as-argument.rs @@ -1,4 +1,3 @@ -// ignore-tidy-linelength // compile-flags:-Zprint-mono-items=eager #![deny(dead_code)] diff --git a/src/test/codegen-units/item-collection/generic-functions.rs b/src/test/codegen-units/item-collection/generic-functions.rs index f879724c9a16c..8390970420482 100644 --- a/src/test/codegen-units/item-collection/generic-functions.rs +++ b/src/test/codegen-units/item-collection/generic-functions.rs @@ -1,4 +1,3 @@ -// ignore-tidy-linelength // compile-flags:-Zprint-mono-items=eager #![deny(dead_code)] diff --git a/src/test/codegen-units/item-collection/generic-impl.rs b/src/test/codegen-units/item-collection/generic-impl.rs index 01b4e5301833e..571bb4fa867cb 100644 --- a/src/test/codegen-units/item-collection/generic-impl.rs +++ b/src/test/codegen-units/item-collection/generic-impl.rs @@ -1,4 +1,3 @@ -// ignore-tidy-linelength // compile-flags:-Zprint-mono-items=eager #![deny(dead_code)] diff --git a/src/test/codegen-units/item-collection/impl-in-non-instantiated-generic.rs b/src/test/codegen-units/item-collection/impl-in-non-instantiated-generic.rs index 702ecba321e3e..e45644cd37562 100644 --- a/src/test/codegen-units/item-collection/impl-in-non-instantiated-generic.rs +++ b/src/test/codegen-units/item-collection/impl-in-non-instantiated-generic.rs @@ -1,4 +1,3 @@ -// ignore-tidy-linelength // compile-flags:-Zprint-mono-items=eager #![deny(dead_code)] diff --git a/src/test/codegen-units/item-collection/items-within-generic-items.rs b/src/test/codegen-units/item-collection/items-within-generic-items.rs index 748b6094a2a40..10bc52f6a8d22 100644 --- a/src/test/codegen-units/item-collection/items-within-generic-items.rs +++ b/src/test/codegen-units/item-collection/items-within-generic-items.rs @@ -1,4 +1,3 @@ -// ignore-tidy-linelength // compile-flags:-Zprint-mono-items=eager #![deny(dead_code)] diff --git a/src/test/codegen-units/item-collection/non-generic-functions.rs b/src/test/codegen-units/item-collection/non-generic-functions.rs index e147b54fdaf08..26d2fb1b42194 100644 --- a/src/test/codegen-units/item-collection/non-generic-functions.rs +++ b/src/test/codegen-units/item-collection/non-generic-functions.rs @@ -1,4 +1,3 @@ -// ignore-tidy-linelength // compile-flags:-Zprint-mono-items=eager #![deny(dead_code)] diff --git a/src/test/codegen-units/item-collection/overloaded-operators.rs b/src/test/codegen-units/item-collection/overloaded-operators.rs index db91486012ddf..2358d38942a71 100644 --- a/src/test/codegen-units/item-collection/overloaded-operators.rs +++ b/src/test/codegen-units/item-collection/overloaded-operators.rs @@ -1,4 +1,3 @@ -// ignore-tidy-linelength // compile-flags:-Zprint-mono-items=eager #![deny(dead_code)] diff --git a/src/test/codegen-units/item-collection/static-init.rs b/src/test/codegen-units/item-collection/static-init.rs index 397bccc4bf834..f6005eed43c7d 100644 --- a/src/test/codegen-units/item-collection/static-init.rs +++ b/src/test/codegen-units/item-collection/static-init.rs @@ -1,5 +1,4 @@ // compile-flags:-Zprint-mono-items=eager -// ignore-tidy-linelength #![feature(start)] diff --git a/src/test/codegen-units/item-collection/statics-and-consts.rs b/src/test/codegen-units/item-collection/statics-and-consts.rs index db2d83aeefabd..7e28ba58b63fa 100644 --- a/src/test/codegen-units/item-collection/statics-and-consts.rs +++ b/src/test/codegen-units/item-collection/statics-and-consts.rs @@ -1,4 +1,3 @@ -// ignore-tidy-linelength // compile-flags:-Zprint-mono-items=eager #![deny(dead_code)] diff --git a/src/test/codegen-units/item-collection/trait-implementations.rs b/src/test/codegen-units/item-collection/trait-implementations.rs index 004198a624ef6..f090c0c8d130a 100644 --- a/src/test/codegen-units/item-collection/trait-implementations.rs +++ b/src/test/codegen-units/item-collection/trait-implementations.rs @@ -1,4 +1,3 @@ -// ignore-tidy-linelength // compile-flags:-Zprint-mono-items=eager #![deny(dead_code)] diff --git a/src/test/codegen-units/item-collection/trait-method-as-argument.rs b/src/test/codegen-units/item-collection/trait-method-as-argument.rs index cab4a70913422..27ace8e31add3 100644 --- a/src/test/codegen-units/item-collection/trait-method-as-argument.rs +++ b/src/test/codegen-units/item-collection/trait-method-as-argument.rs @@ -1,4 +1,3 @@ -// ignore-tidy-linelength // compile-flags:-Zprint-mono-items=eager #![deny(dead_code)] diff --git a/src/test/codegen-units/item-collection/trait-method-default-impl.rs b/src/test/codegen-units/item-collection/trait-method-default-impl.rs index ba99d430acc62..11f6cc62d49e3 100644 --- a/src/test/codegen-units/item-collection/trait-method-default-impl.rs +++ b/src/test/codegen-units/item-collection/trait-method-default-impl.rs @@ -1,4 +1,3 @@ -// ignore-tidy-linelength // compile-flags:-Zprint-mono-items=eager #![deny(dead_code)] diff --git a/src/test/codegen-units/item-collection/unreferenced-const-fn.rs b/src/test/codegen-units/item-collection/unreferenced-const-fn.rs index 5fae72f711d75..ec6be0ecf43ef 100644 --- a/src/test/codegen-units/item-collection/unreferenced-const-fn.rs +++ b/src/test/codegen-units/item-collection/unreferenced-const-fn.rs @@ -1,4 +1,3 @@ -// ignore-tidy-linelength // compile-flags:-Zprint-mono-items=lazy #![deny(dead_code)] diff --git a/src/test/codegen-units/item-collection/unreferenced-inline-function.rs b/src/test/codegen-units/item-collection/unreferenced-inline-function.rs index 4c8d1215c0425..4d095e4d6c7e9 100644 --- a/src/test/codegen-units/item-collection/unreferenced-inline-function.rs +++ b/src/test/codegen-units/item-collection/unreferenced-inline-function.rs @@ -1,4 +1,3 @@ -// ignore-tidy-linelength // compile-flags:-Zprint-mono-items=lazy // N.B., we do not expect *any* monomorphization to be generated here. diff --git a/src/test/codegen-units/item-collection/unsizing.rs b/src/test/codegen-units/item-collection/unsizing.rs index 6b2acab7f7b73..fd794df37608b 100644 --- a/src/test/codegen-units/item-collection/unsizing.rs +++ b/src/test/codegen-units/item-collection/unsizing.rs @@ -1,4 +1,3 @@ -// ignore-tidy-linelength // compile-flags:-Zprint-mono-items=eager // compile-flags:-Zinline-in-all-cgus diff --git a/src/test/codegen-units/item-collection/unused-traits-and-generics.rs b/src/test/codegen-units/item-collection/unused-traits-and-generics.rs index 598efdbdad1bc..4a5e294ea0f4a 100644 --- a/src/test/codegen-units/item-collection/unused-traits-and-generics.rs +++ b/src/test/codegen-units/item-collection/unused-traits-and-generics.rs @@ -1,4 +1,3 @@ -// ignore-tidy-linelength // compile-flags:-Zprint-mono-items=eager #![crate_type="lib"] diff --git a/src/test/codegen-units/partitioning/auxiliary/cgu_generic_function.rs b/src/test/codegen-units/partitioning/auxiliary/cgu_generic_function.rs index 976cbb2b44b68..3926f295742bc 100644 --- a/src/test/codegen-units/partitioning/auxiliary/cgu_generic_function.rs +++ b/src/test/codegen-units/partitioning/auxiliary/cgu_generic_function.rs @@ -24,4 +24,3 @@ pub fn exported_but_not_generic(x: i32) -> i64 { fn not_exported_and_not_generic(x: u32) -> u64 { x as u64 } - diff --git a/src/test/codegen-units/partitioning/statics.rs b/src/test/codegen-units/partitioning/statics.rs index 40483318795b1..bbded480b0c15 100644 --- a/src/test/codegen-units/partitioning/statics.rs +++ b/src/test/codegen-units/partitioning/statics.rs @@ -1,4 +1,3 @@ -// ignore-tidy-linelength // We specify -Z incremental here because we want to test the partitioning for // incremental compilation // compile-flags:-Zprint-mono-items=lazy -Zincremental=tmp/partitioning-tests/statics diff --git a/src/test/codegen/adjustments.rs b/src/test/codegen/adjustments.rs index b8398f6ac8421..ae2ff9994fdf0 100644 --- a/src/test/codegen/adjustments.rs +++ b/src/test/codegen/adjustments.rs @@ -1,5 +1,4 @@ // compile-flags: -C no-prepopulate-passes -// ignore-tidy-linelength #![crate_type = "lib"] diff --git a/src/test/codegen/enum-debug-niche.rs b/src/test/codegen/enum-debug-niche.rs index 93eebde7b8f42..2272488375fdd 100644 --- a/src/test/codegen/enum-debug-niche.rs +++ b/src/test/codegen/enum-debug-niche.rs @@ -2,7 +2,6 @@ // before 7.0, then backported to the Rust LLVM fork. It tests that // optimized enum debug info accurately reflects the enum layout. -// ignore-tidy-linelength // ignore-windows // min-system-llvm-version 8.0 diff --git a/src/test/codegen/enum-debug-tagged.rs b/src/test/codegen/enum-debug-tagged.rs index 84976ce97af4b..3539aae42eae7 100644 --- a/src/test/codegen/enum-debug-tagged.rs +++ b/src/test/codegen/enum-debug-tagged.rs @@ -2,7 +2,6 @@ // before 7.0, then backported to the Rust LLVM fork. It tests that // debug info for tagged (ordinary) enums is properly emitted. -// ignore-tidy-linelength // ignore-windows // min-system-llvm-version 8.0 diff --git a/src/test/codegen/generic-debug.rs b/src/test/codegen/generic-debug.rs index 0bee2a1a8689f..eea16805c5968 100644 --- a/src/test/codegen/generic-debug.rs +++ b/src/test/codegen/generic-debug.rs @@ -1,4 +1,3 @@ -// ignore-tidy-linelength // ignore-windows // compile-flags: -g -C no-prepopulate-passes diff --git a/src/test/codegen/likely.rs b/src/test/codegen/likely.rs index c56cf718f98e4..c5a0185bd482b 100644 --- a/src/test/codegen/likely.rs +++ b/src/test/codegen/likely.rs @@ -28,4 +28,3 @@ pub fn check_unlikely(x: i32, y: i32) -> Option { } } } - diff --git a/src/test/codegen/mainsubprogram.rs b/src/test/codegen/mainsubprogram.rs index d886cb88004cb..7f1b0e17f871e 100644 --- a/src/test/codegen/mainsubprogram.rs +++ b/src/test/codegen/mainsubprogram.rs @@ -1,7 +1,6 @@ // This test depends on a patch that was committed to upstream LLVM // before 4.0, formerly backported to the Rust LLVM fork. -// ignore-tidy-linelength // ignore-windows // ignore-macos diff --git a/src/test/codegen/mainsubprogramstart.rs b/src/test/codegen/mainsubprogramstart.rs index d91f91ee7ab68..b03290af0e3b7 100644 --- a/src/test/codegen/mainsubprogramstart.rs +++ b/src/test/codegen/mainsubprogramstart.rs @@ -1,4 +1,3 @@ -// ignore-tidy-linelength // ignore-windows // ignore-macos diff --git a/src/test/codegen/noreturn-uninhabited.rs b/src/test/codegen/noreturn-uninhabited.rs index 1b65da9f2877a..49f93cf62c754 100644 --- a/src/test/codegen/noreturn-uninhabited.rs +++ b/src/test/codegen/noreturn-uninhabited.rs @@ -1,5 +1,4 @@ // compile-flags: -g -C no-prepopulate-passes -// ignore-tidy-linelength #![crate_type = "lib"] diff --git a/src/test/codegen/noreturnflag.rs b/src/test/codegen/noreturnflag.rs index fc288eb0cf1e2..95c100571ce6e 100644 --- a/src/test/codegen/noreturnflag.rs +++ b/src/test/codegen/noreturnflag.rs @@ -1,5 +1,4 @@ // compile-flags: -g -C no-prepopulate-passes -// ignore-tidy-linelength #![crate_type = "lib"] diff --git a/src/test/codegen/nounwind.rs b/src/test/codegen/nounwind.rs index 49a74ef7ab4ef..f639c60b89358 100644 --- a/src/test/codegen/nounwind.rs +++ b/src/test/codegen/nounwind.rs @@ -14,4 +14,3 @@ pub fn foo() { // CHECK: @bar() unnamed_addr #0 // CHECK: attributes #0 = { {{.*}}nounwind{{.*}} } } - diff --git a/src/test/codegen/packed.rs b/src/test/codegen/packed.rs index b42161db98a79..3c8ff394849a1 100644 --- a/src/test/codegen/packed.rs +++ b/src/test/codegen/packed.rs @@ -152,4 +152,3 @@ pub fn pkd2_nested_pair(pair1: &mut Packed2NestedPair, pair2: &mut Packed2Nested // CHECK: call void @llvm.memcpy.{{.*}}(i8* align 2 %{{.*}}, i8* align 2 %{{.*}}, i{{[0-9]+}} 8, i1 false) *pair2 = *pair1; } - diff --git a/src/test/codegen/panic-abort-windows.rs b/src/test/codegen/panic-abort-windows.rs index e2d942e869992..bbe0d81de3d42 100644 --- a/src/test/codegen/panic-abort-windows.rs +++ b/src/test/codegen/panic-abort-windows.rs @@ -1,5 +1,3 @@ -// ignore-tidy-linelength - // This test is for *-windows-msvc only. // ignore-android // ignore-bitrig diff --git a/src/test/codegen/refs.rs b/src/test/codegen/refs.rs index 9583730e9dd5b..cbb9942347673 100644 --- a/src/test/codegen/refs.rs +++ b/src/test/codegen/refs.rs @@ -1,5 +1,4 @@ // compile-flags: -C no-prepopulate-passes -// ignore-tidy-linelength #![crate_type = "lib"] diff --git a/src/test/codegen/remap_path_prefix/xcrate-generic.rs b/src/test/codegen/remap_path_prefix/xcrate-generic.rs index 70d29577b2f2c..30d6112fd02f6 100644 --- a/src/test/codegen/remap_path_prefix/xcrate-generic.rs +++ b/src/test/codegen/remap_path_prefix/xcrate-generic.rs @@ -1,5 +1,4 @@ // ignore-windows -// ignore-tidy-linelength // compile-flags: -g -C metadata=foo -C no-prepopulate-passes // aux-build:xcrate-generic.rs diff --git a/src/test/codegen/union-abi.rs b/src/test/codegen/union-abi.rs index 03b55eb52a250..b7baffe16695a 100644 --- a/src/test/codegen/union-abi.rs +++ b/src/test/codegen/union-abi.rs @@ -73,4 +73,3 @@ pub union UnionBool { b:bool } #[no_mangle] pub fn test_UnionBool(b: UnionBool) -> bool { unsafe { b.b } } // CHECK: %0 = trunc i8 %b to i1 - diff --git a/src/test/codegen/vtabletype.rs b/src/test/codegen/vtabletype.rs index 70b97a67bbcfd..82d65b101b06d 100644 --- a/src/test/codegen/vtabletype.rs +++ b/src/test/codegen/vtabletype.rs @@ -1,7 +1,6 @@ // This test depends on a patch that was committed to upstream LLVM // after 5.0, then backported to the Rust LLVM fork. -// ignore-tidy-linelength // ignore-windows // ignore-macos diff --git a/src/test/debuginfo/enum-thinlto.rs b/src/test/debuginfo/enum-thinlto.rs index 7f15ed90e67b3..13577b0587ff0 100644 --- a/src/test/debuginfo/enum-thinlto.rs +++ b/src/test/debuginfo/enum-thinlto.rs @@ -1,5 +1,3 @@ -// ignore-tidy-linelength - // Require LLVM with DW_TAG_variant_part and a gdb that can read it. // min-system-llvm-version: 8.0 // min-gdb-version: 8.2 diff --git a/src/test/debuginfo/generic-enum-with-different-disr-sizes.rs b/src/test/debuginfo/generic-enum-with-different-disr-sizes.rs index e26294cb730a0..72d38a6f04544 100644 --- a/src/test/debuginfo/generic-enum-with-different-disr-sizes.rs +++ b/src/test/debuginfo/generic-enum-with-different-disr-sizes.rs @@ -1,4 +1,3 @@ -// ignore-tidy-linelength // ignore-lldb: FIXME(#27089) // min-lldb-version: 310 diff --git a/src/test/debuginfo/recursive-struct.rs b/src/test/debuginfo/recursive-struct.rs index 8fb83b7956be3..4f75ef4fa9b9a 100644 --- a/src/test/debuginfo/recursive-struct.rs +++ b/src/test/debuginfo/recursive-struct.rs @@ -1,4 +1,3 @@ -// ignore-tidy-linelength // ignore-lldb // Require LLVM with DW_TAG_variant_part and a gdb that can read it. diff --git a/src/test/debuginfo/should-fail.rs b/src/test/debuginfo/should-fail.rs index 441be56b5b45a..8765c018b1022 100644 --- a/src/test/debuginfo/should-fail.rs +++ b/src/test/debuginfo/should-fail.rs @@ -25,4 +25,3 @@ fn main() { } fn zzz() {()} - diff --git a/src/test/debuginfo/unique-enum.rs b/src/test/debuginfo/unique-enum.rs index 32bd93f1ed2ce..c440ce059f721 100644 --- a/src/test/debuginfo/unique-enum.rs +++ b/src/test/debuginfo/unique-enum.rs @@ -1,5 +1,3 @@ -// ignore-tidy-linelength - // Require LLVM with DW_TAG_variant_part and a gdb and lldb that can // read it. // min-system-llvm-version: 8.0 diff --git a/src/test/debuginfo/unreachable-locals.rs b/src/test/debuginfo/unreachable-locals.rs index b6971f353a512..5787f819cb938 100644 --- a/src/test/debuginfo/unreachable-locals.rs +++ b/src/test/debuginfo/unreachable-locals.rs @@ -156,4 +156,3 @@ fn diverge() -> ! { } fn some_predicate() -> bool { true || false } - diff --git a/src/test/incremental/change_crate_order/auxiliary/a.rs b/src/test/incremental/change_crate_order/auxiliary/a.rs index 5948f38cf1bd7..1bd48714ac99c 100644 --- a/src/test/incremental/change_crate_order/auxiliary/a.rs +++ b/src/test/incremental/change_crate_order/auxiliary/a.rs @@ -1,4 +1,3 @@ #![crate_type="rlib"] pub static A : u32 = 32; - diff --git a/src/test/incremental/change_crate_order/auxiliary/b.rs b/src/test/incremental/change_crate_order/auxiliary/b.rs index 12e310398511b..001b88912ab4c 100644 --- a/src/test/incremental/change_crate_order/auxiliary/b.rs +++ b/src/test/incremental/change_crate_order/auxiliary/b.rs @@ -1,4 +1,3 @@ #![crate_type="rlib"] pub static B: u32 = 32; - diff --git a/src/test/incremental/hashes/exported_vs_not.rs b/src/test/incremental/hashes/exported_vs_not.rs index dc919abc02d44..5a29afa17d3c2 100644 --- a/src/test/incremental/hashes/exported_vs_not.rs +++ b/src/test/incremental/hashes/exported_vs_not.rs @@ -61,4 +61,3 @@ pub fn body_exported_to_metadata_because_of_generic() -> u32 { pub fn body_exported_to_metadata_because_of_generic() -> u32 { 2 } - diff --git a/src/test/incremental/issue-39569.rs b/src/test/incremental/issue-39569.rs index 06e3cf0a29328..881ecfca740bf 100644 --- a/src/test/incremental/issue-39569.rs +++ b/src/test/incremental/issue-39569.rs @@ -25,4 +25,3 @@ fn main() { let x: Arc = Arc::new(FooX { x: 22 }); let y: Arc = x; } - diff --git a/src/test/incremental/krate-inherent.rs b/src/test/incremental/krate-inherent.rs index e01ce317a2070..3e8d8fb1f94f1 100644 --- a/src/test/incremental/krate-inherent.rs +++ b/src/test/incremental/krate-inherent.rs @@ -21,4 +21,3 @@ pub mod x { #[cfg(cfail1)] pub fn bar() { } // remove this unrelated fn in cfail2, which should not affect `x::method` - diff --git a/src/test/incremental/krate_reassign_34991/auxiliary/a.rs b/src/test/incremental/krate_reassign_34991/auxiliary/a.rs index 33fa789fcae45..69be8d3bc0318 100644 --- a/src/test/incremental/krate_reassign_34991/auxiliary/a.rs +++ b/src/test/incremental/krate_reassign_34991/auxiliary/a.rs @@ -1,4 +1,3 @@ #![crate_type="rlib"] pub type X = u32; - diff --git a/src/test/incremental/remapped_paths_cc/auxiliary/extern_crate.rs b/src/test/incremental/remapped_paths_cc/auxiliary/extern_crate.rs index 52e7f4bd7c782..627b99445ea81 100644 --- a/src/test/incremental/remapped_paths_cc/auxiliary/extern_crate.rs +++ b/src/test/incremental/remapped_paths_cc/auxiliary/extern_crate.rs @@ -1,5 +1,3 @@ -// ignore-tidy-linelength - //[rpass1] compile-flags: -g //[rpass2] compile-flags: -g //[rpass3] compile-flags: -g --remap-path-prefix={{src-base}}=/the/src diff --git a/src/test/incremental/span_hash_stable/main.rs b/src/test/incremental/span_hash_stable/main.rs index f19c99e1986e6..f1d7de1455938 100644 --- a/src/test/incremental/span_hash_stable/main.rs +++ b/src/test/incremental/span_hash_stable/main.rs @@ -21,4 +21,3 @@ fn main() { b: 3, }; } - diff --git a/src/test/mir-opt/basic_assignment.rs b/src/test/mir-opt/basic_assignment.rs index c771013f72814..ca0e9fa811a26 100644 --- a/src/test/mir-opt/basic_assignment.rs +++ b/src/test/mir-opt/basic_assignment.rs @@ -5,8 +5,6 @@ // so subtle breakage in them can leave a quite hard-to-find trail of // destruction. -// ignore-tidy-linelength - fn main() { let nodrop_x = false; let nodrop_y; diff --git a/src/test/mir-opt/nll/named-lifetimes-basic.rs b/src/test/mir-opt/nll/named-lifetimes-basic.rs index 4833ba19554b9..2a6c2db03bec1 100644 --- a/src/test/mir-opt/nll/named-lifetimes-basic.rs +++ b/src/test/mir-opt/nll/named-lifetimes-basic.rs @@ -5,7 +5,6 @@ // compile-flags:-Zborrowck=mir -Zverbose // ^^^^^^^^^ force compiler to dump more region information -// ignore-tidy-linelength #![allow(warnings)] diff --git a/src/test/mir-opt/storage_ranges.rs b/src/test/mir-opt/storage_ranges.rs index 9a22f57116ed8..c099b1dccb668 100644 --- a/src/test/mir-opt/storage_ranges.rs +++ b/src/test/mir-opt/storage_ranges.rs @@ -1,5 +1,3 @@ -// ignore-tidy-linelength - fn main() { let a = 0; { diff --git a/src/test/run-fail/call-fn-never-arg.rs b/src/test/run-fail/call-fn-never-arg.rs index d21a43ec5c50a..f5b2cfaefe022 100644 --- a/src/test/run-fail/call-fn-never-arg.rs +++ b/src/test/run-fail/call-fn-never-arg.rs @@ -12,4 +12,3 @@ fn foo(x: !) -> ! { fn main() { foo(panic!("wowzers!")) } - diff --git a/src/test/run-fail/cast-never.rs b/src/test/run-fail/cast-never.rs index 3620ddee47869..0b05a4b911284 100644 --- a/src/test/run-fail/cast-never.rs +++ b/src/test/run-fail/cast-never.rs @@ -8,4 +8,3 @@ fn main() { let x: ! = panic!(); let y: u32 = x as u32; } - diff --git a/src/test/run-fail/never-associated-type.rs b/src/test/run-fail/never-associated-type.rs index ba30b9ea0fe3d..587f0f72d5a62 100644 --- a/src/test/run-fail/never-associated-type.rs +++ b/src/test/run-fail/never-associated-type.rs @@ -21,4 +21,3 @@ impl Foo for Blah { fn main() { Blah.smeg(); } - diff --git a/src/test/run-fail/never-type-arg.rs b/src/test/run-fail/never-type-arg.rs index fc7f2fc90d704..1747e96eef4e3 100644 --- a/src/test/run-fail/never-type-arg.rs +++ b/src/test/run-fail/never-type-arg.rs @@ -15,4 +15,3 @@ impl PartialEq for Wub { fn main() { let _ = Wub == panic!("oh no!"); } - diff --git a/src/test/run-make-fulldeps/issue-18943/foo.rs b/src/test/run-make-fulldeps/issue-18943/foo.rs index 0b29c8712802d..d18400dd3a54b 100644 --- a/src/test/run-make-fulldeps/issue-18943/foo.rs +++ b/src/test/run-make-fulldeps/issue-18943/foo.rs @@ -3,4 +3,3 @@ trait Foo { } trait Bar { } impl<'a> Foo for Bar + 'a { } - diff --git a/src/test/run-make-fulldeps/issue-28595/b.c b/src/test/run-make-fulldeps/issue-28595/b.c index 8343f5b229e1b..6aecb5f9e04c0 100644 --- a/src/test/run-make-fulldeps/issue-28595/b.c +++ b/src/test/run-make-fulldeps/issue-28595/b.c @@ -3,4 +3,3 @@ extern void a(void); void b(void) { a(); } - diff --git a/src/test/run-make-fulldeps/libtest-json/f.rs b/src/test/run-make-fulldeps/libtest-json/f.rs index 29d52ee96540f..f5e44c2c24407 100644 --- a/src/test/run-make-fulldeps/libtest-json/f.rs +++ b/src/test/run-make-fulldeps/libtest-json/f.rs @@ -19,4 +19,3 @@ fn c() { fn d() { assert!(false); } - diff --git a/src/test/run-make-fulldeps/lto-no-link-whole-rlib/lib2.rs b/src/test/run-make-fulldeps/lto-no-link-whole-rlib/lib2.rs index 50b7882a05a53..c9e1baa434b12 100644 --- a/src/test/run-make-fulldeps/lto-no-link-whole-rlib/lib2.rs +++ b/src/test/run-make-fulldeps/lto-no-link-whole-rlib/lib2.rs @@ -10,4 +10,3 @@ extern { pub fn foo2() -> i32 { unsafe { foo() } } - diff --git a/src/test/run-make-fulldeps/sanitizer-staticlib-link/program.c b/src/test/run-make-fulldeps/sanitizer-staticlib-link/program.c index abd5d508e7295..a6d3bcdc5ac9d 100644 --- a/src/test/run-make-fulldeps/sanitizer-staticlib-link/program.c +++ b/src/test/run-make-fulldeps/sanitizer-staticlib-link/program.c @@ -5,4 +5,3 @@ int main() { overflow(); return 0; } - diff --git a/src/test/run-make-fulldeps/stable-symbol-names/stable-symbol-names2.rs b/src/test/run-make-fulldeps/stable-symbol-names/stable-symbol-names2.rs index 6df74d2491b7d..33df9d6c68988 100644 --- a/src/test/run-make-fulldeps/stable-symbol-names/stable-symbol-names2.rs +++ b/src/test/run-make-fulldeps/stable-symbol-names/stable-symbol-names2.rs @@ -15,4 +15,3 @@ pub fn trait_impl_test_function() { use stable_symbol_names1::*; Bar::generic_method::(); } - diff --git a/src/test/run-make-fulldeps/windows-subsystem/console.rs b/src/test/run-make-fulldeps/windows-subsystem/console.rs index 4a2e9bb3c5cf0..61a92eb6a9db7 100644 --- a/src/test/run-make-fulldeps/windows-subsystem/console.rs +++ b/src/test/run-make-fulldeps/windows-subsystem/console.rs @@ -1,4 +1,3 @@ #![windows_subsystem = "console"] fn main() {} - diff --git a/src/test/run-pass/asm-concat-src.rs b/src/test/run-pass/asm-concat-src.rs index b24586464d673..c629519e8fe62 100644 --- a/src/test/run-pass/asm-concat-src.rs +++ b/src/test/run-pass/asm-concat-src.rs @@ -6,4 +6,3 @@ pub fn main() { unsafe { asm!(concat!("", "")) }; } - diff --git a/src/test/run-pass/binding/empty-types-in-patterns.rs b/src/test/run-pass/binding/empty-types-in-patterns.rs index d9fb176c818da..2b8b1b29df8c9 100644 --- a/src/test/run-pass/binding/empty-types-in-patterns.rs +++ b/src/test/run-pass/binding/empty-types-in-patterns.rs @@ -56,4 +56,3 @@ fn main() { bar(&[]); } - diff --git a/src/test/run-pass/consts/const-fn-feature-flags.rs b/src/test/run-pass/consts/const-fn-feature-flags.rs index 83a98f0f8e9ef..30e7e102b8635 100644 --- a/src/test/run-pass/consts/const-fn-feature-flags.rs +++ b/src/test/run-pass/consts/const-fn-feature-flags.rs @@ -11,4 +11,3 @@ fn main() { assert_eq!(CELL.get(), v); } - diff --git a/src/test/run-pass/deriving/auxiliary/derive-no-std.rs b/src/test/run-pass/deriving/auxiliary/derive-no-std.rs index 21bfd5a2909b1..3893dc1be079c 100644 --- a/src/test/run-pass/deriving/auxiliary/derive-no-std.rs +++ b/src/test/run-pass/deriving/auxiliary/derive-no-std.rs @@ -27,4 +27,3 @@ pub struct Empty; #[derive(Clone, Hash, PartialEq, Eq, PartialOrd, Ord, Debug, Copy)] pub struct AlsoEmpty {} - diff --git a/src/test/run-pass/deriving/derive-no-std.rs b/src/test/run-pass/deriving/derive-no-std.rs index 22edd3eed5926..74c73b99cb923 100644 --- a/src/test/run-pass/deriving/derive-no-std.rs +++ b/src/test/run-pass/deriving/derive-no-std.rs @@ -10,4 +10,3 @@ fn main() { assert!(Bar::Qux < Bar::Quux(42)); } - diff --git a/src/test/run-pass/discriminant_value-wrapper.rs b/src/test/run-pass/discriminant_value-wrapper.rs index f014cce9dddc6..1fb0d1edddf26 100644 --- a/src/test/run-pass/discriminant_value-wrapper.rs +++ b/src/test/run-pass/discriminant_value-wrapper.rs @@ -13,4 +13,3 @@ pub fn main() { let _ = mem::discriminant(&10); let _ = mem::discriminant(&"test"); } - diff --git a/src/test/run-pass/fat-lto.rs b/src/test/run-pass/fat-lto.rs index 7e50b44430c11..fb741200d3cb7 100644 --- a/src/test/run-pass/fat-lto.rs +++ b/src/test/run-pass/fat-lto.rs @@ -4,4 +4,3 @@ fn main() { println!("hello!"); } - diff --git a/src/test/run-pass/functions-closures/closure-expected-type/expect-infer-supply-two-infers.rs b/src/test/run-pass/functions-closures/closure-expected-type/expect-infer-supply-two-infers.rs index fb0bc3c436d9b..6d5a9876c373c 100644 --- a/src/test/run-pass/functions-closures/closure-expected-type/expect-infer-supply-two-infers.rs +++ b/src/test/run-pass/functions-closures/closure-expected-type/expect-infer-supply-two-infers.rs @@ -12,7 +12,7 @@ fn expect_free_supply_free<'x>(x: &'x u32) { x.push(22_u32); // ...since we now know the type of `y` and can resolve the method call. - y.wrapping_add(1); + let _ = y.wrapping_add(1); }); } diff --git a/src/test/run-pass/impl-for-never.rs b/src/test/run-pass/impl-for-never.rs index d2dbae61767b7..a5287123008f2 100644 --- a/src/test/run-pass/impl-for-never.rs +++ b/src/test/run-pass/impl-for-never.rs @@ -23,4 +23,3 @@ fn main() { println!("! is {}", ::stringify_type()); println!("None is {}", maybe_stringify(None::)); } - diff --git a/src/test/run-pass/inc-range-pat.rs b/src/test/run-pass/inc-range-pat.rs index 6b99a9d0a7422..6bf857a11f816 100644 --- a/src/test/run-pass/inc-range-pat.rs +++ b/src/test/run-pass/inc-range-pat.rs @@ -7,4 +7,3 @@ fn main() { assert!(match 'x' { 'a' ... 'z' => true, _ => false }); assert!(match 'x' { 'a' ..= 'z' => true, _ => false }); } - diff --git a/src/test/run-pass/inherit-env.rs b/src/test/run-pass/inherit-env.rs index 856d3a5f72d34..8e2401d0c0356 100644 --- a/src/test/run-pass/inherit-env.rs +++ b/src/test/run-pass/inherit-env.rs @@ -22,4 +22,3 @@ fn main() { k, v, output); } } - diff --git a/src/test/run-pass/issues/auxiliary/issue-17718-aux.rs b/src/test/run-pass/issues/auxiliary/issue-17718-aux.rs index 1cba9709f9116..91abdbff868fe 100644 --- a/src/test/run-pass/issues/auxiliary/issue-17718-aux.rs +++ b/src/test/run-pass/issues/auxiliary/issue-17718-aux.rs @@ -8,4 +8,3 @@ pub const C5: &'static usize = &C4; pub static S1: usize = 3; pub static S2: atomic::AtomicUsize = atomic::AtomicUsize::new(0); - diff --git a/src/test/run-pass/issues/issue-16278.rs b/src/test/run-pass/issues/issue-16278.rs index a9fa0db44d346..ad9af8473defe 100644 --- a/src/test/run-pass/issues/issue-16278.rs +++ b/src/test/run-pass/issues/issue-16278.rs @@ -3,9 +3,8 @@ // this file has some special \r\n endings (use xxd to see them) -fn main() {assert_eq!(b"", b"\ +fn main() {assert_eq!(b"", b"\ "); -assert_eq!(b"\n", b" +assert_eq!(b"\n", b" "); } - diff --git a/src/test/run-pass/issues/issue-21400.rs b/src/test/run-pass/issues/issue-21400.rs index 0f297e9b8f290..4a85158d97a45 100644 --- a/src/test/run-pass/issues/issue-21400.rs +++ b/src/test/run-pass/issues/issue-21400.rs @@ -54,4 +54,3 @@ impl GitConnect { Ok(out) } } - diff --git a/src/test/run-pass/issues/issue-23699.rs b/src/test/run-pass/issues/issue-23699.rs index 11b65d7a67aec..952548837e418 100644 --- a/src/test/run-pass/issues/issue-23699.rs +++ b/src/test/run-pass/issues/issue-23699.rs @@ -12,4 +12,3 @@ fn main() { let t = test as fn (i32); t(0i32); } - diff --git a/src/test/run-pass/issues/issue-24313.rs b/src/test/run-pass/issues/issue-24313.rs index d6426361faeec..ddcf1d0451106 100644 --- a/src/test/run-pass/issues/issue-24313.rs +++ b/src/test/run-pass/issues/issue-24313.rs @@ -30,4 +30,3 @@ fn main() { }).join().unwrap(); } } - diff --git a/src/test/run-pass/issues/issue-24687-embed-debuginfo/auxiliary/issue-24687-lib.rs b/src/test/run-pass/issues/issue-24687-embed-debuginfo/auxiliary/issue-24687-lib.rs index 2275a8da696dd..5b1b1389cebb3 100644 --- a/src/test/run-pass/issues/issue-24687-embed-debuginfo/auxiliary/issue-24687-lib.rs +++ b/src/test/run-pass/issues/issue-24687-embed-debuginfo/auxiliary/issue-24687-lib.rs @@ -8,4 +8,3 @@ mod issue_24687_mbcs_in_comments; pub use issue_24687_mbcs_in_comments::D; - diff --git a/src/test/run-pass/issues/issue-26873-multifile/A/B.rs b/src/test/run-pass/issues/issue-26873-multifile/A/B.rs index d1b802ff3cd48..ab7b0d81605f3 100644 --- a/src/test/run-pass/issues/issue-26873-multifile/A/B.rs +++ b/src/test/run-pass/issues/issue-26873-multifile/A/B.rs @@ -2,4 +2,3 @@ use super::*; pub struct S; - diff --git a/src/test/run-pass/issues/issue-26873-multifile/A/C.rs b/src/test/run-pass/issues/issue-26873-multifile/A/C.rs index 88f3eb04afbdc..b287283df5389 100644 --- a/src/test/run-pass/issues/issue-26873-multifile/A/C.rs +++ b/src/test/run-pass/issues/issue-26873-multifile/A/C.rs @@ -4,4 +4,3 @@ use super::*; use super::B::S; pub struct T { i: i32 } - diff --git a/src/test/run-pass/issues/issue-26873-multifile/A/mod.rs b/src/test/run-pass/issues/issue-26873-multifile/A/mod.rs index 20f40a06782ae..0f18772bf1b25 100644 --- a/src/test/run-pass/issues/issue-26873-multifile/A/mod.rs +++ b/src/test/run-pass/issues/issue-26873-multifile/A/mod.rs @@ -3,4 +3,3 @@ pub mod B; pub mod C; pub use self::C::T; - diff --git a/src/test/run-pass/issues/issue-26873-multifile/mod.rs b/src/test/run-pass/issues/issue-26873-multifile/mod.rs index 52deea79a20c7..a1ba53f919171 100644 --- a/src/test/run-pass/issues/issue-26873-multifile/mod.rs +++ b/src/test/run-pass/issues/issue-26873-multifile/mod.rs @@ -2,4 +2,3 @@ mod A; use self::A::*; - diff --git a/src/test/run-pass/issues/issue-26873-onefile.rs b/src/test/run-pass/issues/issue-26873-onefile.rs index 4cfffb08e8f4a..f06c6499eb0fb 100644 --- a/src/test/run-pass/issues/issue-26873-onefile.rs +++ b/src/test/run-pass/issues/issue-26873-onefile.rs @@ -23,4 +23,3 @@ mod A { use A::*; fn main() {} - diff --git a/src/test/run-pass/issues/issue-26905.rs b/src/test/run-pass/issues/issue-26905.rs index 309e2f7e5719b..2f500d1c0d1b7 100644 --- a/src/test/run-pass/issues/issue-26905.rs +++ b/src/test/run-pass/issues/issue-26905.rs @@ -19,4 +19,3 @@ fn main() { let x = MyRc { _ptr: &iter, _boo: PhantomData }; let _y: MyRc> = x; } - diff --git a/src/test/run-pass/issues/issue-28498-must-work-ex2.rs b/src/test/run-pass/issues/issue-28498-must-work-ex2.rs index 17111308555d8..cadf62461fdf5 100644 --- a/src/test/run-pass/issues/issue-28498-must-work-ex2.rs +++ b/src/test/run-pass/issues/issue-28498-must-work-ex2.rs @@ -18,4 +18,3 @@ fn main() { foo.data[0].1.set(Some(&foo.data[1])); foo.data[1].1.set(Some(&foo.data[0])); } - diff --git a/src/test/run-pass/issues/issue-28498-ugeh-ex1.rs b/src/test/run-pass/issues/issue-28498-ugeh-ex1.rs index 65d5588871b65..c4f249c45f13c 100644 --- a/src/test/run-pass/issues/issue-28498-ugeh-ex1.rs +++ b/src/test/run-pass/issues/issue-28498-ugeh-ex1.rs @@ -27,4 +27,3 @@ fn main() { foo.data[0].1.set(Some(&foo.data[1])); foo.data[1].1.set(Some(&foo.data[0])); } - diff --git a/src/test/run-pass/issues/issue-30371.rs b/src/test/run-pass/issues/issue-30371.rs index 093d4b8c11924..58521b95cf637 100644 --- a/src/test/run-pass/issues/issue-30371.rs +++ b/src/test/run-pass/issues/issue-30371.rs @@ -8,4 +8,3 @@ fn main() { () => Some(0), } {} } - diff --git a/src/test/run-pass/issues/issue-34784.rs b/src/test/run-pass/issues/issue-34784.rs index 4392637c39f26..d3206e9943009 100644 --- a/src/test/run-pass/issues/issue-34784.rs +++ b/src/test/run-pass/issues/issue-34784.rs @@ -17,4 +17,3 @@ fn main() { _ => {} } } - diff --git a/src/test/run-pass/issues/issue-39709.rs b/src/test/run-pass/issues/issue-39709.rs index 8ea49c2082b8a..69ef2700ef367 100644 --- a/src/test/run-pass/issues/issue-39709.rs +++ b/src/test/run-pass/issues/issue-39709.rs @@ -3,4 +3,3 @@ fn main() { println!("{}", { macro_rules! x { ($(t:tt)*) => {} } 33 }); } - diff --git a/src/test/run-pass/issues/issue-42453.rs b/src/test/run-pass/issues/issue-42453.rs index bea441c2bea33..92fefceabc131 100644 --- a/src/test/run-pass/issues/issue-42453.rs +++ b/src/test/run-pass/issues/issue-42453.rs @@ -8,4 +8,3 @@ struct builder; fn main() { } - diff --git a/src/test/run-pass/link-cfg-works.rs b/src/test/run-pass/link-cfg-works.rs index a4888292c7dfe..d7a248fd4d57e 100644 --- a/src/test/run-pass/link-cfg-works.rs +++ b/src/test/run-pass/link-cfg-works.rs @@ -10,4 +10,3 @@ extern crate link_cfg_works_transitive_dylib; extern {} fn main() {} - diff --git a/src/test/run-pass/lint-cap.rs b/src/test/run-pass/lint-cap.rs index 0e8bdbdc6aaf4..f03bb69189272 100644 --- a/src/test/run-pass/lint-cap.rs +++ b/src/test/run-pass/lint-cap.rs @@ -5,4 +5,3 @@ use std::option; fn main() {} - diff --git a/src/test/run-pass/macros/macro-first-set.rs b/src/test/run-pass/macros/macro-first-set.rs index 8b09e72ed2951..a21e4cd201a4f 100644 --- a/src/test/run-pass/macros/macro-first-set.rs +++ b/src/test/run-pass/macros/macro-first-set.rs @@ -275,4 +275,3 @@ fn main() { test_24189(); test_51477(); } - diff --git a/src/test/run-pass/macros/macro-follow.rs b/src/test/run-pass/macros/macro-follow.rs index 488339b025dce..ca93655631f7e 100644 --- a/src/test/run-pass/macros/macro-follow.rs +++ b/src/test/run-pass/macros/macro-follow.rs @@ -181,4 +181,3 @@ macro_rules! follow_meta { } fn main() {} - diff --git a/src/test/run-pass/macros/macro-nested_expr.rs b/src/test/run-pass/macros/macro-nested_expr.rs index 2f93ffec4abb8..f1433cbf4f910 100644 --- a/src/test/run-pass/macros/macro-nested_expr.rs +++ b/src/test/run-pass/macros/macro-nested_expr.rs @@ -20,4 +20,3 @@ fn main() { define_f!(concat!("exported_", "f")); m!(stringify!(foo)); } - diff --git a/src/test/run-pass/macros/macro-pat-neg-lit.rs b/src/test/run-pass/macros/macro-pat-neg-lit.rs index 5345df2e84e62..79c68fd254137 100644 --- a/src/test/run-pass/macros/macro-pat-neg-lit.rs +++ b/src/test/run-pass/macros/macro-pat-neg-lit.rs @@ -23,4 +23,3 @@ enum_number!(Change { fn main() { if let Some(Change::Down) = foo(-1) {} else { panic!() } } - diff --git a/src/test/run-pass/mir/mir_constval_adts.rs b/src/test/run-pass/mir/mir_constval_adts.rs index 3156be3584e1f..ee9d73451f45f 100644 --- a/src/test/run-pass/mir/mir_constval_adts.rs +++ b/src/test/run-pass/mir/mir_constval_adts.rs @@ -32,4 +32,3 @@ fn main(){ assert_eq!(mir(), (STRUCT, TUPLE1, TUPLE2, PAIR_NEWTYPE)); test_promoted_newtype_str_ref(); } - diff --git a/src/test/run-pass/never-result.rs b/src/test/run-pass/never-result.rs index 2b395aa7f66bd..808377ffa1189 100644 --- a/src/test/run-pass/never-result.rs +++ b/src/test/run-pass/never-result.rs @@ -16,4 +16,3 @@ fn main() { }, } } - diff --git a/src/test/run-pass/never_coercions.rs b/src/test/run-pass/never_coercions.rs index 70f67fd3da1b2..f32e2973813c6 100644 --- a/src/test/run-pass/never_coercions.rs +++ b/src/test/run-pass/never_coercions.rs @@ -9,4 +9,3 @@ fn main() { _ => &v[..], }; } - diff --git a/src/test/run-pass/nll/rc-loop.rs b/src/test/run-pass/nll/rc-loop.rs index 2c54ee8693902..a4ef546c25f4a 100644 --- a/src/test/run-pass/nll/rc-loop.rs +++ b/src/test/run-pass/nll/rc-loop.rs @@ -28,4 +28,3 @@ fn main() { let base = find_base(chain); assert_eq!(&*base, &Foo::Base(44)); } - diff --git a/src/test/run-pass/optimization-fuel-0.rs b/src/test/run-pass/optimization-fuel-0.rs index 0920bc9c4b91a..77f21b3fcc0af 100644 --- a/src/test/run-pass/optimization-fuel-0.rs +++ b/src/test/run-pass/optimization-fuel-0.rs @@ -12,4 +12,3 @@ fn main() { assert_eq!(size_of::(), 6); assert_eq!(size_of::(), 6); } - diff --git a/src/test/run-pass/proc-macro/auxiliary/expand-with-a-macro.rs b/src/test/run-pass/proc-macro/auxiliary/expand-with-a-macro.rs index 8580005f4fc3b..5155a4b855865 100644 --- a/src/test/run-pass/proc-macro/auxiliary/expand-with-a-macro.rs +++ b/src/test/run-pass/proc-macro/auxiliary/expand-with-a-macro.rs @@ -20,4 +20,3 @@ pub fn derive(input: TokenStream) -> TokenStream { } "#.parse().unwrap() } - diff --git a/src/test/run-pass/proc-macro/auxiliary/external-crate-var.rs b/src/test/run-pass/proc-macro/auxiliary/external-crate-var.rs index 09e5aea9b8305..4319e921225e0 100644 --- a/src/test/run-pass/proc-macro/auxiliary/external-crate-var.rs +++ b/src/test/run-pass/proc-macro/auxiliary/external-crate-var.rs @@ -38,4 +38,3 @@ macro_rules! external { () => { } } } } - diff --git a/src/test/run-pass/proc-macro/auxiliary/span-api-tests.rs b/src/test/run-pass/proc-macro/auxiliary/span-api-tests.rs index 9092e7a49ea6e..ad1e770a4dcbe 100644 --- a/src/test/run-pass/proc-macro/auxiliary/span-api-tests.rs +++ b/src/test/run-pass/proc-macro/auxiliary/span-api-tests.rs @@ -43,4 +43,3 @@ pub fn macro_stringify(input: TokenStream) -> TokenStream { let src = span.source_text().expect("source_text"); TokenTree::Literal(Literal::string(&src)).into() } - diff --git a/src/test/run-pass/proc-macro/expand-with-a-macro.rs b/src/test/run-pass/proc-macro/expand-with-a-macro.rs index 46c8e0ef5e599..097520b993a79 100644 --- a/src/test/run-pass/proc-macro/expand-with-a-macro.rs +++ b/src/test/run-pass/proc-macro/expand-with-a-macro.rs @@ -17,4 +17,3 @@ fn main() { A.a(); }).is_err()); } - diff --git a/src/test/run-pass/project-cache-issue-31849.rs b/src/test/run-pass/project-cache-issue-31849.rs index 086883e5cb3cd..4920678af1a06 100644 --- a/src/test/run-pass/project-cache-issue-31849.rs +++ b/src/test/run-pass/project-cache-issue-31849.rs @@ -62,4 +62,3 @@ fn main() { let it = ((((((((((),()),()),()),()),()),()),()),()),()); it.build(); } - diff --git a/src/test/run-pass/range_inclusive_gate.rs b/src/test/run-pass/range_inclusive_gate.rs index 7f72bf5d32578..d4d830ef22317 100644 --- a/src/test/run-pass/range_inclusive_gate.rs +++ b/src/test/run-pass/range_inclusive_gate.rs @@ -10,4 +10,3 @@ fn main() { } assert_eq!(count, 55); } - diff --git a/src/test/run-pass/signal-alternate-stack-cleanup.rs b/src/test/run-pass/signal-alternate-stack-cleanup.rs index 3958e72040d3d..d11f3f5b5e66c 100644 --- a/src/test/run-pass/signal-alternate-stack-cleanup.rs +++ b/src/test/run-pass/signal-alternate-stack-cleanup.rs @@ -33,4 +33,3 @@ fn main() { atexit(send_signal); } } - diff --git a/src/test/run-pass/thinlto/thin-lto-inlines2.rs b/src/test/run-pass/thinlto/thin-lto-inlines2.rs index f053dd35a21b5..1eb29657c70d6 100644 --- a/src/test/run-pass/thinlto/thin-lto-inlines2.rs +++ b/src/test/run-pass/thinlto/thin-lto-inlines2.rs @@ -26,4 +26,3 @@ fn main() { assert_eq!(*foo, *bar); } } - diff --git a/src/test/run-pass/try_from.rs b/src/test/run-pass/try_from.rs index e42f2c3e3930d..98344491aecf4 100644 --- a/src/test/run-pass/try_from.rs +++ b/src/test/run-pass/try_from.rs @@ -34,4 +34,3 @@ impl Into> for Foo { pub fn main() { let _: Result, Infallible> = Foo { t: 10 }.try_into(); } - diff --git a/src/test/rustdoc-ui/intra-link-span-ice-55723.rs b/src/test/rustdoc-ui/intra-link-span-ice-55723.rs index 5891a553e3255..c7a13bbf606cb 100644 --- a/src/test/rustdoc-ui/intra-link-span-ice-55723.rs +++ b/src/test/rustdoc-ui/intra-link-span-ice-55723.rs @@ -1,5 +1,3 @@ -// ignore-tidy-end-whitespace - #![deny(intra_doc_link_resolution_failure)] // An error in calculating spans while reporting intra-doc link resolution errors caused rustdoc to diff --git a/src/test/rustdoc-ui/intra-link-span-ice-55723.stderr b/src/test/rustdoc-ui/intra-link-span-ice-55723.stderr index 7ee9ca4792395..79702a1a546b7 100644 --- a/src/test/rustdoc-ui/intra-link-span-ice-55723.stderr +++ b/src/test/rustdoc-ui/intra-link-span-ice-55723.stderr @@ -1,11 +1,11 @@ error: `[i]` cannot be resolved, ignoring it... - --> $DIR/intra-link-span-ice-55723.rs:11:10 + --> $DIR/intra-link-span-ice-55723.rs:9:10 | LL | /// (arr[i]) | ^ cannot be resolved, ignoring | note: lint level defined here - --> $DIR/intra-link-span-ice-55723.rs:3:9 + --> $DIR/intra-link-span-ice-55723.rs:1:9 | LL | #![deny(intra_doc_link_resolution_failure)] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/src/test/rustdoc/auxiliary/issue-23207-2.rs b/src/test/rustdoc/auxiliary/issue-23207-2.rs index e1afb68dc7921..b92b16653167b 100644 --- a/src/test/rustdoc/auxiliary/issue-23207-2.rs +++ b/src/test/rustdoc/auxiliary/issue-23207-2.rs @@ -3,4 +3,3 @@ extern crate issue_23207_1; pub mod fmt { pub use issue_23207_1::fmt::Error; } - diff --git a/src/test/rustdoc/empty-mod-private.rs b/src/test/rustdoc/empty-mod-private.rs index 12576a1b535f7..c2a98049a48cb 100644 --- a/src/test/rustdoc/empty-mod-private.rs +++ b/src/test/rustdoc/empty-mod-private.rs @@ -1,4 +1,3 @@ -// ignore-tidy-linelength // compile-flags: --document-private-items // @has 'empty_mod_private/index.html' '//a[@href="foo/index.html"]' 'foo' diff --git a/src/test/rustdoc/extern-html-root-url.rs b/src/test/rustdoc/extern-html-root-url.rs index 674d0305f2eae..60b7b28ae4acf 100644 --- a/src/test/rustdoc/extern-html-root-url.rs +++ b/src/test/rustdoc/extern-html-root-url.rs @@ -1,5 +1,3 @@ -// ignore-tidy-linelength - // compile-flags:-Z unstable-options --extern-html-root-url core=https://example.com/core/0.1.0 // @has extern_html_root_url/index.html diff --git a/src/test/rustdoc/inline_cross/auxiliary/proc_macro.rs b/src/test/rustdoc/inline_cross/auxiliary/proc_macro.rs index 9836b6ba2edfd..c99ef74433358 100644 --- a/src/test/rustdoc/inline_cross/auxiliary/proc_macro.rs +++ b/src/test/rustdoc/inline_cross/auxiliary/proc_macro.rs @@ -25,4 +25,3 @@ pub fn some_proc_attr(_attr: TokenStream, item: TokenStream) -> TokenStream { pub fn some_derive(_item: TokenStream) -> TokenStream { TokenStream::new() } - diff --git a/src/test/rustdoc/inline_cross/auxiliary/rustdoc-trait-object-impl.rs b/src/test/rustdoc/inline_cross/auxiliary/rustdoc-trait-object-impl.rs index 76913f02cfd82..11d8733c40d12 100644 --- a/src/test/rustdoc/inline_cross/auxiliary/rustdoc-trait-object-impl.rs +++ b/src/test/rustdoc/inline_cross/auxiliary/rustdoc-trait-object-impl.rs @@ -11,4 +11,3 @@ impl<'a> fmt::Debug for Bar + 'a { Ok(()) } } - diff --git a/src/test/rustdoc/inline_cross/issue-32881.rs b/src/test/rustdoc/inline_cross/issue-32881.rs index f783837d06054..5f31e6cd3ad1f 100644 --- a/src/test/rustdoc/inline_cross/issue-32881.rs +++ b/src/test/rustdoc/inline_cross/issue-32881.rs @@ -9,4 +9,3 @@ extern crate rustdoc_trait_object_impl; // @has - '//code' "impl<'a> Debug for dyn Bar" pub use rustdoc_trait_object_impl::Bar; - diff --git a/src/test/rustdoc/issue-15318-2.rs b/src/test/rustdoc/issue-15318-2.rs index 1dbfba988efee..2af811ad5bbe8 100644 --- a/src/test/rustdoc/issue-15318-2.rs +++ b/src/test/rustdoc/issue-15318-2.rs @@ -9,4 +9,3 @@ pub use issue_15318::ptr; // '//*[@href="primitive.pointer.html"]' \ // '*mut T' pub fn bar(ptr: *mut T) {} - diff --git a/src/test/rustdoc/issue-19190-3.rs b/src/test/rustdoc/issue-19190-3.rs index f7366302a1e67..4d34ce6509fe3 100644 --- a/src/test/rustdoc/issue-19190-3.rs +++ b/src/test/rustdoc/issue-19190-3.rs @@ -25,4 +25,3 @@ impl Deref for MyBar { type Target = Baz; fn deref(&self) -> &Baz { loop {} } } - diff --git a/src/test/rustdoc/issue-20727-2.rs b/src/test/rustdoc/issue-20727-2.rs index 7c8b82fbe2114..022ff290e1a71 100644 --- a/src/test/rustdoc/issue-20727-2.rs +++ b/src/test/rustdoc/issue-20727-2.rs @@ -20,4 +20,3 @@ pub mod reexport { // @has - '//*[@class="rust trait"]' 'fn add(self, rhs: RHS) -> Self::Output;' pub use issue_20727::Add; } - diff --git a/src/test/rustdoc/issue-23207.rs b/src/test/rustdoc/issue-23207.rs index 747c59bba6aa5..1a4b849ee8209 100644 --- a/src/test/rustdoc/issue-23207.rs +++ b/src/test/rustdoc/issue-23207.rs @@ -7,4 +7,3 @@ extern crate issue_23207_2; // @has issue_23207/fmt/index.html // @count - '//*[@class="struct"]' 1 pub use issue_23207_2::fmt; - diff --git a/src/test/rustdoc/issue-38129.rs b/src/test/rustdoc/issue-38129.rs index bf9d5e433046b..156d50fa52a64 100644 --- a/src/test/rustdoc/issue-38129.rs +++ b/src/test/rustdoc/issue-38129.rs @@ -97,4 +97,3 @@ pub fn both_attrs() {} /// assert_eq!(1 + 1, 2); /// ``` pub fn both_attrs_reverse() {} - diff --git a/src/test/rustdoc/issue-56701.rs b/src/test/rustdoc/issue-56701.rs index 6fb30a4ff4c30..ba00743fcd12e 100644 --- a/src/test/rustdoc/issue-56701.rs +++ b/src/test/rustdoc/issue-56701.rs @@ -31,4 +31,3 @@ impl>> Deref for Unrelated Pattern for Wrapper { // WriteAndThen where ::Value: Send" pub struct WriteAndThen(pub P1::Value,pub > as Pattern>::Value) where P1: Pattern; - diff --git a/src/test/ui-fulldeps/dropck-tarena-unsound-drop.rs b/src/test/ui-fulldeps/dropck-tarena-unsound-drop.rs index 3103aef36cb9f..e454f44d1af6b 100644 --- a/src/test/ui-fulldeps/dropck-tarena-unsound-drop.rs +++ b/src/test/ui-fulldeps/dropck-tarena-unsound-drop.rs @@ -40,4 +40,3 @@ fn main() { let arena: TypedArena = TypedArena::default(); f(&arena); } //~^ ERROR `arena` does not live long enough - diff --git a/src/test/ui/allocator/two-allocators.rs b/src/test/ui/allocator/two-allocators.rs index c967a45c7b485..10fb03c39302b 100644 --- a/src/test/ui/allocator/two-allocators.rs +++ b/src/test/ui/allocator/two-allocators.rs @@ -7,4 +7,3 @@ static B: System = System; //~^ ERROR: cannot define more than one #[global_allocator] fn main() {} - diff --git a/src/test/ui/allocator/two-allocators2.rs b/src/test/ui/allocator/two-allocators2.rs index b7a07cc274e1d..96da780e4a254 100644 --- a/src/test/ui/allocator/two-allocators2.rs +++ b/src/test/ui/allocator/two-allocators2.rs @@ -10,4 +10,3 @@ use std::alloc::System; static A: System = System; fn main() {} - diff --git a/src/test/ui/auxiliary/default-ty-param-cross-crate-crate.rs b/src/test/ui/auxiliary/default-ty-param-cross-crate-crate.rs index 612f99dbcf884..d722b78768a47 100644 --- a/src/test/ui/auxiliary/default-ty-param-cross-crate-crate.rs +++ b/src/test/ui/auxiliary/default-ty-param-cross-crate-crate.rs @@ -7,4 +7,3 @@ use std::marker::PhantomData; pub struct Foo(PhantomData<(A, B)>); pub fn bleh() -> Foo { Foo(PhantomData) } - diff --git a/src/test/ui/bad/bad-lint-cap3.rs b/src/test/ui/bad/bad-lint-cap3.rs index 8aab38ee5ecf4..4cfa0b266c8c7 100644 --- a/src/test/ui/bad/bad-lint-cap3.rs +++ b/src/test/ui/bad/bad-lint-cap3.rs @@ -8,4 +8,3 @@ use std::option; //~ WARN fn main() {} - diff --git a/src/test/ui/binop/binop-logic-float.rs b/src/test/ui/binop/binop-logic-float.rs index c95c1d30d1ce3..1750d97ba815a 100644 --- a/src/test/ui/binop/binop-logic-float.rs +++ b/src/test/ui/binop/binop-logic-float.rs @@ -1,4 +1,3 @@ fn main() { let x = 1.0_f32 || 2.0_f32; } //~^ ERROR mismatched types //~| ERROR mismatched types - diff --git a/src/test/ui/borrowck/immutable-arg.rs b/src/test/ui/borrowck/immutable-arg.rs index 5a5e619ef31f2..8d1cd3c80455c 100644 --- a/src/test/ui/borrowck/immutable-arg.rs +++ b/src/test/ui/borrowck/immutable-arg.rs @@ -7,4 +7,3 @@ fn foo(_x: u32) { } fn main() {} - diff --git a/src/test/ui/borrowck/mut-borrow-in-loop.rs b/src/test/ui/borrowck/mut-borrow-in-loop.rs index 6b65b903757ac..09f3e4f9b76d8 100644 --- a/src/test/ui/borrowck/mut-borrow-in-loop.rs +++ b/src/test/ui/borrowck/mut-borrow-in-loop.rs @@ -27,4 +27,3 @@ impl<'a, T : 'a> FuncWrapper<'a, T> { fn main() { } - diff --git a/src/test/ui/borrowck/two-phase-activation-sharing-interference.nll_target.stderr b/src/test/ui/borrowck/two-phase-activation-sharing-interference.nll_target.stderr index 8370aad6f3046..40786c032b180 100644 --- a/src/test/ui/borrowck/two-phase-activation-sharing-interference.nll_target.stderr +++ b/src/test/ui/borrowck/two-phase-activation-sharing-interference.nll_target.stderr @@ -1,5 +1,5 @@ error[E0502]: cannot borrow `x` as immutable because it is also borrowed as mutable - --> $DIR/two-phase-activation-sharing-interference.rs:32:15 + --> $DIR/two-phase-activation-sharing-interference.rs:30:15 | LL | let y = &mut x; | ------ mutable borrow occurs here @@ -10,7 +10,7 @@ LL | *y += 1; | ------- mutable borrow later used here error[E0502]: cannot borrow `x` as immutable because it is also borrowed as mutable - --> $DIR/two-phase-activation-sharing-interference.rs:40:13 + --> $DIR/two-phase-activation-sharing-interference.rs:38:13 | LL | let y = &mut x; | ------ mutable borrow occurs here @@ -21,7 +21,7 @@ LL | *y += 1; | ------- mutable borrow later used here error[E0502]: cannot borrow `x` as immutable because it is also borrowed as mutable - --> $DIR/two-phase-activation-sharing-interference.rs:51:13 + --> $DIR/two-phase-activation-sharing-interference.rs:49:13 | LL | let y = &mut x; | ------ mutable borrow occurs here @@ -32,7 +32,7 @@ LL | *y += 1; | ------- mutable borrow later used here error[E0502]: cannot borrow `x` as immutable because it is also borrowed as mutable - --> $DIR/two-phase-activation-sharing-interference.rs:62:14 + --> $DIR/two-phase-activation-sharing-interference.rs:60:14 | LL | let y = &mut x; | ------ mutable borrow occurs here diff --git a/src/test/ui/borrowck/two-phase-activation-sharing-interference.rs b/src/test/ui/borrowck/two-phase-activation-sharing-interference.rs index 55a8ae7a49ef3..4d77ac915b1e7 100644 --- a/src/test/ui/borrowck/two-phase-activation-sharing-interference.rs +++ b/src/test/ui/borrowck/two-phase-activation-sharing-interference.rs @@ -1,5 +1,3 @@ -// ignore-tidy-linelength - // revisions: nll_target // The following revisions are disabled due to missing support from two-phase beyond autorefs diff --git a/src/test/ui/borrowck/two-phase-reservation-sharing-interference.rs b/src/test/ui/borrowck/two-phase-reservation-sharing-interference.rs index d8e60c5859e89..de6f66c1c3f9b 100644 --- a/src/test/ui/borrowck/two-phase-reservation-sharing-interference.rs +++ b/src/test/ui/borrowck/two-phase-reservation-sharing-interference.rs @@ -47,4 +47,3 @@ fn main() { // flummoxes our attmpt to delay the activation point here.) delay.push(2); } - diff --git a/src/test/ui/call-fn-never-arg-wrong-type.rs b/src/test/ui/call-fn-never-arg-wrong-type.rs index 7ed1162171f1c..d06637e74a2f2 100644 --- a/src/test/ui/call-fn-never-arg-wrong-type.rs +++ b/src/test/ui/call-fn-never-arg-wrong-type.rs @@ -9,4 +9,3 @@ fn foo(x: !) -> ! { fn main() { foo("wow"); //~ ERROR mismatched types } - diff --git a/src/test/ui/consts/const-array-oob.rs b/src/test/ui/consts/const-array-oob.rs index 39ef45175f9e3..1174a76adabcb 100644 --- a/src/test/ui/consts/const-array-oob.rs +++ b/src/test/ui/consts/const-array-oob.rs @@ -1,5 +1,3 @@ -// ignore-tidy-linelength - #![feature(const_indexing)] const FOO: [usize; 3] = [1, 2, 3]; diff --git a/src/test/ui/consts/const-array-oob.stderr b/src/test/ui/consts/const-array-oob.stderr index 2d9a4fd0dea27..f25cac5cddd47 100644 --- a/src/test/ui/consts/const-array-oob.stderr +++ b/src/test/ui/consts/const-array-oob.stderr @@ -1,5 +1,5 @@ error[E0080]: evaluation of constant value failed - --> $DIR/const-array-oob.rs:8:19 + --> $DIR/const-array-oob.rs:6:19 | LL | const BLUB: [u32; FOO[4]] = [5, 6]; | ^^^^^^ index out of bounds: the len is 3 but the index is 4 diff --git a/src/test/ui/consts/const-eval/const-eval-overflow-3b.rs b/src/test/ui/consts/const-eval/const-eval-overflow-3b.rs index d9b06370dff79..db6f17a671aea 100644 --- a/src/test/ui/consts/const-eval/const-eval-overflow-3b.rs +++ b/src/test/ui/consts/const-eval/const-eval-overflow-3b.rs @@ -7,12 +7,6 @@ // types for the left- and right-hand sides of the addition do not // match (as well as overflow). - - - - - - #![allow(unused_imports)] use std::fmt; @@ -32,4 +26,3 @@ fn main() { fn foo(x: T) { println!("{:?}", x); } - diff --git a/src/test/ui/consts/const-eval/const-eval-overflow-3b.stderr b/src/test/ui/consts/const-eval/const-eval-overflow-3b.stderr index 9f08f0aa53592..f6b6b5882ba3c 100644 --- a/src/test/ui/consts/const-eval/const-eval-overflow-3b.stderr +++ b/src/test/ui/consts/const-eval/const-eval-overflow-3b.stderr @@ -1,11 +1,11 @@ error[E0308]: mismatched types - --> $DIR/const-eval-overflow-3b.rs:24:22 + --> $DIR/const-eval-overflow-3b.rs:18:22 | LL | = [0; (i8::MAX + 1u8) as usize]; | ^^^ expected i8, found u8 error[E0277]: cannot add `u8` to `i8` - --> $DIR/const-eval-overflow-3b.rs:24:20 + --> $DIR/const-eval-overflow-3b.rs:18:20 | LL | = [0; (i8::MAX + 1u8) as usize]; | ^ no implementation for `i8 + u8` diff --git a/src/test/ui/consts/min_const_fn/min_const_fn.rs b/src/test/ui/consts/min_const_fn/min_const_fn.rs index 881cbb14b538f..783c79005ae37 100644 --- a/src/test/ui/consts/min_const_fn/min_const_fn.rs +++ b/src/test/ui/consts/min_const_fn/min_const_fn.rs @@ -148,4 +148,3 @@ const fn no_fn_ptrs(_x: fn()) {} //~^ ERROR function pointers in const fn are unstable const fn no_fn_ptrs2() -> fn() { fn foo() {} foo } //~^ ERROR function pointers in const fn are unstable - diff --git a/src/test/ui/consts/union_constant.rs b/src/test/ui/consts/union_constant.rs index 074014908bad4..6b6042194ba20 100644 --- a/src/test/ui/consts/union_constant.rs +++ b/src/test/ui/consts/union_constant.rs @@ -8,4 +8,3 @@ union Uninit { const UNINIT: Uninit = Uninit { uninit: () }; fn main() {} - diff --git a/src/test/ui/defaulted-never-note.rs b/src/test/ui/defaulted-never-note.rs index acda4b42f15ee..cf1922ecc789f 100644 --- a/src/test/ui/defaulted-never-note.rs +++ b/src/test/ui/defaulted-never-note.rs @@ -32,4 +32,3 @@ fn smeg() { fn main() { smeg(); } - diff --git a/src/test/ui/deprecation/deprecation-in-future.rs b/src/test/ui/deprecation/deprecation-in-future.rs index 138d902621cbc..c4f9fdce74907 100644 --- a/src/test/ui/deprecation/deprecation-in-future.rs +++ b/src/test/ui/deprecation/deprecation-in-future.rs @@ -1,5 +1,3 @@ -// ignore-tidy-linelength - // run-pass #![deny(deprecated_in_future)] diff --git a/src/test/ui/deprecation/deprecation-in-future.stderr b/src/test/ui/deprecation/deprecation-in-future.stderr index 81d2461c1bd83..2284cfa8d685b 100644 --- a/src/test/ui/deprecation/deprecation-in-future.stderr +++ b/src/test/ui/deprecation/deprecation-in-future.stderr @@ -1,5 +1,5 @@ warning: use of deprecated item 'deprecated_future': text - --> $DIR/deprecation-in-future.rs:11:5 + --> $DIR/deprecation-in-future.rs:9:5 | LL | deprecated_future(); // ok; deprecated_in_future only applies to rustc_deprecated | ^^^^^^^^^^^^^^^^^ diff --git a/src/test/ui/derive-uninhabited-enum-38885.rs b/src/test/ui/derive-uninhabited-enum-38885.rs index c0279d60e24c9..b314eacc92e0e 100644 --- a/src/test/ui/derive-uninhabited-enum-38885.rs +++ b/src/test/ui/derive-uninhabited-enum-38885.rs @@ -14,4 +14,3 @@ enum Foo { //~ WARN never used } fn main() {} - diff --git a/src/test/ui/derives/deriving-copyclone.rs b/src/test/ui/derives/deriving-copyclone.rs index afe619690711f..4565412bff7f3 100644 --- a/src/test/ui/derives/deriving-copyclone.rs +++ b/src/test/ui/derives/deriving-copyclone.rs @@ -35,4 +35,3 @@ fn main() { is_copy(B { a: 1, b: D }); //~ERROR Copy is_clone(B { a: 1, b: D }); } - diff --git a/src/test/ui/derives/deriving-meta-unknown-trait.rs b/src/test/ui/derives/deriving-meta-unknown-trait.rs index 2b29f10150b96..f4a6f3fd62a05 100644 --- a/src/test/ui/derives/deriving-meta-unknown-trait.rs +++ b/src/test/ui/derives/deriving-meta-unknown-trait.rs @@ -1,5 +1,3 @@ -// ignore-tidy-linelength - #[derive(Eqr)] //~^ ERROR cannot find derive macro `Eqr` in this scope struct Foo; diff --git a/src/test/ui/derives/deriving-meta-unknown-trait.stderr b/src/test/ui/derives/deriving-meta-unknown-trait.stderr index 2b121ac679ae0..cf0173dfad5cd 100644 --- a/src/test/ui/derives/deriving-meta-unknown-trait.stderr +++ b/src/test/ui/derives/deriving-meta-unknown-trait.stderr @@ -1,5 +1,5 @@ error: cannot find derive macro `Eqr` in this scope - --> $DIR/deriving-meta-unknown-trait.rs:3:10 + --> $DIR/deriving-meta-unknown-trait.rs:1:10 | LL | #[derive(Eqr)] | ^^^ help: try: `Eq` diff --git a/src/test/ui/derives/deriving-primitive.rs b/src/test/ui/derives/deriving-primitive.rs index 53acf6164d9fe..c7098d4b563bb 100644 --- a/src/test/ui/derives/deriving-primitive.rs +++ b/src/test/ui/derives/deriving-primitive.rs @@ -2,4 +2,3 @@ enum Foo {} fn main() {} - diff --git a/src/test/ui/did_you_mean/recursion_limit_deref.rs b/src/test/ui/did_you_mean/recursion_limit_deref.rs index 76e555e5aa6e6..613843801d461 100644 --- a/src/test/ui/did_you_mean/recursion_limit_deref.rs +++ b/src/test/ui/did_you_mean/recursion_limit_deref.rs @@ -50,4 +50,3 @@ fn main() { let x: &Bottom = &t; //~ ERROR mismatched types //~^ error recursion limit } - diff --git a/src/test/ui/did_you_mean/recursion_limit_macro.rs b/src/test/ui/did_you_mean/recursion_limit_macro.rs index c9415361cf826..a68a5ece7cf10 100644 --- a/src/test/ui/did_you_mean/recursion_limit_macro.rs +++ b/src/test/ui/did_you_mean/recursion_limit_macro.rs @@ -13,4 +13,3 @@ macro_rules! recurse { fn main() { recurse!(0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9); } - diff --git a/src/test/ui/discrim/discrim-overflow-2.rs b/src/test/ui/discrim/discrim-overflow-2.rs index 9ff39cd048454..f8f565f4d9c14 100644 --- a/src/test/ui/discrim/discrim-overflow-2.rs +++ b/src/test/ui/discrim/discrim-overflow-2.rs @@ -1,5 +1,3 @@ -// ignore-tidy-linelength - // Issue 23030: Detect overflowing discriminant // // Check that we detect the overflow even if enum is not used. diff --git a/src/test/ui/discrim/discrim-overflow-2.stderr b/src/test/ui/discrim/discrim-overflow-2.stderr index 744324d1f0ff5..198ebe9eb51f9 100644 --- a/src/test/ui/discrim/discrim-overflow-2.stderr +++ b/src/test/ui/discrim/discrim-overflow-2.stderr @@ -1,5 +1,5 @@ error[E0370]: enum discriminant overflowed - --> $DIR/discrim-overflow-2.rs:17:9 + --> $DIR/discrim-overflow-2.rs:15:9 | LL | OhNo, | ^^^^ overflowed on value after 127 @@ -7,7 +7,7 @@ LL | OhNo, = note: explicitly set `OhNo = -128` if that is desired outcome error[E0370]: enum discriminant overflowed - --> $DIR/discrim-overflow-2.rs:26:9 + --> $DIR/discrim-overflow-2.rs:24:9 | LL | OhNo, | ^^^^ overflowed on value after 255 @@ -15,7 +15,7 @@ LL | OhNo, = note: explicitly set `OhNo = 0` if that is desired outcome error[E0370]: enum discriminant overflowed - --> $DIR/discrim-overflow-2.rs:35:9 + --> $DIR/discrim-overflow-2.rs:33:9 | LL | OhNo, | ^^^^ overflowed on value after 32767 @@ -23,7 +23,7 @@ LL | OhNo, = note: explicitly set `OhNo = -32768` if that is desired outcome error[E0370]: enum discriminant overflowed - --> $DIR/discrim-overflow-2.rs:44:9 + --> $DIR/discrim-overflow-2.rs:42:9 | LL | OhNo, | ^^^^ overflowed on value after 65535 @@ -31,7 +31,7 @@ LL | OhNo, = note: explicitly set `OhNo = 0` if that is desired outcome error[E0370]: enum discriminant overflowed - --> $DIR/discrim-overflow-2.rs:53:9 + --> $DIR/discrim-overflow-2.rs:51:9 | LL | OhNo, | ^^^^ overflowed on value after 2147483647 @@ -39,7 +39,7 @@ LL | OhNo, = note: explicitly set `OhNo = -2147483648` if that is desired outcome error[E0370]: enum discriminant overflowed - --> $DIR/discrim-overflow-2.rs:62:9 + --> $DIR/discrim-overflow-2.rs:60:9 | LL | OhNo, | ^^^^ overflowed on value after 4294967295 @@ -47,7 +47,7 @@ LL | OhNo, = note: explicitly set `OhNo = 0` if that is desired outcome error[E0370]: enum discriminant overflowed - --> $DIR/discrim-overflow-2.rs:71:9 + --> $DIR/discrim-overflow-2.rs:69:9 | LL | OhNo, | ^^^^ overflowed on value after 9223372036854775807 @@ -55,7 +55,7 @@ LL | OhNo, = note: explicitly set `OhNo = -9223372036854775808` if that is desired outcome error[E0370]: enum discriminant overflowed - --> $DIR/discrim-overflow-2.rs:80:9 + --> $DIR/discrim-overflow-2.rs:78:9 | LL | OhNo, | ^^^^ overflowed on value after 18446744073709551615 diff --git a/src/test/ui/discrim/discrim-overflow.rs b/src/test/ui/discrim/discrim-overflow.rs index c612661178cf6..d8a9dacfa5180 100644 --- a/src/test/ui/discrim/discrim-overflow.rs +++ b/src/test/ui/discrim/discrim-overflow.rs @@ -1,5 +1,3 @@ -// ignore-tidy-linelength - // Issue 23030: Detect overflowing discriminant // See also run-pass/discrim-explicit-23030.rs where the suggested diff --git a/src/test/ui/discrim/discrim-overflow.stderr b/src/test/ui/discrim/discrim-overflow.stderr index c831fdfe1a34d..a2ae4863f9f79 100644 --- a/src/test/ui/discrim/discrim-overflow.stderr +++ b/src/test/ui/discrim/discrim-overflow.stderr @@ -1,5 +1,5 @@ error[E0370]: enum discriminant overflowed - --> $DIR/discrim-overflow.rs:15:9 + --> $DIR/discrim-overflow.rs:13:9 | LL | OhNo, | ^^^^ overflowed on value after 127 @@ -7,7 +7,7 @@ LL | OhNo, = note: explicitly set `OhNo = -128` if that is desired outcome error[E0370]: enum discriminant overflowed - --> $DIR/discrim-overflow.rs:26:9 + --> $DIR/discrim-overflow.rs:24:9 | LL | OhNo, | ^^^^ overflowed on value after 255 @@ -15,7 +15,7 @@ LL | OhNo, = note: explicitly set `OhNo = 0` if that is desired outcome error[E0370]: enum discriminant overflowed - --> $DIR/discrim-overflow.rs:37:9 + --> $DIR/discrim-overflow.rs:35:9 | LL | OhNo, | ^^^^ overflowed on value after 32767 @@ -23,7 +23,7 @@ LL | OhNo, = note: explicitly set `OhNo = -32768` if that is desired outcome error[E0370]: enum discriminant overflowed - --> $DIR/discrim-overflow.rs:48:9 + --> $DIR/discrim-overflow.rs:46:9 | LL | OhNo, | ^^^^ overflowed on value after 65535 @@ -31,7 +31,7 @@ LL | OhNo, = note: explicitly set `OhNo = 0` if that is desired outcome error[E0370]: enum discriminant overflowed - --> $DIR/discrim-overflow.rs:60:9 + --> $DIR/discrim-overflow.rs:58:9 | LL | OhNo, | ^^^^ overflowed on value after 2147483647 @@ -39,7 +39,7 @@ LL | OhNo, = note: explicitly set `OhNo = -2147483648` if that is desired outcome error[E0370]: enum discriminant overflowed - --> $DIR/discrim-overflow.rs:72:9 + --> $DIR/discrim-overflow.rs:70:9 | LL | OhNo, | ^^^^ overflowed on value after 4294967295 @@ -47,7 +47,7 @@ LL | OhNo, = note: explicitly set `OhNo = 0` if that is desired outcome error[E0370]: enum discriminant overflowed - --> $DIR/discrim-overflow.rs:84:9 + --> $DIR/discrim-overflow.rs:82:9 | LL | OhNo, | ^^^^ overflowed on value after 9223372036854775807 @@ -55,7 +55,7 @@ LL | OhNo, = note: explicitly set `OhNo = -9223372036854775808` if that is desired outcome error[E0370]: enum discriminant overflowed - --> $DIR/discrim-overflow.rs:96:9 + --> $DIR/discrim-overflow.rs:94:9 | LL | OhNo, | ^^^^ overflowed on value after 18446744073709551615 diff --git a/src/test/ui/editions/edition-raw-pointer-method-2015.rs b/src/test/ui/editions/edition-raw-pointer-method-2015.rs index a538bca75f67d..3631415fc5f98 100644 --- a/src/test/ui/editions/edition-raw-pointer-method-2015.rs +++ b/src/test/ui/editions/edition-raw-pointer-method-2015.rs @@ -1,4 +1,3 @@ -// ignore-tidy-linelength // edition:2015 // tests that editions work with the tyvar warning-turned-error diff --git a/src/test/ui/editions/edition-raw-pointer-method-2015.stderr b/src/test/ui/editions/edition-raw-pointer-method-2015.stderr index deea6a71b24f3..508d5df2a7160 100644 --- a/src/test/ui/editions/edition-raw-pointer-method-2015.stderr +++ b/src/test/ui/editions/edition-raw-pointer-method-2015.stderr @@ -1,11 +1,11 @@ error: type annotations needed - --> $DIR/edition-raw-pointer-method-2015.rs:10:15 + --> $DIR/edition-raw-pointer-method-2015.rs:9:15 | LL | let _ = y.is_null(); | ^^^^^^^ | note: lint level defined here - --> $DIR/edition-raw-pointer-method-2015.rs:6:8 + --> $DIR/edition-raw-pointer-method-2015.rs:5:8 | LL | #[deny(warnings)] | ^^^^^^^^ diff --git a/src/test/ui/editions/edition-raw-pointer-method-2018.rs b/src/test/ui/editions/edition-raw-pointer-method-2018.rs index eabab5e4739ab..af0b2d6bd4aa6 100644 --- a/src/test/ui/editions/edition-raw-pointer-method-2018.rs +++ b/src/test/ui/editions/edition-raw-pointer-method-2018.rs @@ -1,4 +1,3 @@ -// ignore-tidy-linelength // edition:2018 // tests that editions work with the tyvar warning-turned-error diff --git a/src/test/ui/editions/edition-raw-pointer-method-2018.stderr b/src/test/ui/editions/edition-raw-pointer-method-2018.stderr index 03e7f3a9449d6..23452495b4bc6 100644 --- a/src/test/ui/editions/edition-raw-pointer-method-2018.stderr +++ b/src/test/ui/editions/edition-raw-pointer-method-2018.stderr @@ -1,5 +1,5 @@ error[E0699]: the type of this value must be known to call a method on a raw pointer on it - --> $DIR/edition-raw-pointer-method-2018.rs:10:15 + --> $DIR/edition-raw-pointer-method-2018.rs:9:15 | LL | let _ = y.is_null(); | ^^^^^^^ diff --git a/src/test/ui/error-codes/E0375.rs b/src/test/ui/error-codes/E0375.rs index 362854a53aa63..0c03a8761df01 100644 --- a/src/test/ui/error-codes/E0375.rs +++ b/src/test/ui/error-codes/E0375.rs @@ -1,5 +1,3 @@ -// ignore-tidy-linelength - #![feature(coerce_unsized)] use std::ops::CoerceUnsized; diff --git a/src/test/ui/error-codes/E0375.stderr b/src/test/ui/error-codes/E0375.stderr index 18416e9b7d8b9..a68b3af5aaf76 100644 --- a/src/test/ui/error-codes/E0375.stderr +++ b/src/test/ui/error-codes/E0375.stderr @@ -1,5 +1,5 @@ error[E0375]: implementing the trait `CoerceUnsized` requires multiple coercions - --> $DIR/E0375.rs:12:12 + --> $DIR/E0375.rs:10:12 | LL | impl CoerceUnsized> for Foo {} | ^^^^^^^^^^^^^^^^^^^^^^^^ requires multiple coercions diff --git a/src/test/ui/existential_types/auxiliary/cross_crate_ice.rs b/src/test/ui/existential_types/auxiliary/cross_crate_ice.rs index af2d209826e19..96ab476061d2a 100644 --- a/src/test/ui/existential_types/auxiliary/cross_crate_ice.rs +++ b/src/test/ui/existential_types/auxiliary/cross_crate_ice.rs @@ -9,4 +9,3 @@ pub existential type Foo: std::fmt::Debug; pub fn foo() -> Foo { 5 } - diff --git a/src/test/ui/existential_types/generic_duplicate_param_use7.rs b/src/test/ui/existential_types/generic_duplicate_param_use7.rs index 2bcac315f5a96..5d8d05c308780 100644 --- a/src/test/ui/existential_types/generic_duplicate_param_use7.rs +++ b/src/test/ui/existential_types/generic_duplicate_param_use7.rs @@ -22,4 +22,3 @@ fn four(t: T, t2: T, u: U, v: V) -> Two { fn five(x: X, y: Y, y2: Y) -> Two { (y, y2) } - diff --git a/src/test/ui/existential_types/nested_existential_types.rs b/src/test/ui/existential_types/nested_existential_types.rs index 62a4779991411..6d2a12da7e443 100644 --- a/src/test/ui/existential_types/nested_existential_types.rs +++ b/src/test/ui/existential_types/nested_existential_types.rs @@ -18,4 +18,3 @@ mod my_mod { fn main() { let _: my_mod::Foot = my_mod::get_foot(); } - diff --git a/src/test/ui/feature-gates/feature-gate-allocator_internals.rs b/src/test/ui/feature-gates/feature-gate-allocator_internals.rs index 2045857e4cb05..a17d17da60713 100644 --- a/src/test/ui/feature-gates/feature-gate-allocator_internals.rs +++ b/src/test/ui/feature-gates/feature-gate-allocator_internals.rs @@ -1,4 +1,3 @@ #![default_lib_allocator] //~ ERROR: attribute is an experimental feature fn main() {} - diff --git a/src/test/ui/feature-gates/feature-gate-compiler-builtins.rs b/src/test/ui/feature-gates/feature-gate-compiler-builtins.rs index 10a9749ee5cf8..0d64f1fdcf55e 100644 --- a/src/test/ui/feature-gates/feature-gate-compiler-builtins.rs +++ b/src/test/ui/feature-gates/feature-gate-compiler-builtins.rs @@ -1,4 +1,3 @@ #![compiler_builtins] //~ ERROR the `#[compiler_builtins]` attribute is fn main() {} - diff --git a/src/test/ui/feature-gates/feature-gate-exhaustive-patterns.rs b/src/test/ui/feature-gates/feature-gate-exhaustive-patterns.rs index dce8cf46ff9f3..27ff5ace25ddc 100644 --- a/src/test/ui/feature-gates/feature-gate-exhaustive-patterns.rs +++ b/src/test/ui/feature-gates/feature-gate-exhaustive-patterns.rs @@ -6,4 +6,3 @@ fn foo() -> Result { fn main() { let Ok(_x) = foo(); //~ ERROR refutable pattern in local binding } - diff --git a/src/test/ui/feature-gates/feature-gate-ffi_returns_twice.rs b/src/test/ui/feature-gates/feature-gate-ffi_returns_twice.rs index 2ea60029492af..d118b7f4ff2b2 100644 --- a/src/test/ui/feature-gates/feature-gate-ffi_returns_twice.rs +++ b/src/test/ui/feature-gates/feature-gate-ffi_returns_twice.rs @@ -1,4 +1,3 @@ -// ignore-tidy-linelength #![crate_type = "lib"] extern { diff --git a/src/test/ui/feature-gates/feature-gate-ffi_returns_twice.stderr b/src/test/ui/feature-gates/feature-gate-ffi_returns_twice.stderr index c28d45df7cd41..72e414eab9248 100644 --- a/src/test/ui/feature-gates/feature-gate-ffi_returns_twice.stderr +++ b/src/test/ui/feature-gates/feature-gate-ffi_returns_twice.stderr @@ -1,5 +1,5 @@ error[E0658]: the `#[ffi_returns_twice]` attribute is an experimental feature - --> $DIR/feature-gate-ffi_returns_twice.rs:5:5 + --> $DIR/feature-gate-ffi_returns_twice.rs:4:5 | LL | #[ffi_returns_twice] | ^^^^^^^^^^^^^^^^^^^^ diff --git a/src/test/ui/feature-gates/feature-gate-needs-allocator.rs b/src/test/ui/feature-gates/feature-gate-needs-allocator.rs index a3f91d02b3ee3..08954944bcde7 100644 --- a/src/test/ui/feature-gates/feature-gate-needs-allocator.rs +++ b/src/test/ui/feature-gates/feature-gate-needs-allocator.rs @@ -1,4 +1,3 @@ #![needs_allocator] //~ ERROR the `#[needs_allocator]` attribute is fn main() {} - diff --git a/src/test/ui/feature-gates/feature-gate-nll.rs b/src/test/ui/feature-gates/feature-gate-nll.rs index 2cf6e4d52094e..ec5eacd162547 100644 --- a/src/test/ui/feature-gates/feature-gate-nll.rs +++ b/src/test/ui/feature-gates/feature-gate-nll.rs @@ -17,4 +17,3 @@ fn main() { //~ ERROR compilation successful //~| WARNING this warning will become a hard error in the future m; } - diff --git a/src/test/ui/feature-gates/feature-gate-rustc_const_unstable.rs b/src/test/ui/feature-gates/feature-gate-rustc_const_unstable.rs index a85f2f4ad30ea..6961e68744ffe 100644 --- a/src/test/ui/feature-gates/feature-gate-rustc_const_unstable.rs +++ b/src/test/ui/feature-gates/feature-gate-rustc_const_unstable.rs @@ -10,4 +10,3 @@ pub const fn bazinga() {} fn main() { } - diff --git a/src/test/ui/ffi_returns_twice.rs b/src/test/ui/ffi_returns_twice.rs index 93c372e1d83dc..845e18df11b54 100644 --- a/src/test/ui/ffi_returns_twice.rs +++ b/src/test/ui/ffi_returns_twice.rs @@ -1,4 +1,3 @@ -// ignore-tidy-linelength #![feature(ffi_returns_twice)] #![crate_type = "lib"] diff --git a/src/test/ui/ffi_returns_twice.stderr b/src/test/ui/ffi_returns_twice.stderr index e51d3d8c146b4..862892e27be98 100644 --- a/src/test/ui/ffi_returns_twice.stderr +++ b/src/test/ui/ffi_returns_twice.stderr @@ -1,5 +1,5 @@ error[E0724]: `#[ffi_returns_twice]` may only be used on foreign functions - --> $DIR/ffi_returns_twice.rs:5:1 + --> $DIR/ffi_returns_twice.rs:4:1 | LL | #[ffi_returns_twice] | ^^^^^^^^^^^^^^^^^^^^ diff --git a/src/test/ui/generator/borrowing.rs b/src/test/ui/generator/borrowing.rs index 9f8fc7483f64d..6234b73804878 100644 --- a/src/test/ui/generator/borrowing.rs +++ b/src/test/ui/generator/borrowing.rs @@ -18,4 +18,3 @@ fn main() { } }; } - diff --git a/src/test/ui/generator/issue-53548.rs b/src/test/ui/generator/issue-53548.rs index 00fdb91faab76..73a2bcdd55538 100644 --- a/src/test/ui/generator/issue-53548.rs +++ b/src/test/ui/generator/issue-53548.rs @@ -36,4 +36,3 @@ fn main() { yield (); }); } - diff --git a/src/test/ui/impl-trait/auto-trait-leak.rs b/src/test/ui/impl-trait/auto-trait-leak.rs index ea0be0b346cbe..1c601bc3c34ea 100644 --- a/src/test/ui/impl-trait/auto-trait-leak.rs +++ b/src/test/ui/impl-trait/auto-trait-leak.rs @@ -1,5 +1,3 @@ -// ignore-tidy-linelength - use std::cell::Cell; use std::rc::Rc; diff --git a/src/test/ui/impl-trait/auto-trait-leak.stderr b/src/test/ui/impl-trait/auto-trait-leak.stderr index de0043eee8fd7..61450d3203cd8 100644 --- a/src/test/ui/impl-trait/auto-trait-leak.stderr +++ b/src/test/ui/impl-trait/auto-trait-leak.stderr @@ -1,29 +1,29 @@ error[E0391]: cycle detected when processing `cycle1::{{opaque}}#0` - --> $DIR/auto-trait-leak.rs:14:16 + --> $DIR/auto-trait-leak.rs:12:16 | LL | fn cycle1() -> impl Clone { | ^^^^^^^^^^ | note: ...which requires processing `cycle1`... - --> $DIR/auto-trait-leak.rs:14:1 + --> $DIR/auto-trait-leak.rs:12:1 | LL | fn cycle1() -> impl Clone { | ^^^^^^^^^^^^^^^^^^^^^^^^^ = note: ...which requires evaluating trait selection obligation `impl std::clone::Clone: std::marker::Send`... note: ...which requires processing `cycle2::{{opaque}}#0`... - --> $DIR/auto-trait-leak.rs:23:16 + --> $DIR/auto-trait-leak.rs:21:16 | LL | fn cycle2() -> impl Clone { | ^^^^^^^^^^ note: ...which requires processing `cycle2`... - --> $DIR/auto-trait-leak.rs:23:1 + --> $DIR/auto-trait-leak.rs:21:1 | LL | fn cycle2() -> impl Clone { | ^^^^^^^^^^^^^^^^^^^^^^^^^ = note: ...which requires evaluating trait selection obligation `impl std::clone::Clone: std::marker::Send`... = note: ...which again requires processing `cycle1::{{opaque}}#0`, completing the cycle note: cycle used when checking item types in top-level module - --> $DIR/auto-trait-leak.rs:3:1 + --> $DIR/auto-trait-leak.rs:1:1 | LL | / use std::cell::Cell; LL | | use std::rc::Rc; @@ -35,30 +35,30 @@ LL | | } | |_^ error[E0391]: cycle detected when processing `cycle1::{{opaque}}#0` - --> $DIR/auto-trait-leak.rs:14:16 + --> $DIR/auto-trait-leak.rs:12:16 | LL | fn cycle1() -> impl Clone { | ^^^^^^^^^^ | note: ...which requires processing `cycle1`... - --> $DIR/auto-trait-leak.rs:14:1 + --> $DIR/auto-trait-leak.rs:12:1 | LL | fn cycle1() -> impl Clone { | ^^^^^^^^^^^^^^^^^^^^^^^^^ = note: ...which requires evaluating trait selection obligation `impl std::clone::Clone: std::marker::Send`... note: ...which requires processing `cycle2::{{opaque}}#0`... - --> $DIR/auto-trait-leak.rs:23:16 + --> $DIR/auto-trait-leak.rs:21:16 | LL | fn cycle2() -> impl Clone { | ^^^^^^^^^^ note: ...which requires processing `cycle2`... - --> $DIR/auto-trait-leak.rs:23:1 + --> $DIR/auto-trait-leak.rs:21:1 | LL | fn cycle2() -> impl Clone { | ^^^^^^^^^^^^^^^^^^^^^^^^^ = note: ...which again requires processing `cycle1::{{opaque}}#0`, completing the cycle note: cycle used when checking item types in top-level module - --> $DIR/auto-trait-leak.rs:3:1 + --> $DIR/auto-trait-leak.rs:1:1 | LL | / use std::cell::Cell; LL | | use std::rc::Rc; @@ -70,7 +70,7 @@ LL | | } | |_^ error[E0277]: `std::rc::Rc` cannot be sent between threads safely - --> $DIR/auto-trait-leak.rs:17:5 + --> $DIR/auto-trait-leak.rs:15:5 | LL | send(cycle2().clone()); | ^^^^ `std::rc::Rc` cannot be sent between threads safely @@ -78,7 +78,7 @@ LL | send(cycle2().clone()); = help: within `impl std::clone::Clone`, the trait `std::marker::Send` is not implemented for `std::rc::Rc` = note: required because it appears within the type `impl std::clone::Clone` note: required by `send` - --> $DIR/auto-trait-leak.rs:6:1 + --> $DIR/auto-trait-leak.rs:4:1 | LL | fn send(_: T) {} | ^^^^^^^^^^^^^^^^^^^^^^ diff --git a/src/test/ui/impl-trait/auto-trait-leak2.rs b/src/test/ui/impl-trait/auto-trait-leak2.rs index a373edcfcf952..fb4b54051237c 100644 --- a/src/test/ui/impl-trait/auto-trait-leak2.rs +++ b/src/test/ui/impl-trait/auto-trait-leak2.rs @@ -1,5 +1,3 @@ -// ignore-tidy-linelength - use std::cell::Cell; use std::rc::Rc; @@ -25,4 +23,3 @@ fn after() -> impl Fn(i32) { let p = Rc::new(Cell::new(0)); move |x| p.set(x) } - diff --git a/src/test/ui/impl-trait/auto-trait-leak2.stderr b/src/test/ui/impl-trait/auto-trait-leak2.stderr index 4e427d3d6b388..19899ff83f7c3 100644 --- a/src/test/ui/impl-trait/auto-trait-leak2.stderr +++ b/src/test/ui/impl-trait/auto-trait-leak2.stderr @@ -1,29 +1,29 @@ error[E0277]: `std::rc::Rc>` cannot be sent between threads safely - --> $DIR/auto-trait-leak2.rs:15:5 + --> $DIR/auto-trait-leak2.rs:13:5 | 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>` - = note: required because it appears within the type `[closure@$DIR/auto-trait-leak2.rs:9:5: 9:22 p:std::rc::Rc>]` + = note: required because it appears within the type `[closure@$DIR/auto-trait-leak2.rs:7:5: 7:22 p:std::rc::Rc>]` = note: required because it appears within the type `impl std::ops::Fn<(i32,)>` note: required by `send` - --> $DIR/auto-trait-leak2.rs:12:1 + --> $DIR/auto-trait-leak2.rs:10:1 | LL | fn send(_: T) {} | ^^^^^^^^^^^^^^^^^^^^^^ error[E0277]: `std::rc::Rc>` cannot be sent between threads safely - --> $DIR/auto-trait-leak2.rs:18:5 + --> $DIR/auto-trait-leak2.rs:16:5 | 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>` - = note: required because it appears within the type `[closure@$DIR/auto-trait-leak2.rs:26:5: 26:22 p:std::rc::Rc>]` + = note: required because it appears within the type `[closure@$DIR/auto-trait-leak2.rs:24:5: 24:22 p:std::rc::Rc>]` = note: required because it appears within the type `impl std::ops::Fn<(i32,)>` note: required by `send` - --> $DIR/auto-trait-leak2.rs:12:1 + --> $DIR/auto-trait-leak2.rs:10:1 | LL | fn send(_: T) {} | ^^^^^^^^^^^^^^^^^^^^^^ diff --git a/src/test/ui/impl-trait/method-suggestion-no-duplication.rs b/src/test/ui/impl-trait/method-suggestion-no-duplication.rs index 32f3517167349..c5c966a959ae9 100644 --- a/src/test/ui/impl-trait/method-suggestion-no-duplication.rs +++ b/src/test/ui/impl-trait/method-suggestion-no-duplication.rs @@ -1,6 +1,4 @@ // issue #21405 -// ignore-tidy-linelength - struct Foo; fn foo(f: F) where F: FnMut(Foo) {} 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 8da1ce41a0f94..afb3376638a96 100644 --- a/src/test/ui/impl-trait/method-suggestion-no-duplication.stderr +++ b/src/test/ui/impl-trait/method-suggestion-no-duplication.stderr @@ -1,5 +1,5 @@ error[E0599]: no method named `is_empty` found for type `Foo` in the current scope - --> $DIR/method-suggestion-no-duplication.rs:9:15 + --> $DIR/method-suggestion-no-duplication.rs:7:15 | LL | struct Foo; | ----------- method `is_empty` not found for this diff --git a/src/test/ui/invalid-module-declaration/invalid-module-declaration.rs b/src/test/ui/invalid-module-declaration/invalid-module-declaration.rs index 3b1cd9fbdc80e..254d810d79dbc 100644 --- a/src/test/ui/invalid-module-declaration/invalid-module-declaration.rs +++ b/src/test/ui/invalid-module-declaration/invalid-module-declaration.rs @@ -1,5 +1,3 @@ -// ignore-tidy-linelength - mod auxiliary { mod foo; } diff --git a/src/test/ui/issues/issue-21950.rs b/src/test/ui/issues/issue-21950.rs index 0f78b37fedba3..b902893bf8224 100644 --- a/src/test/ui/issues/issue-21950.rs +++ b/src/test/ui/issues/issue-21950.rs @@ -1,5 +1,3 @@ -// ignore-tidy-linelength - use std::ops::Add; fn main() { diff --git a/src/test/ui/issues/issue-21950.stderr b/src/test/ui/issues/issue-21950.stderr index d40893b942376..7655e0811e066 100644 --- a/src/test/ui/issues/issue-21950.stderr +++ b/src/test/ui/issues/issue-21950.stderr @@ -1,5 +1,5 @@ error[E0393]: the type parameter `Rhs` must be explicitly specified - --> $DIR/issue-21950.rs:7:14 + --> $DIR/issue-21950.rs:5:14 | LL | &Add; | ^^^ missing reference to `Rhs` @@ -7,7 +7,7 @@ LL | &Add; = note: because of the default `Self` reference, type parameters must be specified on object types error[E0191]: the value of the associated type `Output` (from the trait `std::ops::Add`) must be specified - --> $DIR/issue-21950.rs:7:14 + --> $DIR/issue-21950.rs:5:14 | LL | &Add; | ^^^ associated type `Output` must be specified diff --git a/src/test/ui/issues/issue-22370.rs b/src/test/ui/issues/issue-22370.rs index 44eef2da83ce3..90912cfda0d4e 100644 --- a/src/test/ui/issues/issue-22370.rs +++ b/src/test/ui/issues/issue-22370.rs @@ -1,5 +1,3 @@ -// ignore-tidy-linelength - trait A {} fn f(a: &A) {} diff --git a/src/test/ui/issues/issue-22370.stderr b/src/test/ui/issues/issue-22370.stderr index 5d76d84d11e6f..f21551a55bc9a 100644 --- a/src/test/ui/issues/issue-22370.stderr +++ b/src/test/ui/issues/issue-22370.stderr @@ -1,5 +1,5 @@ error[E0393]: the type parameter `T` must be explicitly specified - --> $DIR/issue-22370.rs:5:10 + --> $DIR/issue-22370.rs:3:10 | LL | fn f(a: &A) {} | ^ missing reference to `T` diff --git a/src/test/ui/issues/issue-22560.rs b/src/test/ui/issues/issue-22560.rs index d91211e556b11..4b8e3aa9eb3e1 100644 --- a/src/test/ui/issues/issue-22560.rs +++ b/src/test/ui/issues/issue-22560.rs @@ -1,5 +1,3 @@ -// ignore-tidy-linelength - use std::ops::{Add, Sub}; type Test = Add + diff --git a/src/test/ui/issues/issue-22560.stderr b/src/test/ui/issues/issue-22560.stderr index a0ad1fd1279d7..5a056dff590fe 100644 --- a/src/test/ui/issues/issue-22560.stderr +++ b/src/test/ui/issues/issue-22560.stderr @@ -1,5 +1,5 @@ error[E0393]: the type parameter `Rhs` must be explicitly specified - --> $DIR/issue-22560.rs:5:13 + --> $DIR/issue-22560.rs:3:13 | LL | type Test = Add + | ^^^ missing reference to `Rhs` @@ -7,7 +7,7 @@ LL | type Test = Add + = note: because of the default `Self` reference, type parameters must be specified on object types error[E0393]: the type parameter `Rhs` must be explicitly specified - --> $DIR/issue-22560.rs:8:13 + --> $DIR/issue-22560.rs:6:13 | LL | Sub; | ^^^ missing reference to `Rhs` @@ -15,13 +15,13 @@ LL | Sub; = note: because of the default `Self` reference, type parameters must be specified on object types error[E0225]: only auto traits can be used as additional traits in a trait object - --> $DIR/issue-22560.rs:8:13 + --> $DIR/issue-22560.rs:6:13 | 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:5:13 + --> $DIR/issue-22560.rs:3:13 | LL | type Test = Add + | _____________^ diff --git a/src/test/ui/issues/issue-23080-2.rs b/src/test/ui/issues/issue-23080-2.rs index 750b7e19d89df..319aa2a5cce9e 100644 --- a/src/test/ui/issues/issue-23080-2.rs +++ b/src/test/ui/issues/issue-23080-2.rs @@ -1,6 +1,4 @@ -// ignore-tidy-linelength - -//~^^ ERROR +//~ ERROR #![feature(optin_builtin_traits)] diff --git a/src/test/ui/issues/issue-23080-2.stderr b/src/test/ui/issues/issue-23080-2.stderr index 4179ca37a54cb..1103de0d91043 100644 --- a/src/test/ui/issues/issue-23080-2.stderr +++ b/src/test/ui/issues/issue-23080-2.stderr @@ -1,5 +1,5 @@ error[E0380]: auto traits cannot have methods or associated items - --> $DIR/issue-23080-2.rs:7:1 + --> $DIR/issue-23080-2.rs:5:1 | LL | / unsafe auto trait Trait { LL | | diff --git a/src/test/ui/issues/issue-23080.rs b/src/test/ui/issues/issue-23080.rs index e25a2d916f5f2..fdfee6981447d 100644 --- a/src/test/ui/issues/issue-23080.rs +++ b/src/test/ui/issues/issue-23080.rs @@ -1,5 +1,3 @@ -// ignore-tidy-linelength - #![feature(optin_builtin_traits)] unsafe auto trait Trait { diff --git a/src/test/ui/issues/issue-23080.stderr b/src/test/ui/issues/issue-23080.stderr index ed843e793beeb..91c2721732426 100644 --- a/src/test/ui/issues/issue-23080.stderr +++ b/src/test/ui/issues/issue-23080.stderr @@ -1,5 +1,5 @@ error[E0380]: auto traits cannot have methods or associated items - --> $DIR/issue-23080.rs:5:1 + --> $DIR/issue-23080.rs:3:1 | LL | / unsafe auto trait Trait { LL | | diff --git a/src/test/ui/issues/issue-23281.rs b/src/test/ui/issues/issue-23281.rs index 98a0495451d04..2b457a57d3ede 100644 --- a/src/test/ui/issues/issue-23281.rs +++ b/src/test/ui/issues/issue-23281.rs @@ -1,5 +1,3 @@ -// ignore-tidy-linelength - pub struct Struct; impl Struct { diff --git a/src/test/ui/issues/issue-23281.stderr b/src/test/ui/issues/issue-23281.stderr index 1e57774afe55a..e540d4e819242 100644 --- a/src/test/ui/issues/issue-23281.stderr +++ b/src/test/ui/issues/issue-23281.stderr @@ -1,5 +1,5 @@ error[E0277]: the size for values of type `(dyn std::ops::Fn() + 'static)` cannot be known at compilation time - --> $DIR/issue-23281.rs:6:5 + --> $DIR/issue-23281.rs:4:5 | LL | pub fn function(funs: Vec ()>) {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time diff --git a/src/test/ui/issues/issue-26905.rs b/src/test/ui/issues/issue-26905.rs index 0cd166f4ac694..efd06219c3dec 100644 --- a/src/test/ui/issues/issue-26905.rs +++ b/src/test/ui/issues/issue-26905.rs @@ -21,4 +21,3 @@ fn main() { let x = MyRc { _ptr: &iter, _boo: NotPhantomData(PhantomData) }; let _y: MyRc> = x; } - diff --git a/src/test/ui/issues/issue-30236.rs b/src/test/ui/issues/issue-30236.rs index 02f899be09ca1..9c2d855076d79 100644 --- a/src/test/ui/issues/issue-30236.rs +++ b/src/test/ui/issues/issue-30236.rs @@ -5,4 +5,3 @@ type Foo< fn main() { } - diff --git a/src/test/ui/issues/issue-30240-b.rs b/src/test/ui/issues/issue-30240-b.rs index 2df06842e1818..01a6e7d8cb9a8 100644 --- a/src/test/ui/issues/issue-30240-b.rs +++ b/src/test/ui/issues/issue-30240-b.rs @@ -13,4 +13,3 @@ fn main() { _ => {}, } } - diff --git a/src/test/ui/issues/issue-33264.rs b/src/test/ui/issues/issue-33264.rs index 7cba4df7d82ae..51608b48be27c 100644 --- a/src/test/ui/issues/issue-33264.rs +++ b/src/test/ui/issues/issue-33264.rs @@ -27,4 +27,3 @@ impl D32x4 { } fn main() { } - diff --git a/src/test/ui/issues/issue-33287.rs b/src/test/ui/issues/issue-33287.rs index c6e1f4d1eb2f5..cc47e58fcdc15 100644 --- a/src/test/ui/issues/issue-33287.rs +++ b/src/test/ui/issues/issue-33287.rs @@ -8,4 +8,3 @@ fn test() { } fn main() { } - diff --git a/src/test/ui/issues/issue-33903.rs b/src/test/ui/issues/issue-33903.rs index 98544aca5f9da..4fdc8dda8b42c 100644 --- a/src/test/ui/issues/issue-33903.rs +++ b/src/test/ui/issues/issue-33903.rs @@ -8,4 +8,3 @@ const FOO: i32 = [12, 34][0 + 1]; fn main() {} - diff --git a/src/test/ui/issues/issue-40782.rs b/src/test/ui/issues/issue-40782.rs index 55fec04e0e01a..60db19ef9151f 100644 --- a/src/test/ui/issues/issue-40782.rs +++ b/src/test/ui/issues/issue-40782.rs @@ -2,4 +2,3 @@ fn main() { for i 0..2 { //~ ERROR missing `in` } } - diff --git a/src/test/ui/issues/issue-42060.rs b/src/test/ui/issues/issue-42060.rs index da7c03032eb87..1740b238343c8 100644 --- a/src/test/ui/issues/issue-42060.rs +++ b/src/test/ui/issues/issue-42060.rs @@ -9,4 +9,3 @@ fn f(){ ::N //~ ERROR attempt to use a non-constant value in a constant //~^ ERROR `typeof` is a reserved keyword but unimplemented [E0516] } - diff --git a/src/test/ui/issues/issue-43196.rs b/src/test/ui/issues/issue-43196.rs index 81e5205ce330d..0eefa01ce6de3 100644 --- a/src/test/ui/issues/issue-43196.rs +++ b/src/test/ui/issues/issue-43196.rs @@ -4,4 +4,3 @@ fn main() { //~^ ERROR expected `|`, found `}` | //~^ ERROR expected item, found `|` - diff --git a/src/test/ui/issues/issue-44005.rs b/src/test/ui/issues/issue-44005.rs index e2625fd937908..f6d1b7073a2b3 100644 --- a/src/test/ui/issues/issue-44005.rs +++ b/src/test/ui/issues/issue-44005.rs @@ -27,4 +27,3 @@ pub fn broken(x: &i32, f: F) { } fn main() { } - diff --git a/src/test/ui/issues/issue-49851/compiler-builtins-error.rs b/src/test/ui/issues/issue-49851/compiler-builtins-error.rs index 0163da0771e9b..3484ff3b87432 100644 --- a/src/test/ui/issues/issue-49851/compiler-builtins-error.rs +++ b/src/test/ui/issues/issue-49851/compiler-builtins-error.rs @@ -8,4 +8,3 @@ #![no_std] extern crate cortex_m; - diff --git a/src/test/ui/issues/issue-50714-1.rs b/src/test/ui/issues/issue-50714-1.rs index 31de3f3c0a1b8..a25940ce1cbef 100644 --- a/src/test/ui/issues/issue-50714-1.rs +++ b/src/test/ui/issues/issue-50714-1.rs @@ -9,4 +9,3 @@ extern crate std; fn start(_: isize, _: *const *const u8) -> isize where fn(&()): Eq { //~ ERROR [E0647] 0 } - diff --git a/src/test/ui/issues/issue-50714.rs b/src/test/ui/issues/issue-50714.rs index 3683d4bdaccd5..c571a470cee1c 100644 --- a/src/test/ui/issues/issue-50714.rs +++ b/src/test/ui/issues/issue-50714.rs @@ -1,4 +1,3 @@ // Regression test for issue 50714, make sure that this isn't a linker error. fn main() where fn(&()): Eq {} //~ ERROR [E0646] - diff --git a/src/test/ui/issues/issue-53419.rs b/src/test/ui/issues/issue-53419.rs index fc2a926f90ff6..52149cf486dc9 100644 --- a/src/test/ui/issues/issue-53419.rs +++ b/src/test/ui/issues/issue-53419.rs @@ -6,4 +6,3 @@ struct Foo { fn main() { } - diff --git a/src/test/ui/issues/issue-53568.rs b/src/test/ui/issues/issue-53568.rs index 60a6e16492c41..f04d861250b40 100644 --- a/src/test/ui/issues/issue-53568.rs +++ b/src/test/ui/issues/issue-53568.rs @@ -48,4 +48,3 @@ where H: Fn() + Copy } fn main() { } - diff --git a/src/test/ui/issues/issue-58712.rs b/src/test/ui/issues/issue-58712.rs index 577709cf2919d..930bec6889bce 100644 --- a/src/test/ui/issues/issue-58712.rs +++ b/src/test/ui/issues/issue-58712.rs @@ -12,4 +12,3 @@ impl AddrVec { } fn main() {} - diff --git a/src/test/ui/issues/issue-59488.rs b/src/test/ui/issues/issue-59488.rs index 7d8d5f5e7ea81..6fa9961f26cc8 100644 --- a/src/test/ui/issues/issue-59488.rs +++ b/src/test/ui/issues/issue-59488.rs @@ -1,5 +1,3 @@ -// ignore-tidy-linelength - fn foo() -> i32 { 42 } @@ -34,4 +32,3 @@ fn main() { //~| ERROR `fn(usize) -> Foo {Foo::Bar}` doesn't implement `std::fmt::Debug` [E0277] //~| ERROR `fn(usize) -> Foo {Foo::Bar}` doesn't implement `std::fmt::Debug` [E0277] } - diff --git a/src/test/ui/issues/issue-59488.stderr b/src/test/ui/issues/issue-59488.stderr index e8f0f7bbebf86..e0cb1f7b96df8 100644 --- a/src/test/ui/issues/issue-59488.stderr +++ b/src/test/ui/issues/issue-59488.stderr @@ -1,5 +1,5 @@ error[E0369]: binary operation `>` cannot be applied to type `fn() -> i32 {foo}` - --> $DIR/issue-59488.rs:16:9 + --> $DIR/issue-59488.rs:14:9 | LL | foo > 12; | --- ^ -- {integer} @@ -8,7 +8,7 @@ LL | foo > 12; | help: you might have forgotten to call this function: `foo()` error[E0308]: mismatched types - --> $DIR/issue-59488.rs:16:11 + --> $DIR/issue-59488.rs:14:11 | LL | foo > 12; | ^^ expected fn item, found integer @@ -17,7 +17,7 @@ LL | foo > 12; found type `i32` error[E0369]: binary operation `>` cannot be applied to type `fn(i64) -> i64 {bar}` - --> $DIR/issue-59488.rs:20:9 + --> $DIR/issue-59488.rs:18:9 | LL | bar > 13; | --- ^ -- {integer} @@ -26,7 +26,7 @@ LL | bar > 13; | help: you might have forgotten to call this function: `bar( /* arguments */ )` error[E0308]: mismatched types - --> $DIR/issue-59488.rs:20:11 + --> $DIR/issue-59488.rs:18:11 | LL | bar > 13; | ^^ expected fn item, found integer @@ -35,7 +35,7 @@ LL | bar > 13; found type `i64` error[E0369]: binary operation `>` cannot be applied to type `fn() -> i32 {foo}` - --> $DIR/issue-59488.rs:24:9 + --> $DIR/issue-59488.rs:22:9 | LL | foo > foo; | --- ^ --- fn() -> i32 {foo} @@ -51,7 +51,7 @@ LL | foo > foo(); | ^^^^^ error[E0369]: binary operation `>` cannot be applied to type `fn() -> i32 {foo}` - --> $DIR/issue-59488.rs:27:9 + --> $DIR/issue-59488.rs:25:9 | LL | foo > bar; | --- ^ --- fn(i64) -> i64 {bar} @@ -61,7 +61,7 @@ LL | foo > bar; = note: an implementation of `std::cmp::PartialOrd` might be missing for `fn() -> i32 {foo}` error[E0308]: mismatched types - --> $DIR/issue-59488.rs:27:11 + --> $DIR/issue-59488.rs:25:11 | LL | foo > bar; | ^^^ expected fn item, found a different fn item @@ -70,7 +70,7 @@ LL | foo > bar; found type `fn(i64) -> i64 {bar}` error[E0369]: binary operation `==` cannot be applied to type `fn(usize) -> Foo {Foo::Bar}` - --> $DIR/issue-59488.rs:32:5 + --> $DIR/issue-59488.rs:30:5 | LL | assert_eq!(Foo::Bar, i); | ^^^^^^^^^^^^^^^^^^^^^^^^ @@ -82,7 +82,7 @@ LL | assert_eq!(Foo::Bar, i); = 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[E0277]: `fn(usize) -> Foo {Foo::Bar}` doesn't implement `std::fmt::Debug` - --> $DIR/issue-59488.rs:32:5 + --> $DIR/issue-59488.rs:30:5 | LL | assert_eq!(Foo::Bar, i); | ^^^^^^^^^^^^^^^^^^^^^^^^ `fn(usize) -> Foo {Foo::Bar}` cannot be formatted using `{:?}` because it doesn't implement `std::fmt::Debug` @@ -93,7 +93,7 @@ LL | assert_eq!(Foo::Bar, i); = 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[E0277]: `fn(usize) -> Foo {Foo::Bar}` doesn't implement `std::fmt::Debug` - --> $DIR/issue-59488.rs:32:5 + --> $DIR/issue-59488.rs:30:5 | LL | assert_eq!(Foo::Bar, i); | ^^^^^^^^^^^^^^^^^^^^^^^^ `fn(usize) -> Foo {Foo::Bar}` cannot be formatted using `{:?}` because it doesn't implement `std::fmt::Debug` diff --git a/src/test/ui/issues/issue-59896.rs b/src/test/ui/issues/issue-59896.rs index cecf2c5c22b81..ff9f19acf8471 100644 --- a/src/test/ui/issues/issue-59896.rs +++ b/src/test/ui/issues/issue-59896.rs @@ -7,4 +7,3 @@ fn main() { let _s = S; } - diff --git a/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-3.rs b/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-3.rs index c04b5d3a3eb71..c483f59f9d98c 100644 --- a/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-3.rs +++ b/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-3.rs @@ -4,4 +4,3 @@ fn foo(z: &mut Vec<(&u8,&u8)>, (x, y): (&u8, &u8)) { } fn main() { } - diff --git a/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-return-type-is-anon.rs b/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-return-type-is-anon.rs index 09852403d934a..286cb6dc90e1b 100644 --- a/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-return-type-is-anon.rs +++ b/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-return-type-is-anon.rs @@ -9,4 +9,3 @@ impl Foo { } fn main() { } - diff --git a/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-self-is-anon.rs b/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-self-is-anon.rs index 33aa199938f83..79d7d63c8bb1e 100644 --- a/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-self-is-anon.rs +++ b/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-self-is-anon.rs @@ -9,4 +9,3 @@ impl Foo { } fn main() {} - diff --git a/src/test/ui/lint/lint-incoherent-auto-trait-objects.rs b/src/test/ui/lint/lint-incoherent-auto-trait-objects.rs index 0d18965ee7338..d53b514476025 100644 --- a/src/test/ui/lint/lint-incoherent-auto-trait-objects.rs +++ b/src/test/ui/lint/lint-incoherent-auto-trait-objects.rs @@ -1,5 +1,3 @@ -// ignore-tidy-linelength - trait Foo {} impl Foo for dyn Send {} diff --git a/src/test/ui/lint/lint-incoherent-auto-trait-objects.stderr b/src/test/ui/lint/lint-incoherent-auto-trait-objects.stderr index 928c92ef91655..448cc953d40ad 100644 --- a/src/test/ui/lint/lint-incoherent-auto-trait-objects.stderr +++ b/src/test/ui/lint/lint-incoherent-auto-trait-objects.stderr @@ -1,5 +1,5 @@ error: conflicting implementations of trait `Foo` for type `(dyn std::marker::Send + 'static)`: (E0119) - --> $DIR/lint-incoherent-auto-trait-objects.rs:7:1 + --> $DIR/lint-incoherent-auto-trait-objects.rs:5:1 | LL | impl Foo for dyn Send {} | --------------------- first implementation here @@ -12,7 +12,7 @@ LL | impl Foo for dyn Send + Send {} = note: for more information, see issue #56484 error: conflicting implementations of trait `Foo` for type `(dyn std::marker::Send + std::marker::Sync + 'static)`: (E0119) - --> $DIR/lint-incoherent-auto-trait-objects.rs:13:1 + --> $DIR/lint-incoherent-auto-trait-objects.rs:11:1 | LL | impl Foo for dyn Send + Sync {} | ---------------------------- first implementation here @@ -24,7 +24,7 @@ LL | impl Foo for dyn Sync + Send {} = note: for more information, see issue #56484 error: conflicting implementations of trait `Foo` for type `(dyn std::marker::Send + std::marker::Sync + 'static)`: (E0119) - --> $DIR/lint-incoherent-auto-trait-objects.rs:17:1 + --> $DIR/lint-incoherent-auto-trait-objects.rs:15:1 | LL | impl Foo for dyn Sync + Send {} | ---------------------------- first implementation here diff --git a/src/test/ui/macro_backtrace/auxiliary/ping.rs b/src/test/ui/macro_backtrace/auxiliary/ping.rs index efddb209cdaa0..25b9efbc93ac9 100644 --- a/src/test/ui/macro_backtrace/auxiliary/ping.rs +++ b/src/test/ui/macro_backtrace/auxiliary/ping.rs @@ -28,4 +28,3 @@ macro_rules! bar { ping!(); } } - diff --git a/src/test/ui/macros/macro-follow.rs b/src/test/ui/macros/macro-follow.rs index 10b44e0017532..8054418d9b893 100644 --- a/src/test/ui/macros/macro-follow.rs +++ b/src/test/ui/macros/macro-follow.rs @@ -112,4 +112,3 @@ macro_rules! follow_path { // FOLLOW(ident) = any token fn main() {} - diff --git a/src/test/ui/macros/must-use-in-macro-55516.rs b/src/test/ui/macros/must-use-in-macro-55516.rs index 10e5646dc3d94..a5de32e5d2a8b 100644 --- a/src/test/ui/macros/must-use-in-macro-55516.rs +++ b/src/test/ui/macros/must-use-in-macro-55516.rs @@ -8,4 +8,3 @@ fn main() { let mut example = String::new(); write!(&mut example, "{}", 42); //~WARN must be used } - diff --git a/src/test/ui/match/match-argm-statics-2.rs b/src/test/ui/match/match-argm-statics-2.rs index ad220d2f4319a..4c5f2d356491b 100644 --- a/src/test/ui/match/match-argm-statics-2.rs +++ b/src/test/ui/match/match-argm-statics-2.rs @@ -60,4 +60,3 @@ fn main() { nonexhaustive_2(); nonexhaustive_3(); } - diff --git a/src/test/ui/match/match-byte-array-patterns-2.rs b/src/test/ui/match/match-byte-array-patterns-2.rs index a3a47d23bef4c..33468d03fae40 100644 --- a/src/test/ui/match/match-byte-array-patterns-2.rs +++ b/src/test/ui/match/match-byte-array-patterns-2.rs @@ -11,4 +11,3 @@ fn main() { b"AAAA" => {} } } - diff --git a/src/test/ui/mismatched_types/main.rs b/src/test/ui/mismatched_types/main.rs index 16c18ddda291a..e2d09dc219922 100644 --- a/src/test/ui/mismatched_types/main.rs +++ b/src/test/ui/mismatched_types/main.rs @@ -2,4 +2,3 @@ fn main() { let x: u32 = ( //~ ERROR mismatched types ); } - diff --git a/src/test/ui/mismatched_types/numeric-literal-cast.rs b/src/test/ui/mismatched_types/numeric-literal-cast.rs index 74a2211709971..69cfe262fdf42 100644 --- a/src/test/ui/mismatched_types/numeric-literal-cast.rs +++ b/src/test/ui/mismatched_types/numeric-literal-cast.rs @@ -10,4 +10,3 @@ fn main() { foo2(3i16); //~^ ERROR mismatched types } - diff --git a/src/test/ui/mismatched_types/trait-impl-fn-incompatibility.rs b/src/test/ui/mismatched_types/trait-impl-fn-incompatibility.rs index 3547272e51b51..949f5683c8a20 100644 --- a/src/test/ui/mismatched_types/trait-impl-fn-incompatibility.rs +++ b/src/test/ui/mismatched_types/trait-impl-fn-incompatibility.rs @@ -14,4 +14,3 @@ impl Foo for Bar { fn main() { } - diff --git a/src/test/ui/moves/moves-based-on-type-block-bad.rs b/src/test/ui/moves/moves-based-on-type-block-bad.rs index 99928caa926a4..516325ce1d797 100644 --- a/src/test/ui/moves/moves-based-on-type-block-bad.rs +++ b/src/test/ui/moves/moves-based-on-type-block-bad.rs @@ -1,5 +1,3 @@ -// ignore-tidy-linelength - #![feature(box_patterns)] #![feature(box_syntax)] diff --git a/src/test/ui/moves/moves-based-on-type-block-bad.stderr b/src/test/ui/moves/moves-based-on-type-block-bad.stderr index b83a15c9d4dac..e28b22035f5d4 100644 --- a/src/test/ui/moves/moves-based-on-type-block-bad.stderr +++ b/src/test/ui/moves/moves-based-on-type-block-bad.stderr @@ -1,5 +1,5 @@ error[E0507]: cannot move out of borrowed content - --> $DIR/moves-based-on-type-block-bad.rs:24:19 + --> $DIR/moves-based-on-type-block-bad.rs:22:19 | LL | match hellothere.x { | ^^^^^^^^^^^^ @@ -11,7 +11,7 @@ LL | box E::Bar(x) => println!("{}", x.to_string()), | - data moved here | note: move occurs because `x` has type `std::boxed::Box`, which does not implement the `Copy` trait - --> $DIR/moves-based-on-type-block-bad.rs:27:28 + --> $DIR/moves-based-on-type-block-bad.rs:25:28 | LL | box E::Bar(x) => println!("{}", x.to_string()), | ^ diff --git a/src/test/ui/nll/issue-47022.rs b/src/test/ui/nll/issue-47022.rs index c0f8efa24981c..1add2c334dae0 100644 --- a/src/test/ui/nll/issue-47022.rs +++ b/src/test/ui/nll/issue-47022.rs @@ -34,4 +34,3 @@ fn convert(objects: Vec) -> (Vec, Vec) { } fn main() {} - diff --git a/src/test/ui/nll/projection-return.rs b/src/test/ui/nll/projection-return.rs index b2c9a087e0e02..fdf3f59484172 100644 --- a/src/test/ui/nll/projection-return.rs +++ b/src/test/ui/nll/projection-return.rs @@ -16,4 +16,3 @@ fn foo() -> <() as Foo>::Bar { } fn main() { } - diff --git a/src/test/ui/nll/ty-outlives/issue-53789-1.rs b/src/test/ui/nll/ty-outlives/issue-53789-1.rs index 593cdfdbf711a..586f076c8cabf 100644 --- a/src/test/ui/nll/ty-outlives/issue-53789-1.rs +++ b/src/test/ui/nll/ty-outlives/issue-53789-1.rs @@ -88,4 +88,3 @@ fn any_with<'a, A: Arbitrary<'a>>(args: A::Parameters) -> StrategyType<'a, A> { } fn main() { } - diff --git a/src/test/ui/nll/ty-outlives/issue-53789-2.rs b/src/test/ui/nll/ty-outlives/issue-53789-2.rs index 62e2833aa1b1a..de8b05aeed75c 100644 --- a/src/test/ui/nll/ty-outlives/issue-53789-2.rs +++ b/src/test/ui/nll/ty-outlives/issue-53789-2.rs @@ -248,4 +248,3 @@ mod statics { } fn main() { } - diff --git a/src/test/ui/nll/user-annotations/constant-in-expr-inherent-1.rs b/src/test/ui/nll/user-annotations/constant-in-expr-inherent-1.rs index 058ebaee9e512..9f0c60967efb2 100644 --- a/src/test/ui/nll/user-annotations/constant-in-expr-inherent-1.rs +++ b/src/test/ui/nll/user-annotations/constant-in-expr-inherent-1.rs @@ -12,4 +12,3 @@ fn foo<'a>(_: &'a u32) -> &'static u32 { fn main() { } - diff --git a/src/test/ui/on-unimplemented/auxiliary/no_debug.rs b/src/test/ui/on-unimplemented/auxiliary/no_debug.rs index f240d0e1f1fab..fd3dc0abdc8fc 100644 --- a/src/test/ui/on-unimplemented/auxiliary/no_debug.rs +++ b/src/test/ui/on-unimplemented/auxiliary/no_debug.rs @@ -1,5 +1,3 @@ -// ignore-tidy-linelength - #![crate_type = "lib"] pub struct Bar; diff --git a/src/test/ui/on-unimplemented/no-debug.rs b/src/test/ui/on-unimplemented/no-debug.rs index 858df17ffda0f..45c9ea46fa29d 100644 --- a/src/test/ui/on-unimplemented/no-debug.rs +++ b/src/test/ui/on-unimplemented/no-debug.rs @@ -14,4 +14,3 @@ fn main() { //~| ERROR `no_debug::Bar` doesn't implement `std::fmt::Debug` //~^^^^ ERROR `Foo` doesn't implement `std::fmt::Display` //~| ERROR `no_debug::Bar` doesn't implement `std::fmt::Display` - diff --git a/src/test/ui/on-unimplemented/slice-index.rs b/src/test/ui/on-unimplemented/slice-index.rs index b5e18e2397e00..758220d3c4ecd 100644 --- a/src/test/ui/on-unimplemented/slice-index.rs +++ b/src/test/ui/on-unimplemented/slice-index.rs @@ -1,7 +1,4 @@ // Test new Index error message for slices -// ignore-tidy-linelength - - use std::ops::Index; diff --git a/src/test/ui/on-unimplemented/slice-index.stderr b/src/test/ui/on-unimplemented/slice-index.stderr index c1d884929a0c1..25a65460071da 100644 --- a/src/test/ui/on-unimplemented/slice-index.stderr +++ b/src/test/ui/on-unimplemented/slice-index.stderr @@ -1,5 +1,5 @@ error[E0277]: the type `[i32]` cannot be indexed by `i32` - --> $DIR/slice-index.rs:11:5 + --> $DIR/slice-index.rs:8:5 | LL | x[1i32]; | ^^^^^^^ slice indices are of type `usize` or ranges of `usize` @@ -8,7 +8,7 @@ LL | x[1i32]; = note: required because of the requirements on the impl of `std::ops::Index` for `[i32]` error[E0277]: the type `[i32]` cannot be indexed by `std::ops::RangeTo` - --> $DIR/slice-index.rs:12:5 + --> $DIR/slice-index.rs:9:5 | LL | x[..1i32]; | ^^^^^^^^^ slice indices are of type `usize` or ranges of `usize` diff --git a/src/test/ui/panic-runtime/libtest-unwinds.rs b/src/test/ui/panic-runtime/libtest-unwinds.rs index 47dd8c3efe58e..bc13072612a29 100644 --- a/src/test/ui/panic-runtime/libtest-unwinds.rs +++ b/src/test/ui/panic-runtime/libtest-unwinds.rs @@ -8,4 +8,3 @@ extern crate test; fn main() { } - diff --git a/src/test/ui/parser/byte-string-literals.rs b/src/test/ui/parser/byte-string-literals.rs index d028f28655b8e..8d8ee4da98717 100644 --- a/src/test/ui/parser/byte-string-literals.rs +++ b/src/test/ui/parser/byte-string-literals.rs @@ -1,8 +1,5 @@ // compile-flags: -Z continue-parse-after-error - -// ignore-tidy-tab - static FOO: &'static [u8] = b"\f"; //~ ERROR unknown byte escape pub fn main() { diff --git a/src/test/ui/parser/byte-string-literals.stderr b/src/test/ui/parser/byte-string-literals.stderr index 6701cfd8e66c2..b855484444010 100644 --- a/src/test/ui/parser/byte-string-literals.stderr +++ b/src/test/ui/parser/byte-string-literals.stderr @@ -1,29 +1,29 @@ error: unknown byte escape: f - --> $DIR/byte-string-literals.rs:6:32 + --> $DIR/byte-string-literals.rs:3:32 | LL | static FOO: &'static [u8] = b"\f"; | ^ unknown byte escape error: unknown byte escape: f - --> $DIR/byte-string-literals.rs:9:8 + --> $DIR/byte-string-literals.rs:6:8 | LL | b"\f"; | ^ unknown byte escape error: invalid character in numeric character escape: Z - --> $DIR/byte-string-literals.rs:10:10 + --> $DIR/byte-string-literals.rs:7:10 | LL | b"\x0Z"; | ^ error: byte constant must be ASCII. Use a \xHH escape for a non-ASCII byte - --> $DIR/byte-string-literals.rs:11:7 + --> $DIR/byte-string-literals.rs:8:7 | LL | b"é"; | ^ error: unterminated double quote byte string - --> $DIR/byte-string-literals.rs:12:7 + --> $DIR/byte-string-literals.rs:9:7 | LL | b"a | _______^ diff --git a/src/test/ui/proc-macro/auxiliary/derive-bad.rs b/src/test/ui/proc-macro/auxiliary/derive-bad.rs index 468410972fb7c..90bb9b1baf2b7 100644 --- a/src/test/ui/proc-macro/auxiliary/derive-bad.rs +++ b/src/test/ui/proc-macro/auxiliary/derive-bad.rs @@ -11,4 +11,3 @@ use proc_macro::TokenStream; pub fn derive_a(_input: TokenStream) -> TokenStream { "struct A { inner }".parse().unwrap() } - diff --git a/src/test/ui/proc-macro/issue-50493.rs b/src/test/ui/proc-macro/issue-50493.rs index eeb08f5eebdcc..5d1a9f25baffd 100644 --- a/src/test/ui/proc-macro/issue-50493.rs +++ b/src/test/ui/proc-macro/issue-50493.rs @@ -11,4 +11,3 @@ struct Restricted { mod restricted {} fn main() {} - diff --git a/src/test/ui/range/range_traits-2.rs b/src/test/ui/range/range_traits-2.rs index c34ef781d8c78..234d7a64dc8b0 100644 --- a/src/test/ui/range/range_traits-2.rs +++ b/src/test/ui/range/range_traits-2.rs @@ -4,4 +4,3 @@ use std::ops::*; struct R(Range); fn main() {} - diff --git a/src/test/ui/range/range_traits-3.rs b/src/test/ui/range/range_traits-3.rs index b0448afce04ea..2d597cce5ad56 100644 --- a/src/test/ui/range/range_traits-3.rs +++ b/src/test/ui/range/range_traits-3.rs @@ -4,4 +4,3 @@ use std::ops::*; struct R(RangeFrom); fn main() {} - diff --git a/src/test/ui/range/range_traits-4.rs b/src/test/ui/range/range_traits-4.rs index ff84577048379..52c706080f3c2 100644 --- a/src/test/ui/range/range_traits-4.rs +++ b/src/test/ui/range/range_traits-4.rs @@ -7,4 +7,3 @@ struct R(RangeTo); fn main() {} - diff --git a/src/test/ui/range/range_traits-5.rs b/src/test/ui/range/range_traits-5.rs index 95505c94d1fb7..a8c3e9b0d62c0 100644 --- a/src/test/ui/range/range_traits-5.rs +++ b/src/test/ui/range/range_traits-5.rs @@ -7,4 +7,3 @@ struct R(RangeFull); fn main() {} - diff --git a/src/test/ui/range/range_traits-6.rs b/src/test/ui/range/range_traits-6.rs index 041f04a349876..bce106bbfe79b 100644 --- a/src/test/ui/range/range_traits-6.rs +++ b/src/test/ui/range/range_traits-6.rs @@ -4,4 +4,3 @@ use std::ops::*; struct R(RangeInclusive); fn main() {} - diff --git a/src/test/ui/range/range_traits-7.rs b/src/test/ui/range/range_traits-7.rs index c328ecb223a28..548676063caf7 100644 --- a/src/test/ui/range/range_traits-7.rs +++ b/src/test/ui/range/range_traits-7.rs @@ -7,4 +7,3 @@ struct R(RangeToInclusive); fn main() {} - diff --git a/src/test/ui/recursion/recursive-types-are-not-uninhabited.rs b/src/test/ui/recursion/recursive-types-are-not-uninhabited.rs index b3e4efb99401f..4489303638358 100644 --- a/src/test/ui/recursion/recursive-types-are-not-uninhabited.rs +++ b/src/test/ui/recursion/recursive-types-are-not-uninhabited.rs @@ -11,4 +11,3 @@ fn foo(res: Result) -> u32 { fn main() { foo(Ok(23)); } - diff --git a/src/test/ui/regions/region-borrow-params-issue-29793-small.rs b/src/test/ui/regions/region-borrow-params-issue-29793-small.rs index 0d8c9fb269932..a1ccf66767104 100644 --- a/src/test/ui/regions/region-borrow-params-issue-29793-small.rs +++ b/src/test/ui/regions/region-borrow-params-issue-29793-small.rs @@ -210,4 +210,3 @@ fn move_of_trait_default_params() { } fn main() { } - diff --git a/src/test/ui/return/return-from-diverging.rs b/src/test/ui/return/return-from-diverging.rs index faeccaace6987..2ee48e7bc4762 100644 --- a/src/test/ui/return/return-from-diverging.rs +++ b/src/test/ui/return/return-from-diverging.rs @@ -6,4 +6,3 @@ fn fail() -> ! { fn main() { } - diff --git a/src/test/ui/return/return-unit-from-diverging.rs b/src/test/ui/return/return-unit-from-diverging.rs index 31a13784b478d..48417599b1d87 100644 --- a/src/test/ui/return/return-unit-from-diverging.rs +++ b/src/test/ui/return/return-unit-from-diverging.rs @@ -7,4 +7,3 @@ fn fail() -> ! { fn main() { } - diff --git a/src/test/ui/rfc-2093-infer-outlives/cross-crate.rs b/src/test/ui/rfc-2093-infer-outlives/cross-crate.rs index ce50452dd523f..a9bfeabf16e5e 100644 --- a/src/test/ui/rfc-2093-infer-outlives/cross-crate.rs +++ b/src/test/ui/rfc-2093-infer-outlives/cross-crate.rs @@ -6,4 +6,3 @@ struct Foo<'a, T> { //~ ERROR rustc_outlives } fn main() {} - diff --git a/src/test/ui/rfc-2093-infer-outlives/dont-infer-static.rs b/src/test/ui/rfc-2093-infer-outlives/dont-infer-static.rs index 812e8c8bb3e89..5297d0d9842e2 100644 --- a/src/test/ui/rfc-2093-infer-outlives/dont-infer-static.rs +++ b/src/test/ui/rfc-2093-infer-outlives/dont-infer-static.rs @@ -1,5 +1,3 @@ -// ignore-tidy-linelength - /* * We don't infer `T: 'static` outlives relationships by default. * Instead an additional feature gate `infer_static_outlives_requirements` @@ -14,4 +12,3 @@ struct Bar { } fn main() {} - diff --git a/src/test/ui/rfc-2093-infer-outlives/dont-infer-static.stderr b/src/test/ui/rfc-2093-infer-outlives/dont-infer-static.stderr index 26cbeeaf5acde..b049d8a4ab3c3 100644 --- a/src/test/ui/rfc-2093-infer-outlives/dont-infer-static.stderr +++ b/src/test/ui/rfc-2093-infer-outlives/dont-infer-static.stderr @@ -1,5 +1,5 @@ error[E0310]: the parameter type `U` may not live long enough - --> $DIR/dont-infer-static.rs:10:5 + --> $DIR/dont-infer-static.rs:8:5 | LL | struct Foo { | - help: consider adding an explicit lifetime bound `U: 'static`... @@ -7,7 +7,7 @@ LL | bar: Bar | ^^^^^^^^^^^ | note: ...so that the type `U` will meet its required lifetime bounds - --> $DIR/dont-infer-static.rs:10:5 + --> $DIR/dont-infer-static.rs:8:5 | LL | bar: Bar | ^^^^^^^^^^^ diff --git a/src/test/ui/rfc-2093-infer-outlives/enum.rs b/src/test/ui/rfc-2093-infer-outlives/enum.rs index 622794ea9ac3b..71d2d32226556 100644 --- a/src/test/ui/rfc-2093-infer-outlives/enum.rs +++ b/src/test/ui/rfc-2093-infer-outlives/enum.rs @@ -1,5 +1,3 @@ -// ignore-tidy-linelength - #![feature(rustc_attrs)] // Needs an explicit where clause stating outlives condition. (RFC 2093) diff --git a/src/test/ui/rfc-2093-infer-outlives/enum.stderr b/src/test/ui/rfc-2093-infer-outlives/enum.stderr index e81d10a66dff3..dd56c1f79c712 100644 --- a/src/test/ui/rfc-2093-infer-outlives/enum.stderr +++ b/src/test/ui/rfc-2093-infer-outlives/enum.stderr @@ -1,5 +1,5 @@ error: rustc_outlives - --> $DIR/enum.rs:9:1 + --> $DIR/enum.rs:7:1 | LL | / enum Foo<'a, T> { LL | | One(Bar<'a, T>) @@ -9,7 +9,7 @@ LL | | } = note: T : 'a error: rustc_outlives - --> $DIR/enum.rs:15:1 + --> $DIR/enum.rs:13:1 | LL | / struct Bar<'b, U> { LL | | field2: &'b U @@ -19,7 +19,7 @@ LL | | } = note: U : 'b error: rustc_outlives - --> $DIR/enum.rs:21:1 + --> $DIR/enum.rs:19:1 | LL | / enum Ying<'c, K> { LL | | One(&'c Yang) diff --git a/src/test/ui/rfc-2093-infer-outlives/explicit-enum.rs b/src/test/ui/rfc-2093-infer-outlives/explicit-enum.rs index b7a66a326b84e..c330c27fea0a9 100644 --- a/src/test/ui/rfc-2093-infer-outlives/explicit-enum.rs +++ b/src/test/ui/rfc-2093-infer-outlives/explicit-enum.rs @@ -11,4 +11,3 @@ struct Bar<'x, T> where T: 'x { } fn main() {} - diff --git a/src/test/ui/rfc-2093-infer-outlives/explicit-struct.rs b/src/test/ui/rfc-2093-infer-outlives/explicit-struct.rs index 3c69f9f612eaa..3d5e610b934b3 100644 --- a/src/test/ui/rfc-2093-infer-outlives/explicit-struct.rs +++ b/src/test/ui/rfc-2093-infer-outlives/explicit-struct.rs @@ -11,4 +11,3 @@ struct Bar<'a, T> where T: 'a { } fn main() {} - diff --git a/src/test/ui/rfc-2093-infer-outlives/explicit-union.rs b/src/test/ui/rfc-2093-infer-outlives/explicit-union.rs index 87a789b06a0ad..a16fb7670a603 100644 --- a/src/test/ui/rfc-2093-infer-outlives/explicit-union.rs +++ b/src/test/ui/rfc-2093-infer-outlives/explicit-union.rs @@ -13,4 +13,3 @@ union Bar<'a, T> where T: 'a { } fn main() {} - diff --git a/src/test/ui/rfc-2093-infer-outlives/infer-static.rs b/src/test/ui/rfc-2093-infer-outlives/infer-static.rs index 916d4849edbba..bd778e3b13623 100644 --- a/src/test/ui/rfc-2093-infer-outlives/infer-static.rs +++ b/src/test/ui/rfc-2093-infer-outlives/infer-static.rs @@ -10,4 +10,3 @@ struct Bar { } fn main() {} - diff --git a/src/test/ui/rfc-2093-infer-outlives/projection.rs b/src/test/ui/rfc-2093-infer-outlives/projection.rs index 0b9637e9528ed..411c86da1dec5 100644 --- a/src/test/ui/rfc-2093-infer-outlives/projection.rs +++ b/src/test/ui/rfc-2093-infer-outlives/projection.rs @@ -6,4 +6,3 @@ struct Foo<'a, T: Iterator> { //~ ERROR rustc_outlives } fn main() {} - diff --git a/src/test/ui/rust-2018/extern-crate-idiomatic-in-2018.fixed b/src/test/ui/rust-2018/extern-crate-idiomatic-in-2018.fixed index a9f4a1edbb68d..ddd9abbd50ed8 100644 --- a/src/test/ui/rust-2018/extern-crate-idiomatic-in-2018.fixed +++ b/src/test/ui/rust-2018/extern-crate-idiomatic-in-2018.fixed @@ -23,4 +23,3 @@ fn main() { // But this should be a use of the (renamed) crate: crate::bar::foo(); } - diff --git a/src/test/ui/rust-2018/extern-crate-idiomatic-in-2018.rs b/src/test/ui/rust-2018/extern-crate-idiomatic-in-2018.rs index 02e3e83df128c..47674bc19fc04 100644 --- a/src/test/ui/rust-2018/extern-crate-idiomatic-in-2018.rs +++ b/src/test/ui/rust-2018/extern-crate-idiomatic-in-2018.rs @@ -23,4 +23,3 @@ fn main() { // But this should be a use of the (renamed) crate: crate::bar::foo(); } - diff --git a/src/test/ui/rust-2018/extern-crate-idiomatic.fixed b/src/test/ui/rust-2018/extern-crate-idiomatic.fixed index 38dddf38d30eb..3111b1dabcbfd 100644 --- a/src/test/ui/rust-2018/extern-crate-idiomatic.fixed +++ b/src/test/ui/rust-2018/extern-crate-idiomatic.fixed @@ -16,4 +16,3 @@ use edition_lint_paths::foo; fn main() { foo(); } - diff --git a/src/test/ui/rust-2018/extern-crate-idiomatic.rs b/src/test/ui/rust-2018/extern-crate-idiomatic.rs index 38dddf38d30eb..3111b1dabcbfd 100644 --- a/src/test/ui/rust-2018/extern-crate-idiomatic.rs +++ b/src/test/ui/rust-2018/extern-crate-idiomatic.rs @@ -16,4 +16,3 @@ use edition_lint_paths::foo; fn main() { foo(); } - diff --git a/src/test/ui/rust-2018/extern-crate-referenced-by-self-path.fixed b/src/test/ui/rust-2018/extern-crate-referenced-by-self-path.fixed index e249c8a026d96..11b9a67ed7030 100644 --- a/src/test/ui/rust-2018/extern-crate-referenced-by-self-path.fixed +++ b/src/test/ui/rust-2018/extern-crate-referenced-by-self-path.fixed @@ -15,4 +15,3 @@ use self::edition_lint_paths::foo; fn main() { foo(); } - diff --git a/src/test/ui/rust-2018/extern-crate-referenced-by-self-path.rs b/src/test/ui/rust-2018/extern-crate-referenced-by-self-path.rs index e249c8a026d96..11b9a67ed7030 100644 --- a/src/test/ui/rust-2018/extern-crate-referenced-by-self-path.rs +++ b/src/test/ui/rust-2018/extern-crate-referenced-by-self-path.rs @@ -15,4 +15,3 @@ use self::edition_lint_paths::foo; fn main() { foo(); } - diff --git a/src/test/ui/rust-2018/extern-crate-rename.fixed b/src/test/ui/rust-2018/extern-crate-rename.fixed index aa8b935289e44..c4c9bdf58c3d8 100644 --- a/src/test/ui/rust-2018/extern-crate-rename.fixed +++ b/src/test/ui/rust-2018/extern-crate-rename.fixed @@ -16,4 +16,3 @@ use crate::my_crate::foo; fn main() { foo(); } - diff --git a/src/test/ui/rust-2018/extern-crate-rename.rs b/src/test/ui/rust-2018/extern-crate-rename.rs index 98c7d341bff22..8f14f2f1fec87 100644 --- a/src/test/ui/rust-2018/extern-crate-rename.rs +++ b/src/test/ui/rust-2018/extern-crate-rename.rs @@ -16,4 +16,3 @@ use my_crate::foo; fn main() { foo(); } - diff --git a/src/test/ui/rust-2018/extern-crate-submod.fixed b/src/test/ui/rust-2018/extern-crate-submod.fixed index 0564e58f3c7dd..2a8e24db0bdc5 100644 --- a/src/test/ui/rust-2018/extern-crate-submod.fixed +++ b/src/test/ui/rust-2018/extern-crate-submod.fixed @@ -23,4 +23,3 @@ use crate::m::edition_lint_paths::foo; fn main() { foo(); } - diff --git a/src/test/ui/rust-2018/extern-crate-submod.rs b/src/test/ui/rust-2018/extern-crate-submod.rs index 206f3903b4716..f3a357917cc7f 100644 --- a/src/test/ui/rust-2018/extern-crate-submod.rs +++ b/src/test/ui/rust-2018/extern-crate-submod.rs @@ -23,4 +23,3 @@ use m::edition_lint_paths::foo; fn main() { foo(); } - diff --git a/src/test/ui/self/suggest-self.rs b/src/test/ui/self/suggest-self.rs index 9d81b6fd7ca4d..1cc17116ea7f7 100644 --- a/src/test/ui/self/suggest-self.rs +++ b/src/test/ui/self/suggest-self.rs @@ -39,4 +39,3 @@ fn main() { let len = this.len(); let len = my.len(); } - diff --git a/src/test/ui/span/dropck-object-cycle.rs b/src/test/ui/span/dropck-object-cycle.rs index 7b7f37d53f110..8dc70ea252b27 100644 --- a/src/test/ui/span/dropck-object-cycle.rs +++ b/src/test/ui/span/dropck-object-cycle.rs @@ -45,4 +45,3 @@ pub fn main() { // the type of `m` *strictly outlives* `'m`. Hence we get an // error. } - diff --git a/src/test/ui/span/issue-24356.rs b/src/test/ui/span/issue-24356.rs index 7696bd54226da..7ec05aab29a71 100644 --- a/src/test/ui/span/issue-24356.rs +++ b/src/test/ui/span/issue-24356.rs @@ -1,7 +1,5 @@ // Regression test for #24356 -// ignore-tidy-linelength - fn main() { { use std::ops::Deref; diff --git a/src/test/ui/span/issue-24356.stderr b/src/test/ui/span/issue-24356.stderr index 102cc4201e2ec..4827e9ddd50fd 100644 --- a/src/test/ui/span/issue-24356.stderr +++ b/src/test/ui/span/issue-24356.stderr @@ -1,5 +1,5 @@ error[E0046]: not all trait items implemented, missing: `Target` - --> $DIR/issue-24356.rs:20:9 + --> $DIR/issue-24356.rs:18:9 | LL | impl Deref for Thing { | ^^^^^^^^^^^^^^^^^^^^ missing `Target` in implementation diff --git a/src/test/ui/span/issue-7575.rs b/src/test/ui/span/issue-7575.rs index c33398cd39cab..ea0a66540b931 100644 --- a/src/test/ui/span/issue-7575.rs +++ b/src/test/ui/span/issue-7575.rs @@ -1,6 +1,4 @@ // Test the mechanism for warning about possible missing `self` declarations. -// ignore-tidy-linelength - trait CtxtFn { fn f8(self, _: usize) -> usize; fn f9(_: usize) -> usize; diff --git a/src/test/ui/span/issue-7575.stderr b/src/test/ui/span/issue-7575.stderr index b2c9e505f07b6..614638752f166 100644 --- a/src/test/ui/span/issue-7575.stderr +++ b/src/test/ui/span/issue-7575.stderr @@ -1,24 +1,24 @@ error[E0599]: no method named `f9` found for type `usize` in the current scope - --> $DIR/issue-7575.rs:64:18 + --> $DIR/issue-7575.rs:62:18 | LL | u.f8(42) + u.f9(342) + m.fff(42) | ^^ this is an associated function, not a method | = note: found the following associated functions; to be used as methods, functions must have a `self` parameter note: candidate #1 is defined in the trait `CtxtFn` - --> $DIR/issue-7575.rs:6:5 + --> $DIR/issue-7575.rs:4:5 | 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:10:5 + --> $DIR/issue-7575.rs:8:5 | 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:19:5 + --> $DIR/issue-7575.rs:17:5 | LL | fn f9(_: usize) -> usize; | ^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -30,7 +30,7 @@ LL | fn f9(_: usize) -> usize; candidate #3: `UnusedTrait` error[E0599]: no method named `fff` found for type `Myisize` in the current scope - --> $DIR/issue-7575.rs:64:30 + --> $DIR/issue-7575.rs:62:30 | LL | struct Myisize(isize); | ---------------------- method `fff` not found for this @@ -43,20 +43,20 @@ 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 note: the candidate is defined in an impl for the type `Myisize` - --> $DIR/issue-7575.rs:41:5 + --> $DIR/issue-7575.rs:39:5 | 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:72:7 + --> $DIR/issue-7575.rs:70:7 | LL | t.is_str() | ^^^^^^ this is an associated function, not a method | = note: found the following associated functions; to be used as methods, functions must have a `self` parameter note: the candidate is defined in the trait `ManyImplTrait` - --> $DIR/issue-7575.rs:47:5 + --> $DIR/issue-7575.rs:45:5 | LL | fn is_str() -> bool { | ^^^^^^^^^^^^^^^^^^^ diff --git a/src/test/ui/span/suggestion-non-ascii.rs b/src/test/ui/span/suggestion-non-ascii.rs index 74032cf0266f8..914efd85a0ce7 100644 --- a/src/test/ui/span/suggestion-non-ascii.rs +++ b/src/test/ui/span/suggestion-non-ascii.rs @@ -2,4 +2,3 @@ fn main() { let tup = (1,); println!("☃{}", tup[0]); //~ ERROR cannot index into a value of type } - diff --git a/src/test/ui/stability-attribute/stability-attribute-issue.rs b/src/test/ui/stability-attribute/stability-attribute-issue.rs index ca4d7cc6a6ccf..cda1aff133f94 100644 --- a/src/test/ui/stability-attribute/stability-attribute-issue.rs +++ b/src/test/ui/stability-attribute/stability-attribute-issue.rs @@ -1,6 +1,4 @@ // aux-build:stability_attribute_issue.rs -// ignore-tidy-linelength - #![deny(deprecated)] extern crate stability_attribute_issue; diff --git a/src/test/ui/stability-attribute/stability-attribute-issue.stderr b/src/test/ui/stability-attribute/stability-attribute-issue.stderr index 36e192e583e62..7e6fbe1600d1e 100644 --- a/src/test/ui/stability-attribute/stability-attribute-issue.stderr +++ b/src/test/ui/stability-attribute/stability-attribute-issue.stderr @@ -1,5 +1,5 @@ error[E0658]: use of unstable library feature 'unstable_test_feature' - --> $DIR/stability-attribute-issue.rs:10:5 + --> $DIR/stability-attribute-issue.rs:8:5 | LL | unstable(); | ^^^^^^^^ @@ -8,7 +8,7 @@ LL | unstable(); = help: add #![feature(unstable_test_feature)] to the crate attributes to enable error[E0658]: use of unstable library feature 'unstable_test_feature': message - --> $DIR/stability-attribute-issue.rs:12:5 + --> $DIR/stability-attribute-issue.rs:10:5 | LL | unstable_msg(); | ^^^^^^^^^^^^ diff --git a/src/test/ui/structs/struct-fields-shorthand.rs b/src/test/ui/structs/struct-fields-shorthand.rs index 45e3014f22e20..1bdcc8315c154 100644 --- a/src/test/ui/structs/struct-fields-shorthand.rs +++ b/src/test/ui/structs/struct-fields-shorthand.rs @@ -9,4 +9,3 @@ fn main() { x, y, z //~ ERROR struct `Foo` has no field named `z` }; } - diff --git a/src/test/ui/transmute/transmute-imut-to-mut.rs b/src/test/ui/transmute/transmute-imut-to-mut.rs index 94361a29087ea..8e34e0ae8c74d 100644 --- a/src/test/ui/transmute/transmute-imut-to-mut.rs +++ b/src/test/ui/transmute/transmute-imut-to-mut.rs @@ -6,4 +6,3 @@ fn main() { let _a: &mut u8 = unsafe { transmute(&1u8) }; //~^ ERROR mutating transmuted &mut T from &T may cause undefined behavior } - diff --git a/src/test/ui/trivial-bounds/trivial-bounds-leak.rs b/src/test/ui/trivial-bounds/trivial-bounds-leak.rs index dc4f1c7f9fc16..249051d806701 100644 --- a/src/test/ui/trivial-bounds/trivial-bounds-leak.rs +++ b/src/test/ui/trivial-bounds/trivial-bounds-leak.rs @@ -29,4 +29,3 @@ fn foo() { fn generic_function(t: T) {} fn main() {} - diff --git a/src/test/ui/try-block/try-block-bad-lifetime.rs b/src/test/ui/try-block/try-block-bad-lifetime.rs index 872604f4eee84..6063e2e463e2e 100644 --- a/src/test/ui/try-block/try-block-bad-lifetime.rs +++ b/src/test/ui/try-block/try-block-bad-lifetime.rs @@ -35,4 +35,3 @@ pub fn main() { *i_ptr = 50; } } - diff --git a/src/test/ui/try-block/try-block-maybe-bad-lifetime.rs b/src/test/ui/try-block/try-block-maybe-bad-lifetime.rs index 113d089c757c0..1d1c3d980e230 100644 --- a/src/test/ui/try-block/try-block-maybe-bad-lifetime.rs +++ b/src/test/ui/try-block/try-block-maybe-bad-lifetime.rs @@ -42,4 +42,3 @@ pub fn main() { do_something_with(j); } } - diff --git a/src/test/ui/try-block/try-block-opt-init.rs b/src/test/ui/try-block/try-block-opt-init.rs index ef559226e67df..2387db8de4d6a 100644 --- a/src/test/ui/try-block/try-block-opt-init.rs +++ b/src/test/ui/try-block/try-block-opt-init.rs @@ -14,4 +14,3 @@ pub fn main() { }; assert_eq!(cfg_res, 5); //~ ERROR borrow of possibly uninitialized variable: `cfg_res` } - diff --git a/src/test/ui/type/type-mismatch-multiple.rs b/src/test/ui/type/type-mismatch-multiple.rs index 1904ccf5d5945..b8f04ca8d4a33 100644 --- a/src/test/ui/type/type-mismatch-multiple.rs +++ b/src/test/ui/type/type-mismatch-multiple.rs @@ -7,4 +7,3 @@ fn main() { let a: bool = 1; let b: i32 = true; } //~| expected bool, found integer //~| ERROR mismatched types //~| expected i32, found bool - diff --git a/src/test/ui/typeck/typeck-default-trait-impl-negation-sync.rs b/src/test/ui/typeck/typeck-default-trait-impl-negation-sync.rs index f31dac27caec4..e4487fb110cf1 100644 --- a/src/test/ui/typeck/typeck-default-trait-impl-negation-sync.rs +++ b/src/test/ui/typeck/typeck-default-trait-impl-negation-sync.rs @@ -1,5 +1,3 @@ -// ignore-tidy-linelength - #![feature(optin_builtin_traits)] struct Managed; diff --git a/src/test/ui/typeck/typeck-default-trait-impl-negation-sync.stderr b/src/test/ui/typeck/typeck-default-trait-impl-negation-sync.stderr index 5330c04074b2f..4d435bf4e8b24 100644 --- a/src/test/ui/typeck/typeck-default-trait-impl-negation-sync.stderr +++ b/src/test/ui/typeck/typeck-default-trait-impl-negation-sync.stderr @@ -1,18 +1,18 @@ error[E0277]: `MyNotSync` cannot be shared between threads safely - --> $DIR/typeck-default-trait-impl-negation-sync.rs:35:5 + --> $DIR/typeck-default-trait-impl-negation-sync.rs:33:5 | LL | is_sync::(); | ^^^^^^^^^^^^^^^^^^^^ `MyNotSync` cannot be shared between threads safely | = help: the trait `std::marker::Sync` is not implemented for `MyNotSync` note: required by `is_sync` - --> $DIR/typeck-default-trait-impl-negation-sync.rs:31:1 + --> $DIR/typeck-default-trait-impl-negation-sync.rs:29:1 | LL | fn is_sync() {} | ^^^^^^^^^^^^^^^^^^^^^ error[E0277]: `std::cell::UnsafeCell` cannot be shared between threads safely - --> $DIR/typeck-default-trait-impl-negation-sync.rs:38:5 + --> $DIR/typeck-default-trait-impl-negation-sync.rs:36:5 | LL | is_sync::(); | ^^^^^^^^^^^^^^^^^^^^^^^^ `std::cell::UnsafeCell` cannot be shared between threads safely @@ -20,13 +20,13 @@ LL | is_sync::(); = help: within `MyTypeWUnsafe`, the trait `std::marker::Sync` is not implemented for `std::cell::UnsafeCell` = note: required because it appears within the type `MyTypeWUnsafe` note: required by `is_sync` - --> $DIR/typeck-default-trait-impl-negation-sync.rs:31:1 + --> $DIR/typeck-default-trait-impl-negation-sync.rs:29:1 | LL | fn is_sync() {} | ^^^^^^^^^^^^^^^^^^^^^ error[E0277]: `Managed` cannot be shared between threads safely - --> $DIR/typeck-default-trait-impl-negation-sync.rs:41:5 + --> $DIR/typeck-default-trait-impl-negation-sync.rs:39:5 | LL | is_sync::(); | ^^^^^^^^^^^^^^^^^^^^^^^^ `Managed` cannot be shared between threads safely @@ -34,7 +34,7 @@ LL | is_sync::(); = help: within `MyTypeManaged`, the trait `std::marker::Sync` is not implemented for `Managed` = note: required because it appears within the type `MyTypeManaged` note: required by `is_sync` - --> $DIR/typeck-default-trait-impl-negation-sync.rs:31:1 + --> $DIR/typeck-default-trait-impl-negation-sync.rs:29:1 | LL | fn is_sync() {} | ^^^^^^^^^^^^^^^^^^^^^ diff --git a/src/test/ui/uninhabited/uninhabited-irrefutable.rs b/src/test/ui/uninhabited/uninhabited-irrefutable.rs index c32d3a4a0a291..48cd92719b49a 100644 --- a/src/test/ui/uninhabited/uninhabited-irrefutable.rs +++ b/src/test/ui/uninhabited/uninhabited-irrefutable.rs @@ -26,4 +26,3 @@ fn main() { let x: Foo = Foo::D(123); let Foo::D(_y) = x; //~ ERROR refutable pattern in local binding: `A(_)` not covered } - diff --git a/src/test/ui/uninhabited/uninhabited-patterns.rs b/src/test/ui/uninhabited/uninhabited-patterns.rs index 609ed3d75bafa..1bf01184a08e7 100644 --- a/src/test/ui/uninhabited/uninhabited-patterns.rs +++ b/src/test/ui/uninhabited/uninhabited-patterns.rs @@ -45,4 +45,3 @@ fn main() { //~^ ERROR unreachable pattern } } - diff --git a/src/test/ui/unreachable/unreachable-arm.rs b/src/test/ui/unreachable/unreachable-arm.rs index 9f1a5a39587b3..64c3896851669 100644 --- a/src/test/ui/unreachable/unreachable-arm.rs +++ b/src/test/ui/unreachable/unreachable-arm.rs @@ -12,4 +12,3 @@ fn main() { _ => { } } } - diff --git a/src/test/ui/unreachable/unreachable-loop-patterns.rs b/src/test/ui/unreachable/unreachable-loop-patterns.rs index 9794806375324..3c878410f7710 100644 --- a/src/test/ui/unreachable/unreachable-loop-patterns.rs +++ b/src/test/ui/unreachable/unreachable-loop-patterns.rs @@ -20,4 +20,3 @@ fn main() { for _ in unimplemented!() as Void {} //~^ ERROR unreachable pattern } - diff --git a/src/test/ui/unreachable/unreachable-try-pattern.rs b/src/test/ui/unreachable/unreachable-try-pattern.rs index 1c1e01ff0e916..6665c58e457f1 100644 --- a/src/test/ui/unreachable/unreachable-try-pattern.rs +++ b/src/test/ui/unreachable/unreachable-try-pattern.rs @@ -39,4 +39,3 @@ fn main() { let _ = qux(Ok(123)); let _ = vom(Ok(123)); } - diff --git a/src/test/ui/unsafe/unsafe-const-fn.rs b/src/test/ui/unsafe/unsafe-const-fn.rs index cadfdd064e39d..3b4becf17a76c 100644 --- a/src/test/ui/unsafe/unsafe-const-fn.rs +++ b/src/test/ui/unsafe/unsafe-const-fn.rs @@ -10,4 +10,3 @@ const VAL: u32 = dummy(0xFFFF); fn main() { assert_eq!(VAL, 0xFFFF0000); } - diff --git a/src/test/ui/unsized/unsized-enum2.rs b/src/test/ui/unsized/unsized-enum2.rs index 0fe4a3acfbe20..60bfb5cb6402a 100644 --- a/src/test/ui/unsized/unsized-enum2.rs +++ b/src/test/ui/unsized/unsized-enum2.rs @@ -72,4 +72,3 @@ enum E { fn main() { } - diff --git a/src/test/ui/wasm-import-module.rs b/src/test/ui/wasm-import-module.rs index 618bf1952aa5d..16d628a618744 100644 --- a/src/test/ui/wasm-import-module.rs +++ b/src/test/ui/wasm-import-module.rs @@ -8,4 +8,3 @@ extern {} extern {} fn main() {} - diff --git a/src/test/ui/wf/wf-outlives-ty-in-fn-or-trait.rs b/src/test/ui/wf/wf-outlives-ty-in-fn-or-trait.rs index 1c4cda261d1c9..ac95cbab1f73e 100644 --- a/src/test/ui/wf/wf-outlives-ty-in-fn-or-trait.rs +++ b/src/test/ui/wf/wf-outlives-ty-in-fn-or-trait.rs @@ -20,4 +20,3 @@ impl<'a, T> Trait<'a, T> for u32 { } fn main() { } - diff --git a/src/tools/cargo b/src/tools/cargo index b6581d383ed59..6be12653dcefb 160000 --- a/src/tools/cargo +++ b/src/tools/cargo @@ -1 +1 @@ -Subproject commit b6581d383ed596b133e330011658c6f83cf85c2f +Subproject commit 6be12653dcefb46ee7b605f063ee75b5e6cba513 diff --git a/src/tools/tidy/src/style.rs b/src/tools/tidy/src/style.rs index 528a5063ee46c..9ab88d6e9aeac 100644 --- a/src/tools/tidy/src/style.rs +++ b/src/tools/tidy/src/style.rs @@ -9,8 +9,8 @@ //! * No `TODO` or `XXX` directives. //! * No unexplained ` ```ignore ` or ` ```rust,ignore ` doc tests. //! -//! A number of these checks can be opted-out of with various directives like -//! `// ignore-tidy-linelength`. +//! A number of these checks can be opted-out of with various directives of the form: +//! `// ignore-tidy-CHECK-NAME`. use std::fs::File; use std::io::prelude::*; @@ -90,6 +90,36 @@ fn long_line_is_ok(line: &str) -> bool { false } +enum Directive { + /// By default, tidy always warns against style issues. + Deny, + + /// `Ignore(false)` means that an `ignore-tidy-*` directive + /// has been provided, but is unnecessary. `Ignore(true)` + /// means that it is necessary (i.e. a warning would be + /// produced if `ignore-tidy-*` was not present). + Ignore(bool), +} + +fn contains_ignore_directive(contents: &String, check: &str) -> Directive { + if contents.contains(&format!("// ignore-tidy-{}", check)) || + contents.contains(&format!("# ignore-tidy-{}", check)) { + Directive::Ignore(false) + } else { + Directive::Deny + } +} + +macro_rules! suppressible_tidy_err { + ($err:ident, $skip:ident, $msg:expr) => { + if let Directive::Deny = $skip { + $err($msg); + } else { + $skip = Directive::Ignore(true); + } + }; +} + pub fn check(path: &Path, bad: &mut bool) { let mut contents = String::new(); super::walk(path, &mut super::filter_dirs, &mut |file| { @@ -107,29 +137,32 @@ pub fn check(path: &Path, bad: &mut bool) { tidy_error!(bad, "{}: empty file", file.display()); } - let skip_cr = contents.contains("ignore-tidy-cr"); - let skip_tab = contents.contains("ignore-tidy-tab"); - let skip_length = contents.contains("ignore-tidy-linelength"); - let skip_end_whitespace = contents.contains("ignore-tidy-end-whitespace"); - let skip_copyright = contents.contains("ignore-tidy-copyright"); + let mut skip_cr = contains_ignore_directive(&contents, "cr"); + let mut skip_tab = contains_ignore_directive(&contents, "tab"); + let mut skip_length = contains_ignore_directive(&contents, "linelength"); + let mut skip_end_whitespace = contains_ignore_directive(&contents, "end-whitespace"); + let mut skip_copyright = contains_ignore_directive(&contents, "copyright"); let mut leading_new_lines = false; let mut trailing_new_lines = 0; for (i, line) in contents.split('\n').enumerate() { let mut err = |msg: &str| { tidy_error!(bad, "{}:{}: {}", file.display(), i + 1, msg); }; - if !skip_length && line.chars().count() > COLS - && !long_line_is_ok(line) { - err(&format!("line longer than {} chars", COLS)); + if line.chars().count() > COLS && !long_line_is_ok(line) { + suppressible_tidy_err!( + err, + skip_length, + &format!("line longer than {} chars", COLS) + ); } - if !skip_tab && line.contains('\t') { - err("tab character"); + if line.contains('\t') { + suppressible_tidy_err!(err, skip_tab, "tab character"); } - if !skip_end_whitespace && (line.ends_with(' ') || line.ends_with('\t')) { - err("trailing whitespace"); + if line.ends_with(' ') || line.ends_with('\t') { + suppressible_tidy_err!(err, skip_end_whitespace, "trailing whitespace"); } - if !skip_cr && line.contains('\r') { - err("CR character"); + if line.contains('\r') { + suppressible_tidy_err!(err, skip_cr, "CR character"); } if filename != "style.rs" { if line.contains("TODO") { @@ -139,12 +172,16 @@ pub fn check(path: &Path, bad: &mut bool) { err("XXX is deprecated; use FIXME") } } - if !skip_copyright && (line.starts_with("// Copyright") || - line.starts_with("# Copyright") || - line.starts_with("Copyright")) - && (line.contains("Rust Developers") || - line.contains("Rust Project Developers")) { - err("copyright notices attributed to the Rust Project Developers are deprecated"); + if (line.starts_with("// Copyright") || + line.starts_with("# Copyright") || + line.starts_with("Copyright")) + && (line.contains("Rust Developers") || + line.contains("Rust Project Developers")) { + suppressible_tidy_err!( + err, + skip_copyright, + "copyright notices attributed to the Rust Project Developers are deprecated" + ); } if line.ends_with("```ignore") || line.ends_with("```rust,ignore") { err(UNEXPLAINED_IGNORE_DOCTEST_INFO); @@ -166,8 +203,24 @@ pub fn check(path: &Path, bad: &mut bool) { } match trailing_new_lines { 0 => tidy_error!(bad, "{}: missing trailing newline", file.display()), - 1 | 2 => {} + 1 => {} n => tidy_error!(bad, "{}: too many trailing newlines ({})", file.display(), n), }; + + if let Directive::Ignore(false) = skip_cr { + tidy_error!(bad, "{}: ignoring CR characters unnecessarily", file.display()); + } + if let Directive::Ignore(false) = skip_tab { + tidy_error!(bad, "{}: ignoring tab characters unnecessarily", file.display()); + } + if let Directive::Ignore(false) = skip_length { + tidy_error!(bad, "{}: ignoring line length unnecessarily", file.display()); + } + if let Directive::Ignore(false) = skip_end_whitespace { + tidy_error!(bad, "{}: ignoring trailing whitespace unnecessarily", file.display()); + } + if let Directive::Ignore(false) = skip_copyright { + tidy_error!(bad, "{}: ignoring copyright unnecessarily", file.display()); + } }) }