@@ -8,16 +8,16 @@ use rustc_ast::{
8
8
self as ast, AttrArgs , Attribute , DelimArgs , MetaItem , MetaItemInner , MetaItemKind , NodeId ,
9
9
Path , Safety ,
10
10
} ;
11
- use rustc_attr_parsing:: { AttributeParser , Late } ;
12
11
use rustc_errors:: { Applicability , DiagCtxtHandle , FatalError , PResult } ;
13
12
use rustc_feature:: { AttributeSafety , AttributeTemplate , BUILTIN_ATTRIBUTE_MAP , BuiltinAttribute } ;
13
+ use rustc_parse:: parse_in;
14
14
use rustc_session:: errors:: report_lit_error;
15
15
use rustc_session:: lint:: BuiltinLintDiag ;
16
16
use rustc_session:: lint:: builtin:: { ILL_FORMED_ATTRIBUTE_INPUT , UNSAFE_ATTR_OUTSIDE_UNSAFE } ;
17
17
use rustc_session:: parse:: ParseSess ;
18
18
use rustc_span:: { Span , Symbol , sym} ;
19
19
20
- use crate :: { errors , parse_in } ;
20
+ use crate :: { AttributeParser , Late , session_diagnostics as errors } ;
21
21
22
22
pub fn check_attr ( psess : & ParseSess , attr : & Attribute , id : NodeId ) {
23
23
if attr. is_doc_comment ( ) || attr. has_name ( sym:: cfg_trace) || attr. has_name ( sym:: cfg_attr_trace)
@@ -133,16 +133,6 @@ fn check_meta_bad_delim(psess: &ParseSess, span: DelimSpan, delim: Delimiter) {
133
133
} ) ;
134
134
}
135
135
136
- pub ( super ) fn check_cfg_attr_bad_delim ( psess : & ParseSess , span : DelimSpan , delim : Delimiter ) {
137
- if let Delimiter :: Parenthesis = delim {
138
- return ;
139
- }
140
- psess. dcx ( ) . emit_err ( errors:: CfgAttrBadDelim {
141
- span : span. entire ( ) ,
142
- sugg : errors:: MetaBadDelimSugg { open : span. open , close : span. close } ,
143
- } ) ;
144
- }
145
-
146
136
/// Checks that the given meta-item is compatible with this `AttributeTemplate`.
147
137
fn is_attr_template_compatible ( template : & AttributeTemplate , meta : & ast:: MetaItemKind ) -> bool {
148
138
let is_one_allowed_subword = |items : & [ MetaItemInner ] | match items {
0 commit comments