Update tests

This commit is contained in:
Guillaume Gomez 2020-09-16 16:42:06 +02:00
parent fe415ff412
commit 414aecb13e
4 changed files with 78 additions and 2 deletions

View File

@ -7,4 +7,10 @@ pub struct Bar;
#[doc(alias)] //~ ERROR #[doc(alias)] //~ ERROR
#[doc(alias = 0)] //~ ERROR #[doc(alias = 0)] //~ ERROR
#[doc(alias("bar"))] //~ ERROR #[doc(alias("bar"))] //~ ERROR
#[doc(alias = "\"")] //~ ERROR
#[doc(alias = "\n")] //~ ERROR
#[doc(alias = "
")] //~^ ERROR
#[doc(alias = " ")] //~ ERROR
#[doc(alias = "\t")] //~ ERROR
pub struct Foo; pub struct Foo;

View File

@ -16,5 +16,37 @@ error: doc alias attribute expects a string: #[doc(alias = "0")]
LL | #[doc(alias("bar"))] LL | #[doc(alias("bar"))]
| ^^^^^^^^^^^^ | ^^^^^^^^^^^^
error: aborting due to 3 previous errors error: '\"' character isn't allowed in `#[doc(alias = "...")]`
--> $DIR/check-doc-alias-attr.rs:10:7
|
LL | #[doc(alias = "\"")]
| ^^^^^^^^^^^^
error: '\n' character isn't allowed in `#[doc(alias = "...")]`
--> $DIR/check-doc-alias-attr.rs:11:7
|
LL | #[doc(alias = "\n")]
| ^^^^^^^^^^^^
error: '\n' character isn't allowed in `#[doc(alias = "...")]`
--> $DIR/check-doc-alias-attr.rs:12:7
|
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
|
LL | #[doc(alias = "\t")]
| ^^^^^^^^^^^^
error: aborting due to 8 previous errors

View File

@ -7,4 +7,10 @@ pub struct Bar;
#[doc(alias)] //~ ERROR #[doc(alias)] //~ ERROR
#[doc(alias = 0)] //~ ERROR #[doc(alias = 0)] //~ ERROR
#[doc(alias("bar"))] //~ ERROR #[doc(alias("bar"))] //~ ERROR
#[doc(alias = "\"")] //~ ERROR
#[doc(alias = "\n")] //~ ERROR
#[doc(alias = "
")] //~^ ERROR
#[doc(alias = " ")] //~ ERROR
#[doc(alias = "\t")] //~ ERROR
pub struct Foo; pub struct Foo;

View File

@ -16,5 +16,37 @@ error: doc alias attribute expects a string: #[doc(alias = "0")]
LL | #[doc(alias("bar"))] LL | #[doc(alias("bar"))]
| ^^^^^^^^^^^^ | ^^^^^^^^^^^^
error: aborting due to 3 previous errors error: '\"' character isn't allowed in `#[doc(alias = "...")]`
--> $DIR/check-doc-alias-attr.rs:10:7
|
LL | #[doc(alias = "\"")]
| ^^^^^^^^^^^^
error: '\n' character isn't allowed in `#[doc(alias = "...")]`
--> $DIR/check-doc-alias-attr.rs:11:7
|
LL | #[doc(alias = "\n")]
| ^^^^^^^^^^^^
error: '\n' character isn't allowed in `#[doc(alias = "...")]`
--> $DIR/check-doc-alias-attr.rs:12:7
|
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
|
LL | #[doc(alias = "\t")]
| ^^^^^^^^^^^^
error: aborting due to 8 previous errors