From 47c311a7053069cf9640e2f88eced24b202bf218 Mon Sep 17 00:00:00 2001 From: bjorn3 Date: Mon, 10 Jan 2022 15:32:45 +0100 Subject: [PATCH] Use Symbol for target features in asm handling This saves a couple of Symbol::intern calls --- src/asm.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/asm.rs b/src/asm.rs index d620b24e067..b4213da6e05 100644 --- a/src/asm.rs +++ b/src/asm.rs @@ -5,7 +5,7 @@ use rustc_codegen_ssa::traits::{AsmBuilderMethods, AsmMethods, BaseTypeMethods, BuilderMethods, GlobalAsmOperandRef, InlineAsmOperandRef}; use rustc_middle::{bug, ty::Instance}; -use rustc_span::{Span, Symbol}; +use rustc_span::Span; use rustc_target::asm::*; use std::borrow::Cow; @@ -172,7 +172,7 @@ fn codegen_inline_asm(&mut self, template: &[InlineAsmTemplatePiece], rust_opera let is_target_supported = reg.reg_class().supported_types(asm_arch).iter() .any(|&(_, feature)| { if let Some(feature) = feature { - self.tcx.sess.target_features.contains(&Symbol::intern(feature)) + self.tcx.sess.target_features.contains(&feature) } else { true // Register class is unconditionally supported } -- 2.44.0