We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9866136 commit 15f9453Copy full SHA for 15f9453
src/librustdoc/clean/mod.rs
@@ -169,19 +169,7 @@ impl Clean<ExternalCrate> for CrateNum {
169
for attr in attrs.lists(sym::doc) {
170
if attr.has_name(sym::keyword) {
171
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
- }
+ keyword = Some(v.to_string());
185
break;
186
}
187
0 commit comments