Merge pull request #21244 from ChayimFriedman2/deprecated-safe

fix: `#[rustc_deprecated_safe_2024]` can also come as `#[rustc_deprecated_safe_2024(audit_that = "reason")]`
This commit is contained in:
Chayim Refael Friedman 2025-12-10 20:55:35 +00:00 committed by GitHub
commit 533fac504c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 7 additions and 0 deletions

View file

@ -155,6 +155,9 @@ fn match_attr_flags(attr_flags: &mut AttrFlags, attr: Meta) -> ControlFlow<Infal
"rustc_skip_during_method_dispatch" => {
extract_rustc_skip_during_method_dispatch(attr_flags, tt)
}
"rustc_deprecated_safe_2024" => {
attr_flags.insert(AttrFlags::RUSTC_DEPRECATED_SAFE_2024)
}
_ => {}
},
2 => match path.segments[0].text() {

View file

@ -296,8 +296,12 @@ fn main() {
#[rustc_deprecated_safe_2024]
fn set_var() {}
#[rustc_deprecated_safe_2024(audit_that = "something")]
fn set_var2() {}
fn main() {
set_var();
set_var2();
}
"#,
);