diff options
| author | Guillaume Gomez <guillaume1.gomez@gmail.com> | 2020-10-05 14:00:00 +0200 |
|---|---|---|
| committer | Guillaume Gomez <guillaume1.gomez@gmail.com> | 2020-10-05 16:37:13 +0200 |
| commit | a215151cd357945acdb2675010708cb2d10bb4c0 (patch) | |
| tree | a06c226557f14ddcb6754ea8e20afe23d7913ce5 /compiler | |
| parent | efbaa413061c2a6e52f06f00a60ee7830fcf3ea5 (diff) | |
| download | rust-a215151cd357945acdb2675010708cb2d10bb4c0.tar.gz rust-a215151cd357945acdb2675010708cb2d10bb4c0.zip | |
Allow ascii whitespace char for doc aliases
Diffstat (limited to 'compiler')
| -rw-r--r-- | compiler/rustc_passes/src/check_attr.rs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/compiler/rustc_passes/src/check_attr.rs b/compiler/rustc_passes/src/check_attr.rs index 59955b27334..e8e54c3cfaa 100644 --- a/compiler/rustc_passes/src/check_attr.rs +++ b/compiler/rustc_passes/src/check_attr.rs @@ -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 |
