diff --git a/compiler/rustc_middle/src/ty/print/mod.rs b/compiler/rustc_middle/src/ty/print/mod.rs index 80af8a9255398..6bbc8f70f5155 100644 --- a/compiler/rustc_middle/src/ty/print/mod.rs +++ b/compiler/rustc_middle/src/ty/print/mod.rs @@ -12,8 +12,6 @@ pub use self::pretty::*; pub type PrintError = std::fmt::Error; -// FIXME(eddyb) false positive, the lifetime parameters are used with `P: Printer<...>`. -#[allow(unused_lifetimes)] pub trait Print<'tcx, P> { fn print(&self, cx: &mut P) -> Result<(), PrintError>; } diff --git a/compiler/rustc_middle/src/ty/print/pretty.rs b/compiler/rustc_middle/src/ty/print/pretty.rs index 0bdebc41842ca..799ba2c35ec8b 100644 --- a/compiler/rustc_middle/src/ty/print/pretty.rs +++ b/compiler/rustc_middle/src/ty/print/pretty.rs @@ -2719,11 +2719,8 @@ macro_rules! define_print { (($self:ident, $cx:ident): $($ty:ty $print:block)+) => { $(impl<'tcx, P: PrettyPrinter<'tcx>> Print<'tcx, P> for $ty { fn print(&$self, $cx: &mut P) -> Result<(), PrintError> { - #[allow(unused_mut)] - let mut $cx = $cx; define_scoped_cx!($cx); let _: () = $print; - #[allow(unreachable_code)] Ok(()) } })+