rust/src/test/ui/issue-59756.stderr
David Wood 77bdb354bf
Add test demonstrating existing behaviour.
This commit adds a test that demonstrates the compiler's current
behaviour when a function attempts to return a value that was unwrapped
by a `?` operator when the omission of `?` would have made the code
compile.
2019-04-08 00:19:58 +02:00

13 lines
383 B
Plaintext

error[E0308]: try expression alternatives have incompatible types
--> $DIR/issue-59756.rs:11:5
|
LL | foo()?
| ^^^^^^ expected enum `std::result::Result`, found struct `A`
|
= note: expected type `std::result::Result<A, B>`
found type `A`
error: aborting due to previous error
For more information about this error, try `rustc --explain E0308`.