Remove check keyword identifier check from rustdoc
This commit is contained in:
parent
9866136bec
commit
15f9453a26
@ -169,19 +169,7 @@ impl Clean<ExternalCrate> for CrateNum {
|
|||||||
for attr in attrs.lists(sym::doc) {
|
for attr in attrs.lists(sym::doc) {
|
||||||
if attr.has_name(sym::keyword) {
|
if attr.has_name(sym::keyword) {
|
||||||
if let Some(v) = attr.value_str() {
|
if let Some(v) = attr.value_str() {
|
||||||
let k = v.to_string();
|
keyword = Some(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);
|
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user