Better errors for implied static bound
This commit is contained in:
parent
ff623ffc39
commit
c75817b0a7
23 changed files with 345 additions and 99 deletions
|
@ -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.
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue