pub(crate) struct UnsolvedRegionInferenceContext<'tcx> {
pub(super) data: RegionInferenceContextInner<'tcx>,
pub(super) type_tests: Vec<TypeTest<'tcx>>,
}Expand description
This contains data around region constraints and liveness, up to solving.
Calling solve returns a new immutable RegionInferenceContext.
Fields§
§data: RegionInferenceContextInner<'tcx>§type_tests: Vec<TypeTest<'tcx>>Type constraints that we check after solving.
Implementations§
Source§impl<'tcx> UnsolvedRegionInferenceContext<'tcx>
impl<'tcx> UnsolvedRegionInferenceContext<'tcx>
Sourcepub(crate) fn new(
infcx: &BorrowckInferCtxt<'tcx>,
lowered_constraints: LoweredConstraints<'tcx>,
universal_region_relations: Frozen<UniversalRegionRelations<'tcx>>,
location_map: Rc<DenseLocationMap>,
) -> Self
pub(crate) fn new( infcx: &BorrowckInferCtxt<'tcx>, lowered_constraints: LoweredConstraints<'tcx>, universal_region_relations: Frozen<UniversalRegionRelations<'tcx>>, location_map: Rc<DenseLocationMap>, ) -> Self
Creates a new region inference context with a total of
num_region_variables valid inference variables; the first N
of those will be constant regions representing the free
regions defined in universal_regions.
The outlives_constraints and type_tests are an initial set
of constraints produced by the MIR type check.
Sourcepub(crate) fn solve(
self,
infcx: &InferCtxt<'tcx>,
body: &Body<'tcx>,
polonius_output: Option<Box<PoloniusOutput>>,
) -> (RegionInferenceContext<'tcx>, Option<ClosureRegionRequirements<'tcx>>, RegionErrors<'tcx>)
pub(crate) fn solve( self, infcx: &InferCtxt<'tcx>, body: &Body<'tcx>, polonius_output: Option<Box<PoloniusOutput>>, ) -> (RegionInferenceContext<'tcx>, Option<ClosureRegionRequirements<'tcx>>, RegionErrors<'tcx>)
Performs region inference and report errors if we see any unsatisfiable constraints. If this is a closure, returns the region requirements to propagate to our creator, if any.
Sourcefn propagate_constraints(&mut self)
fn propagate_constraints(&mut self)
Propagate the region constraints: this will grow the values for each region variable until all the constraints are satisfied. Note that some values may grow too large to be feasible, but we check this later.
Sourcefn can_name_all_placeholders(
&self,
scc_a: ConstraintSccIndex,
scc_b: ConstraintSccIndex,
) -> bool
fn can_name_all_placeholders( &self, scc_a: ConstraintSccIndex, scc_b: ConstraintSccIndex, ) -> bool
Returns true if all the placeholders in the value of scc_b are nameable
in scc_a. Used during constraint propagation, and only once
the value of scc_b has been computed.
Sourcefn check_type_tests(
&self,
infcx: &InferCtxt<'tcx>,
propagated_outlives_requirements: Option<&mut Vec<ClosureOutlivesRequirement<'tcx>>>,
errors_buffer: &mut RegionErrors<'tcx>,
)
fn check_type_tests( &self, infcx: &InferCtxt<'tcx>, propagated_outlives_requirements: Option<&mut Vec<ClosureOutlivesRequirement<'tcx>>>, errors_buffer: &mut RegionErrors<'tcx>, )
Once regions have been propagated, this method is used to see
whether the “type tests” produced by typeck were satisfied;
type tests encode type-outlives relationships like T: 'a. See TypeTest for more details.
Sourcefn try_promote_type_test(
&self,
infcx: &InferCtxt<'tcx>,
type_test: &TypeTest<'tcx>,
propagated_outlives_requirements: &mut Vec<ClosureOutlivesRequirement<'tcx>>,
) -> bool
fn try_promote_type_test( &self, infcx: &InferCtxt<'tcx>, type_test: &TypeTest<'tcx>, propagated_outlives_requirements: &mut Vec<ClosureOutlivesRequirement<'tcx>>, ) -> bool
Invoked when we have some type-test (e.g., T: 'X) that we cannot
prove to be satisfied. If this is a closure, we will attempt to
“promote” this type-test into our ClosureRegionRequirements and
hence pass it up the creator. To do this, we have to phrase the
type-test in terms of external free regions, as local free
regions are not nameable by the closure’s creator.
Promotion works as follows: we first check that the type T
contains only regions that the creator knows about. If this is
true, then – as a consequence – we know that all regions in
the type T are free regions that outlive the closure body. If
false, then promotion fails.
Once we’ve promoted T, we have to “promote” 'X to some region
that is “external” to the closure. Generally speaking, a region
may be the union of some points in the closure body as well as
various free lifetimes. We can ignore the points in the closure
body: if the type T can be expressed in terms of external regions,
we know it outlives the points in the closure body. That
just leaves the free regions.
The idea then is to lower the T: 'X constraint into multiple
bounds – e.g., if 'X is the union of two free lifetimes,
'1 and '2, then we would create T: '1 and T: '2.
Sourcefn try_promote_type_test_subject(
&self,
infcx: &InferCtxt<'tcx>,
ty: Ty<'tcx>,
) -> Option<ClosureOutlivesSubject<'tcx>>
fn try_promote_type_test_subject( &self, infcx: &InferCtxt<'tcx>, ty: Ty<'tcx>, ) -> Option<ClosureOutlivesSubject<'tcx>>
When we promote a type test T: 'r, we have to replace all region
variables in the type T with an equal universal region from the
closure signature.
This is not always possible, so this is a fallible process.
Sourcefn eval_verify_bound(
&self,
infcx: &InferCtxt<'tcx>,
generic_ty: Ty<'tcx>,
lower_bound: RegionVid,
verify_bound: &VerifyBound<'tcx>,
) -> bool
fn eval_verify_bound( &self, infcx: &InferCtxt<'tcx>, generic_ty: Ty<'tcx>, lower_bound: RegionVid, verify_bound: &VerifyBound<'tcx>, ) -> bool
Tests if test is true when applied to lower_bound at
point.
fn eval_if_eq( &self, infcx: &InferCtxt<'tcx>, generic_ty: Ty<'tcx>, lower_bound: RegionVid, verify_if_eq_b: Binder<'tcx, VerifyIfEq<'tcx>>, ) -> bool
Sourcefn normalize_to_scc_representatives<T>(&self, tcx: TyCtxt<'tcx>, value: T) -> Twhere
T: TypeFoldable<TyCtxt<'tcx>>,
fn normalize_to_scc_representatives<T>(&self, tcx: TyCtxt<'tcx>, value: T) -> Twhere
T: TypeFoldable<TyCtxt<'tcx>>,
This is a conservative normalization procedure. It takes every
free region in value and replaces it with the
“representative” of its SCC (see scc_representatives field).
We are guaranteed that if two values normalize to the same
thing, then they are equal; this is a conservative check in
that they could still be equal even if they normalize to
different results. (For example, there might be two regions
with the same value that are not in the same SCC).
N.B., this is not an ideal approach and I would like to revisit it. However, it works pretty well in practice. In particular, this is needed to deal with projection outlives bounds like
<T as Foo<'0>>::Item: '1In particular, this routine winds up being important when
there are bounds like where <T as Foo<'a>>::Item: 'b in the
environment. In this case, if we can show that '0 == 'a,
and that 'b: '1, then we know that the clause is
satisfied. In such cases, particularly due to limitations of
the trait solver =), we usually wind up with a where-clause like
T: Foo<'a> in scope, which thus forces '0 == 'a to be added as
a constraint, and thus ensures that they are in the same SCC.
So why can’t we do a more correct routine? Well, we could
almost use the relate_tys code, but the way it is
currently setup it creates inference variables to deal with
higher-ranked things and so forth, and right now the inference
context is not permitted to make more inference variables. So
we use this kind of hacky solution.
Sourcepub(crate) fn eval_equal(&self, r1: RegionVid, r2: RegionVid) -> bool
pub(crate) fn eval_equal(&self, r1: RegionVid, r2: RegionVid) -> bool
Evaluate whether sup_region == sub_region.
Panics if called before solve() executes,
Sourcepub(crate) fn eval_outlives(
&self,
sup_region: RegionVid,
sub_region: RegionVid,
) -> bool
pub(crate) fn eval_outlives( &self, sup_region: RegionVid, sub_region: RegionVid, ) -> bool
Evaluate whether sup_region: sub_region.
Panics if called before solve() executes,
Sourcefn check_universal_regions(
&self,
propagated_outlives_requirements: Option<&mut Vec<ClosureOutlivesRequirement<'tcx>>>,
errors_buffer: &mut RegionErrors<'tcx>,
)
fn check_universal_regions( &self, propagated_outlives_requirements: Option<&mut Vec<ClosureOutlivesRequirement<'tcx>>>, errors_buffer: &mut RegionErrors<'tcx>, )
Once regions have been propagated, this method is used to see whether any of the constraints were too strong. In particular, we want to check for a case where a universally quantified region exceeded its bounds. Consider:
fn foo<'a, 'b>(x: &'a u32) -> &'b u32 { x }In this case, returning x requires &'a u32 <: &'b u32
and hence we establish (transitively) a constraint that
'a: 'b. The propagate_constraints code above will
therefore add end('a) into the region for 'b – but we
have no evidence that 'b outlives 'a, so we want to report
an error.
If propagated_outlives_requirements is Some, then we will
push unsatisfied obligations into there. Otherwise, we’ll
report them as errors.
Sourcefn check_polonius_subset_errors(
&self,
propagated_outlives_requirements: Option<&mut Vec<ClosureOutlivesRequirement<'tcx>>>,
errors_buffer: &mut RegionErrors<'tcx>,
polonius_output: &PoloniusOutput,
)
fn check_polonius_subset_errors( &self, propagated_outlives_requirements: Option<&mut Vec<ClosureOutlivesRequirement<'tcx>>>, errors_buffer: &mut RegionErrors<'tcx>, polonius_output: &PoloniusOutput, )
Checks if Polonius has found any unexpected free region relations.
In Polonius terms, a “subset error” (or “illegal subset relation error”) is the equivalent
of NLL’s “checking if any region constraints were too strong”: a placeholder origin 'a
was unexpectedly found to be a subset of another placeholder origin 'b, and means in NLL
terms that the “longer free region” 'a outlived the “shorter free region” 'b.
More details can be found in this blog post by Niko: https://smallcultfollowing.com/babysteps/blog/2019/01/17/polonius-and-region-errors/
In the canonical example
fn foo<'a, 'b>(x: &'a u32) -> &'b u32 { x }returning x requires &'a u32 <: &'b u32 and hence we establish (transitively) a
constraint that 'a: 'b. It is an error that we have no evidence that this
constraint holds.
If propagated_outlives_requirements is Some, then we will
push unsatisfied obligations into there. Otherwise, we’ll
report them as errors.
Sourcefn check_universal_region(
&self,
longer_fr: RegionVid,
propagated_outlives_requirements: &mut Option<&mut Vec<ClosureOutlivesRequirement<'tcx>>>,
errors_buffer: &mut RegionErrors<'tcx>,
)
fn check_universal_region( &self, longer_fr: RegionVid, propagated_outlives_requirements: &mut Option<&mut Vec<ClosureOutlivesRequirement<'tcx>>>, errors_buffer: &mut RegionErrors<'tcx>, )
Checks the final value for the free region fr to see if it
grew too large. In particular, examine what end(X) points
wound up in fr’s final value; for each end(X) where X != fr, we want to check that fr: X. If not, that’s either an
error, or something we have to propagate to our creator.
Things that are to be propagated are accumulated into the
outlives_requirements vector.
Sourcefn check_universal_region_relation(
&self,
longer_fr: RegionVid,
shorter_fr: RegionVid,
propagated_outlives_requirements: &mut Option<&mut Vec<ClosureOutlivesRequirement<'tcx>>>,
) -> RegionRelationCheckResult
fn check_universal_region_relation( &self, longer_fr: RegionVid, shorter_fr: RegionVid, propagated_outlives_requirements: &mut Option<&mut Vec<ClosureOutlivesRequirement<'tcx>>>, ) -> RegionRelationCheckResult
Checks that we can prove that longer_fr: shorter_fr. If we can’t we attempt to propagate
the constraint outward (e.g. to a closure environment), but if that fails, there is an
error.
Sourcefn try_propagate_universal_region_error(
&self,
longer_fr: RegionVid,
shorter_fr: RegionVid,
propagated_outlives_requirements: &mut Option<&mut Vec<ClosureOutlivesRequirement<'tcx>>>,
) -> RegionRelationCheckResult
fn try_propagate_universal_region_error( &self, longer_fr: RegionVid, shorter_fr: RegionVid, propagated_outlives_requirements: &mut Option<&mut Vec<ClosureOutlivesRequirement<'tcx>>>, ) -> RegionRelationCheckResult
Attempt to propagate a region error (e.g. 'a: 'b) that is not met to a closure’s
creator. If we cannot, then the caller should report an error to the user.
fn check_bound_universal_region( &self, longer_fr: RegionVid, placeholder: PlaceholderRegion<'tcx>, errors_buffer: &mut RegionErrors<'tcx>, )
Sourcefn region_from_element(
&self,
longer_fr: RegionVid,
element: &RegionElement<'tcx>,
) -> RegionVid
fn region_from_element( &self, longer_fr: RegionVid, element: &RegionElement<'tcx>, ) -> RegionVid
Get the region outlived by longer_fr and live at element.
Sourcefn scc_representative(&self, scc: ConstraintSccIndex) -> RegionVid
fn scc_representative(&self, scc: ConstraintSccIndex) -> RegionVid
Returns the representative RegionVid for a given SCC.
See RegionTracker for how a region variable ID is chosen.
It is a hacky way to manage checking regions for equality, since we can ‘canonicalize’ each region to the representative of its SCC and be sure that – if they have the same repr – they must be equal (though not having the same repr does not mean they are unequal).
Methods from Deref<Target = RegionInferenceContextInner<'tcx>>§
Sourcepub(crate) fn regions(&self) -> impl Iterator<Item = RegionVid> + 'tcx
pub(crate) fn regions(&self) -> impl Iterator<Item = RegionVid> + 'tcx
Returns an iterator over all the region indices.
Sourcepub(crate) fn to_region_vid(&self, r: Region<'tcx>) -> RegionVid
pub(crate) fn to_region_vid(&self, r: Region<'tcx>) -> RegionVid
Given a universal region in scope on the MIR, returns the corresponding index.
Panics if r is not a registered universal region, most notably
if it is a placeholder. Handling placeholders requires access to the
MirTypeckRegionConstraints.
Sourcepub(crate) fn outlives_constraints(
&self,
) -> impl Iterator<Item = OutlivesConstraint<'tcx>>
pub(crate) fn outlives_constraints( &self, ) -> impl Iterator<Item = OutlivesConstraint<'tcx>>
Returns an iterator over all the outlives constraints.
Sourcepub(crate) fn annotate(&self, tcx: TyCtxt<'tcx>, err: &mut Diag<'_>)
pub(crate) fn annotate(&self, tcx: TyCtxt<'tcx>, err: &mut Diag<'_>)
Adds annotations for #[rustc_regions]; see UniversalRegions::annotate.
Sourcepub(crate) fn region_contains_point(&self, r: RegionVid, p: Location) -> bool
pub(crate) fn region_contains_point(&self, r: RegionVid, p: Location) -> bool
Returns true if the region r contains the point p.
Panics if called before solve() executes,
Sourcepub(crate) fn first_non_contained_inclusive(
&self,
r: RegionVid,
block: BasicBlock,
start: usize,
end: usize,
) -> Option<usize>
pub(crate) fn first_non_contained_inclusive( &self, r: RegionVid, block: BasicBlock, start: usize, end: usize, ) -> Option<usize>
Returns the lowest statement index in start..=end which is not contained by r.
Panics if called before solve() executes.
Sourcepub(crate) fn region_value_str(&self, r: RegionVid) -> String
pub(crate) fn region_value_str(&self, r: RegionVid) -> String
Returns access to the value of r for debugging purposes.
pub(crate) fn placeholders_contained_in( &self, r: RegionVid, ) -> impl Iterator<Item = PlaceholderRegion<'tcx>>
Sourcepub(crate) fn approx_universal_upper_bound(&self, r: RegionVid) -> RegionVid
pub(crate) fn approx_universal_upper_bound(&self, r: RegionVid) -> RegionVid
Like universal_upper_bound, but returns an approximation more suitable
for diagnostics. If r contains multiple disjoint universal regions
(e.g. ’a and ’b in fn foo<'a, 'b> { ... }, we pick the lower-numbered region.
This corresponds to picking named regions over unnamed regions
(e.g. picking early-bound regions over a closure late-bound region).
This means that the returned value may not be a true upper bound, since only ’static is known to outlive disjoint universal regions. Therefore, this method should only be used in diagnostic code, where displaying some named universal region is better than falling back to ’static.
Sourcepub(super) fn max_nameable_universe(
&self,
scc: ConstraintSccIndex,
) -> UniverseIndex
pub(super) fn max_nameable_universe( &self, scc: ConstraintSccIndex, ) -> UniverseIndex
The largest universe of any region nameable from this SCC.
pub(crate) fn constraint_path_between_regions( &self, from_region: RegionVid, to_region: RegionVid, ) -> Option<Vec<OutlivesConstraint<'tcx>>>
Sourcepub(crate) fn constraint_path_to(
&self,
from_region: RegionVid,
target_test: impl Fn(RegionVid) -> bool,
include_placeholder_static: bool,
) -> Option<(Vec<OutlivesConstraint<'tcx>>, RegionVid)>
pub(crate) fn constraint_path_to( &self, from_region: RegionVid, target_test: impl Fn(RegionVid) -> bool, include_placeholder_static: bool, ) -> Option<(Vec<OutlivesConstraint<'tcx>>, RegionVid)>
Walks the graph of constraints (where 'a: 'b is considered
an edge 'a -> 'b) to find a path from from_region to
to_region.
Returns: a series of constraints as well as the region R
that passed the target test.
If include_static_outlives_all is true, then the synthetic
outlives constraints 'static -> a for every region a are
considered in the search, otherwise they are ignored.
Sourcefn find_constraint_path_between_regions_inner(
&self,
ignore_opaque_type_constraints: bool,
from_region: RegionVid,
target_test: impl Fn(RegionVid) -> bool,
include_placeholder_static: bool,
) -> Option<(Vec<OutlivesConstraint<'tcx>>, RegionVid)>
fn find_constraint_path_between_regions_inner( &self, ignore_opaque_type_constraints: bool, from_region: RegionVid, target_test: impl Fn(RegionVid) -> bool, include_placeholder_static: bool, ) -> Option<(Vec<OutlivesConstraint<'tcx>>, RegionVid)>
The constraints we get from equating the hidden type of each use of an opaque with its final hidden type may end up getting preferred over other, potentially longer constraint paths.
Given that we compute the final hidden type by relying on this existing constraint path, this can easily end up hiding the actual reason for why we require these regions to be equal.
To handle this, we first look at the path while ignoring these constraints and then
retry while considering them. This is not perfect, as the from_region may have already
been partially related to its argument region, so while we rely on a member constraint
to get a complete path, the most relevant step of that path already existed before then.
Sourcepub(crate) fn find_sub_region_live_at(
&self,
fr1: RegionVid,
location: Location,
) -> RegionVid
pub(crate) fn find_sub_region_live_at( &self, fr1: RegionVid, location: Location, ) -> RegionVid
Finds some region R such that fr1: R and R is live at location.
Sourcepub(crate) fn region_definition(&self, r: RegionVid) -> &RegionDefinition<'tcx>
pub(crate) fn region_definition(&self, r: RegionVid) -> &RegionDefinition<'tcx>
Get the region definition of r.
Sourcepub(crate) fn upper_bound_in_region_scc(
&self,
r: RegionVid,
upper: RegionVid,
) -> bool
pub(crate) fn upper_bound_in_region_scc( &self, r: RegionVid, upper: RegionVid, ) -> bool
Check if the SCC of r contains upper, a free region.
pub(crate) fn universal_regions(&self) -> &UniversalRegions<'tcx>
Sourcepub(crate) fn best_blame_constraint(
&self,
from_region: RegionVid,
from_region_origin: NllRegionVariableOrigin<'tcx>,
to_region: RegionVid,
) -> BestBlame<'tcx>
pub(crate) fn best_blame_constraint( &self, from_region: RegionVid, from_region_origin: NllRegionVariableOrigin<'tcx>, to_region: RegionVid, ) -> BestBlame<'tcx>
Tries to find the best constraint to blame for the fact that
R: from_region, where R is some region that meets
target_test. This works by following the constraint graph,
creating a constraint path that forces R to outlive
from_region, and then finding the best choices within that
path to blame.
pub(crate) fn universe_info( &self, universe: UniverseIndex, ) -> UniverseInfo<'tcx>
Sourcepub(crate) fn find_loop_terminator_location(
&self,
r: RegionVid,
body: &Body<'_>,
) -> Option<Location>
pub(crate) fn find_loop_terminator_location( &self, r: RegionVid, body: &Body<'_>, ) -> Option<Location>
Tries to find the terminator of the loop in which the region ‘r’ resides. Returns the location of the terminator if found.
Sourcepub(crate) fn constraint_sccs(&self) -> &Sccs<RegionVid, ConstraintSccIndex>
pub(crate) fn constraint_sccs(&self) -> &Sccs<RegionVid, ConstraintSccIndex>
Access to the SCC constraint graph. This can be used to quickly under-approximate the regions which are equal to each other and their relative orderings.
pub(crate) fn liveness_constraints(&self) -> &LivenessValues
Sourcepub(crate) fn is_loan_live_at(
&self,
loan_idx: BorrowIndex,
location: Location,
) -> bool
pub(crate) fn is_loan_live_at( &self, loan_idx: BorrowIndex, location: Location, ) -> bool
Returns whether the loan_idx is live at the given location: whether its issuing
region is contained within the type of a variable that is live at this point.
Note: for now, the sets of live loans is only available when using -Zpolonius=next.
Trait Implementations§
Source§impl<'tcx> Deref for UnsolvedRegionInferenceContext<'tcx>
impl<'tcx> Deref for UnsolvedRegionInferenceContext<'tcx>
Auto Trait Implementations§
impl<'tcx> !DynSend for UnsolvedRegionInferenceContext<'tcx>
impl<'tcx> !DynSync for UnsolvedRegionInferenceContext<'tcx>
impl<'tcx> !Freeze for UnsolvedRegionInferenceContext<'tcx>
impl<'tcx> !RefUnwindSafe for UnsolvedRegionInferenceContext<'tcx>
impl<'tcx> !Send for UnsolvedRegionInferenceContext<'tcx>
impl<'tcx> !Sync for UnsolvedRegionInferenceContext<'tcx>
impl<'tcx> !UnwindSafe for UnsolvedRegionInferenceContext<'tcx>
impl<'tcx> Unpin for UnsolvedRegionInferenceContext<'tcx>
impl<'tcx> UnsafeUnpin for UnsolvedRegionInferenceContext<'tcx>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T, R> CollectAndApply<T, R> for T
impl<T, R> CollectAndApply<T, R> for T
impl<T> ErasedDestructor for Twhere
T: 'static,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<K> IntoQueryKey<K> for K
impl<K> IntoQueryKey<K> for K
Source§fn into_query_key(self) -> K
fn into_query_key(self) -> K
Self to K.
This should always be a very cheap conversion, e.g. LocalDefId::to_def_id.Source§impl<T> MaybeResult<T> for T
impl<T> MaybeResult<T> for T
Source§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<I, T, U> Upcast<I, U> for Twhere
U: UpcastFrom<I, T>,
impl<I, T, U> Upcast<I, U> for Twhere
U: UpcastFrom<I, T>,
Source§impl<I, T> UpcastFrom<I, T> for T
impl<I, T> UpcastFrom<I, T> for T
fn upcast_from(from: T, _tcx: I) -> T
Source§impl<T> WithSubscriber for T
impl<T> WithSubscriber for T
Source§fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘ
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘ
Source§fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ
fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ
Layout§
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...) attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.
Size: 928 bytes