1
Fork 0

Eliminate UbCheck for non-standard libraries

This commit is contained in:
DianQK 2024-03-10 16:29:39 +08:00
parent 10a7aa14fe
commit 47ed73a7b5
No known key found for this signature in database
GPG key ID: 46BDB1AC96C48912
14 changed files with 118 additions and 45 deletions

View file

@ -821,6 +821,10 @@ pub const BUILTIN_ATTRIBUTES: &[BuiltinAttribute] = &[
rustc_allow_incoherent_impl, AttributeType::Normal, template!(Word), ErrorFollowing, EncodeCrossCrate::No,
"#[rustc_allow_incoherent_impl] has to be added to all impl items of an incoherent inherent impl."
),
rustc_attr!(
rustc_preserve_ub_checks, AttributeType::CrateLevel, template!(Word), ErrorFollowing, EncodeCrossCrate::No,
"`#![rustc_preserve_ub_checks]` prevents the designated crate from evaluating whether UB checks are enabled when optimizing MIR",
),
rustc_attr!(
rustc_deny_explicit_impl,
AttributeType::Normal,