Struct rustc::infer::InferCtxt
[−]
[src]
pub struct InferCtxt<'a, 'gcx: 'a + 'tcx, 'tcx: 'a> { pub tcx: TyCtxt<'a, 'gcx, 'tcx>, pub in_progress_tables: Option<&'a RefCell<TypeckTables<'tcx>>>, pub projection_cache: RefCell<ProjectionCache<'tcx>>, pub type_variables: RefCell<TypeVariableTable<'tcx>>, pub selection_cache: SelectionCache<'tcx>, pub evaluation_cache: EvaluationCache<'tcx>, pub reported_trait_errors: RefCell<FxHashMap<Span, Vec<Predicate<'tcx>>>>, // some fields omitted }
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
Fields
tcx: TyCtxt<'a, 'gcx, 'tcx>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
in_progress_tables: Option<&'a RefCell<TypeckTables<'tcx>>>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
During type-checking/inference of a body, in_progress_tables
contains a reference to the tables being built up, which are
used for reading closure kinds/signatures as they are inferred,
and for error reporting logic to read arbitrary node types.
projection_cache: RefCell<ProjectionCache<'tcx>>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
type_variables: RefCell<TypeVariableTable<'tcx>>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
selection_cache: SelectionCache<'tcx>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
Caches the results of trait selection. This cache is used for things that have to do with the parameters in scope.
evaluation_cache: EvaluationCache<'tcx>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
Caches the results of trait evaluation.
reported_trait_errors: RefCell<FxHashMap<Span, Vec<Predicate<'tcx>>>>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
Methods
impl<'a, 'gcx, 'tcx> InferCtxt<'a, 'gcx, 'tcx>
[src]
pub fn at(
&'a self,
cause: &'a ObligationCause<'tcx>,
param_env: ParamEnv<'tcx>
) -> At<'a, 'gcx, 'tcx>
[src]
&'a self,
cause: &'a ObligationCause<'tcx>,
param_env: ParamEnv<'tcx>
) -> At<'a, 'gcx, 'tcx>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
impl<'infcx, 'gcx, 'tcx> InferCtxt<'infcx, 'gcx, 'tcx>
[src]
pub fn super_combine_tys<R>(
&self,
relation: &mut R,
a: Ty<'tcx>,
b: Ty<'tcx>
) -> RelateResult<'tcx, Ty<'tcx>> where
R: TypeRelation<'infcx, 'gcx, 'tcx>,
[src]
&self,
relation: &mut R,
a: Ty<'tcx>,
b: Ty<'tcx>
) -> RelateResult<'tcx, Ty<'tcx>> where
R: TypeRelation<'infcx, 'gcx, 'tcx>,
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
impl<'a, 'gcx, 'tcx> InferCtxt<'a, 'gcx, 'tcx>
[src]
pub fn need_type_info(&self, body_id: Option<BodyId>, span: Span, ty: Ty<'tcx>)
[src]
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
impl<'a, 'gcx, 'tcx> InferCtxt<'a, 'gcx, 'tcx>
[src]
pub fn try_report_named_anon_conflict(
&self,
error: &RegionResolutionError<'tcx>
) -> bool
[src]
&self,
error: &RegionResolutionError<'tcx>
) -> bool
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
When given a ConcreteFailure
for a function with arguments containing a named region and
an anonymous region, emit an descriptive diagnostic error.
impl<'a, 'gcx, 'tcx> InferCtxt<'a, 'gcx, 'tcx>
[src]
pub fn find_arg_with_region(
&self,
anon_region: Region<'tcx>,
replace_region: Region<'tcx>
) -> Option<AnonymousArgInfo>
[src]
&self,
anon_region: Region<'tcx>,
replace_region: Region<'tcx>
) -> Option<AnonymousArgInfo>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
pub fn is_suitable_region(&self, region: Region<'tcx>) -> Option<FreeRegionInfo>
[src]
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
pub fn is_return_type_anon(
&self,
scope_def_id: DefId,
br: BoundRegion,
decl: &FnDecl
) -> Option<Span>
[src]
&self,
scope_def_id: DefId,
br: BoundRegion,
decl: &FnDecl
) -> Option<Span>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
pub fn is_self_anon(&self, is_first: bool, scope_def_id: DefId) -> bool
[src]
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
pub fn is_bound_region_in_impl_item(
&self,
suitable_region_binding_scope: DefId
) -> bool
[src]
&self,
suitable_region_binding_scope: DefId
) -> bool
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
pub fn is_named_region(&self, region: Region<'tcx>) -> bool
[src]
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
impl<'a, 'gcx, 'tcx> InferCtxt<'a, 'gcx, 'tcx>
[src]
pub fn try_report_anon_anon_conflict(
&self,
error: &RegionResolutionError<'tcx>
) -> bool
[src]
&self,
error: &RegionResolutionError<'tcx>
) -> bool
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
Print the error message for lifetime errors when both the concerned regions are anonymous.
Consider a case where we have
fn foo(x: &mut Vec<&u8>, y: &u8) { x.push(y); }
The example gives
fn foo(x: &mut Vec<&u8>, y: &u8) {
--- --- these references are declared with different lifetimes...
x.push(y);
^ ...but data from `y` flows into `x` here
It has been extended for the case of structs too.
Consider the example
struct Ref<'a> { x: &'a u32 }
fn foo(mut x: Vec<Ref>, y: Ref) {
--- --- these structs are declared with different lifetimes...
x.push(y);
^ ...but data from `y` flows into `x` here
}
````
It will later be extended to trait objects.
pub fn find_anon_type(
&self,
region: Region<'tcx>,
br: &BoundRegion
) -> Option<(&Ty, &FnDecl)>
[src]
&self,
region: Region<'tcx>,
br: &BoundRegion
) -> Option<(&Ty, &FnDecl)>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
This function calls the visit_ty
method for the parameters
corresponding to the anonymous regions. The nested_visitor.found_type
contains the anonymous type.
Arguments
region - the anonymous region corresponding to the anon_anon conflict
br - the bound region corresponding to the above region which is of type BrAnon(_)
Example
fn foo(x: &mut Vec<&u8>, y: &u8) { x.push(y); }
The function returns the nested type corresponding to the anonymous region
for e.g. &u8
and Vec<&u8
.
impl<'a, 'gcx, 'tcx> InferCtxt<'a, 'gcx, 'tcx>
[src]
pub fn report_region_errors(
&self,
region_scope_tree: &ScopeTree,
errors: &Vec<RegionResolutionError<'tcx>>
)
[src]
&self,
region_scope_tree: &ScopeTree,
errors: &Vec<RegionResolutionError<'tcx>>
)
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
pub fn note_type_err(
&self,
diag: &mut DiagnosticBuilder<'tcx>,
cause: &ObligationCause<'tcx>,
secondary_span: Option<(Span, String)>,
values: Option<ValuePairs<'tcx>>,
terr: &TypeError<'tcx>
)
[src]
&self,
diag: &mut DiagnosticBuilder<'tcx>,
cause: &ObligationCause<'tcx>,
secondary_span: Option<(Span, String)>,
values: Option<ValuePairs<'tcx>>,
terr: &TypeError<'tcx>
)
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
pub fn report_and_explain_type_error(
&self,
trace: TypeTrace<'tcx>,
terr: &TypeError<'tcx>
) -> DiagnosticBuilder<'tcx>
[src]
&self,
trace: TypeTrace<'tcx>,
terr: &TypeError<'tcx>
) -> DiagnosticBuilder<'tcx>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
impl<'a, 'gcx, 'tcx> InferCtxt<'a, 'gcx, 'tcx>
[src]
pub fn fudge_regions_if_ok<T, E, F>(
&self,
origin: &RegionVariableOrigin,
f: F
) -> Result<T, E> where
F: FnOnce() -> Result<T, E>,
T: TypeFoldable<'tcx>,
[src]
&self,
origin: &RegionVariableOrigin,
f: F
) -> Result<T, E> where
F: FnOnce() -> Result<T, E>,
T: TypeFoldable<'tcx>,
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
This rather funky routine is used while processing expected
types. What happens here is that we want to propagate a
coercion through the return type of a fn to its
argument. Consider the type of Option::Some
, which is
basically for<T> fn(T) -> Option<T>
. So if we have an
expression Some(&[1, 2, 3])
, and that has the expected type
Option<&[u32]>
, we would like to type check &[1, 2, 3]
with the expectation of &[u32]
. This will cause us to coerce
from &[u32; 3]
to &[u32]
and make the users life more
pleasant.
The way we do this is using fudge_regions_if_ok
. What the
routine actually does is to start a snapshot and execute the
closure f
. In our example above, what this closure will do
is to unify the expectation (Option<&[u32]>
) with the actual
return type (Option<?T>
, where ?T
represents the variable
instantiated for T
). This will cause ?T
to be unified
with &?a [u32]
, where ?a
is a fresh lifetime variable. The
input type (?T
) is then returned by f()
.
At this point, fudge_regions_if_ok
will normalize all type
variables, converting ?T
to &?a [u32]
and end the
snapshot. The problem is that we can't just return this type
out, because it references the region variable ?a
, and that
region variable was popped when we popped the snapshot.
So what we do is to keep a list (region_vars
, in the code below)
of region variables created during the snapshot (here, ?a
). We
fold the return value and replace any such regions with a new
region variable (e.g., ?b
) and return the result (&?b [u32]
).
This can then be used as the expectation for the fn argument.
The important point here is that, for soundness purposes, the
regions in question are not particularly important. We will
use the expected types to guide coercions, but we will still
type-check the resulting types from those coercions against
the actual types (?T
, Option<?T
) -- and remember that
after the snapshot is popped, the variable ?T
is no longer
unified.
impl<'a, 'gcx, 'tcx> InferCtxt<'a, 'gcx, 'tcx>
[src]
pub fn skolemize_late_bound_regions<T>(
&self,
binder: &Binder<T>,
snapshot: &CombinedSnapshot
) -> (T, SkolemizationMap<'tcx>) where
T: TypeFoldable<'tcx>,
[src]
&self,
binder: &Binder<T>,
snapshot: &CombinedSnapshot
) -> (T, SkolemizationMap<'tcx>) where
T: TypeFoldable<'tcx>,
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
Replace all regions bound by binder
with skolemized regions and
return a map indicating which bound-region was replaced with what
skolemized region. This is the first step of checking subtyping
when higher-ranked things are involved.
Important: you must call this function from within a snapshot.
Moreover, before committing the snapshot, you must eventually call
either plug_leaks
or pop_skolemized
to remove the skolemized
regions. If you rollback the snapshot (or are using a probe), then
the pop occurs as part of the rollback, so an explicit call is not
needed (but is also permitted).
See README.md
for more details.
pub fn leak_check(
&self,
overly_polymorphic: bool,
_span: Span,
skol_map: &SkolemizationMap<'tcx>,
snapshot: &CombinedSnapshot
) -> RelateResult<'tcx, ()>
[src]
&self,
overly_polymorphic: bool,
_span: Span,
skol_map: &SkolemizationMap<'tcx>,
snapshot: &CombinedSnapshot
) -> RelateResult<'tcx, ()>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
Searches the region constraints created since snapshot
was started
and checks to determine whether any of the skolemized regions created
in skol_map
would "escape" -- meaning that they are related to
other regions in some way. If so, the higher-ranked subtyping doesn't
hold. See README.md
for more details.
pub fn plug_leaks<T>(
&self,
skol_map: SkolemizationMap<'tcx>,
snapshot: &CombinedSnapshot,
value: T
) -> T where
T: TypeFoldable<'tcx>,
[src]
&self,
skol_map: SkolemizationMap<'tcx>,
snapshot: &CombinedSnapshot,
value: T
) -> T where
T: TypeFoldable<'tcx>,
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
This code converts from skolemized regions back to late-bound
regions. It works by replacing each region in the taint set of a
skolemized region with a bound-region. The bound region will be bound
by the outer-most binder in value
; the caller must ensure that there is
such a binder and it is the right place.
This routine is only intended to be used when the leak-check has
passed; currently, it's used in the trait matching code to create
a set of nested obligations frmo an impl that matches against
something higher-ranked. More details can be found in
librustc/middle/traits/README.md
.
As a brief example, consider the obligation for<'a> Fn(&'a int) -> &'a int
, and the impl:
impl<A,R> Fn<A,R> for SomethingOrOther where A : Clone { ... }
Here we will have replaced 'a
with a skolemized region
'0
. This means that our substitution will be {A=>&'0 int, R=>&'0 int}
.
When we apply the substitution to the bounds, we will wind up with
&'0 int : Clone
as a predicate. As a last step, we then go and
replace '0
with a late-bound region 'a
. The depth is matched
to the depth of the predicate, in this case 1, so that the final
predicate is for<'a> &'a int : Clone
.
pub fn pop_skolemized(
&self,
skol_map: SkolemizationMap<'tcx>,
snapshot: &CombinedSnapshot
)
[src]
&self,
skol_map: SkolemizationMap<'tcx>,
snapshot: &CombinedSnapshot
)
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
Pops the skolemized regions found in skol_map
from the region
inference context. Whenever you create skolemized regions via
skolemize_late_bound_regions
, they must be popped before you
commit the enclosing snapshot (if you do not commit, e.g. within a
probe or as a result of an error, then this is not necessary, as
popping happens as part of the rollback).
Note: popping also occurs implicitly as part of leak_check
.
impl<'cx, 'gcx, 'tcx> InferCtxt<'cx, 'gcx, 'tcx>
[src]
pub fn implied_outlives_bounds(
&self,
param_env: ParamEnv<'tcx>,
body_id: NodeId,
ty: Ty<'tcx>,
span: Span
) -> Vec<OutlivesBound<'tcx>>
[src]
&self,
param_env: ParamEnv<'tcx>,
body_id: NodeId,
ty: Ty<'tcx>,
span: Span
) -> Vec<OutlivesBound<'tcx>>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
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
.
Parameters
param_env
, the where-clauses in scopebody_id
, the body-id to use when normalizing assoc types. Note that this may cause outlives obligations to be injected into the inference context with this body-id.ty
, the type that we are supposed to assume is WF.span
, a span to use when normalizing, hopefully not important, might be useful if abug!
occurs.
impl<'cx, 'gcx, 'tcx> InferCtxt<'cx, 'gcx, 'tcx>
[src]
pub fn register_region_obligation(
&self,
body_id: NodeId,
obligation: RegionObligation<'tcx>
)
[src]
&self,
body_id: NodeId,
obligation: RegionObligation<'tcx>
)
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
Registers that the given region obligation must be resolved
from within the scope of body_id
. These regions are enqueued
and later processed by regionck, when full type information is
available (see region_obligations
field for more
information).
pub fn process_registered_region_obligations(
&self,
region_bound_pairs: &[(Region<'tcx>, GenericKind<'tcx>)],
implicit_region_bound: Option<Region<'tcx>>,
param_env: ParamEnv<'tcx>,
body_id: NodeId
)
[src]
&self,
region_bound_pairs: &[(Region<'tcx>, GenericKind<'tcx>)],
implicit_region_bound: Option<Region<'tcx>>,
param_env: ParamEnv<'tcx>,
body_id: NodeId
)
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
Process the region obligations that must be proven (during
regionck
) for the given body_id
, given information about
the region bounds in scope and so forth. This function must be
invoked for all relevant body-ids before region inference is
done (or else an assert will fire).
See the region_obligations
field of InferCtxt
for some
comments about how this funtion fits into the overall expected
flow of the the inferencer. The key point is that it is
invoked after all type-inference variables have been bound --
towards the end of regionck. This also ensures that the
region-bound-pairs are available (see comments above regarding
closures).
Parameters
region_bound_pairs
: the set of region bounds implied by the parameters and where-clauses. In particular, each pair('a, K)
in this list tells us that the bounds in scope indicate thatK: 'a
, whereK
is either a generic parameter likeT
or a projection likeT::Item
.implicit_region_bound
: if some, this is a region bound that is considered to hold for all type parameters (the function body).param_env
is the parameter environment for the enclosing function.body_id
is the body-id whose region obligations are being processed.
Returns
This function may have to perform normalizations, and hence it
returns an InferOk
with subobligations that must be
processed.
pub fn type_must_outlive(
&self,
region_bound_pairs: &[(Region<'tcx>, GenericKind<'tcx>)],
implicit_region_bound: Option<Region<'tcx>>,
param_env: ParamEnv<'tcx>,
origin: SubregionOrigin<'tcx>,
ty: Ty<'tcx>,
region: Region<'tcx>
)
[src]
&self,
region_bound_pairs: &[(Region<'tcx>, GenericKind<'tcx>)],
implicit_region_bound: Option<Region<'tcx>>,
param_env: ParamEnv<'tcx>,
origin: SubregionOrigin<'tcx>,
ty: Ty<'tcx>,
region: Region<'tcx>
)
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
Processes a single ad-hoc region obligation that was not registered in advance.
impl<'a, 'gcx, 'tcx> InferCtxt<'a, 'gcx, 'tcx>
[src]
pub fn drain_fulfillment_cx_or_panic<T>(
&self,
span: Span,
fulfill_cx: &mut FulfillmentContext<'tcx>,
result: &T
) -> T::Lifted where
T: TypeFoldable<'tcx> + Lift<'gcx>,
[src]
&self,
span: Span,
fulfill_cx: &mut FulfillmentContext<'tcx>,
result: &T
) -> T::Lifted where
T: TypeFoldable<'tcx> + Lift<'gcx>,
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
Finishes processes any obligations that remain in the
fulfillment context, and then returns the result with all type
variables removed and regions erased. Because this is intended
for use after type-check has completed, if any errors occur,
it will panic. It is used during normalization and other cases
where processing the obligations in fulfill_cx
may cause
type inference variables that appear in result
to be
unified, and hence we need to process those obligations to get
the complete picture of the type.
pub fn is_in_snapshot(&self) -> bool
[src]
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
pub fn freshen<T: TypeFoldable<'tcx>>(&self, t: T) -> T
[src]
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
pub fn type_var_diverges(&'a self, ty: Ty) -> bool
[src]
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
pub fn freshener<'b>(&'b self) -> TypeFreshener<'b, 'gcx, 'tcx>
[src]
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
pub fn type_is_unconstrained_numeric(&'a self, ty: Ty) -> UnconstrainedNumeric
[src]
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
pub fn default(&self, ty: Ty<'tcx>) -> Option<Default<'tcx>>
[src]
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
Returns a type variable's default fallback if any exists. A default must be attached to the variable when created, if it is created without a default, this will return None.
This code does not apply to integral or floating point variables, only to use declared defaults.
See new_ty_var_with_default
to create a type variable with a default.
See type_variable::Default
for details about what a default entails.
pub fn unsolved_variables(&self) -> Vec<Ty<'tcx>>
[src]
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
pub fn save_and_restore_in_snapshot_flag<F, R>(&self, func: F) -> R where
F: FnOnce(&Self) -> R,
[src]
F: FnOnce(&Self) -> R,
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
pub fn commit_unconditionally<R, F>(&self, f: F) -> R where
F: FnOnce() -> R,
[src]
F: FnOnce() -> R,
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
Execute f
and commit the bindings
pub fn commit_if_ok<T, E, F>(&self, f: F) -> Result<T, E> where
F: FnOnce(&CombinedSnapshot) -> Result<T, E>,
[src]
F: FnOnce(&CombinedSnapshot) -> Result<T, E>,
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
Execute f
and commit the bindings if closure f
returns Ok(_)
pub fn in_snapshot<T, F>(&self, f: F) -> T where
F: FnOnce(&CombinedSnapshot) -> T,
[src]
F: FnOnce(&CombinedSnapshot) -> T,
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
pub fn probe<R, F>(&self, f: F) -> R where
F: FnOnce(&CombinedSnapshot) -> R,
[src]
F: FnOnce(&CombinedSnapshot) -> R,
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
Execute f
then unroll any bindings it creates
pub fn add_given(&self, sub: Region<'tcx>, sup: RegionVid)
[src]
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
pub fn can_sub<T>(
&self,
param_env: ParamEnv<'tcx>,
a: T,
b: T
) -> UnitResult<'tcx> where
T: ToTrace<'tcx>,
[src]
&self,
param_env: ParamEnv<'tcx>,
a: T,
b: T
) -> UnitResult<'tcx> where
T: ToTrace<'tcx>,
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
pub fn can_eq<T>(
&self,
param_env: ParamEnv<'tcx>,
a: T,
b: T
) -> UnitResult<'tcx> where
T: ToTrace<'tcx>,
[src]
&self,
param_env: ParamEnv<'tcx>,
a: T,
b: T
) -> UnitResult<'tcx> where
T: ToTrace<'tcx>,
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
pub fn sub_regions(
&self,
origin: SubregionOrigin<'tcx>,
a: Region<'tcx>,
b: Region<'tcx>
)
[src]
&self,
origin: SubregionOrigin<'tcx>,
a: Region<'tcx>,
b: Region<'tcx>
)
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
pub fn equality_predicate(
&self,
cause: &ObligationCause<'tcx>,
param_env: ParamEnv<'tcx>,
predicate: &PolyEquatePredicate<'tcx>
) -> InferResult<'tcx, ()>
[src]
&self,
cause: &ObligationCause<'tcx>,
param_env: ParamEnv<'tcx>,
predicate: &PolyEquatePredicate<'tcx>
) -> InferResult<'tcx, ()>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
pub fn subtype_predicate(
&self,
cause: &ObligationCause<'tcx>,
param_env: ParamEnv<'tcx>,
predicate: &PolySubtypePredicate<'tcx>
) -> Option<InferResult<'tcx, ()>>
[src]
&self,
cause: &ObligationCause<'tcx>,
param_env: ParamEnv<'tcx>,
predicate: &PolySubtypePredicate<'tcx>
) -> Option<InferResult<'tcx, ()>>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
pub fn region_outlives_predicate(
&self,
cause: &ObligationCause<'tcx>,
predicate: &PolyRegionOutlivesPredicate<'tcx>
) -> UnitResult<'tcx>
[src]
&self,
cause: &ObligationCause<'tcx>,
predicate: &PolyRegionOutlivesPredicate<'tcx>
) -> UnitResult<'tcx>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
pub fn next_ty_var_id(
&self,
diverging: bool,
origin: TypeVariableOrigin
) -> TyVid
[src]
&self,
diverging: bool,
origin: TypeVariableOrigin
) -> TyVid
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
pub fn next_ty_var(&self, origin: TypeVariableOrigin) -> Ty<'tcx>
[src]
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
pub fn next_diverging_ty_var(&self, origin: TypeVariableOrigin) -> Ty<'tcx>
[src]
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
pub fn next_int_var_id(&self) -> IntVid
[src]
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
pub fn next_float_var_id(&self) -> FloatVid
[src]
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
pub fn next_region_var(&self, origin: RegionVariableOrigin) -> Region<'tcx>
[src]
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
Create a fresh region variable with the next available index.
Parameters
origin
: information about why we created this variable, for use during diagnostics / error-reporting.
pub fn num_region_vars(&self) -> usize
[src]
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
Number of region variables created so far.
pub fn next_nll_region_var(
&self,
origin: NLLRegionVariableOrigin
) -> Region<'tcx>
[src]
&self,
origin: NLLRegionVariableOrigin
) -> Region<'tcx>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
Just a convenient wrapper of next_region_var
for using during NLL.
pub fn region_var_for_def(
&self,
span: Span,
def: &RegionParameterDef
) -> Region<'tcx>
[src]
&self,
span: Span,
def: &RegionParameterDef
) -> Region<'tcx>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
Create a region inference variable for the given region parameter definition.
pub fn type_var_for_def(
&self,
span: Span,
def: &TypeParameterDef,
substs: &[Kind<'tcx>]
) -> Ty<'tcx>
[src]
&self,
span: Span,
def: &TypeParameterDef,
substs: &[Kind<'tcx>]
) -> Ty<'tcx>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
Create a type inference variable for the given
type parameter definition. The substitutions are
for actual parameters that may be referred to by
the default of this type parameter, if it exists.
E.g. struct Foo<A, B, C = (A, B)>(...);
when
used in a path such as Foo::<T, U>::new()
will
use an inference variable for C
with [T, U]
as the substitutions for the default, (T, U)
.
pub fn fresh_substs_for_item(
&self,
span: Span,
def_id: DefId
) -> &'tcx Substs<'tcx>
[src]
&self,
span: Span,
def_id: DefId
) -> &'tcx Substs<'tcx>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
Given a set of generics defined on a type or impl, returns a substitution mapping each type/region parameter to a fresh inference variable.
pub fn is_tainted_by_errors(&self) -> bool
[src]
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
True if errors have been reported since this infcx was created. This is sometimes used as a heuristic to skip reporting errors that often occur as a result of earlier errors, but where it's hard to be 100% sure (e.g., unresolved inference variables, regionck errors).
pub fn set_tainted_by_errors(&self)
[src]
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
Set the "tainted by errors" flag to true. We call this when we observe an error from a prior pass.
pub fn resolve_regions_and_report_errors(
&self,
region_context: DefId,
region_map: &ScopeTree,
outlives_env: &OutlivesEnvironment<'tcx>
)
[src]
&self,
region_context: DefId,
region_map: &ScopeTree,
outlives_env: &OutlivesEnvironment<'tcx>
)
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
Process the region constraints and report any errors that
result. After this, no more unification operations should be
done -- or the compiler will panic -- but it is legal to use
resolve_type_vars_if_possible
as well as fully_resolve
.
pub fn take_and_reset_region_constraints(&self) -> RegionConstraintData<'tcx>
[src]
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
Obtains (and clears) the current set of region constraints. The inference context is still usable: further unifications will simply add new constraints.
This method is not meant to be used with normal lexical region resolution. Rather, it is used in the NLL mode as a kind of interim hack: basically we run normal type-check and generate region constraints as normal, but then we take them and translate them into the form that the NLL solver understands. See the NLL module for mode details.
pub fn take_region_var_origins(&self) -> VarOrigins
[src]
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
Takes ownership of the list of variable regions. This implies
that all the region constriants have already been taken, and
hence that resolve_regions_and_report_errors
can never be
called. This is used only during NLL processing to "hand off" ownership
of the set of region vairables into the NLL region context.
pub fn ty_to_string(&self, t: Ty<'tcx>) -> String
[src]
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
pub fn tys_to_string(&self, ts: &[Ty<'tcx>]) -> String
[src]
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
pub fn trait_ref_to_string(&self, t: &TraitRef<'tcx>) -> String
[src]
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
pub fn shallow_resolve(&self, typ: Ty<'tcx>) -> Ty<'tcx>
[src]
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
pub fn resolve_type_vars_if_possible<T>(&self, value: &T) -> T where
T: TypeFoldable<'tcx>,
[src]
T: TypeFoldable<'tcx>,
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
Where possible, replaces type/int/float variables in
value
with their final value. Note that region variables
are unaffected. If a type variable has not been unified, it
is left as is. This is an idempotent operation that does
not affect inference state in any way and so you can do it
at will.
pub fn any_unresolved_type_vars<T>(&self, value: &T) -> bool where
T: TypeFoldable<'tcx>,
[src]
T: TypeFoldable<'tcx>,
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
Returns true if T
contains unresolved type variables. In the
process of visiting T
, this will resolve (where possible)
type variables in T
, but it never constructs the final,
resolved type, so it's more efficient than
resolve_type_vars_if_possible()
.
pub fn resolve_type_and_region_vars_if_possible<T>(&self, value: &T) -> T where
T: TypeFoldable<'tcx>,
[src]
T: TypeFoldable<'tcx>,
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
pub fn fully_resolve<T: TypeFoldable<'tcx>>(&self, value: &T) -> FixupResult<T>
[src]
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
Attempts to resolve all type/region variables in
value
. Region inference must have been run already (e.g.,
by calling resolve_regions_and_report_errors
). If some
variable was never unified, an Err
results.
This method is idempotent, but it not typically not invoked except during the writeback phase.
pub fn type_error_struct_with_diag<M>(
&self,
sp: Span,
mk_diag: M,
actual_ty: Ty<'tcx>
) -> DiagnosticBuilder<'tcx> where
M: FnOnce(String) -> DiagnosticBuilder<'tcx>,
[src]
&self,
sp: Span,
mk_diag: M,
actual_ty: Ty<'tcx>
) -> DiagnosticBuilder<'tcx> where
M: FnOnce(String) -> DiagnosticBuilder<'tcx>,
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
pub fn report_mismatched_types(
&self,
cause: &ObligationCause<'tcx>,
expected: Ty<'tcx>,
actual: Ty<'tcx>,
err: TypeError<'tcx>
) -> DiagnosticBuilder<'tcx>
[src]
&self,
cause: &ObligationCause<'tcx>,
expected: Ty<'tcx>,
actual: Ty<'tcx>,
err: TypeError<'tcx>
) -> DiagnosticBuilder<'tcx>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
pub fn report_conflicting_default_types(
&self,
span: Span,
body_id: NodeId,
expected: Default<'tcx>,
actual: Default<'tcx>
)
[src]
&self,
span: Span,
body_id: NodeId,
expected: Default<'tcx>,
actual: Default<'tcx>
)
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
pub fn replace_late_bound_regions_with_fresh_var<T>(
&self,
span: Span,
lbrct: LateBoundRegionConversionTime,
value: &Binder<T>
) -> (T, BTreeMap<BoundRegion, Region<'tcx>>) where
T: TypeFoldable<'tcx>,
[src]
&self,
span: Span,
lbrct: LateBoundRegionConversionTime,
value: &Binder<T>
) -> (T, BTreeMap<BoundRegion, Region<'tcx>>) where
T: TypeFoldable<'tcx>,
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
pub fn match_poly_projection_predicate(
&self,
cause: ObligationCause<'tcx>,
param_env: ParamEnv<'tcx>,
match_a: PolyProjectionPredicate<'tcx>,
match_b: TraitRef<'tcx>
) -> InferResult<'tcx, HrMatchResult<Ty<'tcx>>>
[src]
&self,
cause: ObligationCause<'tcx>,
param_env: ParamEnv<'tcx>,
match_a: PolyProjectionPredicate<'tcx>,
match_b: TraitRef<'tcx>
) -> InferResult<'tcx, HrMatchResult<Ty<'tcx>>>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
Given a higher-ranked projection predicate like:
for<'a> <T as Fn<&'a u32>>::Output = &'a u32
and a target trait-ref like:
<T as Fn<&'x u32>>
find a substitution S
for the higher-ranked regions (here,
['a => 'x]
) such that the predicate matches the trait-ref,
and then return the value (here, &'a u32
) but with the
substitution applied (hence, &'x u32
).
See higher_ranked_match
in higher_ranked/mod.rs
for more
details.
pub fn verify_generic_bound(
&self,
origin: SubregionOrigin<'tcx>,
kind: GenericKind<'tcx>,
a: Region<'tcx>,
bound: VerifyBound<'tcx>
)
[src]
&self,
origin: SubregionOrigin<'tcx>,
kind: GenericKind<'tcx>,
a: Region<'tcx>,
bound: VerifyBound<'tcx>
)
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
See verify_generic_bound
method in region_constraints
pub fn type_moves_by_default(
&self,
param_env: ParamEnv<'tcx>,
ty: Ty<'tcx>,
span: Span
) -> bool
[src]
&self,
param_env: ParamEnv<'tcx>,
ty: Ty<'tcx>,
span: Span
) -> bool
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
pub fn closure_kind(
&self,
closure_def_id: DefId,
closure_substs: ClosureSubsts<'tcx>
) -> Option<ClosureKind>
[src]
&self,
closure_def_id: DefId,
closure_substs: ClosureSubsts<'tcx>
) -> Option<ClosureKind>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
Obtains the latest type of the given closure; this may be a
closure in the current function, in which case its
ClosureKind
may not yet be known.
pub fn closure_sig(
&self,
def_id: DefId,
substs: ClosureSubsts<'tcx>
) -> PolyFnSig<'tcx>
[src]
&self,
def_id: DefId,
substs: ClosureSubsts<'tcx>
) -> PolyFnSig<'tcx>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
Obtain the signature of a closure. For closures, unlike
tcx.fn_sig(def_id)
, this method will work during the
type-checking of the enclosing function and return the closure
signature in its partially inferred state.
pub fn partially_normalize_associated_types_in<T>(
&self,
span: Span,
body_id: NodeId,
param_env: ParamEnv<'tcx>,
value: &T
) -> InferOk<'tcx, T> where
T: TypeFoldable<'tcx>,
[src]
&self,
span: Span,
body_id: NodeId,
param_env: ParamEnv<'tcx>,
value: &T
) -> InferOk<'tcx, T> where
T: TypeFoldable<'tcx>,
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
Normalizes associated types in value
, potentially returning
new obligations that must further be processed.
impl<'a, 'gcx, 'tcx> InferCtxt<'a, 'gcx, 'tcx>
[src]
pub fn report_fulfillment_errors(
&self,
errors: &Vec<FulfillmentError<'tcx>>,
body_id: Option<BodyId>
)
[src]
&self,
errors: &Vec<FulfillmentError<'tcx>>,
body_id: Option<BodyId>
)
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
pub fn report_overflow_error<T>(
&self,
obligation: &Obligation<'tcx, T>,
suggest_increasing_limit: bool
) -> ! where
T: Display + TypeFoldable<'tcx>,
[src]
&self,
obligation: &Obligation<'tcx, T>,
suggest_increasing_limit: bool
) -> ! where
T: Display + TypeFoldable<'tcx>,
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
Reports that an overflow has occurred and halts compilation. We halt compilation unconditionally because it is important that overflows never be masked -- they basically represent computations whose result could not be truly determined and thus we can't say if the program type checks or not -- and they are unusual occurrences in any case.
pub fn report_overflow_error_cycle(
&self,
cycle: &[PredicateObligation<'tcx>]
) -> !
[src]
&self,
cycle: &[PredicateObligation<'tcx>]
) -> !
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
Reports that a cycle was detected which led to overflow and halts
compilation. This is equivalent to report_overflow_error
except
that we can give a more helpful error message (and, in particular,
we do not suggest increasing the overflow limit, which is not
going to help).
pub fn report_extra_impl_obligation(
&self,
error_span: Span,
item_name: Name,
_impl_item_def_id: DefId,
trait_item_def_id: DefId,
requirement: &Display
) -> DiagnosticBuilder<'tcx>
[src]
&self,
error_span: Span,
item_name: Name,
_impl_item_def_id: DefId,
trait_item_def_id: DefId,
requirement: &Display
) -> DiagnosticBuilder<'tcx>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
pub fn report_selection_error(
&self,
obligation: &PredicateObligation<'tcx>,
error: &SelectionError<'tcx>
)
[src]
&self,
obligation: &PredicateObligation<'tcx>,
error: &SelectionError<'tcx>
)
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?