diff --git a/src/bootstrap/bin/main.rs b/src/bootstrap/bin/main.rs index 0732cb83f39c6..bd1a87c5744d3 100644 --- a/src/bootstrap/bin/main.rs +++ b/src/bootstrap/bin/main.rs @@ -5,7 +5,8 @@ //! parent directory, and otherwise documentation can be found throughout the `build` //! directory in each respective module. -#![deny(warnings)] +// NO-RUSTC-WRAPPER +#![deny(warnings, rust_2018_idioms, unused_lifetimes)] use std::env; diff --git a/src/bootstrap/bin/rustc.rs b/src/bootstrap/bin/rustc.rs index a9225f2870f55..23f81c2c87692 100644 --- a/src/bootstrap/bin/rustc.rs +++ b/src/bootstrap/bin/rustc.rs @@ -15,7 +15,8 @@ //! switching compilers for the bootstrap and for build scripts will probably //! never get replaced. -#![deny(warnings)] +// NO-RUSTC-WRAPPER +#![deny(warnings, rust_2018_idioms, unused_lifetimes)] use std::env; use std::ffi::OsString; @@ -126,8 +127,11 @@ fn main() { if env::var_os("RUSTC_DENY_WARNINGS").is_some() && env::var_os("RUSTC_EXTERNAL_TOOL").is_none() { + // When extending this list, search for `NO-RUSTC-WRAPPER` and add the new lints + // there as well, some code doesn't go through this `rustc` wrapper. cmd.arg("-Dwarnings"); cmd.arg("-Drust_2018_idioms"); + cmd.arg("-Dunused_lifetimes"); // cfg(not(bootstrap)): Remove this during the next stage 0 compiler update. // `-Drustc::internal` is a new feature and `rustc_version` mis-reports the `stage`. let cfg_not_bootstrap = stage != "0" && crate_name != Some("rustc_version"); diff --git a/src/bootstrap/bin/rustdoc.rs b/src/bootstrap/bin/rustdoc.rs index 1c9f6e1ab285c..ff38ee8788f56 100644 --- a/src/bootstrap/bin/rustdoc.rs +++ b/src/bootstrap/bin/rustdoc.rs @@ -2,7 +2,8 @@ //! //! See comments in `src/bootstrap/rustc.rs` for more information. -#![deny(warnings)] +// NO-RUSTC-WRAPPER +#![deny(warnings, rust_2018_idioms, unused_lifetimes)] use std::env; use std::process::Command; diff --git a/src/bootstrap/lib.rs b/src/bootstrap/lib.rs index 7011b7f1664c7..c2e64ef51a746 100644 --- a/src/bootstrap/lib.rs +++ b/src/bootstrap/lib.rs @@ -103,8 +103,9 @@ //! More documentation can be found in each respective module below, and you can //! also check out the `src/bootstrap/README.md` file for more information. -#![deny(rust_2018_idioms)] -#![deny(warnings)] +// NO-RUSTC-WRAPPER +#![deny(warnings, rust_2018_idioms, unused_lifetimes)] + #![feature(core_intrinsics)] #![feature(drain_filter)] @@ -1312,7 +1313,7 @@ fn chmod(path: &Path, perms: u32) { fn chmod(_path: &Path, _perms: u32) {} -impl<'a> Compiler { +impl Compiler { pub fn with_stage(mut self, stage: u32) -> Compiler { self.stage = stage; self diff --git a/src/build_helper/lib.rs b/src/build_helper/lib.rs index 8b00c1d81b08c..c30307f3a1b28 100644 --- a/src/build_helper/lib.rs +++ b/src/build_helper/lib.rs @@ -1,4 +1,5 @@ -#![deny(rust_2018_idioms)] +// NO-RUSTC-WRAPPER +#![deny(warnings, rust_2018_idioms, unused_lifetimes)] use std::fs::File; use std::path::{Path, PathBuf}; diff --git a/src/liballoc/lib.rs b/src/liballoc/lib.rs index e42d643472546..c0f345443b907 100644 --- a/src/liballoc/lib.rs +++ b/src/liballoc/lib.rs @@ -62,8 +62,6 @@ #![warn(missing_docs)] #![warn(missing_debug_implementations)] #![deny(intra_doc_link_resolution_failure)] // rustdoc is run without -D warnings - -#![deny(rust_2018_idioms)] #![allow(explicit_outlives_requirements)] #![cfg_attr(not(test), feature(generator_trait))] diff --git a/src/liballoc/string.rs b/src/liballoc/string.rs index 366191e2c85f3..eca726cd41032 100644 --- a/src/liballoc/string.rs +++ b/src/liballoc/string.rs @@ -1838,6 +1838,7 @@ impl PartialEq for String { macro_rules! impl_eq { ($lhs:ty, $rhs: ty) => { #[stable(feature = "rust1", since = "1.0.0")] + #[allow(unused_lifetimes)] impl<'a, 'b> PartialEq<$rhs> for $lhs { #[inline] fn eq(&self, other: &$rhs) -> bool { PartialEq::eq(&self[..], &other[..]) } @@ -1846,6 +1847,7 @@ macro_rules! impl_eq { } #[stable(feature = "rust1", since = "1.0.0")] + #[allow(unused_lifetimes)] impl<'a, 'b> PartialEq<$lhs> for $rhs { #[inline] fn eq(&self, other: &$lhs) -> bool { PartialEq::eq(&self[..], &other[..]) } diff --git a/src/liballoc/tests/lib.rs b/src/liballoc/tests/lib.rs index 5a43c8e09a2a8..6d774f3fecd92 100644 --- a/src/liballoc/tests/lib.rs +++ b/src/liballoc/tests/lib.rs @@ -8,7 +8,6 @@ #![feature(trusted_len)] #![feature(try_reserve)] #![feature(unboxed_closures)] -#![deny(rust_2018_idioms)] use std::hash::{Hash, Hasher}; use std::collections::hash_map::DefaultHasher; diff --git a/src/libarena/lib.rs b/src/libarena/lib.rs index 967b4ad472052..690d8344acff9 100644 --- a/src/libarena/lib.rs +++ b/src/libarena/lib.rs @@ -11,9 +11,6 @@ #![doc(html_root_url = "https://doc.rust-lang.org/nightly/", test(no_crate_inject, attr(deny(warnings))))] -#![deny(rust_2018_idioms)] -#![deny(unused_lifetimes)] - #![feature(core_intrinsics)] #![feature(dropck_eyepatch)] #![feature(raw_vec_internals)] diff --git a/src/libcore/array.rs b/src/libcore/array.rs index 6ecc0487fae1b..517893a1967dc 100644 --- a/src/libcore/array.rs +++ b/src/libcore/array.rs @@ -217,7 +217,7 @@ where } #[stable(feature = "rust1", since = "1.0.0")] -impl<'a, 'b, A, B, const N: usize> PartialEq<[B; N]> for [A; N] +impl PartialEq<[B; N]> for [A; N] where A: PartialEq, [A; N]: LengthAtMost32, @@ -234,7 +234,7 @@ where } #[stable(feature = "rust1", since = "1.0.0")] -impl<'a, 'b, A, B, const N: usize> PartialEq<[B]> for [A; N] +impl PartialEq<[B]> for [A; N] where A: PartialEq, [A; N]: LengthAtMost32, @@ -250,7 +250,7 @@ where } #[stable(feature = "rust1", since = "1.0.0")] -impl<'a, 'b, A, B, const N: usize> PartialEq<[A; N]> for [B] +impl PartialEq<[A; N]> for [B] where B: PartialEq, [A; N]: LengthAtMost32, @@ -266,7 +266,7 @@ where } #[stable(feature = "rust1", since = "1.0.0")] -impl<'a, 'b, A, B, const N: usize> PartialEq<&'b [B]> for [A; N] +impl<'b, A, B, const N: usize> PartialEq<&'b [B]> for [A; N] where A: PartialEq, [A; N]: LengthAtMost32, @@ -282,7 +282,7 @@ where } #[stable(feature = "rust1", since = "1.0.0")] -impl<'a, 'b, A, B, const N: usize> PartialEq<[A; N]> for &'b [B] +impl<'b, A, B, const N: usize> PartialEq<[A; N]> for &'b [B] where B: PartialEq, [A; N]: LengthAtMost32, @@ -298,7 +298,7 @@ where } #[stable(feature = "rust1", since = "1.0.0")] -impl<'a, 'b, A, B, const N: usize> PartialEq<&'b mut [B]> for [A; N] +impl<'b, A, B, const N: usize> PartialEq<&'b mut [B]> for [A; N] where A: PartialEq, [A; N]: LengthAtMost32, @@ -314,7 +314,7 @@ where } #[stable(feature = "rust1", since = "1.0.0")] -impl<'a, 'b, A, B, const N: usize> PartialEq<[A; N]> for &'b mut [B] +impl<'b, A, B, const N: usize> PartialEq<[A; N]> for &'b mut [B] where B: PartialEq, [A; N]: LengthAtMost32, diff --git a/src/libcore/lib.rs b/src/libcore/lib.rs index 2bb941b490e56..bdfc1e66fd494 100644 --- a/src/libcore/lib.rs +++ b/src/libcore/lib.rs @@ -62,8 +62,6 @@ #![warn(missing_docs)] #![warn(missing_debug_implementations)] #![deny(intra_doc_link_resolution_failure)] // rustdoc is run without -D warnings - -#![deny(rust_2018_idioms)] #![allow(explicit_outlives_requirements)] #![feature(allow_internal_unstable)] diff --git a/src/libcore/pin.rs b/src/libcore/pin.rs index 2feaab7a09c93..88a56174629f9 100644 --- a/src/libcore/pin.rs +++ b/src/libcore/pin.rs @@ -775,7 +775,7 @@ where {} #[stable(feature = "pin", since = "1.33.0")] -impl<'a, P, U> DispatchFromDyn> for Pin

+impl DispatchFromDyn> for Pin

where P: DispatchFromDyn, {} diff --git a/src/libcore/ptr/unique.rs b/src/libcore/ptr/unique.rs index d2517e51fc5a6..f0d011fe6b2c0 100644 --- a/src/libcore/ptr/unique.rs +++ b/src/libcore/ptr/unique.rs @@ -172,7 +172,7 @@ impl From<&T> for Unique { } #[unstable(feature = "ptr_internals", issue = "0")] -impl<'a, T: ?Sized> From> for Unique { +impl From> for Unique { #[inline] fn from(p: NonNull) -> Self { unsafe { Unique::new_unchecked(p.as_ptr()) } diff --git a/src/libcore/tests/lib.rs b/src/libcore/tests/lib.rs index 505f8b0a261d7..a3b108b2e9cea 100644 --- a/src/libcore/tests/lib.rs +++ b/src/libcore/tests/lib.rs @@ -32,7 +32,6 @@ #![feature(const_fn)] #![feature(iter_partition_in_place)] #![feature(iter_is_partitioned)] -#![warn(rust_2018_idioms)] extern crate test; diff --git a/src/libfmt_macros/lib.rs b/src/libfmt_macros/lib.rs index f1c2b1fb87133..83e24a48ea008 100644 --- a/src/libfmt_macros/lib.rs +++ b/src/libfmt_macros/lib.rs @@ -8,9 +8,6 @@ html_playground_url = "https://play.rust-lang.org/", test(attr(deny(warnings))))] -#![deny(rust_2018_idioms)] -#![deny(unused_lifetimes)] - #![feature(nll)] #![feature(rustc_private)] #![feature(unicode_internals)] diff --git a/src/libgraphviz/lib.rs b/src/libgraphviz/lib.rs index a34e4fb89ff27..bb996e5f906d7 100644 --- a/src/libgraphviz/lib.rs +++ b/src/libgraphviz/lib.rs @@ -274,8 +274,6 @@ #![doc(html_root_url = "https://doc.rust-lang.org/nightly/", test(attr(allow(unused_variables), deny(warnings))))] -#![deny(rust_2018_idioms)] - #![feature(nll)] use LabelText::*; diff --git a/src/libpanic_abort/lib.rs b/src/libpanic_abort/lib.rs index 8c20a6ea55ad0..ee9dd858ef45f 100644 --- a/src/libpanic_abort/lib.rs +++ b/src/libpanic_abort/lib.rs @@ -10,7 +10,6 @@ #![panic_runtime] #![allow(unused_features)] -#![deny(rust_2018_idioms)] #![feature(core_intrinsics)] #![feature(libc)] diff --git a/src/libpanic_unwind/lib.rs b/src/libpanic_unwind/lib.rs index 2bb9ce6ab220b..06e6e768f459c 100644 --- a/src/libpanic_unwind/lib.rs +++ b/src/libpanic_unwind/lib.rs @@ -17,8 +17,6 @@ #![doc(html_root_url = "https://doc.rust-lang.org/nightly/", issue_tracker_base_url = "https://github.com/rust-lang/rust/issues/")] -#![deny(rust_2018_idioms)] - #![feature(core_intrinsics)] #![feature(lang_items)] #![feature(libc)] diff --git a/src/libproc_macro/bridge/scoped_cell.rs b/src/libproc_macro/bridge/scoped_cell.rs index 89fb707001589..2cde1f65adf9c 100644 --- a/src/libproc_macro/bridge/scoped_cell.rs +++ b/src/libproc_macro/bridge/scoped_cell.rs @@ -5,6 +5,7 @@ use std::mem; use std::ops::{Deref, DerefMut}; /// Type lambda application, with a lifetime. +#[allow(unused_lifetimes)] pub trait ApplyL<'a> { type Out; } diff --git a/src/libproc_macro/lib.rs b/src/libproc_macro/lib.rs index 2c097238b95b2..c0f7714ca211a 100644 --- a/src/libproc_macro/lib.rs +++ b/src/libproc_macro/lib.rs @@ -17,8 +17,6 @@ test(no_crate_inject, attr(deny(warnings))), test(attr(allow(dead_code, deprecated, unused_variables, unused_mut))))] -#![deny(rust_2018_idioms)] - #![feature(nll)] #![feature(staged_api)] #![feature(const_fn)] diff --git a/src/libprofiler_builtins/lib.rs b/src/libprofiler_builtins/lib.rs index 2ce1a110b44c0..0d12ba01c87a2 100644 --- a/src/libprofiler_builtins/lib.rs +++ b/src/libprofiler_builtins/lib.rs @@ -7,4 +7,3 @@ #![allow(unused_features)] #![feature(nll)] #![feature(staged_api)] -#![deny(rust_2018_idioms)] diff --git a/src/librustc/error_codes.rs b/src/librustc/error_codes.rs index 655028324e157..1edadbd5bae1a 100644 --- a/src/librustc/error_codes.rs +++ b/src/librustc/error_codes.rs @@ -1,5 +1,3 @@ -#![allow(non_snake_case)] - // Error messages for EXXXX errors. // Each message should start and end with a new line, and be wrapped to 80 characters. // In vim you can `:set tw=80` and use `gq` to wrap paragraphs. Use `:set tw=0` to disable. diff --git a/src/librustc/lib.rs b/src/librustc/lib.rs index 79f60778d3cf3..4b3fefcd4debb 100644 --- a/src/librustc/lib.rs +++ b/src/librustc/lib.rs @@ -28,9 +28,6 @@ #![doc(html_root_url = "https://doc.rust-lang.org/nightly/")] -#![deny(rust_2018_idioms)] -#![deny(unused_lifetimes)] - #![feature(arbitrary_self_types)] #![feature(box_patterns)] #![feature(box_syntax)] @@ -81,8 +78,7 @@ extern crate libc; // Use the test crate here so we depend on getopts through it. This allow tools to link to both // librustc_driver and libtest. -#[allow(unused_extern_crates)] -extern crate test; +extern crate test as _; #[macro_use] mod macros; diff --git a/src/librustc/session/config.rs b/src/librustc/session/config.rs index 74653d4fbda73..886915db4498c 100644 --- a/src/librustc/session/config.rs +++ b/src/librustc/session/config.rs @@ -1628,7 +1628,7 @@ impl RustcOptGroup { // *unstable* options, i.e., options that are only enabled when the // user also passes the `-Z unstable-options` debugging flag. mod opt { - // The `fn opt_u` etc below are written so that we can use them + // The `fn flag*` etc below are written so that we can use them // in the future; do not warn about them not being used right now. #![allow(dead_code)] diff --git a/src/librustc/ty/query/job.rs b/src/librustc/ty/query/job.rs index dcc467a61b541..a25560ff762a1 100644 --- a/src/librustc/ty/query/job.rs +++ b/src/librustc/ty/query/job.rs @@ -1,35 +1,25 @@ -#![allow(warnings)] - -use std::mem; -use std::process; -use std::{fmt, ptr}; +use crate::ty::context::TyCtxt; +use crate::ty::query::plumbing::CycleError; +use crate::ty::query::Query; +use crate::ty::tls; -use rustc_data_structures::fx::FxHashSet; -use rustc_data_structures::sync::{Lock, LockGuard, Lrc, Weak}; -use rustc_data_structures::OnDrop; -use rustc_data_structures::jobserver; +use rustc_data_structures::sync::Lrc; use syntax_pos::Span; -use crate::ty::tls; -use crate::ty::query::Query; -use crate::ty::query::plumbing::CycleError; #[cfg(not(parallel_compiler))] -use crate::ty::query::{ - plumbing::TryGetJob, - config::QueryDescription, -}; -use crate::ty::context::TyCtxt; +use std::ptr; #[cfg(parallel_compiler)] use { - rustc_rayon_core as rayon_core, parking_lot::{Mutex, Condvar}, - std::sync::atomic::Ordering, - std::thread, - std::iter, - std::iter::FromIterator, + rustc_data_structures::{jobserver, OnDrop}, + rustc_data_structures::fx::FxHashSet, + rustc_data_structures::stable_hasher::{StableHasher, HashStable}, + rustc_data_structures::sync::Lock, + rustc_rayon_core as rayon_core, syntax_pos::DUMMY_SP, - rustc_data_structures::stable_hasher::{StableHasherResult, StableHasher, HashStable}, + std::{mem, process, thread}, + std::iter::FromIterator, }; /// Indicates the state of a query for a given key in a query map. @@ -81,7 +71,7 @@ impl<'tcx> QueryJob<'tcx> { span: Span, ) -> Result<(), CycleError<'tcx>> { tls::with_related_context(tcx, move |icx| { - let mut waiter = Lrc::new(QueryWaiter { + let waiter = Lrc::new(QueryWaiter { query: icx.query.clone(), span, cycle: Lock::new(None), @@ -138,6 +128,7 @@ impl<'tcx> QueryJob<'tcx> { self.latch.set(); } + #[cfg(parallel_compiler)] fn as_ptr(&self) -> *const QueryJob<'tcx> { self as *const _ } @@ -431,7 +422,7 @@ fn remove_cycle<'tcx>( let usage = usage.as_ref().map(|(span, query)| (*span, query.info.query.clone())); // Create the cycle error - let mut error = CycleError { + let error = CycleError { usage, cycle: stack.iter().map(|&(s, ref q)| QueryInfo { span: s, @@ -463,9 +454,6 @@ fn remove_cycle<'tcx>( /// Must only be called when a deadlock is about to happen. #[cfg(parallel_compiler)] pub unsafe fn handle_deadlock() { - use syntax; - use syntax_pos; - let registry = rayon_core::Registry::current(); let gcx_ptr = tls::GCX_PTR.with(|gcx_ptr| { @@ -473,11 +461,6 @@ pub unsafe fn handle_deadlock() { }); let gcx_ptr = &*gcx_ptr; - let syntax_globals = syntax::GLOBALS.with(|syntax_globals| { - syntax_globals as *const _ - }); - let syntax_globals = &*syntax_globals; - let syntax_pos_globals = syntax_pos::GLOBALS.with(|syntax_pos_globals| { syntax_pos_globals as *const _ }); diff --git a/src/librustc_apfloat/lib.rs b/src/librustc_apfloat/lib.rs index ceade5d278838..9e6d5a6f62434 100644 --- a/src/librustc_apfloat/lib.rs +++ b/src/librustc_apfloat/lib.rs @@ -32,7 +32,6 @@ #![doc(html_root_url = "https://doc.rust-lang.org/nightly/")] #![forbid(unsafe_code)] -#![deny(rust_2018_idioms)] #![feature(nll)] diff --git a/src/librustc_asan/lib.rs b/src/librustc_asan/lib.rs index 3bdb86d313dcb..d6c8e54c18db7 100644 --- a/src/librustc_asan/lib.rs +++ b/src/librustc_asan/lib.rs @@ -6,5 +6,3 @@ #![unstable(feature = "sanitizer_runtime_lib", reason = "internal implementation detail of sanitizers", issue = "0")] - -#![deny(rust_2018_idioms)] diff --git a/src/librustc_ast_borrowck/lib.rs b/src/librustc_ast_borrowck/lib.rs index b857c625ec2e7..dc818278a4b74 100644 --- a/src/librustc_ast_borrowck/lib.rs +++ b/src/librustc_ast_borrowck/lib.rs @@ -1,8 +1,6 @@ #![doc(html_root_url = "https://doc.rust-lang.org/nightly/")] #![allow(non_camel_case_types)] -#![deny(rust_2018_idioms)] -#![deny(unused_lifetimes)] #![feature(in_band_lifetimes)] #![feature(nll)] diff --git a/src/librustc_codegen_llvm/error_codes.rs b/src/librustc_codegen_llvm/error_codes.rs index 872fa424e4cfb..c6b5dc03a6f0a 100644 --- a/src/librustc_codegen_llvm/error_codes.rs +++ b/src/librustc_codegen_llvm/error_codes.rs @@ -1,5 +1,3 @@ -#![allow(non_snake_case)] - register_long_diagnostics! { E0511: r##" diff --git a/src/librustc_codegen_llvm/intrinsic.rs b/src/librustc_codegen_llvm/intrinsic.rs index 44b3eff2ac5c9..199170182e4b4 100644 --- a/src/librustc_codegen_llvm/intrinsic.rs +++ b/src/librustc_codegen_llvm/intrinsic.rs @@ -1,5 +1,3 @@ -#![allow(non_upper_case_globals)] - use crate::attributes; use crate::llvm; use crate::llvm_util; diff --git a/src/librustc_codegen_llvm/lib.rs b/src/librustc_codegen_llvm/lib.rs index 8dd241bd81a0a..a630817fb3386 100644 --- a/src/librustc_codegen_llvm/lib.rs +++ b/src/librustc_codegen_llvm/lib.rs @@ -12,7 +12,6 @@ #![feature(crate_visibility_modifier)] #![feature(extern_types)] #![feature(in_band_lifetimes)] -#![allow(unused_attributes)] #![feature(libc)] #![feature(nll)] #![feature(rustc_diagnostic_macros)] @@ -22,8 +21,6 @@ #![feature(static_nobundle)] #![feature(trusted_len)] #![feature(mem_take)] -#![deny(rust_2018_idioms)] -#![deny(unused_lifetimes)] use back::write::{create_target_machine, create_informational_target_machine}; use syntax_pos::symbol::Symbol; diff --git a/src/librustc_codegen_llvm/llvm/ffi.rs b/src/librustc_codegen_llvm/llvm/ffi.rs index 8c6ea00eb8c87..d82e1c68df094 100644 --- a/src/librustc_codegen_llvm/llvm/ffi.rs +++ b/src/librustc_codegen_llvm/llvm/ffi.rs @@ -1,3 +1,6 @@ +#![allow(non_camel_case_types)] +#![allow(non_upper_case_globals)] + use super::debuginfo::{ DIBuilder, DIDescriptor, DIFile, DILexicalBlock, DISubprogram, DIType, DIBasicType, DIDerivedType, DICompositeType, DIScope, DIVariable, diff --git a/src/librustc_codegen_llvm/llvm/mod.rs b/src/librustc_codegen_llvm/llvm/mod.rs index 543cc912930fd..57815933af02b 100644 --- a/src/librustc_codegen_llvm/llvm/mod.rs +++ b/src/librustc_codegen_llvm/llvm/mod.rs @@ -1,7 +1,4 @@ -#![allow(non_upper_case_globals)] -#![allow(non_camel_case_types)] #![allow(non_snake_case)] -#![deny(bare_trait_objects)] pub use self::IntPredicate::*; pub use self::RealPredicate::*; diff --git a/src/librustc_codegen_llvm/type_.rs b/src/librustc_codegen_llvm/type_.rs index 2c167256ad56c..8d6cd0bcf474b 100644 --- a/src/librustc_codegen_llvm/type_.rs +++ b/src/librustc_codegen_llvm/type_.rs @@ -1,5 +1,3 @@ -#![allow(non_upper_case_globals)] - pub use crate::llvm::Type; use crate::llvm; diff --git a/src/librustc_codegen_ssa/base.rs b/src/librustc_codegen_ssa/base.rs index 00471095f2f35..fc04976f511b3 100644 --- a/src/librustc_codegen_ssa/base.rs +++ b/src/librustc_codegen_ssa/base.rs @@ -781,12 +781,6 @@ impl CrateInfo { } } -fn is_codegened_item(tcx: TyCtxt<'_>, id: DefId) -> bool { - let (all_mono_items, _) = - tcx.collect_and_partition_mono_items(LOCAL_CRATE); - all_mono_items.contains(&id) -} - pub fn provide_both(providers: &mut Providers<'_>) { providers.backend_optimization_level = |tcx, cratenum| { let for_speed = match tcx.sess.opts.optimize { diff --git a/src/librustc_codegen_ssa/error_codes.rs b/src/librustc_codegen_ssa/error_codes.rs index e7ef178cfabfb..8d46dcb7c09c3 100644 --- a/src/librustc_codegen_ssa/error_codes.rs +++ b/src/librustc_codegen_ssa/error_codes.rs @@ -1,5 +1,3 @@ -#![allow(non_snake_case)] - register_long_diagnostics! { E0668: r##" diff --git a/src/librustc_codegen_ssa/lib.rs b/src/librustc_codegen_ssa/lib.rs index d0f4b0a870b5a..73ef16e009146 100644 --- a/src/librustc_codegen_ssa/lib.rs +++ b/src/librustc_codegen_ssa/lib.rs @@ -11,10 +11,6 @@ #![feature(nll)] #![feature(trusted_len)] #![feature(mem_take)] -#![allow(unused_attributes)] -#![allow(dead_code)] -#![deny(rust_2018_idioms)] -#![deny(unused_lifetimes)] #![recursion_limit="256"] diff --git a/src/librustc_codegen_utils/codegen_backend.rs b/src/librustc_codegen_utils/codegen_backend.rs index 7a7a50a25faf0..262cfb1658ef9 100644 --- a/src/librustc_codegen_utils/codegen_backend.rs +++ b/src/librustc_codegen_utils/codegen_backend.rs @@ -5,8 +5,6 @@ //! This API is completely unstable and subject to change. #![doc(html_root_url = "https://doc.rust-lang.org/nightly/")] -#![deny(warnings)] -#![feature(box_syntax)] use std::any::Any; use std::sync::mpsc; diff --git a/src/librustc_codegen_utils/lib.rs b/src/librustc_codegen_utils/lib.rs index f38b672afd939..4ea375b59b2c0 100644 --- a/src/librustc_codegen_utils/lib.rs +++ b/src/librustc_codegen_utils/lib.rs @@ -10,15 +10,11 @@ #![feature(core_intrinsics)] #![feature(never_type)] #![feature(nll)] -#![allow(unused_attributes)] #![feature(rustc_diagnostic_macros)] #![feature(in_band_lifetimes)] #![recursion_limit="256"] -#![deny(rust_2018_idioms)] -#![deny(unused_lifetimes)] - #[macro_use] extern crate rustc; diff --git a/src/librustc_data_structures/graph/mod.rs b/src/librustc_data_structures/graph/mod.rs index e59085a9e3a95..749709521e866 100644 --- a/src/librustc_data_structures/graph/mod.rs +++ b/src/librustc_data_structures/graph/mod.rs @@ -39,6 +39,7 @@ where } } +#[allow(unused_lifetimes)] pub trait GraphSuccessors<'graph> { type Item; type Iter: Iterator; @@ -54,6 +55,7 @@ where ) -> >::Iter; } +#[allow(unused_lifetimes)] pub trait GraphPredecessors<'graph> { type Item; type Iter: Iterator; diff --git a/src/librustc_data_structures/lib.rs b/src/librustc_data_structures/lib.rs index 3047119029abc..bb27637912b31 100644 --- a/src/librustc_data_structures/lib.rs +++ b/src/librustc_data_structures/lib.rs @@ -26,7 +26,6 @@ #![cfg_attr(unix, feature(libc))] #![cfg_attr(test, feature(test))] -#![deny(rust_2018_idioms)] #![cfg_attr(not(bootstrap), allow(rustc::default_hash_types))] #[macro_use] diff --git a/src/librustc_data_structures/owning_ref/mod.rs b/src/librustc_data_structures/owning_ref/mod.rs index a7af615fa5000..3b49ce710633e 100644 --- a/src/librustc_data_structures/owning_ref/mod.rs +++ b/src/librustc_data_structures/owning_ref/mod.rs @@ -283,6 +283,7 @@ impl Erased for T {} /// Helper trait for erasing the concrete type of what an owner dereferences to, /// for example `Box -> Box`. This would be unneeded with /// higher kinded types support in the language. +#[allow(unused_lifetimes)] pub unsafe trait IntoErased<'a> { /// Owner with the dereference type substituted to `Erased`. type Erased; @@ -293,6 +294,7 @@ pub unsafe trait IntoErased<'a> { /// Helper trait for erasing the concrete type of what an owner dereferences to, /// for example `Box -> Box`. This would be unneeded with /// higher kinded types support in the language. +#[allow(unused_lifetimes)] pub unsafe trait IntoErasedSend<'a> { /// Owner with the dereference type substituted to `Erased + Send`. type Erased: Send; @@ -303,6 +305,7 @@ pub unsafe trait IntoErasedSend<'a> { /// Helper trait for erasing the concrete type of what an owner dereferences to, /// for example `Box -> Box`. This would be unneeded with /// higher kinded types support in the language. +#[allow(unused_lifetimes)] pub unsafe trait IntoErasedSendSync<'a> { /// Owner with the dereference type substituted to `Erased + Send + Sync`. type Erased: Send + Sync; diff --git a/src/librustc_driver/lib.rs b/src/librustc_driver/lib.rs index c139be07aa1d3..77b7ef96d3f6c 100644 --- a/src/librustc_driver/lib.rs +++ b/src/librustc_driver/lib.rs @@ -16,9 +16,6 @@ #![recursion_limit="256"] -#![deny(rust_2018_idioms)] -#![deny(unused_lifetimes)] - pub extern crate getopts; #[cfg(unix)] extern crate libc; diff --git a/src/librustc_errors/lib.rs b/src/librustc_errors/lib.rs index 0a6c02c0ca68f..3f758c2521bc0 100644 --- a/src/librustc_errors/lib.rs +++ b/src/librustc_errors/lib.rs @@ -5,12 +5,9 @@ #![doc(html_root_url = "https://doc.rust-lang.org/nightly/")] #![feature(crate_visibility_modifier)] -#![allow(unused_attributes)] #![cfg_attr(unix, feature(libc))] #![feature(nll)] #![feature(optin_builtin_traits)] -#![deny(rust_2018_idioms)] -#![deny(unused_lifetimes)] pub use emitter::ColorConfig; diff --git a/src/librustc_fs_util/lib.rs b/src/librustc_fs_util/lib.rs index ce63bcafd797c..eaf08d76b9905 100644 --- a/src/librustc_fs_util/lib.rs +++ b/src/librustc_fs_util/lib.rs @@ -1,5 +1,3 @@ -#![deny(rust_2018_idioms)] - use std::path::{Path, PathBuf}; use std::ffi::CString; use std::fs; diff --git a/src/librustc_incremental/lib.rs b/src/librustc_incremental/lib.rs index 55aba7caa9d42..b257311138587 100644 --- a/src/librustc_incremental/lib.rs +++ b/src/librustc_incremental/lib.rs @@ -8,9 +8,6 @@ #![recursion_limit="256"] -#![deny(rust_2018_idioms)] -#![deny(unused_lifetimes)] - #[macro_use] extern crate rustc; #[macro_use] extern crate log; diff --git a/src/librustc_interface/interface.rs b/src/librustc_interface/interface.rs index 674b2b60e44a2..fef60a47dc4e7 100644 --- a/src/librustc_interface/interface.rs +++ b/src/librustc_interface/interface.rs @@ -12,7 +12,6 @@ use rustc_data_structures::OnDrop; use rustc_data_structures::sync::Lrc; use rustc_data_structures::fx::{FxHashSet, FxHashMap}; use rustc_metadata::cstore::CStore; -use std::io::Write; use std::path::PathBuf; use std::result; use std::sync::{Arc, Mutex}; diff --git a/src/librustc_interface/lib.rs b/src/librustc_interface/lib.rs index 4bc50c24e817c..2e593d441553a 100644 --- a/src/librustc_interface/lib.rs +++ b/src/librustc_interface/lib.rs @@ -6,11 +6,6 @@ #![feature(generators)] #![cfg_attr(unix, feature(libc))] -#![deny(rust_2018_idioms)] -#![deny(unused_lifetimes)] - -#![allow(unused_imports)] - #![recursion_limit="256"] #[cfg(unix)] diff --git a/src/librustc_interface/passes.rs b/src/librustc_interface/passes.rs index 3c7d854b36b13..8dd2595967fd7 100644 --- a/src/librustc_interface/passes.rs +++ b/src/librustc_interface/passes.rs @@ -2,7 +2,7 @@ use crate::interface::{Compiler, Result}; use crate::util; use crate::proc_macro_decls; -use log::{debug, info, warn, log_enabled}; +use log::{info, warn, log_enabled}; use rustc::dep_graph::DepGraph; use rustc::hir; use rustc::hir::lowering::lower_crate; @@ -10,46 +10,39 @@ use rustc::hir::def_id::{CrateNum, LOCAL_CRATE}; use rustc::lint; use rustc::middle::{self, reachable, resolve_lifetime, stability}; use rustc::middle::cstore::CrateStore; -use rustc::middle::privacy::AccessLevels; use rustc::ty::{self, AllArenas, Resolutions, TyCtxt, GlobalCtxt}; use rustc::ty::steal::Steal; use rustc::traits; use rustc::util::common::{time, ErrorReported}; -use rustc::util::profiling::ProfileCategory; -use rustc::session::{CompileResult, CrateDisambiguator, Session}; +use rustc::session::Session; use rustc::session::config::{self, CrateType, Input, OutputFilenames, OutputType}; use rustc::session::search_paths::PathKind; -use rustc_allocator as allocator; use rustc_ast_borrowck as borrowck; use rustc_codegen_ssa::back::link::emit_metadata; use rustc_codegen_utils::codegen_backend::CodegenBackend; use rustc_codegen_utils::link::filename_for_metadata; use rustc_data_structures::{box_region_allow_access, declare_box_region_type, parallel}; -use rustc_data_structures::fingerprint::Fingerprint; -use rustc_data_structures::stable_hasher::StableHasher; use rustc_data_structures::sync::{Lrc, ParallelIterator, par_iter}; use rustc_incremental; -use rustc_incremental::DepGraphFuture; use rustc_metadata::creader::CrateLoader; use rustc_metadata::cstore::{self, CStore}; use rustc_mir as mir; -use rustc_passes::{self, ast_validation, hir_stats, loops, rvalue_promotion, layout_test}; +use rustc_passes::{self, ast_validation, hir_stats, layout_test}; use rustc_plugin as plugin; use rustc_plugin::registry::Registry; use rustc_privacy; use rustc_resolve::{Resolver, ResolverArenas}; use rustc_traits; use rustc_typeck as typeck; -use syntax::{self, ast, attr, diagnostics, visit}; +use syntax::{self, ast, diagnostics, visit}; use syntax::early_buffered_lints::BufferedEarlyLint; use syntax::ext::base::{NamedSyntaxExtension, ExtCtxt}; use syntax::mut_visit::MutVisitor; use syntax::parse::{self, PResult}; use syntax::util::node_count::NodeCounter; -use syntax::util::lev_distance::find_best_match_for_name; use syntax::symbol::Symbol; use syntax::feature_gate::AttributeType; -use syntax_pos::{FileName, edition::Edition, hygiene}; +use syntax_pos::FileName; use syntax_ext; use rustc_serialize::json; @@ -61,12 +54,11 @@ use std::ffi::OsString; use std::fs; use std::io::{self, Write}; use std::iter; -use std::path::{Path, PathBuf}; +use std::path::PathBuf; use std::sync::mpsc; use std::cell::RefCell; use std::rc::Rc; use std::mem; -use std::ops::Generator; pub fn parse<'a>(sess: &'a Session, input: &Input) -> PResult<'a, ast::Crate> { sess.diagnostic() diff --git a/src/librustc_interface/queries.rs b/src/librustc_interface/queries.rs index 9b79dc6350ca6..2e7952cd00447 100644 --- a/src/librustc_interface/queries.rs +++ b/src/librustc_interface/queries.rs @@ -2,30 +2,18 @@ use crate::interface::{Compiler, Result}; use crate::passes::{self, BoxedResolver, ExpansionResult, BoxedGlobalCtxt, PluginInfo}; use rustc_incremental::DepGraphFuture; -use rustc_data_structures::sync::Lrc; -use rustc::session::config::{Input, OutputFilenames, OutputType}; -use rustc::session::Session; +use rustc::session::config::{OutputFilenames, OutputType}; use rustc::util::common::{time, ErrorReported}; -use rustc::util::profiling::ProfileCategory; -use rustc::lint; use rustc::hir; use rustc::hir::def_id::LOCAL_CRATE; -use rustc::ty; use rustc::ty::steal::Steal; use rustc::dep_graph::DepGraph; -use rustc_passes::hir_stats; -use rustc_plugin::registry::Registry; -use rustc_serialize::json; use std::cell::{Ref, RefMut, RefCell}; -use std::ops::Deref; use std::rc::Rc; use std::sync::mpsc; use std::any::Any; use std::mem; -use syntax::parse::{self, PResult}; -use syntax::util::node_count::NodeCounter; -use syntax::{self, ast, attr, diagnostics, visit}; -use syntax_pos::hygiene; +use syntax::{self, ast}; /// Represent the result of a query. /// This result can be stolen with the `take` method and returned with the `give` method. diff --git a/src/librustc_interface/util.rs b/src/librustc_interface/util.rs index 6ae5e94b11af3..f007a0cf2abee 100644 --- a/src/librustc_interface/util.rs +++ b/src/librustc_interface/util.rs @@ -203,8 +203,6 @@ pub fn spawn_thread_pool R + Send, R: Send>( f: F, ) -> R { use rayon::{ThreadPool, ThreadPoolBuilder}; - use syntax; - use syntax_pos; let gcx_ptr = &Lock::new(0); diff --git a/src/librustc_lint/lib.rs b/src/librustc_lint/lib.rs index c7a8c2b892351..d3975360525d0 100644 --- a/src/librustc_lint/lib.rs +++ b/src/librustc_lint/lib.rs @@ -19,9 +19,6 @@ #![recursion_limit="256"] -#![deny(rust_2018_idioms)] -#![deny(unused_lifetimes)] - #[macro_use] extern crate rustc; diff --git a/src/librustc_llvm/lib.rs b/src/librustc_llvm/lib.rs index dea7e6ae0a2ab..647d473f01572 100644 --- a/src/librustc_llvm/lib.rs +++ b/src/librustc_llvm/lib.rs @@ -1,4 +1,3 @@ -#![deny(rust_2018_idioms)] #![feature(nll)] #![feature(static_nobundle)] diff --git a/src/librustc_lsan/lib.rs b/src/librustc_lsan/lib.rs index 3bdb86d313dcb..d6c8e54c18db7 100644 --- a/src/librustc_lsan/lib.rs +++ b/src/librustc_lsan/lib.rs @@ -6,5 +6,3 @@ #![unstable(feature = "sanitizer_runtime_lib", reason = "internal implementation detail of sanitizers", issue = "0")] - -#![deny(rust_2018_idioms)] diff --git a/src/librustc_macros/src/lib.rs b/src/librustc_macros/src/lib.rs index 53bbecd0e6a1d..85e2247ebd7e3 100644 --- a/src/librustc_macros/src/lib.rs +++ b/src/librustc_macros/src/lib.rs @@ -1,5 +1,4 @@ #![feature(proc_macro_hygiene)] -#![deny(rust_2018_idioms)] #![cfg_attr(not(bootstrap), allow(rustc::default_hash_types))] #![recursion_limit="128"] diff --git a/src/librustc_metadata/error_codes.rs b/src/librustc_metadata/error_codes.rs index 909fca2ab586f..0708a6243bf29 100644 --- a/src/librustc_metadata/error_codes.rs +++ b/src/librustc_metadata/error_codes.rs @@ -1,5 +1,3 @@ -#![allow(non_snake_case)] - use syntax::{register_diagnostics, register_long_diagnostics}; register_long_diagnostics! { diff --git a/src/librustc_metadata/lib.rs b/src/librustc_metadata/lib.rs index 8db3ec491df83..c96d02d9b37de 100644 --- a/src/librustc_metadata/lib.rs +++ b/src/librustc_metadata/lib.rs @@ -15,9 +15,6 @@ #![recursion_limit="256"] -#![deny(rust_2018_idioms)] -#![deny(unused_lifetimes)] - extern crate libc; extern crate proc_macro; diff --git a/src/librustc_mir/borrow_check/nll/type_check/mod.rs b/src/librustc_mir/borrow_check/nll/type_check/mod.rs index 45b806bd286d8..50c0640f885f2 100644 --- a/src/librustc_mir/borrow_check/nll/type_check/mod.rs +++ b/src/librustc_mir/borrow_check/nll/type_check/mod.rs @@ -1,7 +1,5 @@ //! This pass type-checks the MIR to ensure it is not broken. -#![allow(unreachable_code)] - use crate::borrow_check::borrow_set::BorrowSet; use crate::borrow_check::location::LocationTable; use crate::borrow_check::nll::constraints::{OutlivesConstraintSet, OutlivesConstraint}; diff --git a/src/librustc_mir/error_codes.rs b/src/librustc_mir/error_codes.rs index 83d441b90be72..a5e44a1933c9d 100644 --- a/src/librustc_mir/error_codes.rs +++ b/src/librustc_mir/error_codes.rs @@ -1,5 +1,3 @@ -#![allow(non_snake_case)] - register_long_diagnostics! { diff --git a/src/librustc_mir/lib.rs b/src/librustc_mir/lib.rs index 964f04d79b960..20d5e54d2ce49 100644 --- a/src/librustc_mir/lib.rs +++ b/src/librustc_mir/lib.rs @@ -26,9 +26,6 @@ Rust MIR: a lowered representation of Rust. Also: an experiment! #![recursion_limit="256"] -#![deny(rust_2018_idioms)] -#![deny(unused_lifetimes)] - #[macro_use] extern crate log; #[macro_use] extern crate rustc; #[macro_use] extern crate rustc_data_structures; diff --git a/src/librustc_msan/lib.rs b/src/librustc_msan/lib.rs index 3bdb86d313dcb..d6c8e54c18db7 100644 --- a/src/librustc_msan/lib.rs +++ b/src/librustc_msan/lib.rs @@ -6,5 +6,3 @@ #![unstable(feature = "sanitizer_runtime_lib", reason = "internal implementation detail of sanitizers", issue = "0")] - -#![deny(rust_2018_idioms)] diff --git a/src/librustc_passes/error_codes.rs b/src/librustc_passes/error_codes.rs index 36ebe5cf455ff..cd33943e77e20 100644 --- a/src/librustc_passes/error_codes.rs +++ b/src/librustc_passes/error_codes.rs @@ -1,5 +1,3 @@ -#![allow(non_snake_case)] - use syntax::{register_diagnostics, register_long_diagnostics}; register_long_diagnostics! { diff --git a/src/librustc_passes/lib.rs b/src/librustc_passes/lib.rs index 0a96ad3e3445e..5614b570b927a 100644 --- a/src/librustc_passes/lib.rs +++ b/src/librustc_passes/lib.rs @@ -13,9 +13,6 @@ #![recursion_limit="256"] -#![deny(rust_2018_idioms)] -#![deny(unused_lifetimes)] - #[macro_use] extern crate rustc; diff --git a/src/librustc_plugin/error_codes.rs b/src/librustc_plugin/error_codes.rs index 9e76f52a111b5..b5f6a8d905d31 100644 --- a/src/librustc_plugin/error_codes.rs +++ b/src/librustc_plugin/error_codes.rs @@ -1,5 +1,3 @@ -#![allow(non_snake_case)] - use syntax::{register_diagnostics, register_long_diagnostics}; register_long_diagnostics! { diff --git a/src/librustc_plugin/lib.rs b/src/librustc_plugin/lib.rs index 6520cdc306203..25a7a8cdeb6d6 100644 --- a/src/librustc_plugin/lib.rs +++ b/src/librustc_plugin/lib.rs @@ -59,8 +59,6 @@ #![recursion_limit="256"] -#![deny(rust_2018_idioms)] - pub use registry::Registry; mod error_codes; diff --git a/src/librustc_privacy/error_codes.rs b/src/librustc_privacy/error_codes.rs index fa4df53e47b31..70a799d426a07 100644 --- a/src/librustc_privacy/error_codes.rs +++ b/src/librustc_privacy/error_codes.rs @@ -1,5 +1,3 @@ -#![allow(non_snake_case)] - register_long_diagnostics! { E0445: r##" diff --git a/src/librustc_privacy/lib.rs b/src/librustc_privacy/lib.rs index 05df3a6f6bc2e..e291f40ffd27d 100644 --- a/src/librustc_privacy/lib.rs +++ b/src/librustc_privacy/lib.rs @@ -1,8 +1,5 @@ #![doc(html_root_url = "https://doc.rust-lang.org/nightly/")] -#![deny(rust_2018_idioms)] -#![deny(unused_lifetimes)] - #![feature(in_band_lifetimes)] #![feature(nll)] #![feature(rustc_diagnostic_macros)] diff --git a/src/librustc_resolve/error_codes.rs b/src/librustc_resolve/error_codes.rs index 15194a5d1463b..e01f53786edab 100644 --- a/src/librustc_resolve/error_codes.rs +++ b/src/librustc_resolve/error_codes.rs @@ -1,5 +1,3 @@ -#![allow(non_snake_case)] - use syntax::{register_diagnostics, register_long_diagnostics}; // Error messages for EXXXX errors. Each message should start and end with a diff --git a/src/librustc_resolve/lib.rs b/src/librustc_resolve/lib.rs index a5e498fa75643..bc5898fe78da7 100644 --- a/src/librustc_resolve/lib.rs +++ b/src/librustc_resolve/lib.rs @@ -10,9 +10,6 @@ #![recursion_limit="256"] -#![deny(rust_2018_idioms)] -#![deny(unused_lifetimes)] - pub use rustc::hir::def::{Namespace, PerNS}; use Determinacy::*; diff --git a/src/librustc_save_analysis/lib.rs b/src/librustc_save_analysis/lib.rs index ade5e2eca60ba..9edb4c0fa6748 100644 --- a/src/librustc_save_analysis/lib.rs +++ b/src/librustc_save_analysis/lib.rs @@ -1,12 +1,8 @@ #![doc(html_root_url = "https://doc.rust-lang.org/nightly/")] #![feature(nll)] -#![deny(rust_2018_idioms)] -#![deny(unused_lifetimes)] -#![allow(unused_attributes)] #![recursion_limit="256"] - mod dumper; mod dump_visitor; #[macro_use] diff --git a/src/librustc_target/abi/call/hexagon.rs b/src/librustc_target/abi/call/hexagon.rs index db8c915cdb4bd..1aec990064a86 100644 --- a/src/librustc_target/abi/call/hexagon.rs +++ b/src/librustc_target/abi/call/hexagon.rs @@ -1,5 +1,3 @@ -#![allow(non_upper_case_globals)] - use crate::abi::call::{FnType, ArgType}; fn classify_ret_ty(ret: &mut ArgType<'_, Ty>) { diff --git a/src/librustc_target/lib.rs b/src/librustc_target/lib.rs index a14bc66cc3833..a349dc26e834c 100644 --- a/src/librustc_target/lib.rs +++ b/src/librustc_target/lib.rs @@ -13,9 +13,6 @@ #![feature(nll)] #![feature(slice_patterns)] -#![deny(rust_2018_idioms)] -#![deny(unused_lifetimes)] - #[macro_use] extern crate log; pub mod abi; diff --git a/src/librustc_traits/lib.rs b/src/librustc_traits/lib.rs index 12b19a2648d7f..ebe6b7c613885 100644 --- a/src/librustc_traits/lib.rs +++ b/src/librustc_traits/lib.rs @@ -1,9 +1,6 @@ //! New recursive solver modeled on Chalk's recursive solver. Most of //! the guts are broken up into modules; see the comments in those modules. -#![deny(rust_2018_idioms)] -#![deny(unused_lifetimes)] - #![feature(crate_visibility_modifier)] #![feature(in_band_lifetimes)] #![feature(nll)] diff --git a/src/librustc_tsan/lib.rs b/src/librustc_tsan/lib.rs index 3bdb86d313dcb..d6c8e54c18db7 100644 --- a/src/librustc_tsan/lib.rs +++ b/src/librustc_tsan/lib.rs @@ -6,5 +6,3 @@ #![unstable(feature = "sanitizer_runtime_lib", reason = "internal implementation detail of sanitizers", issue = "0")] - -#![deny(rust_2018_idioms)] diff --git a/src/librustc_typeck/error_codes.rs b/src/librustc_typeck/error_codes.rs index b4c856921198e..4bdcb0fa2910c 100644 --- a/src/librustc_typeck/error_codes.rs +++ b/src/librustc_typeck/error_codes.rs @@ -1,7 +1,5 @@ // ignore-tidy-filelength -#![allow(non_snake_case)] - register_long_diagnostics! { E0023: r##" diff --git a/src/librustc_typeck/lib.rs b/src/librustc_typeck/lib.rs index 934fc684eaeda..a34b137aca971 100644 --- a/src/librustc_typeck/lib.rs +++ b/src/librustc_typeck/lib.rs @@ -73,9 +73,6 @@ This API is completely unstable and subject to change. #![recursion_limit="256"] -#![deny(rust_2018_idioms)] -#![deny(unused_lifetimes)] - #[macro_use] extern crate log; #[macro_use] extern crate syntax; diff --git a/src/librustdoc/lib.rs b/src/librustdoc/lib.rs index 3627ce6a5aa50..a8d7ff4a2eb8b 100644 --- a/src/librustdoc/lib.rs +++ b/src/librustdoc/lib.rs @@ -1,6 +1,3 @@ -#![deny(rust_2018_idioms)] -#![deny(unused_lifetimes)] - #![doc(html_root_url = "https://doc.rust-lang.org/nightly/", html_playground_url = "https://play.rust-lang.org/")] diff --git a/src/libserialize/lib.rs b/src/libserialize/lib.rs index b8eeb4d2b34af..2ad85c603d1e4 100644 --- a/src/libserialize/lib.rs +++ b/src/libserialize/lib.rs @@ -8,8 +8,6 @@ Core encoding and decoding interfaces. html_playground_url = "https://play.rust-lang.org/", test(attr(allow(unused_variables), deny(warnings))))] -#![deny(rust_2018_idioms)] - #![feature(box_syntax)] #![feature(core_intrinsics)] #![feature(specialization)] diff --git a/src/libstd/build.rs b/src/libstd/build.rs index 20397369387cb..8db7bc12cd308 100644 --- a/src/libstd/build.rs +++ b/src/libstd/build.rs @@ -1,5 +1,3 @@ -#![deny(warnings)] - use std::env; fn main() { diff --git a/src/libstd/lib.rs b/src/libstd/lib.rs index 722c08a22a6b6..8fd76eabe3943 100644 --- a/src/libstd/lib.rs +++ b/src/libstd/lib.rs @@ -209,9 +209,8 @@ #![warn(missing_docs)] #![warn(missing_debug_implementations)] #![deny(intra_doc_link_resolution_failure)] // rustdoc is run without -D warnings - -#![deny(rust_2018_idioms)] #![allow(explicit_outlives_requirements)] +#![allow(unused_lifetimes)] // Tell the compiler to link to either panic_abort or panic_unwind #![needs_panic_runtime] diff --git a/src/libsyntax/diagnostics/plugin.rs b/src/libsyntax/diagnostics/plugin.rs index ee640a1603a6c..e5e55a6444a2e 100644 --- a/src/libsyntax/diagnostics/plugin.rs +++ b/src/libsyntax/diagnostics/plugin.rs @@ -123,7 +123,6 @@ pub fn expand_register_diagnostic<'cx>(ecx: &'cx mut ExtCtxt<'_>, MacEager::items(smallvec![]) } -#[allow(deprecated)] pub fn expand_build_diagnostic_array<'cx>(ecx: &'cx mut ExtCtxt<'_>, span: Span, token_tree: &[TokenTree]) @@ -149,7 +148,7 @@ pub fn expand_build_diagnostic_array<'cx>(ecx: &'cx mut ExtCtxt<'_>, ecx.span_bug(span, &format!( "error writing metadata for triple `{}` and crate `{}`, error: {}, \ cause: {:?}", - target_triple, crate_name, e.description(), e.cause() + target_triple, crate_name, e.description(), e.source() )); } }); diff --git a/src/libsyntax/error_codes.rs b/src/libsyntax/error_codes.rs index 029ce73498c68..1ba29011f75a4 100644 --- a/src/libsyntax/error_codes.rs +++ b/src/libsyntax/error_codes.rs @@ -1,5 +1,3 @@ -#![allow(non_snake_case)] - // Error messages for EXXXX errors. // Each message should start and end with a new line, and be wrapped to 80 characters. // In vim you can `:set tw=80` and use `gq` to wrap paragraphs. Use `:set tw=0` to disable. diff --git a/src/libsyntax/json.rs b/src/libsyntax/json.rs index ec0222d90eb7a..83c9c692bd30c 100644 --- a/src/libsyntax/json.rs +++ b/src/libsyntax/json.rs @@ -122,7 +122,6 @@ struct Diagnostic { } #[derive(RustcEncodable)] -#[allow(unused_attributes)] struct DiagnosticSpan { file_name: String, byte_start: u32, diff --git a/src/libsyntax/lib.rs b/src/libsyntax/lib.rs index bb6a8dfb1411e..1fd20fa0b3128 100644 --- a/src/libsyntax/lib.rs +++ b/src/libsyntax/lib.rs @@ -7,9 +7,6 @@ #![doc(html_root_url = "https://doc.rust-lang.org/nightly/", test(attr(deny(warnings))))] -#![deny(rust_2018_idioms)] -#![deny(unused_lifetimes)] - #![feature(bind_by_move_pattern_guards)] #![feature(box_syntax)] #![feature(const_fn)] diff --git a/src/libsyntax_ext/error_codes.rs b/src/libsyntax_ext/error_codes.rs index 9ec551b439529..5982a4df226c2 100644 --- a/src/libsyntax_ext/error_codes.rs +++ b/src/libsyntax_ext/error_codes.rs @@ -1,5 +1,3 @@ -#![allow(non_snake_case)] - use syntax::register_long_diagnostics; // Error messages for EXXXX errors. diff --git a/src/libsyntax_ext/lib.rs b/src/libsyntax_ext/lib.rs index fae884860ed56..da11f2ff23fb5 100644 --- a/src/libsyntax_ext/lib.rs +++ b/src/libsyntax_ext/lib.rs @@ -3,9 +3,6 @@ #![doc(html_root_url = "https://doc.rust-lang.org/nightly/")] -#![deny(rust_2018_idioms)] -#![deny(unused_lifetimes)] - #![feature(crate_visibility_modifier)] #![feature(decl_macro)] #![feature(mem_take)] diff --git a/src/libsyntax_pos/lib.rs b/src/libsyntax_pos/lib.rs index e5f0892b37be8..acc13aec40229 100644 --- a/src/libsyntax_pos/lib.rs +++ b/src/libsyntax_pos/lib.rs @@ -6,9 +6,6 @@ #![doc(html_root_url = "https://doc.rust-lang.org/nightly/")] -#![deny(rust_2018_idioms)] -#![deny(unused_lifetimes)] - #![feature(const_fn)] #![feature(crate_visibility_modifier)] #![feature(nll)] diff --git a/src/libterm/lib.rs b/src/libterm/lib.rs index 3b5ac7baf20bd..ad1a83316be7c 100644 --- a/src/libterm/lib.rs +++ b/src/libterm/lib.rs @@ -35,8 +35,6 @@ test(attr(deny(warnings))))] #![deny(missing_docs)] -#![deny(rust_2018_idioms)] - #![cfg_attr(windows, feature(libc))] use std::io::prelude::*; diff --git a/src/libtest/lib.rs b/src/libtest/lib.rs index fa45c9d7d9d79..653dce32e50ca 100644 --- a/src/libtest/lib.rs +++ b/src/libtest/lib.rs @@ -17,7 +17,6 @@ // this crate, which relies on this attribute (rather than the value of `--crate-name` passed by // cargo) to detect this crate. -#![deny(rust_2018_idioms)] #![crate_name = "test"] #![unstable(feature = "test", issue = "27812")] #![doc(html_root_url = "https://doc.rust-lang.org/nightly/", test(attr(deny(warnings))))] diff --git a/src/libunwind/lib.rs b/src/libunwind/lib.rs index 9182e349b196e..b9ce71b6b847e 100644 --- a/src/libunwind/lib.rs +++ b/src/libunwind/lib.rs @@ -1,8 +1,6 @@ #![no_std] #![unstable(feature = "panic_unwind", issue = "32837")] -#![deny(rust_2018_idioms)] - #![feature(link_cfg)] #![feature(nll)] #![feature(staged_api)] diff --git a/src/test/run-make-fulldeps/issue-19371/foo.rs b/src/test/run-make-fulldeps/issue-19371/foo.rs index 3c4f2cd541f4e..afc92638fda97 100644 --- a/src/test/run-make-fulldeps/issue-19371/foo.rs +++ b/src/test/run-make-fulldeps/issue-19371/foo.rs @@ -2,8 +2,7 @@ extern crate rustc; extern crate rustc_interface; -#[allow(unused_extern_crates)] -extern crate rustc_driver; +extern crate rustc_driver as _; extern crate syntax; use rustc::session::DiagnosticOutput; diff --git a/src/test/ui-fulldeps/plugin-as-extern-crate.rs b/src/test/ui-fulldeps/plugin-as-extern-crate.rs index c671ab581efbe..dde73ba69f7bf 100644 --- a/src/test/ui-fulldeps/plugin-as-extern-crate.rs +++ b/src/test/ui-fulldeps/plugin-as-extern-crate.rs @@ -5,7 +5,6 @@ // libsyntax is not compiled for it. #![deny(plugin_as_library)] -#![allow(unused_extern_crates)] extern crate attr_plugin_test; //~ ERROR compiler plugin used as an ordinary library diff --git a/src/test/ui-fulldeps/plugin-as-extern-crate.stderr b/src/test/ui-fulldeps/plugin-as-extern-crate.stderr index ccc9580a60c29..4daa4a2c82120 100644 --- a/src/test/ui-fulldeps/plugin-as-extern-crate.stderr +++ b/src/test/ui-fulldeps/plugin-as-extern-crate.stderr @@ -1,5 +1,5 @@ error: compiler plugin used as an ordinary library - --> $DIR/plugin-as-extern-crate.rs:10:1 + --> $DIR/plugin-as-extern-crate.rs:9:1 | LL | extern crate attr_plugin_test; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/src/test/ui/enable-unstable-lib-feature.rs b/src/test/ui/enable-unstable-lib-feature.rs index 383c6868ce2fe..aa6a973d7bd85 100644 --- a/src/test/ui/enable-unstable-lib-feature.rs +++ b/src/test/ui/enable-unstable-lib-feature.rs @@ -6,7 +6,6 @@ #![deny(non_snake_case)] // To trigger a hard error // Shouldn't generate a warning about unstable features -#[allow(unused_extern_crates)] extern crate stability_cfg2; pub fn BOGUS() { } //~ ERROR diff --git a/src/test/ui/enable-unstable-lib-feature.stderr b/src/test/ui/enable-unstable-lib-feature.stderr index 5b6ebc4c0d990..d5b8c0efaad37 100644 --- a/src/test/ui/enable-unstable-lib-feature.stderr +++ b/src/test/ui/enable-unstable-lib-feature.stderr @@ -1,5 +1,5 @@ error: function `BOGUS` should have a snake case name - --> $DIR/enable-unstable-lib-feature.rs:12:8 + --> $DIR/enable-unstable-lib-feature.rs:11:8 | LL | pub fn BOGUS() { } | ^^^^^ help: convert the identifier to snake case: `bogus` diff --git a/src/test/ui/error-codes/E0254.rs b/src/test/ui/error-codes/E0254.rs index d166aff565792..e291268be86e5 100644 --- a/src/test/ui/error-codes/E0254.rs +++ b/src/test/ui/error-codes/E0254.rs @@ -1,4 +1,4 @@ -#![allow(unused_extern_crates, non_camel_case_types)] +#![allow(non_camel_case_types)] extern crate alloc; diff --git a/src/test/ui/error-codes/E0259.rs b/src/test/ui/error-codes/E0259.rs index c83561be9c6a5..e7e94d58635c1 100644 --- a/src/test/ui/error-codes/E0259.rs +++ b/src/test/ui/error-codes/E0259.rs @@ -1,5 +1,4 @@ #![feature(rustc_private)] -#![allow(unused_extern_crates)] extern crate alloc; diff --git a/src/test/ui/error-codes/E0259.stderr b/src/test/ui/error-codes/E0259.stderr index fd6a4087aeca4..4a48a4d554167 100644 --- a/src/test/ui/error-codes/E0259.stderr +++ b/src/test/ui/error-codes/E0259.stderr @@ -1,5 +1,5 @@ error[E0259]: the name `alloc` is defined multiple times - --> $DIR/E0259.rs:6:1 + --> $DIR/E0259.rs:5:1 | LL | extern crate alloc; | ------------------- previous import of the extern crate `alloc` here diff --git a/src/test/ui/error-codes/E0260.rs b/src/test/ui/error-codes/E0260.rs index 73b8934159fcf..f7eb220b08f59 100644 --- a/src/test/ui/error-codes/E0260.rs +++ b/src/test/ui/error-codes/E0260.rs @@ -1,5 +1,3 @@ -#![allow(unused_extern_crates)] - extern crate alloc; mod alloc { diff --git a/src/test/ui/error-codes/E0260.stderr b/src/test/ui/error-codes/E0260.stderr index 7d0b3022914d8..737b20b91ec25 100644 --- a/src/test/ui/error-codes/E0260.stderr +++ b/src/test/ui/error-codes/E0260.stderr @@ -1,5 +1,5 @@ error[E0260]: the name `alloc` is defined multiple times - --> $DIR/E0260.rs:5:1 + --> $DIR/E0260.rs:3:1 | LL | extern crate alloc; | ------------------- previous import of the extern crate `alloc` here diff --git a/src/test/ui/issues/issue-36881.rs b/src/test/ui/issues/issue-36881.rs index 2b0508d08ea67..04313872d2713 100644 --- a/src/test/ui/issues/issue-36881.rs +++ b/src/test/ui/issues/issue-36881.rs @@ -1,7 +1,6 @@ // aux-build:issue-36881-aux.rs fn main() { - #[allow(unused_extern_crates)] extern crate issue_36881_aux; use issue_36881_aux::Foo; //~ ERROR unresolved import } diff --git a/src/test/ui/issues/issue-36881.stderr b/src/test/ui/issues/issue-36881.stderr index 2ec636fde60bf..07d2c99d7d2de 100644 --- a/src/test/ui/issues/issue-36881.stderr +++ b/src/test/ui/issues/issue-36881.stderr @@ -1,5 +1,5 @@ error[E0432]: unresolved import `issue_36881_aux` - --> $DIR/issue-36881.rs:6:9 + --> $DIR/issue-36881.rs:5:9 | LL | use issue_36881_aux::Foo; | ^^^^^^^^^^^^^^^ maybe a missing `extern crate issue_36881_aux;`? diff --git a/src/test/ui/lint/lint-stability-deprecated.rs b/src/test/ui/lint/lint-stability-deprecated.rs index 652fd04bdf526..5e747467a127e 100644 --- a/src/test/ui/lint/lint-stability-deprecated.rs +++ b/src/test/ui/lint/lint-stability-deprecated.rs @@ -5,7 +5,6 @@ // aux-build:stability-cfg2.rs // ignore-tidy-linelength #![warn(deprecated)] -#![allow(dead_code, unused_extern_crates)] #![feature(staged_api, unstable_test_feature)] #![stable(feature = "rust1", since = "1.0.0")] diff --git a/src/test/ui/lint/lint-stability-deprecated.stderr b/src/test/ui/lint/lint-stability-deprecated.stderr index 811004ee12ccb..8132a66df8a0f 100644 --- a/src/test/ui/lint/lint-stability-deprecated.stderr +++ b/src/test/ui/lint/lint-stability-deprecated.stderr @@ -1,5 +1,5 @@ warning: use of deprecated item 'lint_stability::deprecated': text - --> $DIR/lint-stability-deprecated.rs:26:9 + --> $DIR/lint-stability-deprecated.rs:25:9 | LL | deprecated(); | ^^^^^^^^^^ @@ -11,625 +11,625 @@ LL | #![warn(deprecated)] | ^^^^^^^^^^ warning: use of deprecated item 'lint_stability::Trait::trait_deprecated': text - --> $DIR/lint-stability-deprecated.rs:31:9 + --> $DIR/lint-stability-deprecated.rs:30:9 | LL | Trait::trait_deprecated(&foo); | ^^^^^^^^^^^^^^^^^^^^^^^ warning: use of deprecated item 'lint_stability::Trait::trait_deprecated': text - --> $DIR/lint-stability-deprecated.rs:33:9 + --> $DIR/lint-stability-deprecated.rs:32:9 | LL | ::trait_deprecated(&foo); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ warning: use of deprecated item 'lint_stability::deprecated_text': text - --> $DIR/lint-stability-deprecated.rs:35:9 + --> $DIR/lint-stability-deprecated.rs:34:9 | LL | deprecated_text(); | ^^^^^^^^^^^^^^^ warning: use of deprecated item 'lint_stability::Trait::trait_deprecated_text': text - --> $DIR/lint-stability-deprecated.rs:40:9 + --> $DIR/lint-stability-deprecated.rs:39:9 | LL | Trait::trait_deprecated_text(&foo); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ warning: use of deprecated item 'lint_stability::Trait::trait_deprecated_text': text - --> $DIR/lint-stability-deprecated.rs:42:9 + --> $DIR/lint-stability-deprecated.rs:41:9 | LL | ::trait_deprecated_text(&foo); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ warning: use of deprecated item 'lint_stability::deprecated_unstable': text - --> $DIR/lint-stability-deprecated.rs:44:9 + --> $DIR/lint-stability-deprecated.rs:43:9 | LL | deprecated_unstable(); | ^^^^^^^^^^^^^^^^^^^ warning: use of deprecated item 'lint_stability::Trait::trait_deprecated_unstable': text - --> $DIR/lint-stability-deprecated.rs:49:9 + --> $DIR/lint-stability-deprecated.rs:48:9 | LL | Trait::trait_deprecated_unstable(&foo); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ warning: use of deprecated item 'lint_stability::Trait::trait_deprecated_unstable': text - --> $DIR/lint-stability-deprecated.rs:51:9 + --> $DIR/lint-stability-deprecated.rs:50:9 | LL | ::trait_deprecated_unstable(&foo); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ warning: use of deprecated item 'lint_stability::deprecated_unstable_text': text - --> $DIR/lint-stability-deprecated.rs:53:9 + --> $DIR/lint-stability-deprecated.rs:52:9 | LL | deprecated_unstable_text(); | ^^^^^^^^^^^^^^^^^^^^^^^^ warning: use of deprecated item 'lint_stability::Trait::trait_deprecated_unstable_text': text - --> $DIR/lint-stability-deprecated.rs:58:9 + --> $DIR/lint-stability-deprecated.rs:57:9 | LL | Trait::trait_deprecated_unstable_text(&foo); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ warning: use of deprecated item 'lint_stability::Trait::trait_deprecated_unstable_text': text - --> $DIR/lint-stability-deprecated.rs:60:9 + --> $DIR/lint-stability-deprecated.rs:59:9 | LL | ::trait_deprecated_unstable_text(&foo); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ warning: use of deprecated item 'lint_stability::DeprecatedStruct': text - --> $DIR/lint-stability-deprecated.rs:107:17 + --> $DIR/lint-stability-deprecated.rs:106:17 | LL | let _ = DeprecatedStruct { | ^^^^^^^^^^^^^^^^ warning: use of deprecated item 'lint_stability::DeprecatedUnstableStruct': text - --> $DIR/lint-stability-deprecated.rs:110:17 + --> $DIR/lint-stability-deprecated.rs:109:17 | LL | let _ = DeprecatedUnstableStruct { | ^^^^^^^^^^^^^^^^^^^^^^^^ warning: use of deprecated item 'lint_stability::DeprecatedUnitStruct': text - --> $DIR/lint-stability-deprecated.rs:117:17 + --> $DIR/lint-stability-deprecated.rs:116:17 | LL | let _ = DeprecatedUnitStruct; | ^^^^^^^^^^^^^^^^^^^^ warning: use of deprecated item 'lint_stability::DeprecatedUnstableUnitStruct': text - --> $DIR/lint-stability-deprecated.rs:118:17 + --> $DIR/lint-stability-deprecated.rs:117:17 | LL | let _ = DeprecatedUnstableUnitStruct; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ warning: use of deprecated item 'lint_stability::Enum::DeprecatedVariant': text - --> $DIR/lint-stability-deprecated.rs:122:17 + --> $DIR/lint-stability-deprecated.rs:121:17 | LL | let _ = Enum::DeprecatedVariant; | ^^^^^^^^^^^^^^^^^^^^^^^ warning: use of deprecated item 'lint_stability::Enum::DeprecatedUnstableVariant': text - --> $DIR/lint-stability-deprecated.rs:123:17 + --> $DIR/lint-stability-deprecated.rs:122:17 | LL | let _ = Enum::DeprecatedUnstableVariant; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ warning: use of deprecated item 'lint_stability::DeprecatedTupleStruct': text - --> $DIR/lint-stability-deprecated.rs:127:17 + --> $DIR/lint-stability-deprecated.rs:126:17 | LL | let _ = DeprecatedTupleStruct (1); | ^^^^^^^^^^^^^^^^^^^^^ warning: use of deprecated item 'lint_stability::DeprecatedUnstableTupleStruct': text - --> $DIR/lint-stability-deprecated.rs:128:17 + --> $DIR/lint-stability-deprecated.rs:127:17 | LL | let _ = DeprecatedUnstableTupleStruct (1); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ warning: use of deprecated item 'lint_stability::deprecated_text': text - --> $DIR/lint-stability-deprecated.rs:137:25 + --> $DIR/lint-stability-deprecated.rs:136:25 | LL | macro_test_arg!(deprecated_text()); | ^^^^^^^^^^^^^^^ warning: use of deprecated item 'lint_stability::deprecated_unstable_text': text - --> $DIR/lint-stability-deprecated.rs:138:25 + --> $DIR/lint-stability-deprecated.rs:137:25 | LL | macro_test_arg!(deprecated_unstable_text()); | ^^^^^^^^^^^^^^^^^^^^^^^^ warning: use of deprecated item 'lint_stability::deprecated_text': text - --> $DIR/lint-stability-deprecated.rs:139:41 + --> $DIR/lint-stability-deprecated.rs:138:41 | LL | macro_test_arg!(macro_test_arg!(deprecated_text())); | ^^^^^^^^^^^^^^^ warning: use of deprecated item 'lint_stability::Trait::trait_deprecated': text - --> $DIR/lint-stability-deprecated.rs:144:9 + --> $DIR/lint-stability-deprecated.rs:143:9 | LL | Trait::trait_deprecated(&foo); | ^^^^^^^^^^^^^^^^^^^^^^^ warning: use of deprecated item 'lint_stability::Trait::trait_deprecated': text - --> $DIR/lint-stability-deprecated.rs:146:9 + --> $DIR/lint-stability-deprecated.rs:145:9 | LL | ::trait_deprecated(&foo); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ warning: use of deprecated item 'lint_stability::Trait::trait_deprecated_text': text - --> $DIR/lint-stability-deprecated.rs:148:9 + --> $DIR/lint-stability-deprecated.rs:147:9 | LL | Trait::trait_deprecated_text(&foo); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ warning: use of deprecated item 'lint_stability::Trait::trait_deprecated_text': text - --> $DIR/lint-stability-deprecated.rs:150:9 + --> $DIR/lint-stability-deprecated.rs:149:9 | LL | ::trait_deprecated_text(&foo); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ warning: use of deprecated item 'lint_stability::Trait::trait_deprecated_unstable': text - --> $DIR/lint-stability-deprecated.rs:152:9 + --> $DIR/lint-stability-deprecated.rs:151:9 | LL | Trait::trait_deprecated_unstable(&foo); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ warning: use of deprecated item 'lint_stability::Trait::trait_deprecated_unstable': text - --> $DIR/lint-stability-deprecated.rs:154:9 + --> $DIR/lint-stability-deprecated.rs:153:9 | LL | ::trait_deprecated_unstable(&foo); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ warning: use of deprecated item 'lint_stability::Trait::trait_deprecated_unstable_text': text - --> $DIR/lint-stability-deprecated.rs:156:9 + --> $DIR/lint-stability-deprecated.rs:155:9 | LL | Trait::trait_deprecated_unstable_text(&foo); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ warning: use of deprecated item 'lint_stability::Trait::trait_deprecated_unstable_text': text - --> $DIR/lint-stability-deprecated.rs:158:9 + --> $DIR/lint-stability-deprecated.rs:157:9 | LL | ::trait_deprecated_unstable_text(&foo); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ warning: use of deprecated item 'lint_stability::DeprecatedTrait': text - --> $DIR/lint-stability-deprecated.rs:186:10 + --> $DIR/lint-stability-deprecated.rs:185:10 | LL | impl DeprecatedTrait for S {} | ^^^^^^^^^^^^^^^ warning: use of deprecated item 'lint_stability::DeprecatedTrait': text - --> $DIR/lint-stability-deprecated.rs:188:25 + --> $DIR/lint-stability-deprecated.rs:187:25 | LL | trait LocalTrait2 : DeprecatedTrait { } | ^^^^^^^^^^^^^^^ warning: use of deprecated item 'inheritance::inherited_stability::unstable_mod::deprecated': text - --> $DIR/lint-stability-deprecated.rs:207:9 + --> $DIR/lint-stability-deprecated.rs:206:9 | LL | unstable_mod::deprecated(); | ^^^^^^^^^^^^^^^^^^^^^^^^ warning: use of deprecated item 'this_crate::deprecated': text - --> $DIR/lint-stability-deprecated.rs:329:9 + --> $DIR/lint-stability-deprecated.rs:328:9 | LL | deprecated(); | ^^^^^^^^^^ warning: use of deprecated item 'this_crate::Trait::trait_deprecated': text - --> $DIR/lint-stability-deprecated.rs:334:9 + --> $DIR/lint-stability-deprecated.rs:333:9 | LL | Trait::trait_deprecated(&foo); | ^^^^^^^^^^^^^^^^^^^^^^^ warning: use of deprecated item 'this_crate::Trait::trait_deprecated': text - --> $DIR/lint-stability-deprecated.rs:336:9 + --> $DIR/lint-stability-deprecated.rs:335:9 | LL | ::trait_deprecated(&foo); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ warning: use of deprecated item 'this_crate::deprecated_text': text - --> $DIR/lint-stability-deprecated.rs:338:9 + --> $DIR/lint-stability-deprecated.rs:337:9 | LL | deprecated_text(); | ^^^^^^^^^^^^^^^ warning: use of deprecated item 'this_crate::Trait::trait_deprecated_text': text - --> $DIR/lint-stability-deprecated.rs:343:9 + --> $DIR/lint-stability-deprecated.rs:342:9 | LL | Trait::trait_deprecated_text(&foo); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ warning: use of deprecated item 'this_crate::Trait::trait_deprecated_text': text - --> $DIR/lint-stability-deprecated.rs:345:9 + --> $DIR/lint-stability-deprecated.rs:344:9 | LL | ::trait_deprecated_text(&foo); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ warning: use of deprecated item 'this_crate::DeprecatedStruct': text - --> $DIR/lint-stability-deprecated.rs:383:17 + --> $DIR/lint-stability-deprecated.rs:382:17 | LL | let _ = DeprecatedStruct { | ^^^^^^^^^^^^^^^^ warning: use of deprecated item 'this_crate::DeprecatedUnitStruct': text - --> $DIR/lint-stability-deprecated.rs:390:17 + --> $DIR/lint-stability-deprecated.rs:389:17 | LL | let _ = DeprecatedUnitStruct; | ^^^^^^^^^^^^^^^^^^^^ warning: use of deprecated item 'this_crate::Enum::DeprecatedVariant': text - --> $DIR/lint-stability-deprecated.rs:394:17 + --> $DIR/lint-stability-deprecated.rs:393:17 | LL | let _ = Enum::DeprecatedVariant; | ^^^^^^^^^^^^^^^^^^^^^^^ warning: use of deprecated item 'this_crate::DeprecatedTupleStruct': text - --> $DIR/lint-stability-deprecated.rs:398:17 + --> $DIR/lint-stability-deprecated.rs:397:17 | LL | let _ = DeprecatedTupleStruct (1); | ^^^^^^^^^^^^^^^^^^^^^ warning: use of deprecated item 'this_crate::Trait::trait_deprecated': text - --> $DIR/lint-stability-deprecated.rs:405:9 + --> $DIR/lint-stability-deprecated.rs:404:9 | LL | Trait::trait_deprecated(&foo); | ^^^^^^^^^^^^^^^^^^^^^^^ warning: use of deprecated item 'this_crate::Trait::trait_deprecated': text - --> $DIR/lint-stability-deprecated.rs:407:9 + --> $DIR/lint-stability-deprecated.rs:406:9 | LL | ::trait_deprecated(&foo); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ warning: use of deprecated item 'this_crate::Trait::trait_deprecated_text': text - --> $DIR/lint-stability-deprecated.rs:409:9 + --> $DIR/lint-stability-deprecated.rs:408:9 | LL | Trait::trait_deprecated_text(&foo); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ warning: use of deprecated item 'this_crate::Trait::trait_deprecated_text': text - --> $DIR/lint-stability-deprecated.rs:411:9 + --> $DIR/lint-stability-deprecated.rs:410:9 | LL | ::trait_deprecated_text(&foo); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ warning: use of deprecated item 'this_crate::test_fn_body::fn_in_body': text - --> $DIR/lint-stability-deprecated.rs:438:9 + --> $DIR/lint-stability-deprecated.rs:437:9 | LL | fn_in_body(); | ^^^^^^^^^^ warning: use of deprecated item 'this_crate::DeprecatedTrait': text - --> $DIR/lint-stability-deprecated.rs:458:10 + --> $DIR/lint-stability-deprecated.rs:457:10 | LL | impl DeprecatedTrait for S { } | ^^^^^^^^^^^^^^^ warning: use of deprecated item 'this_crate::DeprecatedTrait': text - --> $DIR/lint-stability-deprecated.rs:460:24 + --> $DIR/lint-stability-deprecated.rs:459:24 | LL | trait LocalTrait : DeprecatedTrait { } | ^^^^^^^^^^^^^^^ warning: use of deprecated item 'this_crate::MethodTester::test_method_body::fn_in_body': text - --> $DIR/lint-stability-deprecated.rs:446:13 + --> $DIR/lint-stability-deprecated.rs:445:13 | LL | fn_in_body(); | ^^^^^^^^^^ warning: use of deprecated item 'lint_stability::TraitWithAssociatedTypes::TypeDeprecated': text - --> $DIR/lint-stability-deprecated.rs:99:48 + --> $DIR/lint-stability-deprecated.rs:98:48 | LL | struct S2(T::TypeDeprecated); | ^^^^^^^^^^^^^^^^^ warning: use of deprecated item 'lint_stability::TraitWithAssociatedTypes::TypeDeprecated': text - --> $DIR/lint-stability-deprecated.rs:103:13 + --> $DIR/lint-stability-deprecated.rs:102:13 | LL | TypeDeprecated = u16, | ^^^^^^^^^^^^^^^^^^^^ warning: use of deprecated item 'lint_stability::MethodTester::method_deprecated': text - --> $DIR/lint-stability-deprecated.rs:27:13 + --> $DIR/lint-stability-deprecated.rs:26:13 | LL | foo.method_deprecated(); | ^^^^^^^^^^^^^^^^^ warning: use of deprecated item 'lint_stability::MethodTester::method_deprecated': text - --> $DIR/lint-stability-deprecated.rs:28:9 + --> $DIR/lint-stability-deprecated.rs:27:9 | LL | Foo::method_deprecated(&foo); | ^^^^^^^^^^^^^^^^^^^^^^ warning: use of deprecated item 'lint_stability::MethodTester::method_deprecated': text - --> $DIR/lint-stability-deprecated.rs:29:9 + --> $DIR/lint-stability-deprecated.rs:28:9 | LL | ::method_deprecated(&foo); | ^^^^^^^^^^^^^^^^^^^^^^^^ warning: use of deprecated item 'lint_stability::Trait::trait_deprecated': text - --> $DIR/lint-stability-deprecated.rs:30:13 + --> $DIR/lint-stability-deprecated.rs:29:13 | LL | foo.trait_deprecated(); | ^^^^^^^^^^^^^^^^ warning: use of deprecated item 'lint_stability::Trait::trait_deprecated': text - --> $DIR/lint-stability-deprecated.rs:32:9 + --> $DIR/lint-stability-deprecated.rs:31:9 | LL | ::trait_deprecated(&foo); | ^^^^^^^^^^^^^^^^^^^^^^^ warning: use of deprecated item 'lint_stability::MethodTester::method_deprecated_text': text - --> $DIR/lint-stability-deprecated.rs:36:13 + --> $DIR/lint-stability-deprecated.rs:35:13 | LL | foo.method_deprecated_text(); | ^^^^^^^^^^^^^^^^^^^^^^ warning: use of deprecated item 'lint_stability::MethodTester::method_deprecated_text': text - --> $DIR/lint-stability-deprecated.rs:37:9 + --> $DIR/lint-stability-deprecated.rs:36:9 | LL | Foo::method_deprecated_text(&foo); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ warning: use of deprecated item 'lint_stability::MethodTester::method_deprecated_text': text - --> $DIR/lint-stability-deprecated.rs:38:9 + --> $DIR/lint-stability-deprecated.rs:37:9 | LL | ::method_deprecated_text(&foo); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ warning: use of deprecated item 'lint_stability::Trait::trait_deprecated_text': text - --> $DIR/lint-stability-deprecated.rs:39:13 + --> $DIR/lint-stability-deprecated.rs:38:13 | LL | foo.trait_deprecated_text(); | ^^^^^^^^^^^^^^^^^^^^^ warning: use of deprecated item 'lint_stability::Trait::trait_deprecated_text': text - --> $DIR/lint-stability-deprecated.rs:41:9 + --> $DIR/lint-stability-deprecated.rs:40:9 | LL | ::trait_deprecated_text(&foo); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ warning: use of deprecated item 'lint_stability::MethodTester::method_deprecated_unstable': text - --> $DIR/lint-stability-deprecated.rs:45:13 + --> $DIR/lint-stability-deprecated.rs:44:13 | LL | foo.method_deprecated_unstable(); | ^^^^^^^^^^^^^^^^^^^^^^^^^^ warning: use of deprecated item 'lint_stability::MethodTester::method_deprecated_unstable': text - --> $DIR/lint-stability-deprecated.rs:46:9 + --> $DIR/lint-stability-deprecated.rs:45:9 | LL | Foo::method_deprecated_unstable(&foo); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ warning: use of deprecated item 'lint_stability::MethodTester::method_deprecated_unstable': text - --> $DIR/lint-stability-deprecated.rs:47:9 + --> $DIR/lint-stability-deprecated.rs:46:9 | LL | ::method_deprecated_unstable(&foo); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ warning: use of deprecated item 'lint_stability::Trait::trait_deprecated_unstable': text - --> $DIR/lint-stability-deprecated.rs:48:13 + --> $DIR/lint-stability-deprecated.rs:47:13 | LL | foo.trait_deprecated_unstable(); | ^^^^^^^^^^^^^^^^^^^^^^^^^ warning: use of deprecated item 'lint_stability::Trait::trait_deprecated_unstable': text - --> $DIR/lint-stability-deprecated.rs:50:9 + --> $DIR/lint-stability-deprecated.rs:49:9 | LL | ::trait_deprecated_unstable(&foo); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ warning: use of deprecated item 'lint_stability::MethodTester::method_deprecated_unstable_text': text - --> $DIR/lint-stability-deprecated.rs:54:13 + --> $DIR/lint-stability-deprecated.rs:53:13 | LL | foo.method_deprecated_unstable_text(); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ warning: use of deprecated item 'lint_stability::MethodTester::method_deprecated_unstable_text': text - --> $DIR/lint-stability-deprecated.rs:55:9 + --> $DIR/lint-stability-deprecated.rs:54:9 | LL | Foo::method_deprecated_unstable_text(&foo); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ warning: use of deprecated item 'lint_stability::MethodTester::method_deprecated_unstable_text': text - --> $DIR/lint-stability-deprecated.rs:56:9 + --> $DIR/lint-stability-deprecated.rs:55:9 | LL | ::method_deprecated_unstable_text(&foo); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ warning: use of deprecated item 'lint_stability::Trait::trait_deprecated_unstable_text': text - --> $DIR/lint-stability-deprecated.rs:57:13 + --> $DIR/lint-stability-deprecated.rs:56:13 | LL | foo.trait_deprecated_unstable_text(); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ warning: use of deprecated item 'lint_stability::Trait::trait_deprecated_unstable_text': text - --> $DIR/lint-stability-deprecated.rs:59:9 + --> $DIR/lint-stability-deprecated.rs:58:9 | LL | ::trait_deprecated_unstable_text(&foo); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ warning: use of deprecated item 'lint_stability::DeprecatedStruct::i': text - --> $DIR/lint-stability-deprecated.rs:108:13 + --> $DIR/lint-stability-deprecated.rs:107:13 | LL | i: 0 | ^^^^ warning: use of deprecated item 'lint_stability::DeprecatedUnstableStruct::i': text - --> $DIR/lint-stability-deprecated.rs:112:13 + --> $DIR/lint-stability-deprecated.rs:111:13 | LL | i: 0 | ^^^^ warning: use of deprecated item 'lint_stability::Trait::trait_deprecated': text - --> $DIR/lint-stability-deprecated.rs:143:13 + --> $DIR/lint-stability-deprecated.rs:142:13 | LL | foo.trait_deprecated(); | ^^^^^^^^^^^^^^^^ warning: use of deprecated item 'lint_stability::Trait::trait_deprecated': text - --> $DIR/lint-stability-deprecated.rs:145:9 + --> $DIR/lint-stability-deprecated.rs:144:9 | LL | ::trait_deprecated(&foo); | ^^^^^^^^^^^^^^^^^^^^^^^ warning: use of deprecated item 'lint_stability::Trait::trait_deprecated_text': text - --> $DIR/lint-stability-deprecated.rs:147:13 + --> $DIR/lint-stability-deprecated.rs:146:13 | LL | foo.trait_deprecated_text(); | ^^^^^^^^^^^^^^^^^^^^^ warning: use of deprecated item 'lint_stability::Trait::trait_deprecated_text': text - --> $DIR/lint-stability-deprecated.rs:149:9 + --> $DIR/lint-stability-deprecated.rs:148:9 | LL | ::trait_deprecated_text(&foo); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ warning: use of deprecated item 'lint_stability::Trait::trait_deprecated_unstable': text - --> $DIR/lint-stability-deprecated.rs:151:13 + --> $DIR/lint-stability-deprecated.rs:150:13 | LL | foo.trait_deprecated_unstable(); | ^^^^^^^^^^^^^^^^^^^^^^^^^ warning: use of deprecated item 'lint_stability::Trait::trait_deprecated_unstable': text - --> $DIR/lint-stability-deprecated.rs:153:9 + --> $DIR/lint-stability-deprecated.rs:152:9 | LL | ::trait_deprecated_unstable(&foo); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ warning: use of deprecated item 'lint_stability::Trait::trait_deprecated_unstable_text': text - --> $DIR/lint-stability-deprecated.rs:155:13 + --> $DIR/lint-stability-deprecated.rs:154:13 | LL | foo.trait_deprecated_unstable_text(); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ warning: use of deprecated item 'lint_stability::Trait::trait_deprecated_unstable_text': text - --> $DIR/lint-stability-deprecated.rs:157:9 + --> $DIR/lint-stability-deprecated.rs:156:9 | LL | ::trait_deprecated_unstable_text(&foo); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ warning: use of deprecated item 'lint_stability::Trait::trait_deprecated': text - --> $DIR/lint-stability-deprecated.rs:174:13 + --> $DIR/lint-stability-deprecated.rs:173:13 | LL | foo.trait_deprecated(); | ^^^^^^^^^^^^^^^^ warning: use of deprecated item 'lint_stability::Trait::trait_deprecated_text': text - --> $DIR/lint-stability-deprecated.rs:175:13 + --> $DIR/lint-stability-deprecated.rs:174:13 | LL | foo.trait_deprecated_text(); | ^^^^^^^^^^^^^^^^^^^^^ warning: use of deprecated item 'lint_stability::Trait::trait_deprecated_unstable': text - --> $DIR/lint-stability-deprecated.rs:176:13 + --> $DIR/lint-stability-deprecated.rs:175:13 | LL | foo.trait_deprecated_unstable(); | ^^^^^^^^^^^^^^^^^^^^^^^^^ warning: use of deprecated item 'lint_stability::Trait::trait_deprecated_unstable_text': text - --> $DIR/lint-stability-deprecated.rs:177:13 + --> $DIR/lint-stability-deprecated.rs:176:13 | LL | foo.trait_deprecated_unstable_text(); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ warning: use of deprecated item 'this_crate::MethodTester::method_deprecated': text - --> $DIR/lint-stability-deprecated.rs:330:13 + --> $DIR/lint-stability-deprecated.rs:329:13 | LL | foo.method_deprecated(); | ^^^^^^^^^^^^^^^^^ warning: use of deprecated item 'this_crate::MethodTester::method_deprecated': text - --> $DIR/lint-stability-deprecated.rs:331:9 + --> $DIR/lint-stability-deprecated.rs:330:9 | LL | Foo::method_deprecated(&foo); | ^^^^^^^^^^^^^^^^^^^^^^ warning: use of deprecated item 'this_crate::MethodTester::method_deprecated': text - --> $DIR/lint-stability-deprecated.rs:332:9 + --> $DIR/lint-stability-deprecated.rs:331:9 | LL | ::method_deprecated(&foo); | ^^^^^^^^^^^^^^^^^^^^^^^^ warning: use of deprecated item 'this_crate::Trait::trait_deprecated': text - --> $DIR/lint-stability-deprecated.rs:333:13 + --> $DIR/lint-stability-deprecated.rs:332:13 | LL | foo.trait_deprecated(); | ^^^^^^^^^^^^^^^^ warning: use of deprecated item 'this_crate::Trait::trait_deprecated': text - --> $DIR/lint-stability-deprecated.rs:335:9 + --> $DIR/lint-stability-deprecated.rs:334:9 | LL | ::trait_deprecated(&foo); | ^^^^^^^^^^^^^^^^^^^^^^^ warning: use of deprecated item 'this_crate::MethodTester::method_deprecated_text': text - --> $DIR/lint-stability-deprecated.rs:339:13 + --> $DIR/lint-stability-deprecated.rs:338:13 | LL | foo.method_deprecated_text(); | ^^^^^^^^^^^^^^^^^^^^^^ warning: use of deprecated item 'this_crate::MethodTester::method_deprecated_text': text - --> $DIR/lint-stability-deprecated.rs:340:9 + --> $DIR/lint-stability-deprecated.rs:339:9 | LL | Foo::method_deprecated_text(&foo); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ warning: use of deprecated item 'this_crate::MethodTester::method_deprecated_text': text - --> $DIR/lint-stability-deprecated.rs:341:9 + --> $DIR/lint-stability-deprecated.rs:340:9 | LL | ::method_deprecated_text(&foo); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ warning: use of deprecated item 'this_crate::Trait::trait_deprecated_text': text - --> $DIR/lint-stability-deprecated.rs:342:13 + --> $DIR/lint-stability-deprecated.rs:341:13 | LL | foo.trait_deprecated_text(); | ^^^^^^^^^^^^^^^^^^^^^ warning: use of deprecated item 'this_crate::Trait::trait_deprecated_text': text - --> $DIR/lint-stability-deprecated.rs:344:9 + --> $DIR/lint-stability-deprecated.rs:343:9 | LL | ::trait_deprecated_text(&foo); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ warning: use of deprecated item 'this_crate::DeprecatedStruct::i': text - --> $DIR/lint-stability-deprecated.rs:385:13 + --> $DIR/lint-stability-deprecated.rs:384:13 | LL | i: 0 | ^^^^ warning: use of deprecated item 'this_crate::Trait::trait_deprecated': text - --> $DIR/lint-stability-deprecated.rs:404:13 + --> $DIR/lint-stability-deprecated.rs:403:13 | LL | foo.trait_deprecated(); | ^^^^^^^^^^^^^^^^ warning: use of deprecated item 'this_crate::Trait::trait_deprecated': text - --> $DIR/lint-stability-deprecated.rs:406:9 + --> $DIR/lint-stability-deprecated.rs:405:9 | LL | ::trait_deprecated(&foo); | ^^^^^^^^^^^^^^^^^^^^^^^ warning: use of deprecated item 'this_crate::Trait::trait_deprecated_text': text - --> $DIR/lint-stability-deprecated.rs:408:13 + --> $DIR/lint-stability-deprecated.rs:407:13 | LL | foo.trait_deprecated_text(); | ^^^^^^^^^^^^^^^^^^^^^ warning: use of deprecated item 'this_crate::Trait::trait_deprecated_text': text - --> $DIR/lint-stability-deprecated.rs:410:9 + --> $DIR/lint-stability-deprecated.rs:409:9 | LL | ::trait_deprecated_text(&foo); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ warning: use of deprecated item 'this_crate::Trait::trait_deprecated': text - --> $DIR/lint-stability-deprecated.rs:427:13 + --> $DIR/lint-stability-deprecated.rs:426:13 | LL | foo.trait_deprecated(); | ^^^^^^^^^^^^^^^^ warning: use of deprecated item 'this_crate::Trait::trait_deprecated_text': text - --> $DIR/lint-stability-deprecated.rs:428:13 + --> $DIR/lint-stability-deprecated.rs:427:13 | LL | foo.trait_deprecated_text(); | ^^^^^^^^^^^^^^^^^^^^^ diff --git a/src/test/ui/macros/macro-use-bad-args-1.rs b/src/test/ui/macros/macro-use-bad-args-1.rs index 061c5cc7b3c0e..ec0b64a10953f 100644 --- a/src/test/ui/macros/macro-use-bad-args-1.rs +++ b/src/test/ui/macros/macro-use-bad-args-1.rs @@ -1,6 +1,5 @@ #![no_std] -#[allow(unused_extern_crates)] #[macro_use(foo(bar))] //~ ERROR bad macro import extern crate std; diff --git a/src/test/ui/macros/macro-use-bad-args-1.stderr b/src/test/ui/macros/macro-use-bad-args-1.stderr index f403c8a366084..4e5482a518c95 100644 --- a/src/test/ui/macros/macro-use-bad-args-1.stderr +++ b/src/test/ui/macros/macro-use-bad-args-1.stderr @@ -1,5 +1,5 @@ error[E0466]: bad macro import - --> $DIR/macro-use-bad-args-1.rs:4:13 + --> $DIR/macro-use-bad-args-1.rs:3:13 | LL | #[macro_use(foo(bar))] | ^^^^^^^^ diff --git a/src/test/ui/macros/macro-use-bad-args-2.rs b/src/test/ui/macros/macro-use-bad-args-2.rs index cb231ce292a96..c5f8f62c18686 100644 --- a/src/test/ui/macros/macro-use-bad-args-2.rs +++ b/src/test/ui/macros/macro-use-bad-args-2.rs @@ -1,6 +1,5 @@ #![no_std] -#[allow(unused_extern_crates)] #[macro_use(foo="bar")] //~ ERROR bad macro import extern crate std; diff --git a/src/test/ui/macros/macro-use-bad-args-2.stderr b/src/test/ui/macros/macro-use-bad-args-2.stderr index 93617edeeaea4..c958104eac43b 100644 --- a/src/test/ui/macros/macro-use-bad-args-2.stderr +++ b/src/test/ui/macros/macro-use-bad-args-2.stderr @@ -1,5 +1,5 @@ error[E0466]: bad macro import - --> $DIR/macro-use-bad-args-2.rs:4:13 + --> $DIR/macro-use-bad-args-2.rs:3:13 | LL | #[macro_use(foo="bar")] | ^^^^^^^^^ diff --git a/src/test/ui/no-std-inject.rs b/src/test/ui/no-std-inject.rs index 09879c791f89f..e9664a4dd480e 100644 --- a/src/test/ui/no-std-inject.rs +++ b/src/test/ui/no-std-inject.rs @@ -1,5 +1,4 @@ #![no_std] -#![allow(unused_extern_crates)] extern crate core; //~ ERROR: the name `core` is defined multiple times extern crate std; diff --git a/src/test/ui/no-std-inject.stderr b/src/test/ui/no-std-inject.stderr index 975f5c2f50c5d..a82931e0fbdd0 100644 --- a/src/test/ui/no-std-inject.stderr +++ b/src/test/ui/no-std-inject.stderr @@ -1,5 +1,5 @@ error[E0259]: the name `core` is defined multiple times - --> $DIR/no-std-inject.rs:4:1 + --> $DIR/no-std-inject.rs:3:1 | LL | extern crate core; | ^^^^^^^^^^^^^^^^^^ `core` reimported here diff --git a/src/test/ui/resolve/resolve-conflict-extern-crate-vs-extern-crate.rs b/src/test/ui/resolve/resolve-conflict-extern-crate-vs-extern-crate.rs index e4bb0d32942a4..3cb6ab52e0a2c 100644 --- a/src/test/ui/resolve/resolve-conflict-extern-crate-vs-extern-crate.rs +++ b/src/test/ui/resolve/resolve-conflict-extern-crate-vs-extern-crate.rs @@ -1,4 +1,3 @@ -#[allow(unused_extern_crates)] extern crate std; //~^ ERROR the name `std` is defined multiple times diff --git a/src/test/ui/resolve/resolve-conflict-extern-crate-vs-extern-crate.stderr b/src/test/ui/resolve/resolve-conflict-extern-crate-vs-extern-crate.stderr index 9e43cd4839f9b..ea6cb9eb00d8f 100644 --- a/src/test/ui/resolve/resolve-conflict-extern-crate-vs-extern-crate.stderr +++ b/src/test/ui/resolve/resolve-conflict-extern-crate-vs-extern-crate.stderr @@ -1,8 +1,4 @@ error[E0259]: the name `std` is defined multiple times - --> $DIR/resolve-conflict-extern-crate-vs-extern-crate.rs:2:1 - | -LL | extern crate std; - | ^^^^^^^^^^^^^^^^^ `std` reimported here | = note: `std` must be defined only once in the type namespace of this module help: you can use `as` to change the binding name of the import diff --git a/src/test/ui/resolve_self_super_hint.rs b/src/test/ui/resolve_self_super_hint.rs index a9423830d9040..a14ec5b7290b4 100644 --- a/src/test/ui/resolve_self_super_hint.rs +++ b/src/test/ui/resolve_self_super_hint.rs @@ -1,5 +1,3 @@ -#![allow(unused_extern_crates)] - mod a { extern crate alloc; use alloc::HashMap; diff --git a/src/test/ui/resolve_self_super_hint.stderr b/src/test/ui/resolve_self_super_hint.stderr index 14cdae97d14f3..bc862553b5bce 100644 --- a/src/test/ui/resolve_self_super_hint.stderr +++ b/src/test/ui/resolve_self_super_hint.stderr @@ -1,17 +1,17 @@ error[E0432]: unresolved import `alloc` - --> $DIR/resolve_self_super_hint.rs:5:9 + --> $DIR/resolve_self_super_hint.rs:3:9 | LL | use alloc::HashMap; | ^^^^^ help: a similar path exists: `self::alloc` error[E0432]: unresolved import `alloc` - --> $DIR/resolve_self_super_hint.rs:10:13 + --> $DIR/resolve_self_super_hint.rs:8:13 | LL | use alloc::HashMap; | ^^^^^ help: a similar path exists: `super::alloc` error[E0432]: unresolved import `alloc` - --> $DIR/resolve_self_super_hint.rs:15:17 + --> $DIR/resolve_self_super_hint.rs:13:17 | LL | use alloc::HashMap; | ^^^^^ @@ -20,7 +20,7 @@ LL | use alloc::HashMap; | help: a similar path exists: `a::alloc` error[E0432]: unresolved import `alloc` - --> $DIR/resolve_self_super_hint.rs:20:21 + --> $DIR/resolve_self_super_hint.rs:18:21 | LL | use alloc::HashMap; | ^^^^^ diff --git a/src/tools/build-manifest/src/main.rs b/src/tools/build-manifest/src/main.rs index 20176557bcbeb..a935bc6a4ded9 100644 --- a/src/tools/build-manifest/src/main.rs +++ b/src/tools/build-manifest/src/main.rs @@ -1,5 +1,3 @@ -#![deny(rust_2018_idioms)] - use toml; use serde::Serialize; diff --git a/src/tools/cargotest/main.rs b/src/tools/cargotest/main.rs index 14035eedbb44b..729287faeb628 100644 --- a/src/tools/cargotest/main.rs +++ b/src/tools/cargotest/main.rs @@ -1,5 +1,3 @@ -#![deny(rust_2018_idioms)] - use std::env; use std::process::Command; use std::path::{Path, PathBuf}; diff --git a/src/tools/compiletest/src/main.rs b/src/tools/compiletest/src/main.rs index 31360c000ce84..d709475541a60 100644 --- a/src/tools/compiletest/src/main.rs +++ b/src/tools/compiletest/src/main.rs @@ -1,7 +1,6 @@ #![crate_name = "compiletest"] #![feature(test)] #![feature(vec_remove_item)] -#![deny(warnings, rust_2018_idioms)] extern crate test; diff --git a/src/tools/error_index_generator/main.rs b/src/tools/error_index_generator/main.rs index 3e7c7ab6379d8..c31a5069e4673 100644 --- a/src/tools/error_index_generator/main.rs +++ b/src/tools/error_index_generator/main.rs @@ -1,7 +1,5 @@ #![feature(rustc_private)] -#![deny(rust_2018_idioms)] - extern crate env_logger; extern crate syntax; extern crate serialize as rustc_serialize; diff --git a/src/tools/linkchecker/main.rs b/src/tools/linkchecker/main.rs index e2bcd4d40af7f..49c149afe17f9 100644 --- a/src/tools/linkchecker/main.rs +++ b/src/tools/linkchecker/main.rs @@ -14,8 +14,6 @@ //! A few whitelisted exceptions are allowed as there's known bugs in rustdoc, //! but this should catch the majority of "broken link" cases. -#![deny(rust_2018_idioms)] - use std::collections::hash_map::Entry; use std::collections::{HashMap, HashSet}; use std::env; diff --git a/src/tools/remote-test-client/src/main.rs b/src/tools/remote-test-client/src/main.rs index f42de44176787..a1d52251263d4 100644 --- a/src/tools/remote-test-client/src/main.rs +++ b/src/tools/remote-test-client/src/main.rs @@ -1,5 +1,3 @@ -#![deny(rust_2018_idioms)] - /// This is a small client program intended to pair with `remote-test-server` in /// this repository. This client connects to the server over TCP and is used to /// push artifacts and run tests on the server instead of locally. diff --git a/src/tools/remote-test-server/src/main.rs b/src/tools/remote-test-server/src/main.rs index e1270489d315f..d2238730196aa 100644 --- a/src/tools/remote-test-server/src/main.rs +++ b/src/tools/remote-test-server/src/main.rs @@ -1,5 +1,3 @@ -#![deny(rust_2018_idioms)] - /// This is a small server which is intended to run inside of an emulator or /// on a remote test device. This server pairs with the `remote-test-client` /// program in this repository. The `remote-test-client` connects to this diff --git a/src/tools/rustbook/src/main.rs b/src/tools/rustbook/src/main.rs index 4689bee3e1319..6bce7c3a978eb 100644 --- a/src/tools/rustbook/src/main.rs +++ b/src/tools/rustbook/src/main.rs @@ -1,5 +1,3 @@ -#![deny(rust_2018_idioms)] - use clap::{crate_version}; use std::env; diff --git a/src/tools/rustc-std-workspace-core/lib.rs b/src/tools/rustc-std-workspace-core/lib.rs index 99d51bc2d56ac..1432785256166 100644 --- a/src/tools/rustc-std-workspace-core/lib.rs +++ b/src/tools/rustc-std-workspace-core/lib.rs @@ -1,5 +1,4 @@ #![feature(no_core)] #![no_core] -#![deny(rust_2018_idioms)] pub use core::*; diff --git a/src/tools/rustdoc-themes/main.rs b/src/tools/rustdoc-themes/main.rs index 63432a6585a84..616b5444832c1 100644 --- a/src/tools/rustdoc-themes/main.rs +++ b/src/tools/rustdoc-themes/main.rs @@ -1,5 +1,3 @@ -#![deny(rust_2018_idioms)] - use std::env::args; use std::fs::read_dir; use std::path::Path; diff --git a/src/tools/rustdoc/main.rs b/src/tools/rustdoc/main.rs index 8171708e99d00..99573cadb95f0 100644 --- a/src/tools/rustdoc/main.rs +++ b/src/tools/rustdoc/main.rs @@ -1,3 +1 @@ -#![deny(rust_2018_idioms)] - fn main() { rustdoc::main() } diff --git a/src/tools/tidy/src/main.rs b/src/tools/tidy/src/main.rs index 19f02f0a96e1d..3acb50547daf0 100644 --- a/src/tools/tidy/src/main.rs +++ b/src/tools/tidy/src/main.rs @@ -4,8 +4,6 @@ //! etc. This is run by default on `make check` and as part of the auto //! builders. -#![deny(warnings)] - use tidy::*; use std::process; diff --git a/src/tools/unstable-book-gen/src/main.rs b/src/tools/unstable-book-gen/src/main.rs index e92d174a4e1d4..036349ea1c82a 100644 --- a/src/tools/unstable-book-gen/src/main.rs +++ b/src/tools/unstable-book-gen/src/main.rs @@ -1,10 +1,5 @@ //! Auto-generate stub docs for the unstable book -#![deny(rust_2018_idioms)] -#![deny(warnings)] - - - use tidy::features::{Feature, Features, collect_lib_features, collect_lang_features}; use tidy::unstable_book::{collect_unstable_feature_names, collect_unstable_book_section_file_names, PATH_STR, LANG_FEATURES_DIR, LIB_FEATURES_DIR};