Open gnzlbg opened 6 years ago
This (playground):
fn foo() {} fn bar() {} fn main() { let _ = [(foo), (bar)]; // OK let _ = [(foo,), (bar,)]; // FAILS }
fails to compile with the following error:
error[E0308]: mismatched types --> src/main.rs:5:23 | 5 | let _ = [(foo,), (bar,)]; // FAILS | ^^^ expected fn item, found a different fn item | = note: expected type `fn() {foo}` found type `fn() {bar}`
cc @eddyb
Aside: as @eddyb's working example shows, my description of coercions "not reaching into aggregates" is not actually correct.
This (playground):
fails to compile with the following error: