1
Fork 0

Better errors for implied static bound

This commit is contained in:
Jack Huey 2022-08-23 01:13:07 -04:00
parent ff623ffc39
commit c75817b0a7
23 changed files with 345 additions and 99 deletions

View file

@ -3,7 +3,7 @@
//! hand, though we've recently added some macros and proc-macros to help with the tedium.
use crate::mir::interpret;
use crate::mir::ProjectionKind;
use crate::mir::{Field, ProjectionKind};
use crate::ty::fold::{FallibleTypeFolder, TypeFoldable, TypeSuperFoldable};
use crate::ty::print::{with_no_trimmed_paths, FmtPrinter, Printer};
use crate::ty::visit::{TypeSuperVisitable, TypeVisitable, TypeVisitor};
@ -648,6 +648,20 @@ impl<'a, 'tcx> Lift<'tcx> for ty::InstanceDef<'a> {
}
}
impl<'tcx> Lift<'tcx> for Field {
type Lifted = Field;
fn lift_to_tcx(self, _tcx: TyCtxt<'tcx>) -> Option<Self::Lifted> {
Some(self)
}
}
impl<'tcx> Lift<'tcx> for crate::mir::ReturnConstraint {
type Lifted = crate::mir::ReturnConstraint;
fn lift_to_tcx(self, _tcx: TyCtxt<'tcx>) -> Option<Self::Lifted> {
Some(self)
}
}
///////////////////////////////////////////////////////////////////////////
// TypeFoldable implementations.