diff --git a/src/test/rustdoc-ui/check-doc-alias-attr.rs b/src/test/rustdoc-ui/check-doc-alias-attr.rs index b02cc1a4545..c8bec39fad6 100644 --- a/src/test/rustdoc-ui/check-doc-alias-attr.rs +++ b/src/test/rustdoc-ui/check-doc-alias-attr.rs @@ -7,4 +7,10 @@ pub struct Bar; #[doc(alias)] //~ ERROR #[doc(alias = 0)] //~ 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; diff --git a/src/test/rustdoc-ui/check-doc-alias-attr.stderr b/src/test/rustdoc-ui/check-doc-alias-attr.stderr index 268230ab44a..be7d7b3dbea 100644 --- a/src/test/rustdoc-ui/check-doc-alias-attr.stderr +++ b/src/test/rustdoc-ui/check-doc-alias-attr.stderr @@ -16,5 +16,37 @@ error: doc alias attribute expects a string: #[doc(alias = "0")] 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 diff --git a/src/test/ui/check-doc-alias-attr.rs b/src/test/ui/check-doc-alias-attr.rs index b02cc1a4545..c8bec39fad6 100644 --- a/src/test/ui/check-doc-alias-attr.rs +++ b/src/test/ui/check-doc-alias-attr.rs @@ -7,4 +7,10 @@ pub struct Bar; #[doc(alias)] //~ ERROR #[doc(alias = 0)] //~ 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; diff --git a/src/test/ui/check-doc-alias-attr.stderr b/src/test/ui/check-doc-alias-attr.stderr index 268230ab44a..be7d7b3dbea 100644 --- a/src/test/ui/check-doc-alias-attr.stderr +++ b/src/test/ui/check-doc-alias-attr.stderr @@ -16,5 +16,37 @@ error: doc alias attribute expects a string: #[doc(alias = "0")] 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