diff options
| author | Matthias Krüger <matthias.krueger@famsik.de> | 2025-02-02 18:05:25 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-02-02 18:05:25 +0100 |
| commit | 961bf7ffa68bbba40b24402d2143cb16257d404c (patch) | |
| tree | 6ff486bce581fec66ca4377e1939b6c3ef74c9ca /src | |
| parent | 5bc582763637e5bcd12147ee89be972e814985b8 (diff) | |
| parent | 3320e915757baea34d796feb513e6563c04ad3c3 (diff) | |
| download | rust-961bf7ffa68bbba40b24402d2143cb16257d404c.tar.gz rust-961bf7ffa68bbba40b24402d2143cb16257d404c.zip | |
Rollup merge of #136434 - RalfJung:rustc_allowed_through_unstable_modules-deprecation-required, r=compiler-errors
rustc_allowed_through_unstable_modules: require deprecation message This changes the `#[rustc_allowed_through_unstable_modules]` attribute so that a deprecation message (ideally directing people towards the stable path) is required.
Diffstat (limited to 'src')
| -rw-r--r-- | src/librustdoc/clean/types.rs | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/src/librustdoc/clean/types.rs b/src/librustdoc/clean/types.rs index 6e817af0d6e..a44d74e6df6 100644 --- a/src/librustdoc/clean/types.rs +++ b/src/librustdoc/clean/types.rs @@ -5,9 +5,7 @@ use std::{fmt, iter}; use arrayvec::ArrayVec; use rustc_abi::{ExternAbi, VariantIdx}; -use rustc_attr_parsing::{ - AllowedThroughUnstableModules, ConstStability, Deprecation, Stability, StableSince, -}; +use rustc_attr_parsing::{ConstStability, Deprecation, Stability, StableSince}; use rustc_data_structures::fx::{FxHashSet, FxIndexMap, FxIndexSet}; use rustc_hir::def::{CtorKind, DefKind, Res}; use rustc_hir::def_id::{CrateNum, DefId, LOCAL_CRATE, LocalDefId}; @@ -411,15 +409,9 @@ impl Item { .. } = stab.level { - let note = match note { - AllowedThroughUnstableModules::WithDeprecation(note) => Some(note), - // FIXME: Would be better to say *something* here about the *path* being - // deprecated rather than the item. - AllowedThroughUnstableModules::WithoutDeprecation => None, - }; Some(Deprecation { since: rustc_attr_parsing::DeprecatedSince::Unspecified, - note, + note: Some(note), suggestion: None, }) } else { |
