File tree 2 files changed +33
-0
lines changed
2 files changed +33
-0
lines changed Original file line number Diff line number Diff line change
1
+ #![ feature( doc_alias) ]
2
+
3
+ pub struct Bar ;
4
+ pub trait Foo { }
5
+
6
+ #[ doc( alias = "foo" ) ] //~ ERROR
7
+ extern { }
8
+
9
+ #[ doc( alias = "bar" ) ] //~ ERROR
10
+ impl Bar { }
11
+
12
+ #[ doc( alias = "foobar" ) ] //~ ERROR
13
+ impl Foo for Bar { }
Original file line number Diff line number Diff line change
1
+ error: `#[doc(alias = "...")]` isn't allowed on extern block
2
+ --> $DIR/check-doc-alias-attr-location.rs:6:7
3
+ |
4
+ LL | #[doc(alias = "foo")]
5
+ | ^^^^^^^^^^^^^
6
+
7
+ error: `#[doc(alias = "...")]` isn't allowed on implementation block
8
+ --> $DIR/check-doc-alias-attr-location.rs:9:7
9
+ |
10
+ LL | #[doc(alias = "bar")]
11
+ | ^^^^^^^^^^^^^
12
+
13
+ error: `#[doc(alias = "...")]` isn't allowed on implementation block
14
+ --> $DIR/check-doc-alias-attr-location.rs:12:7
15
+ |
16
+ LL | #[doc(alias = "foobar")]
17
+ | ^^^^^^^^^^^^^^^^
18
+
19
+ error: aborting due to 3 previous errors
20
+
You can’t perform that action at this time.
0 commit comments