Module rustc_trait_selection::error_reporting::traits::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 suggestingparam: ?Sized
would be a valid constraint. - Collect the spans that we see the generic param
param_did
- 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.
- Collect all the paths that reference
Self
. Used to suggest replacing associated types with an explicit type inwhere
clauses.
Enumsยง
Traitsยง
Functionsยง
- hint_missing_borrow ๐Add a hint to add a missing borrow or remove an unnecessary one.
- On
impl
evaluation cycles, look forSelf::AssocTy
restrictions inwhere
clauses, explain they are not allowed and if possible suggest alternatives. - predicate_constraint ๐
- Type parameter needs more bounds. The trivial case is
T
where T: Bound
, but it can also be animpl Trait
param that needs to be decomposed to a type param for cleaner code.