1
Fork 0

Removes dead code from the compiler

This commit is contained in:
mu001999 2024-08-08 08:17:55 +08:00
parent f167efad2f
commit e7f11b6913
6 changed files with 2 additions and 25 deletions

View file

@ -4,7 +4,6 @@ use crate::layout;
pub(crate) trait QueryContext {
type Def: layout::Def;
type Ref: layout::Ref;
type Scope: Copy;
}
#[cfg(test)]
@ -28,20 +27,17 @@ pub(crate) mod test {
impl QueryContext for UltraMinimal {
type Def = Def;
type Ref = !;
type Scope = ();
}
}
#[cfg(feature = "rustc")]
mod rustc {
use rustc_middle::ty::{Ty, TyCtxt};
use rustc_middle::ty::TyCtxt;
use super::*;
impl<'tcx> super::QueryContext for TyCtxt<'tcx> {
type Def = layout::rustc::Def<'tcx>;
type Ref = layout::rustc::Ref<'tcx>;
type Scope = Ty<'tcx>;
}
}