Rollup merge of #79464 - GuillaumeGomez:doc-keyword-ident, r=jyn514
Extend doc keyword feature by allowing any ident Part of #51315. As suggested by ``@danielhenrymantilla`` in [this comment](https://github.com/rust-lang/rust/issues/51315#issuecomment-733879934), this PR extends `#[doc(keyword = "...")]` to allow any ident to be used as keyword. The final goal is to allow (proc-)macro crates' owners to write documentation of the keywords they might introduce. r? ``@jyn514``
This commit is contained in:
commit
ca8a1b05c6
5 changed files with 35 additions and 11 deletions
|
@ -1590,11 +1590,6 @@ impl Symbol {
|
|||
self == kw::Try
|
||||
}
|
||||
|
||||
/// Used for sanity checking rustdoc keyword sections.
|
||||
pub fn is_doc_keyword(self) -> bool {
|
||||
self <= kw::Union
|
||||
}
|
||||
|
||||
/// A keyword or reserved identifier that can be used as a path segment.
|
||||
pub fn is_path_segment_keyword(self) -> bool {
|
||||
self == kw::Super
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue