|
1 |
| -use rustc_ast::{ast, attr, MetaItemInner, MetaItemKind}; |
2 |
| -use rustc_attr::{list_contains_name, InlineAttr, InstructionSetAttr, OptimizeAttr}; |
| 1 | +use rustc_ast::{MetaItemInner, MetaItemKind, ast, attr}; |
| 2 | +use rustc_attr::{InlineAttr, InstructionSetAttr, OptimizeAttr, list_contains_name}; |
3 | 3 | use rustc_data_structures::fx::FxHashMap;
|
4 | 4 | use rustc_errors::codes::*;
|
5 |
| -use rustc_errors::{struct_span_code_err, DiagMessage, SubdiagMessage}; |
| 5 | +use rustc_errors::{DiagMessage, SubdiagMessage, struct_span_code_err}; |
6 | 6 | use rustc_hir as hir;
|
7 | 7 | use rustc_hir::def::DefKind;
|
8 |
| -use rustc_hir::def_id::{DefId, LocalDefId, LOCAL_CRATE}; |
| 8 | +use rustc_hir::def_id::{DefId, LOCAL_CRATE, LocalDefId}; |
9 | 9 | use rustc_hir::weak_lang_items::WEAK_LANG_ITEMS;
|
10 |
| -use rustc_hir::{lang_items, LangItem}; |
| 10 | +use rustc_hir::{LangItem, lang_items}; |
11 | 11 | use rustc_middle::middle::codegen_fn_attrs::{
|
12 | 12 | CodegenFnAttrFlags, CodegenFnAttrs, PatchableFunctionEntry,
|
13 | 13 | };
|
14 | 14 | use rustc_middle::mir::mono::Linkage;
|
15 | 15 | use rustc_middle::query::Providers;
|
16 | 16 | use rustc_middle::ty::{self as ty, TyCtxt};
|
17 | 17 | use rustc_session::parse::feature_err;
|
18 |
| -use rustc_session::{lint, Session}; |
| 18 | +use rustc_session::{Session, lint}; |
19 | 19 | use rustc_span::symbol::Ident;
|
20 |
| -use rustc_span::{sym, Span}; |
21 |
| -use rustc_target::spec::{abi, SanitizerSet}; |
| 20 | +use rustc_span::{Span, sym}; |
| 21 | +use rustc_target::spec::{SanitizerSet, abi}; |
22 | 22 |
|
23 | 23 | use crate::errors;
|
24 | 24 | use crate::target_features::{check_target_feature_trait_unsafe, from_target_feature_attr};
|
@@ -399,16 +399,7 @@ fn codegen_fn_attrs(tcx: TyCtxt<'_>, did: LocalDefId) -> CodegenFnAttrs {
|
399 | 399 | .emit();
|
400 | 400 | None
|
401 | 401 | }
|
402 |
| - _ => { |
403 |
| - struct_span_code_err!( |
404 |
| - tcx.dcx(), |
405 |
| - attr.span, |
406 |
| - E0779, |
407 |
| - "`[instruction_set]` attribute argument should be valid" |
408 |
| - ) |
409 |
| - .emit(); |
410 |
| - None |
411 |
| - } |
| 402 | + _ => None, |
412 | 403 | }
|
413 | 404 | }
|
414 | 405 | _ => None,
|
|
0 commit comments