summaryrefslogtreecommitdiffstats
path: root/tests/ui/try-block
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-19 09:25:56 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-19 09:25:56 +0000
commit018c4950b9406055dec02ef0fb52f132e2bb1e2c (patch)
treea835ebdf2088ef88fa681f8fad45f09922c1ae9a /tests/ui/try-block
parentAdding debian version 1.75.0+dfsg1-5. (diff)
downloadrustc-018c4950b9406055dec02ef0fb52f132e2bb1e2c.tar.xz
rustc-018c4950b9406055dec02ef0fb52f132e2bb1e2c.zip
Merging upstream version 1.76.0+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tests/ui/try-block')
-rw-r--r--tests/ui/try-block/try-block-bad-type.stderr4
-rw-r--r--tests/ui/try-block/try-block-catch.stderr2
-rw-r--r--tests/ui/try-block/try-block-in-while.stderr2
-rw-r--r--tests/ui/try-block/try-block-opt-init.stderr2
4 files changed, 6 insertions, 4 deletions
diff --git a/tests/ui/try-block/try-block-bad-type.stderr b/tests/ui/try-block/try-block-bad-type.stderr
index b41bf86d3..d58a011ff 100644
--- a/tests/ui/try-block/try-block-bad-type.stderr
+++ b/tests/ui/try-block/try-block-bad-type.stderr
@@ -2,7 +2,9 @@ error[E0277]: `?` couldn't convert the error to `TryFromSliceError`
--> $DIR/try-block-bad-type.rs:7:16
|
LL | Err("")?;
- | ^ the trait `From<&str>` is not implemented for `TryFromSliceError`
+ | -------^ the trait `From<&str>` is not implemented for `TryFromSliceError`
+ | |
+ | this can't be annotated with `?` because it has type `Result<_, &str>`
|
= note: the question mark operation (`?`) implicitly performs a conversion on the error value using the `From` trait
= help: the trait `From<Infallible>` is implemented for `TryFromSliceError`
diff --git a/tests/ui/try-block/try-block-catch.stderr b/tests/ui/try-block/try-block-catch.stderr
index 39cf943f4..185bcb407 100644
--- a/tests/ui/try-block/try-block-catch.stderr
+++ b/tests/ui/try-block/try-block-catch.stderr
@@ -6,5 +6,5 @@ LL | } catch { };
|
= help: try using `match` on the result of the `try` block instead
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/try-block/try-block-in-while.stderr b/tests/ui/try-block/try-block-in-while.stderr
index 62cc26dd4..2760e9301 100644
--- a/tests/ui/try-block/try-block-in-while.stderr
+++ b/tests/ui/try-block/try-block-in-while.stderr
@@ -6,6 +6,6 @@ LL | while try { false } {}
|
= help: the trait `Try` is not implemented for `bool`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/try-block/try-block-opt-init.stderr b/tests/ui/try-block/try-block-opt-init.stderr
index c39738501..1679fc2ac 100644
--- a/tests/ui/try-block/try-block-opt-init.stderr
+++ b/tests/ui/try-block/try-block-opt-init.stderr
@@ -12,6 +12,6 @@ LL | assert_eq!(cfg_res, 5);
|
= note: this error originates in the macro `assert_eq` (in Nightly builds, run with -Z macro-backtrace for more info)
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0381`.