Also replace the placeholder for the stable_features lint
This commit is contained in:
parent
4a09adf99f
commit
3a38d566bd
3 changed files with 20 additions and 9 deletions
|
@ -5,7 +5,7 @@
|
|||
//! collect them instead.
|
||||
|
||||
use rustc_ast::{Attribute, MetaItemKind};
|
||||
use rustc_attr::VERSION_PLACEHOLDER;
|
||||
use rustc_attr::{rust_version_symbol, VERSION_PLACEHOLDER};
|
||||
use rustc_errors::struct_span_err;
|
||||
use rustc_hir::intravisit::Visitor;
|
||||
use rustc_middle::hir::nested_filter;
|
||||
|
@ -57,9 +57,7 @@ impl<'tcx> LibFeatureCollector<'tcx> {
|
|||
}
|
||||
|
||||
if let Some(s) = since && s.as_str() == VERSION_PLACEHOLDER {
|
||||
let version = option_env!("CFG_VERSION").unwrap_or("<current>");
|
||||
let version = version.split(' ').next().unwrap();
|
||||
since = Some(Symbol::intern(&version));
|
||||
since = Some(rust_version_symbol());
|
||||
}
|
||||
|
||||
if let Some(feature) = feature {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue