about summary refs log tree commit diff
diff options
context:
space:
mode:
authorNilstrieb <48135649+Nilstrieb@users.noreply.github.com>2023-10-28 20:25:43 +0200
committerNilstrieb <48135649+Nilstrieb@users.noreply.github.com>2023-10-28 20:25:43 +0200
commit4e2bbfef3eaddf399e33caeaa3976005855dc322 (patch)
tree66dc69fd405a406cb580d37b98a648ca3a2ec350
parent4dada601c17301ce897af77dbdf0375d657234a0 (diff)
downloadrust-4e2bbfef3eaddf399e33caeaa3976005855dc322.tar.gz
rust-4e2bbfef3eaddf399e33caeaa3976005855dc322.zip
Remove needless `allow`s
-rw-r--r--compiler/rustc_middle/src/ty/print/mod.rs2
-rw-r--r--compiler/rustc_middle/src/ty/print/pretty.rs3
2 files changed, 0 insertions, 5 deletions
diff --git a/compiler/rustc_middle/src/ty/print/mod.rs b/compiler/rustc_middle/src/ty/print/mod.rs
index 80af8a92553..6bbc8f70f51 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 0bdebc41842..799ba2c35ec 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(())
             }
         })+