Enum rustc::ty::wf::ImpliedBound
[−]
[src]
pub enum ImpliedBound<'tcx> { RegionSubRegion(&'tcx Region, &'tcx Region), RegionSubParam(&'tcx Region, ParamTy), RegionSubProjection(&'tcx Region, ProjectionTy<'tcx>), }
🔬 This is a nightly-only experimental API. (
rustc_private
)Implied bounds are region relationships that we deduce automatically. The idea is that (e.g.) a caller must check that a function's argument types are well-formed immediately before calling that fn, and hence the callee can assume that its argument types are well-formed. This may imply certain relationships between generic parameters. For example:
fn foo<'a,T>(x: &'a T)
can only be called with a 'a
and T
such that &'a T
is WF.
For &'a T
to be WF, T: 'a
must hold. So we can assume T: 'a
.
Variants
RegionSubRegion(&'tcx Region, &'tcx Region)
🔬 This is a nightly-only experimental API. (
rustc_private
)RegionSubParam(&'tcx Region, ParamTy)
🔬 This is a nightly-only experimental API. (
rustc_private
)RegionSubProjection(&'tcx Region, ProjectionTy<'tcx>)
🔬 This is a nightly-only experimental API. (
rustc_private
)