File tree Expand file tree Collapse file tree 1 file changed +4
-8
lines changed
compiler/rustc_ast/src/attr Expand file tree Collapse file tree 1 file changed +4
-8
lines changed Original file line number Diff line number Diff line change @@ -298,7 +298,10 @@ impl MetaItem {
298
298
}
299
299
300
300
pub fn value_str ( & self ) -> Option < Symbol > {
301
- self . kind . value_str ( )
301
+ match & self . kind {
302
+ MetaItemKind :: NameValue ( v) => v. kind . str ( ) ,
303
+ _ => None ,
304
+ }
302
305
}
303
306
304
307
fn from_tokens < ' a , I > ( tokens : & mut iter:: Peekable < I > ) -> Option < MetaItem >
@@ -362,13 +365,6 @@ impl MetaItem {
362
365
}
363
366
364
367
impl MetaItemKind {
365
- pub fn value_str ( & self ) -> Option < Symbol > {
366
- match self {
367
- MetaItemKind :: NameValue ( v) => v. kind . str ( ) ,
368
- _ => None ,
369
- }
370
- }
371
-
372
368
fn list_from_tokens ( tokens : TokenStream ) -> Option < ThinVec < NestedMetaItem > > {
373
369
let mut tokens = tokens. trees ( ) . peekable ( ) ;
374
370
let mut result = ThinVec :: new ( ) ;
You can’t perform that action at this time.
0 commit comments