-
-
Notifications
You must be signed in to change notification settings - Fork 167
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
17 changed files
with
18 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
error: #[error(transparent)] needs to go outside the enum or struct, not on an individual field | ||
--> $DIR/bad-field-attr.rs:5:18 | ||
--> $DIR/tests/ui/bad-field-attr.rs:5:18 | ||
| | ||
5 | pub struct Error(#[error(transparent)] std::io::Error); | ||
| ^^^^^^^^^^^^^^^^^^^^^ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
error: duplicate #[source] attribute | ||
--> $DIR/duplicate-enum-source.rs:8:9 | ||
--> $DIR/tests/ui/duplicate-enum-source.rs:8:9 | ||
| | ||
8 | #[source] | ||
| ^^^^^^^^^ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
error: only one #[error(...)] attribute is allowed | ||
--> $DIR/duplicate-fmt.rs:5:1 | ||
--> $DIR/tests/ui/duplicate-fmt.rs:5:1 | ||
| | ||
5 | #[error("...")] | ||
| ^^^^^^^^^^^^^^^ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
error: duplicate #[source] attribute | ||
--> $DIR/duplicate-struct-source.rs:7:5 | ||
--> $DIR/tests/ui/duplicate-struct-source.rs:7:5 | ||
| | ||
7 | #[source] | ||
| ^^^^^^^^^ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
error: duplicate #[error(transparent)] attribute | ||
--> $DIR/duplicate-transparent.rs:5:1 | ||
--> $DIR/tests/ui/duplicate-transparent.rs:5:1 | ||
| | ||
5 | #[error(transparent)] | ||
| ^^^^^^^^^^^^^^^^^^^^^ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
error: #[from] is only supported on the source field, not any other field | ||
--> $DIR/from-not-source.rs:7:5 | ||
--> $DIR/tests/ui/from-not-source.rs:7:5 | ||
| | ||
7 | #[from] | ||
| ^^^^^^^ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,11 @@ | ||
error: non-static lifetimes are not allowed in the source of an error, because std::error::Error requires the source is dyn Error + 'static | ||
--> $DIR/lifetime.rs:6:26 | ||
--> $DIR/tests/ui/lifetime.rs:6:26 | ||
| | ||
6 | struct Error<'a>(#[from] Inner<'a>); | ||
| ^^^^^^^^^ | ||
|
||
error: non-static lifetimes are not allowed in the source of an error, because std::error::Error requires the source is dyn Error + 'static | ||
--> $DIR/lifetime.rs:15:17 | ||
--> $DIR/tests/ui/lifetime.rs:15:17 | ||
| | ||
15 | Foo(#[from] Generic<&'a str>), | ||
| ^^^^^^^^^^^^^^^^ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
error: missing #[error("...")] display attribute | ||
--> $DIR/missing-fmt.rs:7:5 | ||
--> $DIR/tests/ui/missing-fmt.rs:7:5 | ||
| | ||
7 | B(usize), | ||
| ^^^^^^^^ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
error: cannot have both #[error(transparent)] and a display attribute | ||
--> $DIR/transparent-display.rs:5:1 | ||
--> $DIR/tests/ui/transparent-display.rs:5:1 | ||
| | ||
5 | #[error("...")] | ||
| ^^^^^^^^^^^^^^^ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
error: transparent variant can't contain #[source] | ||
--> $DIR/transparent-enum-source.rs:6:11 | ||
--> $DIR/tests/ui/transparent-enum-source.rs:6:11 | ||
| | ||
6 | Other(#[source] anyhow::Error), | ||
| ^^^^^^^^^ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
error: #[error(transparent)] requires exactly one field | ||
--> $DIR/transparent-struct-many.rs:4:1 | ||
--> $DIR/tests/ui/transparent-struct-many.rs:4:1 | ||
| | ||
4 | #[error(transparent)] | ||
| ^^^^^^^^^^^^^^^^^^^^^ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
error: transparent error struct can't contain #[source] | ||
--> $DIR/transparent-struct-source.rs:5:18 | ||
--> $DIR/tests/ui/transparent-struct-source.rs:5:18 | ||
| | ||
5 | pub struct Error(#[source] anyhow::Error); | ||
| ^^^^^^^^^ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
error: not expected here; the #[error(...)] attribute belongs on top of a struct or an enum variant | ||
--> $DIR/unexpected-field-fmt.rs:6:9 | ||
--> $DIR/tests/ui/unexpected-field-fmt.rs:6:9 | ||
| | ||
6 | #[error("...")] | ||
| ^^^^^^^^^^^^^^^ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
error: not expected here; the #[source] attribute belongs on a specific field | ||
--> $DIR/unexpected-struct-source.rs:4:1 | ||
--> $DIR/tests/ui/unexpected-struct-source.rs:4:1 | ||
| | ||
4 | #[source] | ||
| ^^^^^^^^^ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters