1
Fork 0

allowed_through_unstable_modules: support showing a deprecation message when the unstable module name is used

This commit is contained in:
Ralf Jung 2025-01-01 19:09:01 +01:00
parent 561a097b65
commit cf0ab86251
12 changed files with 146 additions and 59 deletions

View file

@ -623,7 +623,7 @@ pub const BUILTIN_ATTRIBUTES: &[BuiltinAttribute] = &[
EncodeCrossCrate::No, "allow_internal_unsafe side-steps the unsafe_code lint",
),
rustc_attr!(
rustc_allowed_through_unstable_modules, Normal, template!(Word),
rustc_allowed_through_unstable_modules, Normal, template!(Word, NameValueStr: "deprecation message"),
WarnFollowing, EncodeCrossCrate::No,
"rustc_allowed_through_unstable_modules special cases accidental stabilizations of stable items \
through unstable paths"