11error[E0308]: mismatched types
22 --> $DIR/abridged.rs:26:5
33 |
4- 25 | fn a() -> Foo {
5- | --- expected `Foo` because of this return type
6426 | Some(Foo { bar: 1 })
75 | ^^^^^^^^^^^^^^^^^^^^ expected struct `Foo`, found enum `std::option::Option`
86 |
@@ -12,8 +10,6 @@ error[E0308]: mismatched types
1210error[E0308]: mismatched types
1311 --> $DIR/abridged.rs:30:5
1412 |
15- 29 | fn a2() -> Foo {
16- | --- expected `Foo` because of this return type
171330 | Ok(Foo { bar: 1})
1814 | ^^^^^^^^^^^^^^^^^ expected struct `Foo`, found enum `std::result::Result`
1915 |
@@ -23,8 +19,6 @@ error[E0308]: mismatched types
2319error[E0308]: mismatched types
2420 --> $DIR/abridged.rs:34:5
2521 |
26- 33 | fn b() -> Option<Foo> {
27- | ----------- expected because of this return type
282234 | Foo { bar: 1 }
2923 | ^^^^^^^^^^^^^^ expected enum `std::option::Option`, found struct `Foo`
3024 |
@@ -34,8 +28,6 @@ error[E0308]: mismatched types
3428error[E0308]: mismatched types
3529 --> $DIR/abridged.rs:38:5
3630 |
37- 37 | fn c() -> Result<Foo, Bar> {
38- | ---------------- expected because of this return type
393138 | Foo { bar: 1 }
4032 | ^^^^^^^^^^^^^^ expected enum `std::result::Result`, found struct `Foo`
4133 |
@@ -45,8 +37,6 @@ error[E0308]: mismatched types
4537error[E0308]: mismatched types
4638 --> $DIR/abridged.rs:42:5
4739 |
48- 41 | fn d() -> X<X<String, String>, String> {
49- | ---------------------------- expected because of this return type
504042 | / X {
514143 | | x: X {
524244 | | x: "".to_string(),
@@ -62,8 +52,6 @@ error[E0308]: mismatched types
6252error[E0308]: mismatched types
6353 --> $DIR/abridged.rs:52:5
6454 |
65- 51 | fn e() -> X<X<String, String>, String> {
66- | ---------------------------- expected because of this return type
675552 | / X {
685653 | | x: X {
695754 | | x: "".to_string(),
0 commit comments