rust/compiler/rustc_hir/src
Dylan DPC ac1d26bcd3
Rollup merge of #80920 - rylev:check_attr-refactor, r=davidtwco
Visit more targets when validating attributes

This begins to address #80048, allowing for additional validation of attributes.

There are more refactorings that can be done, though I think they should be tackled in additional PRs:
* ICE when a builtin attribute is encountered that is not checked
* Move some of the attr checking done `ast_validation` into `rustc_passes`
  * note that this requires a bit of additional refactoring, especially of extern items which currently parse attributes (and thus are a part of the AST) but do not possess attributes in their HIR representation.
* Rename `Target` to `AttributeTarget`
* Refactor attribute validation completely to go through `Visitor::visit_attribute`.
  * This would require at a minimum passing `Target` into this method which might be too big of a refactoring to be worth it.
  * It's also likely not possible to do all the validation this way as some validation requires knowing what other attributes a target has.

r? `@davidtwco`
2021-02-14 16:54:42 +01:00
..
arena.rs Retain assembly operands span when lowering AST to HIR 2020-12-06 20:48:08 +01:00
def.rs resolve: Reject ambiguity built-in attr vs different built-in attr 2021-01-17 01:48:17 +03:00
definitions.rs Iterate DefId to encode spans. 2021-01-23 13:44:02 +01:00
hir_id.rs Remove unused code from rustc_hir 2020-10-14 04:14:32 +02:00
hir.rs Rename HIR UnOp variants 2021-02-09 11:39:20 +03:00
intravisit.rs add generic args to hir::TypeBinding 2021-02-04 16:20:56 +01:00
itemlikevisit.rs Store ForeignItem in a side table. 2020-11-26 21:29:27 +01:00
lang_items.rs Enforce that query results implement Debug 2021-01-16 17:53:02 -05:00
lib.rs Stabilize feature(iterator_fold_self): Iterator::reduce 2021-02-04 11:31:11 +01:00
pat_util.rs Fix even more clippy warnings 2020-10-30 10:13:39 -04:00
stable_hash_impls.rs Store ForeignItem in a side table. 2020-11-26 21:29:27 +01:00
target.rs Visit more targets when checking attrs 2021-02-09 21:54:46 +01:00
weak_lang_items.rs This should address issue 81294. 2021-01-25 14:37:27 -05:00