pub enum Followed {
Type(Type),
Exhausted,
NotAnAlias,
}Expand description
What following an imported name across the file boundary, as a type alias, found.
A plain Option<Type> cannot tell two failure shapes apart, and named_type’s fallback
has to answer them differently: “this name is not an alias at all” keeps its own nominal
identity, exactly as it always has, while “this name is an alias, but the chain following
it was cut by MAX_DEPTH” must answer nothing — see addendum B of task 4.16. The
distinction has to survive an arbitrary number of cross-file hops, because the bound can
be spent several files away from the frame that first asked; every hop threads this enum
rather than collapsing it back to Option until the walk has fully unwound.
Variants§
Type(Type)
The type the alias names.
Exhausted
The name is an alias, but MAX_DEPTH cut the chain before it resolved to a type.
NotAnAlias
The name does not name a type alias at all.