rustc_allowed_through_unstable_modules: require deprecation message
This commit is contained in:
parent
8239a37f9c
commit
3320e91575
12 changed files with 107 additions and 125 deletions
|
@ -101,16 +101,6 @@ impl PartialConstStability {
|
|||
}
|
||||
}
|
||||
|
||||
#[derive(Encodable, Decodable, PartialEq, Copy, Clone, Debug, Eq, Hash)]
|
||||
#[derive(HashStable_Generic)]
|
||||
pub enum AllowedThroughUnstableModules {
|
||||
/// This does not get a deprecation warning. We still generally would prefer people to use the
|
||||
/// fully stable path, and a warning will likely be emitted in the future.
|
||||
WithoutDeprecation,
|
||||
/// Emit the given deprecation warning.
|
||||
WithDeprecation(Symbol),
|
||||
}
|
||||
|
||||
/// The available stability levels.
|
||||
#[derive(Encodable, Decodable, PartialEq, Copy, Clone, Debug, Eq, Hash)]
|
||||
#[derive(HashStable_Generic)]
|
||||
|
@ -147,8 +137,9 @@ pub enum StabilityLevel {
|
|||
Stable {
|
||||
/// Rust release which stabilized this feature.
|
||||
since: StableSince,
|
||||
/// This is `Some` if this item allowed to be referred to on stable via unstable modules.
|
||||
allowed_through_unstable_modules: Option<AllowedThroughUnstableModules>,
|
||||
/// This is `Some` if this item allowed to be referred to on stable via unstable modules;
|
||||
/// the `Symbol` is the deprecation message printed in that case.
|
||||
allowed_through_unstable_modules: Option<Symbol>,
|
||||
},
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue