about summary refs log tree commit diff
path: root/compiler/rustc_codegen_ssa/src/traits
diff options
context:
space:
mode:
authorRalf Jung <post@ralfj.de>2024-11-16 10:00:16 +0100
committerRalf Jung <post@ralfj.de>2024-12-11 22:11:15 +0100
commit2d887a5c5ca65287bb40dc5b2d108e2bb2dd6719 (patch)
treeaf562288d549ff410de0ed4bd055d3fb6ba17279 /compiler/rustc_codegen_ssa/src/traits
parent1f3bf231e160b9869e2a85260fd6805304bfcee2 (diff)
downloadrust-2d887a5c5ca65287bb40dc5b2d108e2bb2dd6719.tar.gz
rust-2d887a5c5ca65287bb40dc5b2d108e2bb2dd6719.zip
generalize 'forbidden feature' concept so that even (un)stable feature can be invalid to toggle
Also rename some things for extra clarity
Diffstat (limited to 'compiler/rustc_codegen_ssa/src/traits')
-rw-r--r--compiler/rustc_codegen_ssa/src/traits/backend.rs4
1 files changed, 3 insertions, 1 deletions
diff --git a/compiler/rustc_codegen_ssa/src/traits/backend.rs b/compiler/rustc_codegen_ssa/src/traits/backend.rs
index 5b4a51fc301..4b17db2c49e 100644
--- a/compiler/rustc_codegen_ssa/src/traits/backend.rs
+++ b/compiler/rustc_codegen_ssa/src/traits/backend.rs
@@ -45,7 +45,9 @@ pub trait CodegenBackend {
 
     fn print(&self, _req: &PrintRequest, _out: &mut String, _sess: &Session) {}
 
-    fn target_features(&self, _sess: &Session, _allow_unstable: bool) -> Vec<Symbol> {
+    /// Returns the features that should be set in `cfg(target_features)`.
+    /// RUSTC_SPECIFIC_FEATURES should be skipped here, those are handled outside codegen.
+    fn target_features_cfg(&self, _sess: &Session, _allow_unstable: bool) -> Vec<Symbol> {
         vec![]
     }