Skip to content

Commit

Permalink
Update ui test files
Browse files Browse the repository at this point in the history
  • Loading branch information
dtolnay committed Oct 7, 2021
1 parent 791a98e commit f072c62
Show file tree
Hide file tree
Showing 17 changed files with 18 additions and 18 deletions.
2 changes: 1 addition & 1 deletion tests/ui/bad-field-attr.stderr
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);
| ^^^^^^^^^^^^^^^^^^^^^
2 changes: 1 addition & 1 deletion tests/ui/concat-display.stderr
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
error: expected string literal
--> $DIR/concat-display.rs:8:17
--> $DIR/tests/ui/concat-display.rs:8:17
|
8 | #[error(concat!("invalid ", $what))]
| ^^^^^^
Expand Down
2 changes: 1 addition & 1 deletion tests/ui/duplicate-enum-source.stderr
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]
| ^^^^^^^^^
2 changes: 1 addition & 1 deletion tests/ui/duplicate-fmt.stderr
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("...")]
| ^^^^^^^^^^^^^^^
2 changes: 1 addition & 1 deletion tests/ui/duplicate-struct-source.stderr
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]
| ^^^^^^^^^
2 changes: 1 addition & 1 deletion tests/ui/duplicate-transparent.stderr
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)]
| ^^^^^^^^^^^^^^^^^^^^^
2 changes: 1 addition & 1 deletion tests/ui/from-not-source.stderr
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]
| ^^^^^^^
4 changes: 2 additions & 2 deletions tests/ui/lifetime.stderr
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>),
| ^^^^^^^^^^^^^^^^
2 changes: 1 addition & 1 deletion tests/ui/missing-fmt.stderr
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),
| ^^^^^^^^
2 changes: 1 addition & 1 deletion tests/ui/transparent-display.stderr
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("...")]
| ^^^^^^^^^^^^^^^
2 changes: 1 addition & 1 deletion tests/ui/transparent-enum-many.stderr
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
error: #[error(transparent)] requires exactly one field
--> $DIR/transparent-enum-many.rs:5:5
--> $DIR/tests/ui/transparent-enum-many.rs:5:5
|
5 | / #[error(transparent)]
6 | | Other(anyhow::Error, String),
Expand Down
2 changes: 1 addition & 1 deletion tests/ui/transparent-enum-source.stderr
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),
| ^^^^^^^^^
2 changes: 1 addition & 1 deletion tests/ui/transparent-struct-many.stderr
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)]
| ^^^^^^^^^^^^^^^^^^^^^
2 changes: 1 addition & 1 deletion tests/ui/transparent-struct-source.stderr
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);
| ^^^^^^^^^
2 changes: 1 addition & 1 deletion tests/ui/unexpected-field-fmt.stderr
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("...")]
| ^^^^^^^^^^^^^^^
2 changes: 1 addition & 1 deletion tests/ui/unexpected-struct-source.stderr
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]
| ^^^^^^^^^
2 changes: 1 addition & 1 deletion tests/ui/union.stderr
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
error: union as errors are not supported
--> $DIR/union.rs:4:1
--> $DIR/tests/ui/union.rs:4:1
|
4 | / pub union U {
5 | | msg: &'static str,
Expand Down

0 comments on commit f072c62

Please sign in to comment.