diff options
| author | Guillaume Gomez <guillaume1.gomez@gmail.com> | 2020-12-02 10:44:19 +0100 |
|---|---|---|
| committer | Guillaume Gomez <guillaume1.gomez@gmail.com> | 2020-12-02 20:01:06 +0100 |
| commit | 15f9453a260ffc035ea3797c6939b1f61acd3e6d (patch) | |
| tree | 5ffb78529ddb862a4dc5d88b83303d87dfdc1b0e | |
| parent | 9866136bec0040993f26e8c4b7316fb0a5dc94b5 (diff) | |
| download | rust-15f9453a260ffc035ea3797c6939b1f61acd3e6d.tar.gz rust-15f9453a260ffc035ea3797c6939b1f61acd3e6d.zip | |
Remove check keyword identifier check from rustdoc
| -rw-r--r-- | src/librustdoc/clean/mod.rs | 14 |
1 files changed, 1 insertions, 13 deletions
diff --git a/src/librustdoc/clean/mod.rs b/src/librustdoc/clean/mod.rs index cd2700be5a7..a3c28be3137 100644 --- a/src/librustdoc/clean/mod.rs +++ b/src/librustdoc/clean/mod.rs @@ -169,19 +169,7 @@ impl Clean<ExternalCrate> for CrateNum { for attr in attrs.lists(sym::doc) { if attr.has_name(sym::keyword) { if let Some(v) = attr.value_str() { - let k = v.to_string(); - if !rustc_lexer::is_ident(&k) { - let sp = get_span(&attr).unwrap_or_else(|| attr.span()); - cx.tcx - .sess - .struct_span_err( - sp, - &format!("`{}` is not a valid identifier", v), - ) - .emit(); - } else { - keyword = Some(k); - } + keyword = Some(v.to_string()); break; } } |
