Rollup merge of #101215 - est31:rustdoc_version_placeholder, r=Mark-Simulacrum
Also replace the version placeholder in rustc_attr
Replace the version placeholder with the current version in the rustc_attr crate too so that users won't see the placeholder but instead the explicit version. This especially fixes the bug for rustdoc not showing it but instead the placeholder.
Originally reported [here](296057188
).
cc #100591

This commit is contained in:
commit
5a23efd31e
3 changed files with 14 additions and 2 deletions
|
@ -5,6 +5,7 @@
|
|||
//! collect them instead.
|
||||
|
||||
use rustc_ast::{Attribute, MetaItemKind};
|
||||
use rustc_attr::VERSION_PLACEHOLDER;
|
||||
use rustc_errors::struct_span_err;
|
||||
use rustc_hir::intravisit::Visitor;
|
||||
use rustc_middle::hir::nested_filter;
|
||||
|
@ -54,7 +55,6 @@ impl<'tcx> LibFeatureCollector<'tcx> {
|
|||
}
|
||||
}
|
||||
}
|
||||
const VERSION_PLACEHOLDER: &str = "CURRENT_RUSTC_VERSION";
|
||||
|
||||
if let Some(s) = since && s.as_str() == VERSION_PLACEHOLDER {
|
||||
let version = option_env!("CFG_VERSION").unwrap_or("<current>");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue