Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add a regression test for rust-lang#123630
compiler should not suggest nonsensical signatures, original suggestion was error[E0308]: mismatched types --> src/lib.rs:3:31 | 3 | fn select<F, I>(filter: F) -> Select<F, I> { | ------ ^^^^^^^^^^^^ expected `Select<F, I>`, found `()` | | | implicitly returns `()` as its body has no tail or `return` expression | = note: expected struct `Select<F, I>` found unit type `()` error[E0282]: type annotations needed for `Select<{closure@src/lib.rs:8:22: 8:25}, I>` --> src/lib.rs:8:9 | 8 | let lit = select(|x| match x { | ^^^ | help: consider giving `lit` an explicit type, where the type for type parameter `I` is specified | 8 | let lit: Select<{closure@src/lib.rs:8:22: 8:25}, I> = select(|x| match x { | ++++++++++++++++++++++++++++++++++++++++++++ Some errors have detailed explanations: E0282, E0308. For more information about an error, try `rustc --explain E0282`.
- Loading branch information