@@ -33,45 +33,6 @@ help: use parentheses to call this function
3333LL | x = foo::<I>(/* I */);
3434 | +++++++++
3535
36- error[E0308]: `match` arms have incompatible types
37- --> $DIR/fn_def_opaque_coercion_to_fn_ptr.rs:37:18
38- |
39- LL | type J = impl Sized;
40- | ---------- the expected opaque type
41- ...
42- LL | let x = match true {
43- | _____________-
44- LL | | true => bar::<J>,
45- | | -------- this is found to be of type `fn(J) -> J {bar::<J>}`
46- LL | | false => foo::<()>,
47- | | ^^^^^^^^^ expected opaque type, found `()`
48- LL | | };
49- | |_____- `match` arms have incompatible types
50- |
51- = note: expected fn item `fn(J) -> J {bar::<J>}`
52- found fn item `fn(()) {foo::<()>}`
53-
54- error[E0308]: `match` arms have incompatible types
55- --> $DIR/fn_def_opaque_coercion_to_fn_ptr.rs:52:18
56- |
57- LL | fn k() -> impl Sized {
58- | ---------- the expected opaque type
59- ...
60- LL | let x = match true {
61- | _____________-
62- LL | | true => {
63- LL | | let f = foo;
64- LL | | bind(k(), f)
65- | | ------------ this is found to be of type `fn(impl Sized) -> impl Sized {foo::<impl Sized>}`
66- LL | | }
67- LL | | false => bar::<()>,
68- | | ^^^^^^^^^ expected opaque type, found `()`
69- LL | | };
70- | |_____- `match` arms have incompatible types
71- |
72- = note: expected fn item `fn(impl Sized) -> impl Sized {foo::<impl Sized>}`
73- found fn item `fn(()) {bar::<()>}`
74-
75- error: aborting due to 4 previous errors
36+ error: aborting due to 2 previous errors
7637
7738For more information about this error, try `rustc --explain E0308`.
0 commit comments