Skip to content

Commit 15f9453

Browse files
Remove check keyword identifier check from rustdoc
1 parent 9866136 commit 15f9453

File tree

1 file changed

+1
-13
lines changed

1 file changed

+1
-13
lines changed

Diff for: src/librustdoc/clean/mod.rs

+1-13
Original file line numberDiff line numberDiff line change
@@ -169,19 +169,7 @@ impl Clean<ExternalCrate> for CrateNum {
169169
for attr in attrs.lists(sym::doc) {
170170
if attr.has_name(sym::keyword) {
171171
if let Some(v) = attr.value_str() {
172-
let k = v.to_string();
173-
if !rustc_lexer::is_ident(&k) {
174-
let sp = get_span(&attr).unwrap_or_else(|| attr.span());
175-
cx.tcx
176-
.sess
177-
.struct_span_err(
178-
sp,
179-
&format!("`{}` is not a valid identifier", v),
180-
)
181-
.emit();
182-
} else {
183-
keyword = Some(k);
184-
}
172+
keyword = Some(v.to_string());
185173
break;
186174
}
187175
}

0 commit comments

Comments
 (0)