rustc_trait_selection::error_reporting::traits

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.