Remove needless allows

This commit is contained in:
Nilstrieb 2023-10-28 20:25:43 +02:00
parent 4dada601c1
commit 4e2bbfef3e
2 changed files with 0 additions and 5 deletions

View File

@ -12,8 +12,6 @@
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>;
}

View File

@ -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(())
}
})+