From 00956f1f8cb20bd40b67696b1f5f13c4a70a5c12 Mon Sep 17 00:00:00 2001 From: David Tolnay Date: Fri, 8 Oct 2021 03:02:01 -0400 Subject: [PATCH] Ui test changes for trybuild 1.0.49 --- Cargo.toml | 2 +- tests/ui/bad-field-attr.stderr | 2 +- tests/ui/concat-display.stderr | 2 +- tests/ui/duplicate-enum-source.stderr | 2 +- tests/ui/duplicate-fmt.stderr | 2 +- tests/ui/duplicate-struct-source.stderr | 2 +- tests/ui/duplicate-transparent.stderr | 2 +- tests/ui/from-not-source.stderr | 2 +- tests/ui/lifetime.stderr | 4 ++-- tests/ui/missing-fmt.stderr | 2 +- tests/ui/no-display.stderr | 2 +- tests/ui/source-enum-not-error.stderr | 2 +- tests/ui/source-struct-not-error.stderr | 2 +- tests/ui/transparent-display.stderr | 2 +- tests/ui/transparent-enum-many.stderr | 2 +- tests/ui/transparent-enum-source.stderr | 2 +- tests/ui/transparent-struct-many.stderr | 2 +- tests/ui/transparent-struct-source.stderr | 2 +- tests/ui/unexpected-field-fmt.stderr | 2 +- tests/ui/unexpected-struct-source.stderr | 2 +- tests/ui/union.stderr | 2 +- 21 files changed, 22 insertions(+), 22 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 812679b..3785b4b 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -18,7 +18,7 @@ thiserror-impl = { version = "=1.0.29", path = "impl" } anyhow = "1.0" ref-cast = "1.0" rustversion = "1.0" -trybuild = { version = "1.0.19", features = ["diff"] } +trybuild = { version = "1.0.49", features = ["diff"] } [workspace] members = ["impl"] diff --git a/tests/ui/bad-field-attr.stderr b/tests/ui/bad-field-attr.stderr index 60c0bf5..5fb5744 100644 --- a/tests/ui/bad-field-attr.stderr +++ b/tests/ui/bad-field-attr.stderr @@ -1,5 +1,5 @@ error: #[error(transparent)] needs to go outside the enum or struct, not on an individual field - --> $DIR/tests/ui/bad-field-attr.rs:5:18 + --> tests/ui/bad-field-attr.rs:5:18 | 5 | pub struct Error(#[error(transparent)] std::io::Error); | ^^^^^^^^^^^^^^^^^^^^^ diff --git a/tests/ui/concat-display.stderr b/tests/ui/concat-display.stderr index 1f095fd..6ab4048 100644 --- a/tests/ui/concat-display.stderr +++ b/tests/ui/concat-display.stderr @@ -1,5 +1,5 @@ error: expected string literal - --> $DIR/tests/ui/concat-display.rs:8:17 + --> tests/ui/concat-display.rs:8:17 | 8 | #[error(concat!("invalid ", $what))] | ^^^^^^ diff --git a/tests/ui/duplicate-enum-source.stderr b/tests/ui/duplicate-enum-source.stderr index 0c08675..4a4b2d3 100644 --- a/tests/ui/duplicate-enum-source.stderr +++ b/tests/ui/duplicate-enum-source.stderr @@ -1,5 +1,5 @@ error: duplicate #[source] attribute - --> $DIR/tests/ui/duplicate-enum-source.rs:8:9 + --> tests/ui/duplicate-enum-source.rs:8:9 | 8 | #[source] | ^^^^^^^^^ diff --git a/tests/ui/duplicate-fmt.stderr b/tests/ui/duplicate-fmt.stderr index 919307d..532b16b 100644 --- a/tests/ui/duplicate-fmt.stderr +++ b/tests/ui/duplicate-fmt.stderr @@ -1,5 +1,5 @@ error: only one #[error(...)] attribute is allowed - --> $DIR/tests/ui/duplicate-fmt.rs:5:1 + --> tests/ui/duplicate-fmt.rs:5:1 | 5 | #[error("...")] | ^^^^^^^^^^^^^^^ diff --git a/tests/ui/duplicate-struct-source.stderr b/tests/ui/duplicate-struct-source.stderr index 151eba4..c8de574 100644 --- a/tests/ui/duplicate-struct-source.stderr +++ b/tests/ui/duplicate-struct-source.stderr @@ -1,5 +1,5 @@ error: duplicate #[source] attribute - --> $DIR/tests/ui/duplicate-struct-source.rs:7:5 + --> tests/ui/duplicate-struct-source.rs:7:5 | 7 | #[source] | ^^^^^^^^^ diff --git a/tests/ui/duplicate-transparent.stderr b/tests/ui/duplicate-transparent.stderr index 9f1d5b5..a830879 100644 --- a/tests/ui/duplicate-transparent.stderr +++ b/tests/ui/duplicate-transparent.stderr @@ -1,5 +1,5 @@ error: duplicate #[error(transparent)] attribute - --> $DIR/tests/ui/duplicate-transparent.rs:5:1 + --> tests/ui/duplicate-transparent.rs:5:1 | 5 | #[error(transparent)] | ^^^^^^^^^^^^^^^^^^^^^ diff --git a/tests/ui/from-not-source.stderr b/tests/ui/from-not-source.stderr index c52381a..9713601 100644 --- a/tests/ui/from-not-source.stderr +++ b/tests/ui/from-not-source.stderr @@ -1,5 +1,5 @@ error: #[from] is only supported on the source field, not any other field - --> $DIR/tests/ui/from-not-source.rs:7:5 + --> tests/ui/from-not-source.rs:7:5 | 7 | #[from] | ^^^^^^^ diff --git a/tests/ui/lifetime.stderr b/tests/ui/lifetime.stderr index 994debb..8b58136 100644 --- a/tests/ui/lifetime.stderr +++ b/tests/ui/lifetime.stderr @@ -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/tests/ui/lifetime.rs:6:26 + --> 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/tests/ui/lifetime.rs:15:17 + --> tests/ui/lifetime.rs:15:17 | 15 | Foo(#[from] Generic<&'a str>), | ^^^^^^^^^^^^^^^^ diff --git a/tests/ui/missing-fmt.stderr b/tests/ui/missing-fmt.stderr index a8fd91a..c0be373 100644 --- a/tests/ui/missing-fmt.stderr +++ b/tests/ui/missing-fmt.stderr @@ -1,5 +1,5 @@ error: missing #[error("...")] display attribute - --> $DIR/tests/ui/missing-fmt.rs:7:5 + --> tests/ui/missing-fmt.rs:7:5 | 7 | B(usize), | ^^^^^^^^ diff --git a/tests/ui/no-display.stderr b/tests/ui/no-display.stderr index bd6924b..e6a52f5 100644 --- a/tests/ui/no-display.stderr +++ b/tests/ui/no-display.stderr @@ -1,5 +1,5 @@ error[E0599]: the method `as_display` exists for reference `&NoDisplay`, but its trait bounds were not satisfied - --> $DIR/tests/ui/no-display.rs:7:9 + --> tests/ui/no-display.rs:7:9 | 4 | struct NoDisplay; | ----------------- doesn't satisfy `NoDisplay: std::fmt::Display` diff --git a/tests/ui/source-enum-not-error.stderr b/tests/ui/source-enum-not-error.stderr index 2b5bb17..d01cba5 100644 --- a/tests/ui/source-enum-not-error.stderr +++ b/tests/ui/source-enum-not-error.stderr @@ -1,5 +1,5 @@ error[E0599]: the method `as_dyn_error` exists for reference `&NotError`, but its trait bounds were not satisfied - --> $DIR/tests/ui/source-enum-not-error.rs:10:9 + --> tests/ui/source-enum-not-error.rs:10:9 | 4 | pub struct NotError; | -------------------- diff --git a/tests/ui/source-struct-not-error.stderr b/tests/ui/source-struct-not-error.stderr index 0325314..be1331a 100644 --- a/tests/ui/source-struct-not-error.stderr +++ b/tests/ui/source-struct-not-error.stderr @@ -1,5 +1,5 @@ error[E0599]: the method `as_dyn_error` exists for struct `NotError`, but its trait bounds were not satisfied - --> $DIR/tests/ui/source-struct-not-error.rs:9:5 + --> tests/ui/source-struct-not-error.rs:9:5 | 4 | struct NotError; | ---------------- diff --git a/tests/ui/transparent-display.stderr b/tests/ui/transparent-display.stderr index 943e53d..54d958b 100644 --- a/tests/ui/transparent-display.stderr +++ b/tests/ui/transparent-display.stderr @@ -1,5 +1,5 @@ error: cannot have both #[error(transparent)] and a display attribute - --> $DIR/tests/ui/transparent-display.rs:5:1 + --> tests/ui/transparent-display.rs:5:1 | 5 | #[error("...")] | ^^^^^^^^^^^^^^^ diff --git a/tests/ui/transparent-enum-many.stderr b/tests/ui/transparent-enum-many.stderr index f6e6073..a9adfa5 100644 --- a/tests/ui/transparent-enum-many.stderr +++ b/tests/ui/transparent-enum-many.stderr @@ -1,5 +1,5 @@ error: #[error(transparent)] requires exactly one field - --> $DIR/tests/ui/transparent-enum-many.rs:5:5 + --> tests/ui/transparent-enum-many.rs:5:5 | 5 | / #[error(transparent)] 6 | | Other(anyhow::Error, String), diff --git a/tests/ui/transparent-enum-source.stderr b/tests/ui/transparent-enum-source.stderr index a4726b9..ccb9067 100644 --- a/tests/ui/transparent-enum-source.stderr +++ b/tests/ui/transparent-enum-source.stderr @@ -1,5 +1,5 @@ error: transparent variant can't contain #[source] - --> $DIR/tests/ui/transparent-enum-source.rs:6:11 + --> tests/ui/transparent-enum-source.rs:6:11 | 6 | Other(#[source] anyhow::Error), | ^^^^^^^^^ diff --git a/tests/ui/transparent-struct-many.stderr b/tests/ui/transparent-struct-many.stderr index 1b1bfc4..c0e3806 100644 --- a/tests/ui/transparent-struct-many.stderr +++ b/tests/ui/transparent-struct-many.stderr @@ -1,5 +1,5 @@ error: #[error(transparent)] requires exactly one field - --> $DIR/tests/ui/transparent-struct-many.rs:4:1 + --> tests/ui/transparent-struct-many.rs:4:1 | 4 | #[error(transparent)] | ^^^^^^^^^^^^^^^^^^^^^ diff --git a/tests/ui/transparent-struct-source.stderr b/tests/ui/transparent-struct-source.stderr index 9a1be34..3012ca3 100644 --- a/tests/ui/transparent-struct-source.stderr +++ b/tests/ui/transparent-struct-source.stderr @@ -1,5 +1,5 @@ error: transparent error struct can't contain #[source] - --> $DIR/tests/ui/transparent-struct-source.rs:5:18 + --> tests/ui/transparent-struct-source.rs:5:18 | 5 | pub struct Error(#[source] anyhow::Error); | ^^^^^^^^^ diff --git a/tests/ui/unexpected-field-fmt.stderr b/tests/ui/unexpected-field-fmt.stderr index b812970..bf3c24d 100644 --- a/tests/ui/unexpected-field-fmt.stderr +++ b/tests/ui/unexpected-field-fmt.stderr @@ -1,5 +1,5 @@ error: not expected here; the #[error(...)] attribute belongs on top of a struct or an enum variant - --> $DIR/tests/ui/unexpected-field-fmt.rs:6:9 + --> tests/ui/unexpected-field-fmt.rs:6:9 | 6 | #[error("...")] | ^^^^^^^^^^^^^^^ diff --git a/tests/ui/unexpected-struct-source.stderr b/tests/ui/unexpected-struct-source.stderr index b2b639a..6f15841 100644 --- a/tests/ui/unexpected-struct-source.stderr +++ b/tests/ui/unexpected-struct-source.stderr @@ -1,5 +1,5 @@ error: not expected here; the #[source] attribute belongs on a specific field - --> $DIR/tests/ui/unexpected-struct-source.rs:4:1 + --> tests/ui/unexpected-struct-source.rs:4:1 | 4 | #[source] | ^^^^^^^^^ diff --git a/tests/ui/union.stderr b/tests/ui/union.stderr index fbb544d..3ec4d71 100644 --- a/tests/ui/union.stderr +++ b/tests/ui/union.stderr @@ -1,5 +1,5 @@ error: union as errors are not supported - --> $DIR/tests/ui/union.rs:4:1 + --> tests/ui/union.rs:4:1 | 4 | / pub union U { 5 | | msg: &'static str,