diff --git a/src/librustc_borrowck/borrowck/mod.rs b/src/librustc_borrowck/borrowck/mod.rs index 7dca47485bb..669fb9103aa 100644 --- a/src/librustc_borrowck/borrowck/mod.rs +++ b/src/librustc_borrowck/borrowck/mod.rs @@ -1487,7 +1487,7 @@ impl DataFlowOperator for LoanDataFlowOperator { } } -impl<'tcx> fmt::Debug for InteriorKind { +impl fmt::Debug for InteriorKind { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { match *self { InteriorField(mc::FieldIndex(_, info)) => write!(f, "{}", info), diff --git a/src/librustc_borrowck/lib.rs b/src/librustc_borrowck/lib.rs index 14bc77f380a..5d8b0cd14dd 100644 --- a/src/librustc_borrowck/lib.rs +++ b/src/librustc_borrowck/lib.rs @@ -3,6 +3,7 @@ #![allow(non_camel_case_types)] #![deny(rust_2018_idioms)] #![deny(internal)] +#![deny(unused_lifetimes)] #![feature(nll)]