Expand description
The one place that decides whether a parameter must carry a type.
A parameter with no annotation used to mean any, which switches type
checking off in both directions: the body may reach for any member, and
callers may pass anything. Nothing recovers that type later, so the
declaration is a hole rather than a gradual step.
Every consumer of that judgement reads it here. The type checker turns a
hit into HARN-TYP-028, and the harn fix annotation repair walks the
same list to decide which sites it must fill in. A second predicate
elsewhere would let the error and the migration disagree about what needs
a type, so there is exactly one.
Structs§
- Unannotated
Param - One declared parameter that the rule requires an annotation for.
Enums§
- Declaration
Kind - The declaration form that owns a parameter list.
Functions§
- annotation_
insert_ offset - Byte offset where
: Typebelongs for this parameter, orNonewhen the span does not contain the parameter name (a synthetic parameter, or a span that does not line up withsource). - help
- The repair sentence for one hit.
- message
- The diagnostic sentence for one hit. Shared so the checker and any other renderer word the rule identically.
- requires_
annotation - Whether this parameter must carry an explicit type.
- unannotated_
params - Collect the same list
walk_unannotated_paramsvisits. - walk_
unannotated_ params - Visit every parameter in
programthat the rule requires a type for, including declarations nested inside another body.