summaryrefslogtreecommitdiffstats
path: root/vendor/thiserror/tests/ui
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:06:37 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:06:37 +0000
commit246f239d9f40f633160f0c18f87a20922d4e77bb (patch)
tree5a88572663584b3d4d28e5a20e10abab1be40884 /vendor/thiserror/tests/ui
parentReleasing progress-linux version 1.64.0+dfsg1-1~progress7.99u1. (diff)
downloadrustc-246f239d9f40f633160f0c18f87a20922d4e77bb.tar.xz
rustc-246f239d9f40f633160f0c18f87a20922d4e77bb.zip
Merging debian version 1.65.0+dfsg1-2.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'vendor/thiserror/tests/ui')
-rw-r--r--vendor/thiserror/tests/ui/concat-display.stderr2
-rw-r--r--vendor/thiserror/tests/ui/from-backtrace-backtrace.rs10
-rw-r--r--vendor/thiserror/tests/ui/from-backtrace-backtrace.stderr5
-rw-r--r--vendor/thiserror/tests/ui/no-display.stderr12
-rw-r--r--vendor/thiserror/tests/ui/source-enum-not-error.stderr44
-rw-r--r--vendor/thiserror/tests/ui/source-struct-not-error.stderr42
6 files changed, 56 insertions, 59 deletions
diff --git a/vendor/thiserror/tests/ui/concat-display.stderr b/vendor/thiserror/tests/ui/concat-display.stderr
index 6ab40481f..dbecd69f2 100644
--- a/vendor/thiserror/tests/ui/concat-display.stderr
+++ b/vendor/thiserror/tests/ui/concat-display.stderr
@@ -5,6 +5,6 @@ error: expected string literal
| ^^^^^^
...
13 | error_type!(Error, "foo");
- | -------------------------- in this macro invocation
+ | ------------------------- in this macro invocation
|
= note: this error originates in the macro `error_type` (in Nightly builds, run with -Z macro-backtrace for more info)
diff --git a/vendor/thiserror/tests/ui/from-backtrace-backtrace.rs b/vendor/thiserror/tests/ui/from-backtrace-backtrace.rs
new file mode 100644
index 000000000..8f411bf5d
--- /dev/null
+++ b/vendor/thiserror/tests/ui/from-backtrace-backtrace.rs
@@ -0,0 +1,10 @@
+// https://github.com/dtolnay/thiserror/issues/163
+
+use std::backtrace::Backtrace;
+use thiserror::Error;
+
+#[derive(Error, Debug)]
+#[error("...")]
+pub struct Error(#[from] #[backtrace] std::io::Error, Backtrace);
+
+fn main() {}
diff --git a/vendor/thiserror/tests/ui/from-backtrace-backtrace.stderr b/vendor/thiserror/tests/ui/from-backtrace-backtrace.stderr
new file mode 100644
index 000000000..55d647b42
--- /dev/null
+++ b/vendor/thiserror/tests/ui/from-backtrace-backtrace.stderr
@@ -0,0 +1,5 @@
+error: deriving From requires no fields other than source and backtrace
+ --> tests/ui/from-backtrace-backtrace.rs:8:18
+ |
+8 | pub struct Error(#[from] #[backtrace] std::io::Error, Backtrace);
+ | ^^^^^^^
diff --git a/vendor/thiserror/tests/ui/no-display.stderr b/vendor/thiserror/tests/ui/no-display.stderr
index e6a52f5e7..82c3eea1c 100644
--- a/vendor/thiserror/tests/ui/no-display.stderr
+++ b/vendor/thiserror/tests/ui/no-display.stderr
@@ -2,7 +2,7 @@ error[E0599]: the method `as_display` exists for reference `&NoDisplay`, but its
--> tests/ui/no-display.rs:7:9
|
4 | struct NoDisplay;
- | ----------------- doesn't satisfy `NoDisplay: std::fmt::Display`
+ | ---------------- doesn't satisfy `NoDisplay: std::fmt::Display`
...
7 | #[error("thread: {thread}")]
| ^^^^^^^^^^^^^^^^^^ method cannot be called on `&NoDisplay` due to unsatisfied trait bounds
@@ -13,11 +13,5 @@ error[E0599]: the method `as_display` exists for reference `&NoDisplay`, but its
note: the following trait must be implemented
--> $RUST/core/src/fmt/mod.rs
|
- | / pub trait Display {
- | | /// Formats the value using the given formatter.
- | | ///
- | | /// # Examples
-... |
- | | fn fmt(&self, f: &mut Formatter<'_>) -> Result;
- | | }
- | |_^
+ | pub trait Display {
+ | ^^^^^^^^^^^^^^^^^
diff --git a/vendor/thiserror/tests/ui/source-enum-not-error.stderr b/vendor/thiserror/tests/ui/source-enum-not-error.stderr
index d01cba5b0..da10c6e77 100644
--- a/vendor/thiserror/tests/ui/source-enum-not-error.stderr
+++ b/vendor/thiserror/tests/ui/source-enum-not-error.stderr
@@ -1,28 +1,22 @@
error[E0599]: the method `as_dyn_error` exists for reference `&NotError`, but its trait bounds were not satisfied
- --> tests/ui/source-enum-not-error.rs:10:9
- |
-4 | pub struct NotError;
- | --------------------
- | |
- | doesn't satisfy `NotError: AsDynError`
- | doesn't satisfy `NotError: std::error::Error`
+ --> tests/ui/source-enum-not-error.rs:10:9
+ |
+4 | pub struct NotError;
+ | -------------------
+ | |
+ | doesn't satisfy `NotError: AsDynError`
+ | doesn't satisfy `NotError: std::error::Error`
...
-10 | source: NotError,
- | ^^^^^^ method cannot be called on `&NotError` due to unsatisfied trait bounds
- |
- = note: the following trait bounds were not satisfied:
- `NotError: std::error::Error`
- which is required by `NotError: AsDynError`
- `&NotError: std::error::Error`
- which is required by `&NotError: AsDynError`
+10 | source: NotError,
+ | ^^^^^^ method cannot be called on `&NotError` due to unsatisfied trait bounds
+ |
+ = note: the following trait bounds were not satisfied:
+ `NotError: std::error::Error`
+ which is required by `NotError: AsDynError`
+ `&NotError: std::error::Error`
+ which is required by `&NotError: AsDynError`
note: the following trait must be implemented
- --> $RUST/std/src/error.rs
- |
- | / pub trait Error: Debug + Display {
- | | /// The lower-level source of this error, if any.
- | | ///
- | | /// # Examples
-... |
- | | }
- | | }
- | |_^
+ --> $RUST/core/src/error.rs
+ |
+ | pub trait Error: Debug + Display {
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
diff --git a/vendor/thiserror/tests/ui/source-struct-not-error.stderr b/vendor/thiserror/tests/ui/source-struct-not-error.stderr
index be1331a50..cc0e67aca 100644
--- a/vendor/thiserror/tests/ui/source-struct-not-error.stderr
+++ b/vendor/thiserror/tests/ui/source-struct-not-error.stderr
@@ -1,27 +1,21 @@
error[E0599]: the method `as_dyn_error` exists for struct `NotError`, but its trait bounds were not satisfied
- --> tests/ui/source-struct-not-error.rs:9:5
- |
-4 | struct NotError;
- | ----------------
- | |
- | method `as_dyn_error` not found for this
- | doesn't satisfy `NotError: AsDynError`
- | doesn't satisfy `NotError: std::error::Error`
+ --> tests/ui/source-struct-not-error.rs:9:5
+ |
+4 | struct NotError;
+ | ---------------
+ | |
+ | method `as_dyn_error` not found for this struct
+ | doesn't satisfy `NotError: AsDynError`
+ | doesn't satisfy `NotError: std::error::Error`
...
-9 | source: NotError,
- | ^^^^^^ method cannot be called on `NotError` due to unsatisfied trait bounds
- |
- = note: the following trait bounds were not satisfied:
- `NotError: std::error::Error`
- which is required by `NotError: AsDynError`
+9 | source: NotError,
+ | ^^^^^^ method cannot be called on `NotError` due to unsatisfied trait bounds
+ |
+ = note: the following trait bounds were not satisfied:
+ `NotError: std::error::Error`
+ which is required by `NotError: AsDynError`
note: the following trait must be implemented
- --> $RUST/std/src/error.rs
- |
- | / pub trait Error: Debug + Display {
- | | /// The lower-level source of this error, if any.
- | | ///
- | | /// # Examples
-... |
- | | }
- | | }
- | |_^
+ --> $RUST/core/src/error.rs
+ |
+ | pub trait Error: Debug + Display {
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^