1
Fork 0

Allow ascii whitespace char for doc aliases

This commit is contained in:
Guillaume Gomez 2020-10-05 14:00:00 +02:00
parent efbaa41306
commit a215151cd3
5 changed files with 7 additions and 20 deletions

View file

@ -287,8 +287,9 @@ impl CheckAttrVisitor<'tcx> {
self.doc_alias_str_error(meta);
return false;
}
if let Some(c) =
doc_alias.chars().find(|&c| c == '"' || c == '\'' || c.is_whitespace())
if let Some(c) = doc_alias
.chars()
.find(|&c| c == '"' || c == '\'' || (c.is_whitespace() && c != ' '))
{
self.tcx
.sess