diff options
| author | Nilstrieb <48135649+Nilstrieb@users.noreply.github.com> | 2023-10-28 20:25:43 +0200 |
|---|---|---|
| committer | Nilstrieb <48135649+Nilstrieb@users.noreply.github.com> | 2023-10-28 20:25:43 +0200 |
| commit | 4e2bbfef3eaddf399e33caeaa3976005855dc322 (patch) | |
| tree | 66dc69fd405a406cb580d37b98a648ca3a2ec350 | |
| parent | 4dada601c17301ce897af77dbdf0375d657234a0 (diff) | |
| download | rust-4e2bbfef3eaddf399e33caeaa3976005855dc322.tar.gz rust-4e2bbfef3eaddf399e33caeaa3976005855dc322.zip | |
Remove needless `allow`s
| -rw-r--r-- | compiler/rustc_middle/src/ty/print/mod.rs | 2 | ||||
| -rw-r--r-- | compiler/rustc_middle/src/ty/print/pretty.rs | 3 |
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(()) } })+ |
