Skip to content

Commit cf93f55

Browse files
committed
Remove MetaItemParser::{word,word_without_args,path_is}.
They are unused.
1 parent d89eefa commit cf93f55

File tree

1 file changed

+0
-23
lines changed

1 file changed

+0
-23
lines changed

compiler/rustc_attr_parsing/src/parser.rs

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff 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)]

0 commit comments

Comments
 (0)