Add AstConv::astconv method to remove <dyn AstConv>:: calls

This commit is contained in:
Maybe Waffle 2023-01-11 18:58:44 +00:00
parent b22c152958
commit 89f1555824
12 changed files with 50 additions and 77 deletions

View file

@ -120,6 +120,13 @@ pub trait AstConv<'tcx> {
fn set_tainted_by_errors(&self, e: ErrorGuaranteed);
fn record_ty(&self, hir_id: hir::HirId, ty: Ty<'tcx>, span: Span);
fn astconv(&self) -> &dyn AstConv<'tcx>
where
Self: Sized,
{
self
}
}
#[derive(Debug)]