rust/compiler/rustc_resolve/src
bors dff1edf919 Auto merge of #79519 - cjgillot:noattr, r=wesleywiser
Store HIR attributes in a side table

Same idea as #72015 but for attributes.
The objective is to reduce incr-comp invalidations due to modified attributes.
Notably, those due to modified doc comments.

Implementation:
- collect attributes during AST->HIR lowering, in `LocalDefId -> ItemLocalId -> &[Attributes]` nested tables;
- access the attributes through a `hir_owner_attrs` query;
- local refactorings to use this access;
- remove `attrs` from HIR data structures one-by-one.

Change in behaviour:
- the HIR visitor traverses all attributes at once instead of parent-by-parent;
- attribute arrays are sometimes duplicated: for statements and variant constructors;
- as a consequence, attributes are marked as used after unused-attribute lint emission to avoid duplicate lints.

~~Current bug: the lint level is not correctly applied in `std::backtrace_rs`, triggering an unused attribute warning on `#![no_std]`. I welcome suggestions.~~
2021-03-10 08:40:51 +00:00
..
late Auto merge of #79519 - cjgillot:noattr, r=wesleywiser 2021-03-10 08:40:51 +00:00
build_reduced_graph.rs Support pub on macro_rules 2021-02-19 13:52:57 -03:00
check_unused.rs
def_collector.rs
diagnostics.rs Rollup merge of #81680 - camsteffen:primty, r=oli-obk 2021-02-06 17:01:45 +01:00
imports.rs resolve: Reduce scope of pub_use_of_private_extern_crate deprecation lint 2021-02-11 10:15:29 +03:00
late.rs Address review comments 2021-02-25 00:09:33 +00:00
lib.rs diagnostics: Don't mention external crates when hitting import errors on crate imports in 2018 2021-03-07 15:15:19 -08:00
macros.rs Feature gate macro attributes in #[derive] output 2021-02-07 20:08:45 +03:00