mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-22 23:04:33 +00:00
Update doc alias ui tests
This commit is contained in:
parent
bbbefa3edc
commit
2069d3e13b
@ -1,11 +1,11 @@
|
||||
#![crate_type = "lib"]
|
||||
|
||||
#[doc(alias = "foo")] // ok!
|
||||
#[doc(alias("bar", "baz"))] // ok!
|
||||
pub struct Bar;
|
||||
|
||||
#[doc(alias)] //~ ERROR
|
||||
#[doc(alias = 0)] //~ ERROR
|
||||
#[doc(alias("bar"))] //~ ERROR
|
||||
#[doc(alias = "\"")] //~ ERROR
|
||||
#[doc(alias = "\n")] //~ ERROR
|
||||
#[doc(alias = "
|
||||
@ -13,4 +13,16 @@ pub struct Bar;
|
||||
#[doc(alias = "\t")] //~ ERROR
|
||||
#[doc(alias = " hello")] //~ ERROR
|
||||
#[doc(alias = "hello ")] //~ ERROR
|
||||
#[doc(alias = "")] //~ ERROR
|
||||
pub struct Foo;
|
||||
|
||||
#[doc(alias(0))] //~ ERROR
|
||||
#[doc(alias("\""))] //~ ERROR
|
||||
#[doc(alias("\n"))] //~ ERROR
|
||||
#[doc(alias("
|
||||
"))] //~^ ERROR
|
||||
#[doc(alias("\t"))] //~ ERROR
|
||||
#[doc(alias(" hello"))] //~ ERROR
|
||||
#[doc(alias("hello "))] //~ ERROR
|
||||
#[doc(alias(""))] //~ ERROR
|
||||
pub struct Foo2;
|
||||
|
@ -1,21 +1,15 @@
|
||||
error: doc alias attribute expects a string: #[doc(alias = "a")]
|
||||
--> $DIR/check-doc-alias-attr.rs:6:7
|
||||
error: doc alias attribute expects a string `#[doc(alias = "a")]` or a list of strings `#[doc(alias("a", "b"))]`
|
||||
--> $DIR/check-doc-alias-attr.rs:7:7
|
||||
|
|
||||
LL | #[doc(alias)]
|
||||
| ^^^^^
|
||||
|
||||
error: doc alias attribute expects a string: #[doc(alias = "a")]
|
||||
--> $DIR/check-doc-alias-attr.rs:7:7
|
||||
error: doc alias attribute expects a string `#[doc(alias = "a")]` or a list of strings `#[doc(alias("a", "b"))]`
|
||||
--> $DIR/check-doc-alias-attr.rs:8:7
|
||||
|
|
||||
LL | #[doc(alias = 0)]
|
||||
| ^^^^^^^^^
|
||||
|
||||
error: doc alias attribute expects a string: #[doc(alias = "a")]
|
||||
--> $DIR/check-doc-alias-attr.rs:8:7
|
||||
|
|
||||
LL | #[doc(alias("bar"))]
|
||||
| ^^^^^^^^^^^^
|
||||
|
||||
error: '\"' character isn't allowed in `#[doc(alias = "...")]`
|
||||
--> $DIR/check-doc-alias-attr.rs:9:15
|
||||
|
|
||||
@ -54,5 +48,61 @@ error: `#[doc(alias = "...")]` cannot start or end with ' '
|
||||
LL | #[doc(alias = "hello ")]
|
||||
| ^^^^^^^^
|
||||
|
||||
error: aborting due to 9 previous errors
|
||||
error: `#[doc(alias = "...")]` attribute cannot have empty value
|
||||
--> $DIR/check-doc-alias-attr.rs:16:15
|
||||
|
|
||||
LL | #[doc(alias = "")]
|
||||
| ^^
|
||||
|
||||
error: `#[doc(alias("a"))]` expects string literals
|
||||
--> $DIR/check-doc-alias-attr.rs:19:13
|
||||
|
|
||||
LL | #[doc(alias(0))]
|
||||
| ^
|
||||
|
||||
error: '\"' character isn't allowed in `#[doc(alias("..."))]`
|
||||
--> $DIR/check-doc-alias-attr.rs:20:13
|
||||
|
|
||||
LL | #[doc(alias("\""))]
|
||||
| ^^^^
|
||||
|
||||
error: '\n' character isn't allowed in `#[doc(alias("..."))]`
|
||||
--> $DIR/check-doc-alias-attr.rs:21:13
|
||||
|
|
||||
LL | #[doc(alias("\n"))]
|
||||
| ^^^^
|
||||
|
||||
error: '\n' character isn't allowed in `#[doc(alias("..."))]`
|
||||
--> $DIR/check-doc-alias-attr.rs:22:13
|
||||
|
|
||||
LL | #[doc(alias("
|
||||
| _____________^
|
||||
LL | | "))]
|
||||
| |_^
|
||||
|
||||
error: '\t' character isn't allowed in `#[doc(alias("..."))]`
|
||||
--> $DIR/check-doc-alias-attr.rs:24:13
|
||||
|
|
||||
LL | #[doc(alias("\t"))]
|
||||
| ^^^^
|
||||
|
||||
error: `#[doc(alias("..."))]` cannot start or end with ' '
|
||||
--> $DIR/check-doc-alias-attr.rs:25:13
|
||||
|
|
||||
LL | #[doc(alias(" hello"))]
|
||||
| ^^^^^^^^
|
||||
|
||||
error: `#[doc(alias("..."))]` cannot start or end with ' '
|
||||
--> $DIR/check-doc-alias-attr.rs:26:13
|
||||
|
|
||||
LL | #[doc(alias("hello "))]
|
||||
| ^^^^^^^^
|
||||
|
||||
error: `#[doc(alias("..."))]` attribute cannot have empty value
|
||||
--> $DIR/check-doc-alias-attr.rs:27:13
|
||||
|
|
||||
LL | #[doc(alias(""))]
|
||||
| ^^
|
||||
|
||||
error: aborting due to 17 previous errors
|
||||
|
||||
|
@ -1,11 +1,11 @@
|
||||
#![crate_type = "lib"]
|
||||
|
||||
#[doc(alias = "foo")] // ok!
|
||||
#[doc(alias("bar", "baz"))] // ok!
|
||||
pub struct Bar;
|
||||
|
||||
#[doc(alias)] //~ ERROR
|
||||
#[doc(alias = 0)] //~ ERROR
|
||||
#[doc(alias("bar"))] //~ ERROR
|
||||
#[doc(alias = "\"")] //~ ERROR
|
||||
#[doc(alias = "\n")] //~ ERROR
|
||||
#[doc(alias = "
|
||||
@ -13,4 +13,16 @@ pub struct Bar;
|
||||
#[doc(alias = "\t")] //~ ERROR
|
||||
#[doc(alias = " hello")] //~ ERROR
|
||||
#[doc(alias = "hello ")] //~ ERROR
|
||||
#[doc(alias = "")] //~ ERROR
|
||||
pub struct Foo;
|
||||
|
||||
#[doc(alias(0))] //~ ERROR
|
||||
#[doc(alias("\""))] //~ ERROR
|
||||
#[doc(alias("\n"))] //~ ERROR
|
||||
#[doc(alias("
|
||||
"))] //~^ ERROR
|
||||
#[doc(alias("\t"))] //~ ERROR
|
||||
#[doc(alias(" hello"))] //~ ERROR
|
||||
#[doc(alias("hello "))] //~ ERROR
|
||||
#[doc(alias(""))] //~ ERROR
|
||||
pub struct Foo2;
|
||||
|
@ -1,21 +1,15 @@
|
||||
error: doc alias attribute expects a string: #[doc(alias = "a")]
|
||||
--> $DIR/check-doc-alias-attr.rs:6:7
|
||||
error: doc alias attribute expects a string `#[doc(alias = "a")]` or a list of strings `#[doc(alias("a", "b"))]`
|
||||
--> $DIR/check-doc-alias-attr.rs:7:7
|
||||
|
|
||||
LL | #[doc(alias)]
|
||||
| ^^^^^
|
||||
|
||||
error: doc alias attribute expects a string: #[doc(alias = "a")]
|
||||
--> $DIR/check-doc-alias-attr.rs:7:7
|
||||
error: doc alias attribute expects a string `#[doc(alias = "a")]` or a list of strings `#[doc(alias("a", "b"))]`
|
||||
--> $DIR/check-doc-alias-attr.rs:8:7
|
||||
|
|
||||
LL | #[doc(alias = 0)]
|
||||
| ^^^^^^^^^
|
||||
|
||||
error: doc alias attribute expects a string: #[doc(alias = "a")]
|
||||
--> $DIR/check-doc-alias-attr.rs:8:7
|
||||
|
|
||||
LL | #[doc(alias("bar"))]
|
||||
| ^^^^^^^^^^^^
|
||||
|
||||
error: '\"' character isn't allowed in `#[doc(alias = "...")]`
|
||||
--> $DIR/check-doc-alias-attr.rs:9:15
|
||||
|
|
||||
@ -54,5 +48,61 @@ error: `#[doc(alias = "...")]` cannot start or end with ' '
|
||||
LL | #[doc(alias = "hello ")]
|
||||
| ^^^^^^^^
|
||||
|
||||
error: aborting due to 9 previous errors
|
||||
error: `#[doc(alias = "...")]` attribute cannot have empty value
|
||||
--> $DIR/check-doc-alias-attr.rs:16:15
|
||||
|
|
||||
LL | #[doc(alias = "")]
|
||||
| ^^
|
||||
|
||||
error: `#[doc(alias("a"))]` expects string literals
|
||||
--> $DIR/check-doc-alias-attr.rs:19:13
|
||||
|
|
||||
LL | #[doc(alias(0))]
|
||||
| ^
|
||||
|
||||
error: '\"' character isn't allowed in `#[doc(alias("..."))]`
|
||||
--> $DIR/check-doc-alias-attr.rs:20:13
|
||||
|
|
||||
LL | #[doc(alias("\""))]
|
||||
| ^^^^
|
||||
|
||||
error: '\n' character isn't allowed in `#[doc(alias("..."))]`
|
||||
--> $DIR/check-doc-alias-attr.rs:21:13
|
||||
|
|
||||
LL | #[doc(alias("\n"))]
|
||||
| ^^^^
|
||||
|
||||
error: '\n' character isn't allowed in `#[doc(alias("..."))]`
|
||||
--> $DIR/check-doc-alias-attr.rs:22:13
|
||||
|
|
||||
LL | #[doc(alias("
|
||||
| _____________^
|
||||
LL | | "))]
|
||||
| |_^
|
||||
|
||||
error: '\t' character isn't allowed in `#[doc(alias("..."))]`
|
||||
--> $DIR/check-doc-alias-attr.rs:24:13
|
||||
|
|
||||
LL | #[doc(alias("\t"))]
|
||||
| ^^^^
|
||||
|
||||
error: `#[doc(alias("..."))]` cannot start or end with ' '
|
||||
--> $DIR/check-doc-alias-attr.rs:25:13
|
||||
|
|
||||
LL | #[doc(alias(" hello"))]
|
||||
| ^^^^^^^^
|
||||
|
||||
error: `#[doc(alias("..."))]` cannot start or end with ' '
|
||||
--> $DIR/check-doc-alias-attr.rs:26:13
|
||||
|
|
||||
LL | #[doc(alias("hello "))]
|
||||
| ^^^^^^^^
|
||||
|
||||
error: `#[doc(alias("..."))]` attribute cannot have empty value
|
||||
--> $DIR/check-doc-alias-attr.rs:27:13
|
||||
|
|
||||
LL | #[doc(alias(""))]
|
||||
| ^^
|
||||
|
||||
error: aborting due to 17 previous errors
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user