Skip to content

Commit

Permalink
Remove needless allows
Browse files Browse the repository at this point in the history
  • Loading branch information
Noratrieb committed Oct 28, 2023
1 parent 4dada60 commit 4e2bbfe
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 5 deletions.
2 changes: 0 additions & 2 deletions compiler/rustc_middle/src/ty/print/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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>;
}
Expand Down
3 changes: 0 additions & 3 deletions compiler/rustc_middle/src/ty/print/pretty.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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(())
}
})+
Expand Down

0 comments on commit 4e2bbfe

Please sign in to comment.