summaryrefslogtreecommitdiffstats
path: root/src/test/ui/generator/type-mismatch-signature-deduction.stderr
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:02:58 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:02:58 +0000
commit698f8c2f01ea549d77d7dc3338a12e04c11057b9 (patch)
tree173a775858bd501c378080a10dca74132f05bc50 /src/test/ui/generator/type-mismatch-signature-deduction.stderr
parentInitial commit. (diff)
downloadrustc-698f8c2f01ea549d77d7dc3338a12e04c11057b9.tar.xz
rustc-698f8c2f01ea549d77d7dc3338a12e04c11057b9.zip
Adding upstream version 1.64.0+dfsg1.upstream/1.64.0+dfsg1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r--src/test/ui/generator/type-mismatch-signature-deduction.stderr27
1 files changed, 27 insertions, 0 deletions
diff --git a/src/test/ui/generator/type-mismatch-signature-deduction.stderr b/src/test/ui/generator/type-mismatch-signature-deduction.stderr
new file mode 100644
index 000000000..7938fc809
--- /dev/null
+++ b/src/test/ui/generator/type-mismatch-signature-deduction.stderr
@@ -0,0 +1,27 @@
+error[E0308]: mismatched types
+ --> $DIR/type-mismatch-signature-deduction.rs:14:9
+ |
+LL | 5
+ | ^ expected enum `Result`, found integer
+ |
+ = note: expected enum `Result<{integer}, _>`
+ found type `{integer}`
+note: return type inferred to be `Result<{integer}, _>` here
+ --> $DIR/type-mismatch-signature-deduction.rs:9:20
+ |
+LL | return Ok(6);
+ | ^^^^^
+
+error[E0271]: type mismatch resolving `<[generator@$DIR/type-mismatch-signature-deduction.rs:7:5: 7:7] as Generator>::Return == i32`
+ --> $DIR/type-mismatch-signature-deduction.rs:5:13
+ |
+LL | fn foo() -> impl Generator<Return = i32> {
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected enum `Result`, found `i32`
+ |
+ = note: expected enum `Result<{integer}, _>`
+ found type `i32`
+
+error: aborting due to 2 previous errors
+
+Some errors have detailed explanations: E0271, E0308.
+For more information about an error, try `rustc --explain E0271`.