Module suggestions

Source

Structs§

AwaitsVisitor 🔒
Collect all the awaited expressions within the input expression.
CoroutineData 🔒
FindTypeParam 🔒
Look for type param in an ADT being used only through a reference to confirm that suggesting param: ?Sized would be a valid constraint.
ReplaceImplTraitFolder 🔒
ReplaceImplTraitVisitor 🔒
Collect the spans that we see the generic param param_did
ReturnsVisitor
Collect all the returned expressions within the input expression. Used to point at the return spans when we want to suggest some change to them.
SelfVisitor
Collect all the paths that reference Self. Used to suggest replacing associated types with an explicit type in where clauses.

Enums§

CoroutineInteriorOrUpvar

Traits§

NextTypeParamName
Suggest a new type parameter name for diagnostic purposes.

Functions§

get_deref_type_and_refs 🔒
get_explanation_based_on_obligation 🔒
hint_missing_borrow 🔒
Add a hint to add a missing borrow or remove an unnecessary one.
point_at_assoc_type_restriction 🔒
On impl evaluation cycles, look for Self::AssocTy restrictions in where clauses, explain they are not allowed and if possible suggest alternatives.
predicate_constraint 🔒
suggest_desugaring_async_fn_to_impl_future_in_trait
suggest_restriction
Type parameter needs more bounds. The trivial case is T where T: Bound, but it can also be an impl Trait param that needs to be decomposed to a type param for cleaner code.