rust/compiler
bors 481db40311 Auto merge of #95562 - lcnr:attr-no-encode, r=davidtwco
don't encode only locally used attrs

Part of https://github.com/rust-lang/compiler-team/issues/505.

We now filter builtin attributes before encoding them in the crate metadata in case they should only be used in the local crate. To prevent accidental misuse `get_attrs` now requires the caller to state which attribute they are interested in. For places where that isn't trivially possible, I've added a method `fn get_attrs_unchecked` which I intend to remove in a followup PR.

After this pull request landed, we can then slowly move all attributes to only be used in the local crate while being certain that we don't accidentally try to access them from extern crates.

cc https://github.com/rust-lang/rust/pull/94963#issuecomment-1082924289
2022-05-12 12:48:30 +00:00
..
rustc
rustc_apfloat
rustc_arena
rustc_ast ast: Introduce some traits to get AST node properties generically 2022-05-11 12:43:27 +03:00
rustc_ast_lowering Auto merge of #96770 - flip1995:fix-trait-type-in-bounds, r=cjgillot 2022-05-08 14:10:12 +00:00
rustc_ast_passes Feature-gate do yeet inside cfgs too 2022-04-30 18:10:01 -07:00
rustc_ast_pretty ast: Introduce some traits to get AST node properties generically 2022-05-11 12:43:27 +03:00
rustc_attr only_local: always check for misuse 2022-05-10 12:07:35 +02:00
rustc_borrowck Auto merge of #96736 - oli-obk:tait_missing_wf_check, r=davidtwco 2022-05-10 13:39:43 +00:00
rustc_builtin_macros ast: Introduce some traits to get AST node properties generically 2022-05-11 12:43:27 +03:00
rustc_codegen_cranelift Rename unsigned_offset_from to sub_ptr 2022-05-11 17:16:25 -07:00
rustc_codegen_gcc Merge new_metadata into codegen_allocator 2022-04-30 21:20:08 +02:00
rustc_codegen_llvm Auto merge of #95562 - lcnr:attr-no-encode, r=davidtwco 2022-05-12 12:48:30 +00:00
rustc_codegen_ssa Add unsigned_offset_from on pointers 2022-05-11 17:16:25 -07:00
rustc_const_eval Auto merge of #95562 - lcnr:attr-no-encode, r=davidtwco 2022-05-12 12:48:30 +00:00
rustc_data_structures Auto merge of #96094 - Elliot-Roberts:fix_doctests, r=compiler-errors 2022-05-07 06:30:29 +00:00
rustc_driver
rustc_error_codes Auto merge of #95960 - jhpratt:remove-rustc_deprecated, r=compiler-errors 2022-05-09 04:47:30 +00:00
rustc_error_messages typeck: port "no resolve overridden impl substs" 2022-05-12 07:21:51 +01:00
rustc_errors errors: set_arg takes IntoDiagnosticArg 2022-05-12 07:21:51 +01:00
rustc_expand Auto merge of #96150 - est31:unused_macro_rules, r=petrochenkov 2022-05-12 00:08:08 +00:00
rustc_feature change some attrs to only_local 2022-05-10 12:07:36 +02:00
rustc_fs_util
rustc_graphviz
rustc_hir review 2022-05-09 18:40:18 +02:00
rustc_hir_pretty Store all generic bounds as where predicates. 2022-04-30 13:55:13 +02:00
rustc_incremental only_local: always check for misuse 2022-05-10 12:07:35 +02:00
rustc_index Add element iterator for ChunkedBitSet 2022-04-30 16:40:49 +02:00
rustc_infer stop suggesting non-existing fully qualified paths 2022-05-11 19:18:02 +09:00
rustc_interface only_local: always check for misuse 2022-05-10 12:07:35 +02:00
rustc_lexer
rustc_lint Auto merge of #95562 - lcnr:attr-no-encode, r=davidtwco 2022-05-12 12:48:30 +00:00
rustc_lint_defs Auto merge of #96150 - est31:unused_macro_rules, r=petrochenkov 2022-05-12 00:08:08 +00:00
rustc_llvm RustWrapper: explicitly don't handle DXILPointerTyID 2022-04-28 13:53:52 -04:00
rustc_log rustc_log: add env var to set verbose entry/exit behavior 2022-05-11 09:14:31 +02:00
rustc_macros errors: set_arg takes IntoDiagnosticArg 2022-05-12 07:21:51 +01:00
rustc_metadata only_local: always check for misuse 2022-05-10 12:07:35 +02:00
rustc_middle Auto merge of #95562 - lcnr:attr-no-encode, r=davidtwco 2022-05-12 12:48:30 +00:00
rustc_mir_build Auto merge of #95562 - lcnr:attr-no-encode, r=davidtwco 2022-05-12 12:48:30 +00:00
rustc_mir_dataflow only_local: always check for misuse 2022-05-10 12:07:35 +02:00
rustc_mir_transform simplify length count 2022-05-10 20:42:45 +02:00
rustc_monomorphize only_local: always check for misuse 2022-05-10 12:07:35 +02:00
rustc_parse ast: Introduce some traits to get AST node properties generically 2022-05-11 12:43:27 +03:00
rustc_parse_format Make rustc_parse_format compile on stable 2022-05-03 11:26:58 +02:00
rustc_passes fix typo 2022-05-10 12:07:36 +02:00
rustc_plugin_impl
rustc_privacy rustc: Panic by default in DefIdTree::parent 2022-05-02 01:56:50 +03:00
rustc_query_impl Move lint expectation checking into a separate query (RFC 2383) 2022-05-08 14:37:14 +02:00
rustc_query_system Auto merge of #96094 - Elliot-Roberts:fix_doctests, r=compiler-errors 2022-05-07 06:30:29 +00:00
rustc_resolve Auto merge of #95562 - lcnr:attr-no-encode, r=davidtwco 2022-05-12 12:48:30 +00:00
rustc_save_analysis rustc: Panic by default in DefIdTree::parent 2022-05-02 01:56:50 +03:00
rustc_serialize
rustc_session sess: add create_{err,warning} 2022-05-06 03:44:41 +01:00
rustc_span Add unsigned_offset_from on pointers 2022-05-11 17:16:25 -07:00
rustc_symbol_mangling only_local: always check for misuse 2022-05-10 12:07:35 +02:00
rustc_target make Size and Align debug-printing a bit more compact 2022-05-06 10:57:03 +02:00
rustc_trait_selection Auto merge of #95562 - lcnr:attr-no-encode, r=davidtwco 2022-05-12 12:48:30 +00:00
rustc_traits
rustc_ty_utils Gracefully fail to resolve associated items instead of delay_span_bug. 2022-05-11 08:28:02 +02:00
rustc_type_ir fix most compiler/ doctests 2022-05-02 17:40:30 -07:00
rustc_typeck Auto merge of #95562 - lcnr:attr-no-encode, r=davidtwco 2022-05-12 12:48:30 +00:00