rust/compiler/rustc_lint/src
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
..
nonstandard_style mv compiler to compiler/ 2020-08-30 18:45:07 +03:00
array_into_iter.rs errors: span_suggestion takes impl ToString 2022-04-29 02:05:20 +01:00
builtin.rs Auto merge of #95562 - lcnr:attr-no-encode, r=davidtwco 2022-05-12 12:48:30 +00:00
context.rs errors: span_suggestion takes impl ToString 2022-04-29 02:05:20 +01:00
early.rs ast: Introduce some traits to get AST node properties generically 2022-05-11 12:43:27 +03:00
enum_intrinsics_non_enums.rs initial revert 2022-01-15 01:16:55 +00:00
expect.rs Move lint expectation checking into a separate query (RFC 2383) 2022-05-08 14:37:14 +02:00
hidden_unicode_codepoints.rs Remove unnecessary sigils around Symbol::as_str() calls. 2021-12-15 17:32:14 +11:00
internal.rs Improve AdtDef interning. 2022-03-11 13:31:24 +11:00
late.rs Move lint expectation checking into a separate query (RFC 2383) 2022-05-08 14:37:14 +02:00
levels.rs Move lint expectation checking into a separate query (RFC 2383) 2022-05-08 14:37:14 +02:00
lib.rs Auto merge of #96150 - est31:unused_macro_rules, r=petrochenkov 2022-05-12 00:08:08 +00:00
methods.rs Improve AdtDef interning. 2022-03-11 13:31:24 +11:00
non_ascii_idents.rs rustc_error: make ErrorReported impossible to construct 2022-03-16 10:35:24 -05:00
non_fmt_panic.rs Make rustc_parse_format compile on stable 2022-05-03 11:26:58 +02:00
nonstandard_style.rs Stop visiting visibility. 2022-04-23 09:53:45 +02:00
noop_method_call.rs Spellchecking compiler comments 2022-03-30 15:14:15 -04:00
pass_by_value.rs Improve AdtDef interning. 2022-03-11 13:31:24 +11:00
passes.rs Do not pass hir::Crate to lints. 2021-09-30 17:39:54 +02:00
redundant_semicolon.rs Lint on redundant trailing semicolon after item 2020-12-29 16:30:02 -05:00
tests.rs Update to last upstream version 2021-07-08 17:14:28 +02:00
traits.rs Rename ~const Drop to ~const Destruct 2022-03-21 17:04:03 +11:00
types.rs only_local: always check for misuse 2022-05-10 12:07:35 +02:00
unused.rs only_local: always check for misuse 2022-05-10 12:07:35 +02:00