-
Notifications
You must be signed in to change notification settings - Fork 14k
Description
In order for the lint attributes to actually have an effect, we need to change ast::visit and hir::intravisit significantly before even being able to adjust LateLintPass and EarlyLintPass to handle the attributes.
The current schemes for iterating over the pattern of the argument and the type of the argument vary significantly between functions, methods extern functions, closures, .... I'm not sure if they can be unified easily, since extern functions don't allow patterns as arguments, but I think there should be a visit_argument method which all of the sites should call. In case attributes aren't allowed in extern functions, this should be possible, otherwise we'll have to figure out something.
After that, the *LintPass traits need a new check_argument method, too and before invocing said method, a with_lint_attrs call needs to be nested around the check_argument and walk_argument method calls.
Originally posted by @oli-obk in #60669 (comment)