Skip to content

Commit e37b75e

Browse files
committed
rustc_span: Remove Symbol::is_doc_keyword
The check in rustdoc using it is artificial and not helpful
1 parent 5addb13 commit e37b75e

File tree

2 files changed

+2
-10
lines changed

2 files changed

+2
-10
lines changed

src/librustc_span/symbol.rs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1554,11 +1554,6 @@ impl Symbol {
15541554
self == kw::Try
15551555
}
15561556

1557-
/// Used for sanity checking rustdoc keyword sections.
1558-
pub fn is_doc_keyword(self) -> bool {
1559-
self <= kw::Union
1560-
}
1561-
15621557
/// A keyword or reserved identifier that can be used as a path segment.
15631558
pub fn is_path_segment_keyword(self) -> bool {
15641559
self == kw::Super

src/librustdoc/clean/mod.rs

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -169,11 +169,8 @@ impl Clean<ExternalCrate> for CrateNum {
169169
for attr in attrs.lists(sym::doc) {
170170
if let Some(v) = attr.value_str() {
171171
if attr.has_name(sym::keyword) {
172-
if v.is_doc_keyword() {
173-
keyword = Some(v.to_string());
174-
break;
175-
}
176-
// FIXME: should warn on unknown keywords?
172+
keyword = Some(v.to_string());
173+
break;
177174
}
178175
}
179176
}

0 commit comments

Comments
 (0)