@@ -6,7 +6,9 @@ use std::{fmt, iter};
6
6
7
7
use arrayvec:: ArrayVec ;
8
8
use 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
+ } ;
10
12
use rustc_data_structures:: fx:: { FxHashSet , FxIndexMap , FxIndexSet } ;
11
13
use rustc_hir:: def:: { CtorKind , DefKind , Res } ;
12
14
use rustc_hir:: def_id:: { CrateNum , DefId , LOCAL_CRATE , LocalDefId } ;
@@ -406,15 +408,19 @@ impl Item {
406
408
// were never supposed to work at all.
407
409
let stab = self . stability ( tcx) ?;
408
410
if let rustc_attr_parsing:: StabilityLevel :: Stable {
409
- allowed_through_unstable_modules : Some ( _ ) ,
411
+ allowed_through_unstable_modules : Some ( note ) ,
410
412
..
411
413
} = stab. level
412
414
{
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
+ } ;
413
421
Some ( Deprecation {
414
- // FIXME(#131676, #135003): when a note is added to this stability tag,
415
- // translate it here
416
422
since : rustc_attr_parsing:: DeprecatedSince :: Unspecified ,
417
- note : None ,
423
+ note,
418
424
suggestion : None ,
419
425
} )
420
426
} else {
0 commit comments