diff options
| author | Simonas Kazlauskas <git@kazlauskas.me> | 2021-07-23 16:19:22 +0300 |
|---|---|---|
| committer | Simonas Kazlauskas <git@kazlauskas.me> | 2022-03-01 01:57:10 +0200 |
| commit | c97c216efd542fbec5a7ccf9555f3cebb3198cec (patch) | |
| tree | 779e6d34d1bc9adef8be9ffe6c0a7fc8acca80af /compiler/rustc_codegen_llvm/src/attributes.rs | |
| parent | dfcfaa4ec1dd8a5bda33874dc180509b74bb625f (diff) | |
| download | rust-c97c216efd542fbec5a7ccf9555f3cebb3198cec.tar.gz rust-c97c216efd542fbec5a7ccf9555f3cebb3198cec.zip | |
Direct users towards using Rust feature names in CLI
If they are trying to use features rustc doesn't yet know about, request a feature request. Additionally, also warn against using feature names without leading `+` or `-` signs.
Diffstat (limited to 'compiler/rustc_codegen_llvm/src/attributes.rs')
| -rw-r--r-- | compiler/rustc_codegen_llvm/src/attributes.rs | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/compiler/rustc_codegen_llvm/src/attributes.rs b/compiler/rustc_codegen_llvm/src/attributes.rs index 13a41388f5e..4ab6f1bd0f5 100644 --- a/compiler/rustc_codegen_llvm/src/attributes.rs +++ b/compiler/rustc_codegen_llvm/src/attributes.rs @@ -382,10 +382,7 @@ pub fn from_fn_attrs<'ll, 'tcx>( let mut function_features = function_features .iter() .flat_map(|feat| { - llvm_util::to_llvm_feature(cx.tcx.sess, feat) - .into_iter() - .map(|f| format!("+{}", f)) - .collect::<Vec<String>>() + llvm_util::to_llvm_features(cx.tcx.sess, feat).into_iter().map(|f| format!("+{}", f)) }) .chain(codegen_fn_attrs.instruction_set.iter().map(|x| match x { InstructionSetAttr::ArmA32 => "-thumb-mode".to_string(), |
