Deny `unused_lifetimes` through rustbuild

This commit is contained in:
Vadim Petrochenkov 2019-07-23 22:17:27 +03:00
parent 434152157f
commit 676d282dd3
38 changed files with 23 additions and 59 deletions

View File

@ -6,7 +6,7 @@
//! directory in each respective module.
// NO-RUSTC-WRAPPER
#![deny(warnings, rust_2018_idioms)]
#![deny(warnings, rust_2018_idioms, unused_lifetimes)]
use std::env;

View File

@ -16,7 +16,7 @@
//! never get replaced.
// NO-RUSTC-WRAPPER
#![deny(warnings, rust_2018_idioms)]
#![deny(warnings, rust_2018_idioms, unused_lifetimes)]
use std::env;
use std::ffi::OsString;
@ -129,6 +129,7 @@ fn main() {
env::var_os("RUSTC_EXTERNAL_TOOL").is_none() {
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");

View File

@ -3,7 +3,7 @@
//! See comments in `src/bootstrap/rustc.rs` for more information.
// NO-RUSTC-WRAPPER
#![deny(warnings, rust_2018_idioms)]
#![deny(warnings, rust_2018_idioms, unused_lifetimes)]
use std::env;
use std::process::Command;

View File

@ -104,7 +104,7 @@
//! also check out the `src/bootstrap/README.md` file for more information.
// NO-RUSTC-WRAPPER
#![deny(warnings, rust_2018_idioms)]
#![deny(warnings, rust_2018_idioms, unused_lifetimes)]
#![feature(core_intrinsics)]
#![feature(drain_filter)]
@ -1313,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

View File

@ -1,5 +1,5 @@
// NO-RUSTC-WRAPPER
#![deny(warnings, rust_2018_idioms)]
#![deny(warnings, rust_2018_idioms, unused_lifetimes)]
use std::fs::File;
use std::path::{Path, PathBuf};

View File

@ -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[..]) }

View File

@ -11,8 +11,6 @@
#![doc(html_root_url = "https://doc.rust-lang.org/nightly/",
test(no_crate_inject, attr(deny(warnings))))]
#![deny(unused_lifetimes)]
#![feature(core_intrinsics)]
#![feature(dropck_eyepatch)]
#![feature(raw_vec_internals)]

View File

@ -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<A, B, const N: usize> PartialEq<[A; N]> for [B]
where
B: PartialEq<A>,
[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<B>,
[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>,
[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<B>,
[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>,
[A; N]: LengthAtMost32,

View File

@ -775,7 +775,7 @@ where
{}
#[stable(feature = "pin", since = "1.33.0")]
impl<'a, P, U> DispatchFromDyn<Pin<U>> for Pin<P>
impl<P, U> DispatchFromDyn<Pin<U>> for Pin<P>
where
P: DispatchFromDyn<U>,
{}

View File

@ -172,7 +172,7 @@ impl<T: ?Sized> From<&T> for Unique<T> {
}
#[unstable(feature = "ptr_internals", issue = "0")]
impl<'a, T: ?Sized> From<NonNull<T>> for Unique<T> {
impl<T: ?Sized> From<NonNull<T>> for Unique<T> {
#[inline]
fn from(p: NonNull<T>) -> Self {
unsafe { Unique::new_unchecked(p.as_ptr()) }

View File

@ -8,8 +8,6 @@
html_playground_url = "https://play.rust-lang.org/",
test(attr(deny(warnings))))]
#![deny(unused_lifetimes)]
#![feature(nll)]
#![feature(rustc_private)]
#![feature(unicode_internals)]

View File

@ -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;
}

View File

@ -28,8 +28,6 @@
#![doc(html_root_url = "https://doc.rust-lang.org/nightly/")]
#![deny(unused_lifetimes)]
#![feature(arbitrary_self_types)]
#![feature(box_patterns)]
#![feature(box_syntax)]

View File

@ -1,7 +1,6 @@
#![doc(html_root_url = "https://doc.rust-lang.org/nightly/")]
#![allow(non_camel_case_types)]
#![deny(unused_lifetimes)]
#![feature(in_band_lifetimes)]
#![feature(nll)]

View File

@ -21,7 +21,6 @@
#![feature(static_nobundle)]
#![feature(trusted_len)]
#![feature(mem_take)]
#![deny(unused_lifetimes)]
use back::write::{create_target_machine, create_informational_target_machine};
use syntax_pos::symbol::Symbol;

View File

@ -11,7 +11,6 @@
#![feature(nll)]
#![feature(trusted_len)]
#![feature(mem_take)]
#![deny(unused_lifetimes)]
#![recursion_limit="256"]

View File

@ -15,8 +15,6 @@
#![recursion_limit="256"]
#![deny(unused_lifetimes)]
#[macro_use]
extern crate rustc;

View File

@ -39,6 +39,7 @@ where
}
}
#[allow(unused_lifetimes)]
pub trait GraphSuccessors<'graph> {
type Item;
type Iter: Iterator<Item = Self::Item>;
@ -54,6 +55,7 @@ where
) -> <Self as GraphPredecessors<'_>>::Iter;
}
#[allow(unused_lifetimes)]
pub trait GraphPredecessors<'graph> {
type Item;
type Iter: Iterator<Item = Self::Item>;

View File

@ -283,6 +283,7 @@ impl<T> Erased for T {}
/// Helper trait for erasing the concrete type of what an owner dereferences to,
/// for example `Box<T> -> Box<Erased>`. 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<T> -> Box<Erased + Send>`. 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<T> -> Box<Erased + Send + Sync>`. 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;

View File

@ -16,8 +16,6 @@
#![recursion_limit="256"]
#![deny(unused_lifetimes)]
pub extern crate getopts;
#[cfg(unix)]
extern crate libc;

View File

@ -8,7 +8,6 @@
#![cfg_attr(unix, feature(libc))]
#![feature(nll)]
#![feature(optin_builtin_traits)]
#![deny(unused_lifetimes)]
pub use emitter::ColorConfig;

View File

@ -8,8 +8,6 @@
#![recursion_limit="256"]
#![deny(unused_lifetimes)]
#[macro_use] extern crate rustc;
#[macro_use] extern crate log;

View File

@ -6,8 +6,6 @@
#![feature(generators)]
#![cfg_attr(unix, feature(libc))]
#![deny(unused_lifetimes)]
#![recursion_limit="256"]
#[cfg(unix)]

View File

@ -19,8 +19,6 @@
#![recursion_limit="256"]
#![deny(unused_lifetimes)]
#[macro_use]
extern crate rustc;

View File

@ -15,8 +15,6 @@
#![recursion_limit="256"]
#![deny(unused_lifetimes)]
extern crate libc;
extern crate proc_macro;

View File

@ -26,8 +26,6 @@ Rust MIR: a lowered representation of Rust. Also: an experiment!
#![recursion_limit="256"]
#![deny(unused_lifetimes)]
#[macro_use] extern crate log;
#[macro_use] extern crate rustc;
#[macro_use] extern crate rustc_data_structures;

View File

@ -13,8 +13,6 @@
#![recursion_limit="256"]
#![deny(unused_lifetimes)]
#[macro_use]
extern crate rustc;

View File

@ -1,7 +1,5 @@
#![doc(html_root_url = "https://doc.rust-lang.org/nightly/")]
#![deny(unused_lifetimes)]
#![feature(in_band_lifetimes)]
#![feature(nll)]
#![feature(rustc_diagnostic_macros)]

View File

@ -10,8 +10,6 @@
#![recursion_limit="256"]
#![deny(unused_lifetimes)]
pub use rustc::hir::def::{Namespace, PerNS};
use Determinacy::*;

View File

@ -1,10 +1,8 @@
#![doc(html_root_url = "https://doc.rust-lang.org/nightly/")]
#![feature(nll)]
#![deny(unused_lifetimes)]
#![recursion_limit="256"]
mod dumper;
mod dump_visitor;
#[macro_use]

View File

@ -13,8 +13,6 @@
#![feature(nll)]
#![feature(slice_patterns)]
#![deny(unused_lifetimes)]
#[macro_use] extern crate log;
pub mod abi;

View File

@ -1,8 +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(unused_lifetimes)]
#![feature(crate_visibility_modifier)]
#![feature(in_band_lifetimes)]
#![feature(nll)]

View File

@ -73,8 +73,6 @@ This API is completely unstable and subject to change.
#![recursion_limit="256"]
#![deny(unused_lifetimes)]
#[macro_use] extern crate log;
#[macro_use] extern crate syntax;

View File

@ -1,5 +1,3 @@
#![deny(unused_lifetimes)]
#![doc(html_root_url = "https://doc.rust-lang.org/nightly/",
html_playground_url = "https://play.rust-lang.org/")]

View File

@ -210,6 +210,7 @@
#![warn(missing_debug_implementations)]
#![deny(intra_doc_link_resolution_failure)] // rustdoc is run without -D warnings
#![allow(explicit_outlives_requirements)]
#![allow(unused_lifetimes)]
// Tell the compiler to link to either panic_abort or panic_unwind
#![needs_panic_runtime]

View File

@ -7,8 +7,6 @@
#![doc(html_root_url = "https://doc.rust-lang.org/nightly/",
test(attr(deny(warnings))))]
#![deny(unused_lifetimes)]
#![feature(bind_by_move_pattern_guards)]
#![feature(box_syntax)]
#![feature(const_fn)]

View File

@ -3,8 +3,6 @@
#![doc(html_root_url = "https://doc.rust-lang.org/nightly/")]
#![deny(unused_lifetimes)]
#![feature(crate_visibility_modifier)]
#![feature(decl_macro)]
#![feature(mem_take)]

View File

@ -6,8 +6,6 @@
#![doc(html_root_url = "https://doc.rust-lang.org/nightly/")]
#![deny(unused_lifetimes)]
#![feature(const_fn)]
#![feature(crate_visibility_modifier)]
#![feature(nll)]