rust/compiler
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
..
rustc Rollup merge of #82642 - sfackler:jemalloc-zone, r=pnkfelix 2021-03-08 13:13:22 +01:00
rustc_apfloat
rustc_arena
rustc_ast Rollup merge of #82841 - hvdijk:x32, r=joshtriplett 2021-03-09 09:05:24 +00:00
rustc_ast_lowering Use BTreeMap to store attributes. 2021-03-09 19:28:01 +01:00
rustc_ast_passes Add help for matches for if let in arm guard 2021-03-07 14:44:21 -08:00
rustc_ast_pretty
rustc_attr Auto merge of #71481 - estebank:inherit-stability, r=nikomatsakis 2021-03-05 05:28:07 +00:00
rustc_builtin_macros Rollup merge of #82682 - petrochenkov:cfgeval, r=Aaron1011 2021-03-08 13:13:23 +01:00
rustc_codegen_cranelift Clean up todos 2021-03-09 19:31:31 +00:00
rustc_codegen_llvm Auto merge of #82285 - nhwn:nonzero-debug, r=nagisa 2021-03-07 20:23:23 +00:00
rustc_codegen_ssa Auto merge of #79519 - cjgillot:noattr, r=wesleywiser 2021-03-10 08:40:51 +00:00
rustc_data_structures Auto merge of #81635 - michaelwoerister:structured_def_path_hash, r=pnkfelix 2021-03-07 23:45:57 +00:00
rustc_driver Bump tracing-tree dependency 2021-03-09 16:44:51 +00:00
rustc_error_codes Rollup merge of #80527 - jyn514:rustdoc-lints, r=GuillaumeGomez 2021-03-04 20:01:01 +09:00
rustc_errors Change x64 size checks to not apply to x32. 2021-03-06 16:02:48 +00:00
rustc_expand Rollup merge of #82682 - petrochenkov:cfgeval, r=Aaron1011 2021-03-08 13:13:23 +01:00
rustc_feature Rollup merge of #79208 - LeSeulArtichaut:stable-unsafe_op_in_unsafe_fn, r=nikomatsakis 2021-03-10 08:01:25 +09:00
rustc_fs_util
rustc_graphviz
rustc_hir Use BTreeMap to store attributes. 2021-03-09 19:28:01 +01:00
rustc_hir_pretty Use BTreeMap to store attributes. 2021-03-09 19:28:01 +01:00
rustc_incremental Deduplicate unchecked_attrs errors. 2021-03-09 19:28:00 +01:00
rustc_index Remove useless Clone bound in IndexVec. 2021-03-09 18:51:36 +01:00
rustc_infer Change x64 size checks to not apply to x32. 2021-03-06 16:02:48 +00:00
rustc_interface Remove hir::Item::attrs. 2021-03-09 19:27:50 +01:00
rustc_lexer
rustc_lint Track HirId when visiting attributes. 2021-03-09 19:27:59 +01:00
rustc_lint_defs Rollup merge of #79208 - LeSeulArtichaut:stable-unsafe_op_in_unsafe_fn, r=nikomatsakis 2021-03-10 08:01:25 +09:00
rustc_llvm Schedule ThinLTOBuffer passes again after sanitizer passes 2021-03-03 20:48:37 +01:00
rustc_macros
rustc_metadata Remove hir::Item::attrs. 2021-03-09 19:27:50 +01:00
rustc_middle Auto merge of #79519 - cjgillot:noattr, r=wesleywiser 2021-03-10 08:40:51 +00:00
rustc_mir Rollup merge of #82849 - camsteffen:option-get-or-default, r=joshtriplett 2021-03-10 08:01:32 +09:00
rustc_mir_build Do not store attrs in FnKind. 2021-03-09 19:09:33 +01:00
rustc_parse Rollup merge of #82048 - mark-i-m:or-pat-type-ascription, r=petrochenkov 2021-03-09 09:05:20 +00:00
rustc_parse_format
rustc_passes Track HirId when visiting attributes. 2021-03-09 19:27:59 +01:00
rustc_plugin_impl Remove hir::Item::attrs. 2021-03-09 19:27:50 +01:00
rustc_privacy Remove hir::MacroDef::attrs. 2021-03-09 19:09:36 +01:00
rustc_query_impl
rustc_query_system
rustc_resolve Auto merge of #79519 - cjgillot:noattr, r=wesleywiser 2021-03-10 08:40:51 +00:00
rustc_save_analysis Remove hir::Item::attrs. 2021-03-09 19:27:50 +01:00
rustc_serialize
rustc_session Rollup merge of #82415 - petrochenkov:modin3, r=davidtwco 2021-03-08 13:13:19 +01:00
rustc_span Rollup merge of #82682 - petrochenkov:cfgeval, r=Aaron1011 2021-03-08 13:13:23 +01:00
rustc_symbol_mangling
rustc_target Rollup merge of #82733 - Yn0ga:master, r=estebank 2021-03-10 08:01:29 +09:00
rustc_trait_selection Rollup merge of #82841 - hvdijk:x32, r=joshtriplett 2021-03-09 09:05:24 +00:00
rustc_traits Fix tests 2021-03-03 11:22:44 +01:00
rustc_ty_utils
rustc_type_ir
rustc_typeck Auto merge of #79519 - cjgillot:noattr, r=wesleywiser 2021-03-10 08:40:51 +00:00