about summary refs log tree commit diff
path: root/compiler/rustc_ast_lowering/src
diff options
context:
space:
mode:
authorbjorn3 <bjorn3@users.noreply.github.com>2022-01-10 15:32:45 +0100
committerbjorn3 <bjorn3@users.noreply.github.com>2022-01-17 18:06:27 +0100
commit991cbd15034798e86de6823800b13c87fb3e904c (patch)
treecb22ef0a82dd1e9fa93bf9579ff1f49ddd4312b3 /compiler/rustc_ast_lowering/src
parenta34c0797528172ede89480e3033f7a5e71ea4735 (diff)
downloadrust-991cbd15034798e86de6823800b13c87fb3e904c.tar.gz
rust-991cbd15034798e86de6823800b13c87fb3e904c.zip
Use Symbol for target features in asm handling
This saves a couple of Symbol::intern calls
Diffstat (limited to 'compiler/rustc_ast_lowering/src')
-rw-r--r--compiler/rustc_ast_lowering/src/asm.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/compiler/rustc_ast_lowering/src/asm.rs b/compiler/rustc_ast_lowering/src/asm.rs
index 9c28f3c7f58..16a9631f846 100644
--- a/compiler/rustc_ast_lowering/src/asm.rs
+++ b/compiler/rustc_ast_lowering/src/asm.rs
@@ -6,7 +6,7 @@ use rustc_data_structures::stable_set::FxHashSet;
 use rustc_errors::struct_span_err;
 use rustc_hir as hir;
 use rustc_session::parse::feature_err;
-use rustc_span::{sym, Span, Symbol};
+use rustc_span::{sym, Span};
 use rustc_target::asm;
 use std::collections::hash_map::Entry;
 use std::fmt::Write;
@@ -66,7 +66,7 @@ impl<'a, 'hir> LoweringContext<'a, 'hir> {
             for (abi_name, abi_span) in &asm.clobber_abis {
                 match asm::InlineAsmClobberAbi::parse(
                     asm_arch,
-                    |feature| self.sess.target_features.contains(&Symbol::intern(feature)),
+                    |feature| self.sess.target_features.contains(&feature),
                     &self.sess.target,
                     *abi_name,
                 ) {
@@ -134,7 +134,7 @@ impl<'a, 'hir> LoweringContext<'a, 'hir> {
                         asm::InlineAsmRegOrRegClass::Reg(if let Some(asm_arch) = asm_arch {
                             asm::InlineAsmReg::parse(
                                 asm_arch,
-                                |feature| sess.target_features.contains(&Symbol::intern(feature)),
+                                |feature| sess.target_features.contains(&feature),
                                 &sess.target,
                                 s,
                             )