allow deprecated(since = "CURRENT_RUSTC_VERSION")
This commit is contained in:
parent
f21b4c0888
commit
52919c7f81
1 changed files with 3 additions and 0 deletions
|
|
@ -1,4 +1,5 @@
|
|||
use rustc_hir::attrs::{DeprecatedSince, Deprecation};
|
||||
use rustc_hir::{RustcVersion, VERSION_PLACEHOLDER};
|
||||
|
||||
use super::prelude::*;
|
||||
use super::util::parse_version;
|
||||
|
|
@ -143,6 +144,8 @@ impl<S: Stage> SingleAttributeParser<S> for DeprecationParser {
|
|||
DeprecatedSince::Future
|
||||
} else if !is_rustc {
|
||||
DeprecatedSince::NonStandard(since)
|
||||
} else if since.as_str() == VERSION_PLACEHOLDER {
|
||||
DeprecatedSince::RustcVersion(RustcVersion::CURRENT)
|
||||
} else if let Some(version) = parse_version(since) {
|
||||
DeprecatedSince::RustcVersion(version)
|
||||
} else {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue