@@ -1366,7 +1366,7 @@ impl<'a> Context<'a> {
1366
1366
}
1367
1367
} else if n == "doc" {
1368
1368
if let Some ( content) = attr. meta_item_list ( ) {
1369
- if content. iter ( ) . any ( |c| c. check_name_symbol ( symbols:: include) ) {
1369
+ if content. iter ( ) . any ( |c| c. check_name ( symbols:: include) ) {
1370
1370
gate_feature ! ( self , external_doc, attr. span,
1371
1371
"#[doc(include = \" ...\" )] is experimental"
1372
1372
) ;
@@ -1648,25 +1648,25 @@ impl<'a> Visitor<'a> for PostExpansionVisitor<'a> {
1648
1648
// check for gated attributes
1649
1649
self . context . check_attribute ( attr, false ) ;
1650
1650
1651
- if attr. check_name_symbol ( symbols:: doc) {
1651
+ if attr. check_name ( symbols:: doc) {
1652
1652
if let Some ( content) = attr. meta_item_list ( ) {
1653
- if content. len ( ) == 1 && content[ 0 ] . check_name_symbol ( symbols:: cfg) {
1653
+ if content. len ( ) == 1 && content[ 0 ] . check_name ( symbols:: cfg) {
1654
1654
gate_feature_post ! ( & self , doc_cfg, attr. span,
1655
1655
"#[doc(cfg(...))] is experimental"
1656
1656
) ;
1657
- } else if content. iter ( ) . any ( |c| c. check_name_symbol ( symbols:: masked) ) {
1657
+ } else if content. iter ( ) . any ( |c| c. check_name ( symbols:: masked) ) {
1658
1658
gate_feature_post ! ( & self , doc_masked, attr. span,
1659
1659
"#[doc(masked)] is experimental"
1660
1660
) ;
1661
- } else if content. iter ( ) . any ( |c| c. check_name_symbol ( symbols:: spotlight) ) {
1661
+ } else if content. iter ( ) . any ( |c| c. check_name ( symbols:: spotlight) ) {
1662
1662
gate_feature_post ! ( & self , doc_spotlight, attr. span,
1663
1663
"#[doc(spotlight)] is experimental"
1664
1664
) ;
1665
- } else if content. iter ( ) . any ( |c| c. check_name_symbol ( symbols:: alias) ) {
1665
+ } else if content. iter ( ) . any ( |c| c. check_name ( symbols:: alias) ) {
1666
1666
gate_feature_post ! ( & self , doc_alias, attr. span,
1667
1667
"#[doc(alias = \" ...\" )] is experimental"
1668
1668
) ;
1669
- } else if content. iter ( ) . any ( |c| c. check_name_symbol ( symbols:: keyword) ) {
1669
+ } else if content. iter ( ) . any ( |c| c. check_name ( symbols:: keyword) ) {
1670
1670
gate_feature_post ! ( & self , doc_keyword, attr. span,
1671
1671
"#[doc(keyword = \" ...\" )] is experimental"
1672
1672
) ;
@@ -1727,7 +1727,7 @@ impl<'a> Visitor<'a> for PostExpansionVisitor<'a> {
1727
1727
ast:: ItemKind :: Struct ( ..) => {
1728
1728
for attr in attr:: filter_by_name ( & i. attrs [ ..] , "repr" ) {
1729
1729
for item in attr. meta_item_list ( ) . unwrap_or_else ( Vec :: new) {
1730
- if item. check_name_symbol ( symbols:: simd) {
1730
+ if item. check_name ( symbols:: simd) {
1731
1731
gate_feature_post ! ( & self , repr_simd, attr. span,
1732
1732
"SIMD types are experimental and possibly buggy" ) ;
1733
1733
}
@@ -1738,7 +1738,7 @@ impl<'a> Visitor<'a> for PostExpansionVisitor<'a> {
1738
1738
ast:: ItemKind :: Enum ( ..) => {
1739
1739
for attr in attr:: filter_by_name ( & i. attrs [ ..] , "repr" ) {
1740
1740
for item in attr. meta_item_list ( ) . unwrap_or_else ( Vec :: new) {
1741
- if item. check_name_symbol ( symbols:: align) {
1741
+ if item. check_name ( symbols:: align) {
1742
1742
gate_feature_post ! ( & self , repr_align_enum, attr. span,
1743
1743
"`#[repr(align(x))]` on enums is experimental" ) ;
1744
1744
}
@@ -2062,7 +2062,7 @@ pub fn get_features(span_handler: &Handler, krate_attrs: &[ast::Attribute],
2062
2062
// Process the edition umbrella feature-gates first, to ensure
2063
2063
// `edition_enabled_features` is completed before it's queried.
2064
2064
for attr in krate_attrs {
2065
- if !attr. check_name_symbol ( symbols:: feature) {
2065
+ if !attr. check_name ( symbols:: feature) {
2066
2066
continue
2067
2067
}
2068
2068
@@ -2107,7 +2107,7 @@ pub fn get_features(span_handler: &Handler, krate_attrs: &[ast::Attribute],
2107
2107
}
2108
2108
2109
2109
for attr in krate_attrs {
2110
- if !attr. check_name_symbol ( symbols:: feature) {
2110
+ if !attr. check_name ( symbols:: feature) {
2111
2111
continue
2112
2112
}
2113
2113
@@ -2237,7 +2237,7 @@ fn maybe_stage_features(span_handler: &Handler, krate: &ast::Crate,
2237
2237
} ;
2238
2238
if !allow_features {
2239
2239
for attr in & krate. attrs {
2240
- if attr. check_name_symbol ( symbols:: feature) {
2240
+ if attr. check_name ( symbols:: feature) {
2241
2241
let release_channel = option_env ! ( "CFG_RELEASE_CHANNEL" ) . unwrap_or ( "(unknown)" ) ;
2242
2242
span_err ! ( span_handler, attr. span, E0554 ,
2243
2243
"#![feature] may not be used on the {} release channel" ,
0 commit comments