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

@ -11,6 +11,5 @@ pub struct Bar;
#[doc(alias = "\n")] //~ ERROR
#[doc(alias = "
")] //~^ ERROR
#[doc(alias = " ")] //~ ERROR
#[doc(alias = "\t")] //~ ERROR
pub struct Foo;

View file

@ -36,17 +36,11 @@ LL | #[doc(alias = "
LL | | ")]
| |_^
error: ' ' character isn't allowed in `#[doc(alias = "...")]`
--> $DIR/check-doc-alias-attr.rs:14:7
|
LL | #[doc(alias = " ")]
| ^^^^^^^^^^^
error: '\t' character isn't allowed in `#[doc(alias = "...")]`
--> $DIR/check-doc-alias-attr.rs:15:7
--> $DIR/check-doc-alias-attr.rs:14:7
|
LL | #[doc(alias = "\t")]
| ^^^^^^^^^^^^
error: aborting due to 8 previous errors
error: aborting due to 7 previous errors

View file

@ -11,6 +11,5 @@ pub struct Bar;
#[doc(alias = "\n")] //~ ERROR
#[doc(alias = "
")] //~^ ERROR
#[doc(alias = " ")] //~ ERROR
#[doc(alias = "\t")] //~ ERROR
pub struct Foo;

View file

@ -36,17 +36,11 @@ LL | #[doc(alias = "
LL | | ")]
| |_^
error: ' ' character isn't allowed in `#[doc(alias = "...")]`
--> $DIR/check-doc-alias-attr.rs:14:7
|
LL | #[doc(alias = " ")]
| ^^^^^^^^^^^
error: '\t' character isn't allowed in `#[doc(alias = "...")]`
--> $DIR/check-doc-alias-attr.rs:15:7
--> $DIR/check-doc-alias-attr.rs:14:7
|
LL | #[doc(alias = "\t")]
| ^^^^^^^^^^^^
error: aborting due to 8 previous errors
error: aborting due to 7 previous errors