> for Pin
+impl
DispatchFromDyn> for Pin
where
P: DispatchFromDyn,
{}
diff --git a/src/libcore/ptr/unique.rs b/src/libcore/ptr/unique.rs
index d2517e51fc5..f0d011fe6b2 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/libfmt_macros/lib.rs b/src/libfmt_macros/lib.rs
index d673088fe45..83e24a48ea0 100644
--- a/src/libfmt_macros/lib.rs
+++ b/src/libfmt_macros/lib.rs
@@ -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)]
diff --git a/src/libproc_macro/bridge/scoped_cell.rs b/src/libproc_macro/bridge/scoped_cell.rs
index 89fb7070015..2cde1f65adf 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/librustc/lib.rs b/src/librustc/lib.rs
index 9957b173116..4b3fefcd4de 100644
--- a/src/librustc/lib.rs
+++ b/src/librustc/lib.rs
@@ -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)]
diff --git a/src/librustc_ast_borrowck/lib.rs b/src/librustc_ast_borrowck/lib.rs
index 045671e37c0..dc818278a4b 100644
--- a/src/librustc_ast_borrowck/lib.rs
+++ b/src/librustc_ast_borrowck/lib.rs
@@ -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)]
diff --git a/src/librustc_codegen_llvm/lib.rs b/src/librustc_codegen_llvm/lib.rs
index 90609d6c85a..a630817fb33 100644
--- a/src/librustc_codegen_llvm/lib.rs
+++ b/src/librustc_codegen_llvm/lib.rs
@@ -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;
diff --git a/src/librustc_codegen_ssa/lib.rs b/src/librustc_codegen_ssa/lib.rs
index 4e2977a011c..73ef16e0091 100644
--- a/src/librustc_codegen_ssa/lib.rs
+++ b/src/librustc_codegen_ssa/lib.rs
@@ -11,7 +11,6 @@
#![feature(nll)]
#![feature(trusted_len)]
#![feature(mem_take)]
-#![deny(unused_lifetimes)]
#![recursion_limit="256"]
diff --git a/src/librustc_codegen_utils/lib.rs b/src/librustc_codegen_utils/lib.rs
index e3fafc2f2cd..4ea375b59b2 100644
--- a/src/librustc_codegen_utils/lib.rs
+++ b/src/librustc_codegen_utils/lib.rs
@@ -15,8 +15,6 @@
#![recursion_limit="256"]
-#![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 e59085a9e3a..749709521e8 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/owning_ref/mod.rs b/src/librustc_data_structures/owning_ref/mod.rs
index a7af615fa50..3b49ce71063 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 66739761ef0..77b7ef96d3f 100644
--- a/src/librustc_driver/lib.rs
+++ b/src/librustc_driver/lib.rs
@@ -16,8 +16,6 @@
#![recursion_limit="256"]
-#![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 f252d0573dc..3f758c2521b 100644
--- a/src/librustc_errors/lib.rs
+++ b/src/librustc_errors/lib.rs
@@ -8,7 +8,6 @@
#![cfg_attr(unix, feature(libc))]
#![feature(nll)]
#![feature(optin_builtin_traits)]
-#![deny(unused_lifetimes)]
pub use emitter::ColorConfig;
diff --git a/src/librustc_incremental/lib.rs b/src/librustc_incremental/lib.rs
index 0b5eb41605b..b2573111385 100644
--- a/src/librustc_incremental/lib.rs
+++ b/src/librustc_incremental/lib.rs
@@ -8,8 +8,6 @@
#![recursion_limit="256"]
-#![deny(unused_lifetimes)]
-
#[macro_use] extern crate rustc;
#[macro_use] extern crate log;
diff --git a/src/librustc_interface/lib.rs b/src/librustc_interface/lib.rs
index f4e4612007c..2e593d44155 100644
--- a/src/librustc_interface/lib.rs
+++ b/src/librustc_interface/lib.rs
@@ -6,8 +6,6 @@
#![feature(generators)]
#![cfg_attr(unix, feature(libc))]
-#![deny(unused_lifetimes)]
-
#![recursion_limit="256"]
#[cfg(unix)]
diff --git a/src/librustc_lint/lib.rs b/src/librustc_lint/lib.rs
index 1d3b2b62996..d3975360525 100644
--- a/src/librustc_lint/lib.rs
+++ b/src/librustc_lint/lib.rs
@@ -19,8 +19,6 @@
#![recursion_limit="256"]
-#![deny(unused_lifetimes)]
-
#[macro_use]
extern crate rustc;
diff --git a/src/librustc_metadata/lib.rs b/src/librustc_metadata/lib.rs
index ce7fb7cdc66..c96d02d9b37 100644
--- a/src/librustc_metadata/lib.rs
+++ b/src/librustc_metadata/lib.rs
@@ -15,8 +15,6 @@
#![recursion_limit="256"]
-#![deny(unused_lifetimes)]
-
extern crate libc;
extern crate proc_macro;
diff --git a/src/librustc_mir/lib.rs b/src/librustc_mir/lib.rs
index 28e5c5dc99a..20d5e54d2ce 100644
--- a/src/librustc_mir/lib.rs
+++ b/src/librustc_mir/lib.rs
@@ -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;
diff --git a/src/librustc_passes/lib.rs b/src/librustc_passes/lib.rs
index 6c11d82958b..5614b570b92 100644
--- a/src/librustc_passes/lib.rs
+++ b/src/librustc_passes/lib.rs
@@ -13,8 +13,6 @@
#![recursion_limit="256"]
-#![deny(unused_lifetimes)]
-
#[macro_use]
extern crate rustc;
diff --git a/src/librustc_privacy/lib.rs b/src/librustc_privacy/lib.rs
index 75c98753d31..e291f40ffd2 100644
--- a/src/librustc_privacy/lib.rs
+++ b/src/librustc_privacy/lib.rs
@@ -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)]
diff --git a/src/librustc_resolve/lib.rs b/src/librustc_resolve/lib.rs
index c7982b4a396..bc5898fe78d 100644
--- a/src/librustc_resolve/lib.rs
+++ b/src/librustc_resolve/lib.rs
@@ -10,8 +10,6 @@
#![recursion_limit="256"]
-#![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 1e18b34e5c8..9edb4c0fa67 100644
--- a/src/librustc_save_analysis/lib.rs
+++ b/src/librustc_save_analysis/lib.rs
@@ -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]
diff --git a/src/librustc_target/lib.rs b/src/librustc_target/lib.rs
index 0fc5fbdc6a2..a349dc26e83 100644
--- a/src/librustc_target/lib.rs
+++ b/src/librustc_target/lib.rs
@@ -13,8 +13,6 @@
#![feature(nll)]
#![feature(slice_patterns)]
-#![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 ec5a8bc544b..ebe6b7c6138 100644
--- a/src/librustc_traits/lib.rs
+++ b/src/librustc_traits/lib.rs
@@ -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)]
diff --git a/src/librustc_typeck/lib.rs b/src/librustc_typeck/lib.rs
index 284b1d533d5..a34b137aca9 100644
--- a/src/librustc_typeck/lib.rs
+++ b/src/librustc_typeck/lib.rs
@@ -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;
diff --git a/src/librustdoc/lib.rs b/src/librustdoc/lib.rs
index 74a7b2b9152..a8d7ff4a2eb 100644
--- a/src/librustdoc/lib.rs
+++ b/src/librustdoc/lib.rs
@@ -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/")]
diff --git a/src/libstd/lib.rs b/src/libstd/lib.rs
index 1390341cf7c..8fd76eabe39 100644
--- a/src/libstd/lib.rs
+++ b/src/libstd/lib.rs
@@ -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]
diff --git a/src/libsyntax/lib.rs b/src/libsyntax/lib.rs
index 5ef80518b40..1fd20fa0b31 100644
--- a/src/libsyntax/lib.rs
+++ b/src/libsyntax/lib.rs
@@ -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)]
diff --git a/src/libsyntax_ext/lib.rs b/src/libsyntax_ext/lib.rs
index 21031109f2a..da11f2ff23f 100644
--- a/src/libsyntax_ext/lib.rs
+++ b/src/libsyntax_ext/lib.rs
@@ -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)]
diff --git a/src/libsyntax_pos/lib.rs b/src/libsyntax_pos/lib.rs
index bc7be9f34ee..acc13aec402 100644
--- a/src/libsyntax_pos/lib.rs
+++ b/src/libsyntax_pos/lib.rs
@@ -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)]