diff options
| author | Andrew Zhogin <andrew.zhogin@gmail.com> | 2025-01-15 20:43:02 +0700 |
|---|---|---|
| committer | Andrew Zhogin <andrew.zhogin@gmail.com> | 2025-06-09 21:29:59 +0700 |
| commit | 5601490c9d889ff8d964d4aafd44dcdeea40bfef (patch) | |
| tree | 1555b009d14a71a2187d8506ef00ec8cb9866fe9 /src | |
| parent | 7c10378e1fee5ddc6573b916aeb884ab10e0de17 (diff) | |
| download | rust-5601490c9d889ff8d964d4aafd44dcdeea40bfef.tar.gz rust-5601490c9d889ff8d964d4aafd44dcdeea40bfef.zip | |
-Zretpoline and -Zretpoline-external-thunk flags (target modifiers) to enable retpoline-related target features
Diffstat (limited to 'src')
| -rw-r--r-- | src/librustdoc/json/mod.rs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/librustdoc/json/mod.rs b/src/librustdoc/json/mod.rs index 131a12ce228..0ceeea2b9b1 100644 --- a/src/librustdoc/json/mod.rs +++ b/src/librustdoc/json/mod.rs @@ -18,6 +18,7 @@ use rustc_data_structures::fx::FxHashSet; use rustc_hir::def_id::{DefId, DefIdSet}; use rustc_middle::ty::TyCtxt; use rustc_session::Session; +use rustc_session::features::StabilityExt; use rustc_span::def_id::LOCAL_CRATE; use rustdoc_json_types as types; // It's important to use the FxHashMap from rustdoc_json_types here, instead of @@ -148,7 +149,7 @@ fn target(sess: &rustc_session::Session) -> types::Target { .copied() .filter(|(_, stability, _)| { // Describe only target features which the user can toggle - stability.toggle_allowed().is_ok() + stability.is_toggle_permitted(sess).is_ok() }) .map(|(name, stability, implied_features)| { types::TargetFeature { @@ -164,7 +165,7 @@ fn target(sess: &rustc_session::Session) -> types::Target { // Imply only target features which the user can toggle feature_stability .get(name) - .map(|stability| stability.toggle_allowed().is_ok()) + .map(|stability| stability.is_toggle_permitted(sess).is_ok()) .unwrap_or(false) }) .map(String::from) |
