Expand description
--remove-adt-clauses strips trait clauses from type declarations when it’s possible to do so.
Because it’s not possible to recover associated type information when we remove clauses,
we don’t remove clauses if any of them have associated types. For that reason,
this flag is best used with --lift-associated-types.
Every reference to a clause removed in this way is replaced with a TraitRefKind::BuiltinOrAuto { builtin_data: RemovedAdtClause, .. }.
Structs§
Functions§
- build_
removed_ 🔒clause_ placeholder - Build a
BuiltinOrAuto { builtin_data: RemovedAdtClause, .. }kind whoseparent_trait_refsrecursively mirror the trait’s implied clauses (each parent itself aRemovedAdtClauseplaceholder). - has_
assoc_ 🔒types - Compute whether a trait has associated types, even through supertraits.
- untouchable_
adts 🔒 - ADTs that have at least one trait clause pointing at a trait with associated types (transitively). We leave these ADTs entirely untouched.