File tree 4 files changed +8
-6
lines changed
4 files changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -737,7 +737,7 @@ pub enum DeprecatedSince {
737
737
Future ,
738
738
/// `feature(staged_api)` is off. Deprecation versions outside the standard
739
739
/// library are allowed to be arbitrary strings, for better or worse.
740
- Symbol ( Symbol ) ,
740
+ NonStandard ( Symbol ) ,
741
741
/// Deprecation version is unspecified but optional.
742
742
Unspecified ,
743
743
/// Failed to parse a deprecation version, or the deprecation version is
@@ -754,7 +754,7 @@ impl Deprecation {
754
754
DeprecatedSince :: RustcVersion ( since) => since <= RustcVersion :: CURRENT ,
755
755
DeprecatedSince :: Future => false ,
756
756
// The `since` field doesn't have semantic purpose without `#![staged_api]`.
757
- DeprecatedSince :: Symbol ( _) => true ,
757
+ DeprecatedSince :: NonStandard ( _) => true ,
758
758
// Assume deprecation is in effect if "since" field is absent or invalid.
759
759
DeprecatedSince :: Unspecified | DeprecatedSince :: Err => true ,
760
760
}
@@ -871,7 +871,7 @@ pub fn find_deprecation(
871
871
if since. as_str ( ) == "TBD" {
872
872
DeprecatedSince :: Future
873
873
} else if !is_rustc {
874
- DeprecatedSince :: Symbol ( since)
874
+ DeprecatedSince :: NonStandard ( since)
875
875
} else if let Some ( version) = parse_version ( since) {
876
876
DeprecatedSince :: RustcVersion ( version)
877
877
} else {
Original file line number Diff line number Diff line change @@ -162,7 +162,9 @@ fn deprecation_message(
162
162
DeprecatedSince :: Future => {
163
163
format ! ( "use of {kind} `{path}` that will be deprecated in a future Rust version" )
164
164
}
165
- DeprecatedSince :: Symbol ( _) | DeprecatedSince :: Unspecified | DeprecatedSince :: Err => {
165
+ DeprecatedSince :: NonStandard ( _)
166
+ | DeprecatedSince :: Unspecified
167
+ | DeprecatedSince :: Err => {
166
168
unreachable ! ( "this deprecation is always in effect; {since:?}" )
167
169
}
168
170
}
Original file line number Diff line number Diff line change @@ -628,7 +628,7 @@ fn short_item_info(
628
628
}
629
629
}
630
630
DeprecatedSince :: Future => String :: from ( "Deprecating in a future Rust version" ) ,
631
- DeprecatedSince :: Symbol ( since) => {
631
+ DeprecatedSince :: NonStandard ( since) => {
632
632
format ! ( "Deprecated since {}" , Escape ( since. as_str( ) ) )
633
633
}
634
634
DeprecatedSince :: Unspecified | DeprecatedSince :: Err => String :: from ( "Deprecated" ) ,
Original file line number Diff line number Diff line change @@ -143,7 +143,7 @@ pub(crate) fn from_deprecation(deprecation: rustc_attr::Deprecation) -> Deprecat
143
143
let since = match since {
144
144
DeprecatedSince :: RustcVersion ( version) => Some ( version. to_string ( ) ) ,
145
145
DeprecatedSince :: Future => Some ( "TBD" . to_owned ( ) ) ,
146
- DeprecatedSince :: Symbol ( since) => Some ( since. to_string ( ) ) ,
146
+ DeprecatedSince :: NonStandard ( since) => Some ( since. to_string ( ) ) ,
147
147
DeprecatedSince :: Unspecified | DeprecatedSince :: Err => None ,
148
148
} ;
149
149
Deprecation { since, note : note. map ( |s| s. to_string ( ) ) }
You can’t perform that action at this time.
0 commit comments