@@ -6,7 +6,9 @@ use std::{fmt, iter};
66
77use arrayvec:: ArrayVec ;
88use rustc_abi:: { ExternAbi , VariantIdx } ;
9- use rustc_attr_parsing:: { ConstStability , Deprecation , Stability , StableSince } ;
9+ use rustc_attr_parsing:: {
10+ AllowedThroughUnstableModules , ConstStability , Deprecation , Stability , StableSince ,
11+ } ;
1012use rustc_data_structures:: fx:: { FxHashSet , FxIndexMap , FxIndexSet } ;
1113use rustc_hir:: def:: { CtorKind , DefKind , Res } ;
1214use rustc_hir:: def_id:: { CrateNum , DefId , LOCAL_CRATE , LocalDefId } ;
@@ -406,15 +408,19 @@ impl Item {
406408 // were never supposed to work at all.
407409 let stab = self . stability ( tcx) ?;
408410 if let rustc_attr_parsing:: StabilityLevel :: Stable {
409- allowed_through_unstable_modules : Some ( _ ) ,
411+ allowed_through_unstable_modules : Some ( note ) ,
410412 ..
411413 } = stab. level
412414 {
415+ let note = match note {
416+ AllowedThroughUnstableModules :: WithDeprecation ( note) => Some ( note) ,
417+ // FIXME: Would be better to say *something* here about the *path* being
418+ // deprecated rather than the item.
419+ AllowedThroughUnstableModules :: WithoutDeprecation => None ,
420+ } ;
413421 Some ( Deprecation {
414- // FIXME(#131676, #135003): when a note is added to this stability tag,
415- // translate it here
416422 since : rustc_attr_parsing:: DeprecatedSince :: Unspecified ,
417- note : None ,
423+ note,
418424 suggestion : None ,
419425 } )
420426 } else {
0 commit comments