File tree Expand file tree Collapse file tree 1 file changed +0
-23
lines changed
compiler/rustc_attr_parsing/src Expand file tree Collapse file tree 1 file changed +0
-23
lines changed Original file line number Diff line number Diff line change @@ -276,38 +276,15 @@ impl<'a> MetaItemParser<'a> {
276
276
self . deconstruct ( )
277
277
}
278
278
279
- /// Asserts that this MetaItem starts with a word, or single segment path.
280
- /// Doesn't return the args parser.
281
- ///
282
- /// For examples. see [`Self::word`]
283
- pub fn word_without_args ( & self ) -> Option < Ident > {
284
- Some ( self . word ( ) ?. 0 )
285
- }
286
-
287
279
/// Asserts that this MetaItem starts with a word, or single segment path.
288
280
///
289
281
/// Some examples:
290
282
/// - `#[inline]`: `inline` is a word
291
283
/// - `#[rustfmt::skip]`: `rustfmt::skip` is a path,
292
284
/// and not a word and should instead be parsed using [`path`](Self::path)
293
- pub fn word ( & self ) -> Option < ( Ident , & ArgParser < ' a > ) > {
294
- let ( path, args) = self . deconstruct ( ) ;
295
- Some ( ( path. word ( ) ?, args) )
296
- }
297
-
298
- /// Asserts that this MetaItem starts with some specific word.
299
- ///
300
- /// See [`word`](Self::word) for examples of what a word is.
301
285
pub fn word_is ( & self , sym : Symbol ) -> Option < & ArgParser < ' a > > {
302
286
self . path_without_args ( ) . word_is ( sym) . then ( || self . args ( ) )
303
287
}
304
-
305
- /// Asserts that this MetaItem starts with some specific path.
306
- ///
307
- /// See [`word`](Self::path) for examples of what a word is.
308
- pub fn path_is ( & self , segments : & [ Symbol ] ) -> Option < & ArgParser < ' a > > {
309
- self . path_without_args ( ) . segments_is ( segments) . then ( || self . args ( ) )
310
- }
311
288
}
312
289
313
290
#[ derive( Clone ) ]
You can’t perform that action at this time.
0 commit comments