rust/compiler/rustc_const_eval/src/transform
bors 481db40311 Auto merge of - 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
..
check_consts only_local: always check for misuse 2022-05-10 12:07:35 +02:00
mod.rs Don't re-export MirPass 2021-11-29 12:58:15 -08:00
promote_consts.rs use Result<(),()> instead of Validity enum 2022-05-09 17:13:30 +08:00
validate.rs Remove PartialOrd/Ord impl for PlaceRef 2022-05-11 16:22:23 -04:00