about summary refs log tree commit diff
path: root/compiler/rustc_codegen_llvm/src
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/rustc_codegen_llvm/src')
-rw-r--r--compiler/rustc_codegen_llvm/src/errors.rs9
-rw-r--r--compiler/rustc_codegen_llvm/src/llvm_util.rs11
2 files changed, 14 insertions, 6 deletions
diff --git a/compiler/rustc_codegen_llvm/src/errors.rs b/compiler/rustc_codegen_llvm/src/errors.rs
index b1f85e656b8..c9af545a818 100644
--- a/compiler/rustc_codegen_llvm/src/errors.rs
+++ b/compiler/rustc_codegen_llvm/src/errors.rs
@@ -1,6 +1,6 @@
+use rustc_errors::fluent;
 use rustc_errors::DiagnosticBuilder;
 use rustc_session::SessionDiagnostic;
-use rustc_errors::fluent;
 
 pub(crate) enum UnknownCTargetFeature {
     UnknownFeaturePrefix { feature: String },
@@ -8,7 +8,10 @@ pub(crate) enum UnknownCTargetFeature {
 }
 
 impl SessionDiagnostic<'_, ()> for UnknownCTargetFeature {
-    fn into_diagnostic(self, sess: &'_ rustc_session::parse::ParseSess) -> DiagnosticBuilder<'_, ()> {
+    fn into_diagnostic(
+        self,
+        sess: &'_ rustc_session::parse::ParseSess,
+    ) -> DiagnosticBuilder<'_, ()> {
         match self {
             UnknownCTargetFeature::UnknownFeaturePrefix { feature } => {
                 let mut diag = sess.struct_warn(fluent::codegen_llvm::unknown_ctarget_feature);
@@ -30,4 +33,4 @@ impl SessionDiagnostic<'_, ()> for UnknownCTargetFeature {
             }
         }
     }
-}
\ No newline at end of file
+}
diff --git a/compiler/rustc_codegen_llvm/src/llvm_util.rs b/compiler/rustc_codegen_llvm/src/llvm_util.rs
index f8f174692c0..81b325fee2d 100644
--- a/compiler/rustc_codegen_llvm/src/llvm_util.rs
+++ b/compiler/rustc_codegen_llvm/src/llvm_util.rs
@@ -1,6 +1,6 @@
 use crate::back::write::create_informational_target_machine;
-use crate::llvm;
 use crate::errors::UnknownCTargetFeature;
+use crate::llvm;
 use libc::c_int;
 use rustc_codegen_ssa::target_features::{
     supported_target_features, tied_target_features, RUSTC_SPECIFIC_FEATURES,
@@ -435,7 +435,9 @@ pub(crate) fn global_llvm_features(sess: &Session, diagnostics: bool) -> Vec<Str
                 Some(c @ '+' | c @ '-') => c,
                 Some(_) => {
                     if diagnostics {
-                        sess.emit_warning(UnknownCTargetFeature::UnknownFeaturePrefix { feature: s.to_string() });
+                        sess.emit_warning(UnknownCTargetFeature::UnknownFeaturePrefix {
+                            feature: s.to_string(),
+                        });
                     }
                     return None;
                 }
@@ -452,7 +454,10 @@ pub(crate) fn global_llvm_features(sess: &Session, diagnostics: bool) -> Vec<Str
                         None
                     }
                 });
-                sess.emit_warning(UnknownCTargetFeature::UnknownFeature { feature: feature.to_string(), rust_feature: rust_feature.map(|f| f.to_string()) });
+                sess.emit_warning(UnknownCTargetFeature::UnknownFeature {
+                    feature: feature.to_string(),
+                    rust_feature: rust_feature.map(|f| f.to_string()),
+                });
             }
 
             if diagnostics {