Skip to content

Commit 9714ac0

Browse files
Add tests for new doc alias check
1 parent c4c010f commit 9714ac0

File tree

4 files changed

+24
-0
lines changed

4 files changed

+24
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#![crate_type = "lib"]
2+
3+
#[doc(alias = "Foo")] //~ ERROR
4+
pub struct Foo;
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
error: `#[doc(alias = "...")]` is the same as the item's name
2+
--> $DIR/doc-alias-same-name.rs:3:7
3+
|
4+
LL | #[doc(alias = "Foo")]
5+
| ^^^^^^^^^^^^^
6+
7+
error: aborting due to previous error
8+

src/test/ui/doc-alias-same-name.rs

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#![crate_type = "lib"]
2+
3+
#[doc(alias = "Foo")] //~ ERROR
4+
pub struct Foo;
+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
error: `#[doc(alias = "...")]` is the same as the item's name
2+
--> $DIR/doc-alias-same-name.rs:3:7
3+
|
4+
LL | #[doc(alias = "Foo")]
5+
| ^^^^^^^^^^^^^
6+
7+
error: aborting due to previous error
8+

0 commit comments

Comments
 (0)