1 error[E0308]: mismatched types
2 --> $DIR/issue-74280.rs:9:5
4 LL | fn test() -> Test {
5 | ---- expected `()` because of return type
6 LL | let y = || -> Test { () };
8 | ^ expected `()`, found integer
10 error: aborting due to previous error
12 For more information about this error, try `rustc --explain E0308`.