This repository was archived by the owner on May 28, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 4 files changed +8
-6
lines changed Expand file tree Collapse file tree 4 files changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -737,7 +737,7 @@ pub enum DeprecatedSince {
737737 Future ,
738738 /// `feature(staged_api)` is off. Deprecation versions outside the standard
739739 /// library are allowed to be arbitrary strings, for better or worse.
740- Symbol ( Symbol ) ,
740+ NonStandard ( Symbol ) ,
741741 /// Deprecation version is unspecified but optional.
742742 Unspecified ,
743743 /// Failed to parse a deprecation version, or the deprecation version is
@@ -754,7 +754,7 @@ impl Deprecation {
754754 DeprecatedSince :: RustcVersion ( since) => since <= RustcVersion :: CURRENT ,
755755 DeprecatedSince :: Future => false ,
756756 // The `since` field doesn't have semantic purpose without `#![staged_api]`.
757- DeprecatedSince :: Symbol ( _) => true ,
757+ DeprecatedSince :: NonStandard ( _) => true ,
758758 // Assume deprecation is in effect if "since" field is absent or invalid.
759759 DeprecatedSince :: Unspecified | DeprecatedSince :: Err => true ,
760760 }
@@ -871,7 +871,7 @@ pub fn find_deprecation(
871871 if since. as_str ( ) == "TBD" {
872872 DeprecatedSince :: Future
873873 } else if !is_rustc {
874- DeprecatedSince :: Symbol ( since)
874+ DeprecatedSince :: NonStandard ( since)
875875 } else if let Some ( version) = parse_version ( since) {
876876 DeprecatedSince :: RustcVersion ( version)
877877 } else {
Original file line number Diff line number Diff line change @@ -162,7 +162,9 @@ fn deprecation_message(
162162 DeprecatedSince :: Future => {
163163 format ! ( "use of {kind} `{path}` that will be deprecated in a future Rust version" )
164164 }
165- DeprecatedSince :: Symbol ( _) | DeprecatedSince :: Unspecified | DeprecatedSince :: Err => {
165+ DeprecatedSince :: NonStandard ( _)
166+ | DeprecatedSince :: Unspecified
167+ | DeprecatedSince :: Err => {
166168 unreachable ! ( "this deprecation is always in effect; {since:?}" )
167169 }
168170 }
Original file line number Diff line number Diff line change @@ -628,7 +628,7 @@ fn short_item_info(
628628 }
629629 }
630630 DeprecatedSince :: Future => String :: from ( "Deprecating in a future Rust version" ) ,
631- DeprecatedSince :: Symbol ( since) => {
631+ DeprecatedSince :: NonStandard ( since) => {
632632 format ! ( "Deprecated since {}" , Escape ( since. as_str( ) ) )
633633 }
634634 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
143143 let since = match since {
144144 DeprecatedSince :: RustcVersion ( version) => Some ( version. to_string ( ) ) ,
145145 DeprecatedSince :: Future => Some ( "TBD" . to_owned ( ) ) ,
146- DeprecatedSince :: Symbol ( since) => Some ( since. to_string ( ) ) ,
146+ DeprecatedSince :: NonStandard ( since) => Some ( since. to_string ( ) ) ,
147147 DeprecatedSince :: Unspecified | DeprecatedSince :: Err => None ,
148148 } ;
149149 Deprecation { since, note : note. map ( |s| s. to_string ( ) ) }
You can’t perform that action at this time.
0 commit comments