We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d06e0e5 commit 7a5b1d7Copy full SHA for 7a5b1d7
compiler/rustc_passes/src/lib_features.rs
@@ -54,6 +54,14 @@ impl<'tcx> LibFeatureCollector<'tcx> {
54
}
55
56
57
+ const VERSION_PLACEHOLDER: &str = "CURRENT_RUSTC_VERSION";
58
+
59
+ if let Some(s) = since && s.as_str() == VERSION_PLACEHOLDER {
60
+ let version = option_env!("CFG_VERSION").unwrap_or("<current>");
61
+ let version = version.split(' ').next().unwrap();
62
+ since = Some(Symbol::intern(&version));
63
+ }
64
65
if let Some(feature) = feature {
66
// This additional check for stability is to make sure we
67
// don't emit additional, irrelevant errors for malformed
0 commit comments