about summary refs log tree commit diff
path: root/compiler/rustc_interface/src
diff options
context:
space:
mode:
authorMatthias Krüger <matthias.krueger@famsik.de>2024-03-25 17:05:35 +0100
committerGitHub <noreply@github.com>2024-03-25 17:05:35 +0100
commit10daf8aa9918d51655f3d17674abaaddaaead44e (patch)
treeb82fee92202ef9b03485341307159b9da7bfac8c /compiler/rustc_interface/src
parent657dd0b7971ccb4e1f55a93061bf36d81d82148a (diff)
parent2cb53473d92251a6ba2538fe034ab1ad62224ed1 (diff)
downloadrust-10daf8aa9918d51655f3d17674abaaddaaead44e.tar.gz
rust-10daf8aa9918d51655f3d17674abaaddaaead44e.zip
Rollup merge of #123001 - Alexendoo:check-attributes, r=oli-obk
Rename `{enter,exit}_lint_attrs` to `check_attributes{,_post}`

Several places in Clippy want to check all the attributes of a node, we end up using `hir().attrs()` from several different `check_` functions (e.g. [in our doc lints](https://github.com/rust-lang/rust-clippy/blob/95c62ffae9bbce793f68a6f1473e3fc24af19bdd/clippy_lints/src/doc/mod.rs#L396)) but this is error prone, we recently found that doc lints weren't triggering on struct fields for example

I went to add a `check_attributes` function but realised `enter_lint_attrs` is already this, the rename is to encourage their use

Also removes `LateContextAndPass::visit_attribute` since it's unused - `visit_attribute` for HIR visitors is only called by `hir().walk_attributes()` which lint passes do not use
Diffstat (limited to 'compiler/rustc_interface/src')
0 files changed, 0 insertions, 0 deletions