rust/compiler/rustc_passes/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
..
liveness
check_attr.rs Visit more targets when checking attrs 2021-02-09 21:54:46 +01:00
check_const.rs Add loop head span to hir 2021-01-21 21:41:46 -08:00
dead.rs Add missing brace 2021-01-28 17:49:40 +01:00
diagnostic_items.rs
entry.rs
hir_id_validator.rs
hir_stats.rs
intrinsicck.rs Use ty::{IntTy,UintTy,FloatTy} in rustc 2021-01-18 21:09:30 +01:00
lang_items.rs
layout_test.rs
lib_features.rs
lib.rs
liveness.rs Add loop head span to hir 2021-01-21 21:41:46 -08:00
loops.rs Do not suggest using a break label when one is already present 2021-01-21 21:43:29 -08:00
naked_functions.rs Reintroduce hir::ExprKind::If 2021-01-07 18:54:12 -03:00
reachable.rs Allow to query the HIR crate node. 2021-01-23 13:58:09 +01:00
region.rs Rename HIR UnOp variants 2021-02-09 11:39:20 +03:00
stability.rs Bump rustfmt version 2021-02-02 09:09:52 -05:00
upvars.rs
weak_lang_items.rs This should address issue 81294. 2021-01-25 14:37:27 -05:00