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> {
276276 self . deconstruct ( )
277277 }
278278
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-
287279 /// Asserts that this MetaItem starts with a word, or single segment path.
288280 ///
289281 /// Some examples:
290282 /// - `#[inline]`: `inline` is a word
291283 /// - `#[rustfmt::skip]`: `rustfmt::skip` is a path,
292284 /// 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.
301285 pub fn word_is ( & self , sym : Symbol ) -> Option < & ArgParser < ' a > > {
302286 self . path_without_args ( ) . word_is ( sym) . then ( || self . args ( ) )
303287 }
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- }
311288}
312289
313290#[ derive( Clone ) ]
You can’t perform that action at this time.
0 commit comments