gcc/testsuite/rust/compile/torture/check-doc-attr-string.rs
raw| 1 | #![crate_type = "lib"] |
| 2 | |
| 3 | #[doc(alias = "foo")] // ok! |
| 4 | #[doc(alias("bar", "baz"))] // ok! |
| 5 | pub struct Bar; |
| 6 | |
| 7 | #[doc(alias = " |
| 8 | ")] // { dg-error "invalid character used" "" { target *-*-* } .-1 } |
| 9 | pub struct Foo; |
| 10 | |
| 11 | #[doc(alias( |
| 12 | " |
| 13 | " |
| 14 | ))] // ko but unchecked for now |
| 15 | pub struct Foo2; |
| 16 | |
| 17 | #[doc(whatever = "buidule")] // ko as well but unchecked for now |
| 18 | struct Boo; |