Skip to content

Commit

Permalink
Remove check keyword identifier check from rustdoc
Browse files Browse the repository at this point in the history
  • Loading branch information
GuillaumeGomez committed Dec 2, 2020
1 parent 9866136 commit 15f9453
Showing 1 changed file with 1 addition and 13 deletions.
14 changes: 1 addition & 13 deletions src/librustdoc/clean/mod.rs
Expand Up @@ -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;
}
}
Expand Down

0 comments on commit 15f9453

Please sign in to comment.