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 {
298298 }
299299
300300 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+ }
302305 }
303306
304307 fn from_tokens < ' a , I > ( tokens : & mut iter:: Peekable < I > ) -> Option < MetaItem >
@@ -362,13 +365,6 @@ impl MetaItem {
362365}
363366
364367impl MetaItemKind {
365- pub fn value_str ( & self ) -> Option < Symbol > {
366- match self {
367- MetaItemKind :: NameValue ( v) => v. kind . str ( ) ,
368- _ => None ,
369- }
370- }
371-
372368 fn list_from_tokens ( tokens : TokenStream ) -> Option < ThinVec < NestedMetaItem > > {
373369 let mut tokens = tokens. trees ( ) . peekable ( ) ;
374370 let mut result = ThinVec :: new ( ) ;
You can’t perform that action at this time.
0 commit comments