1 error[E0308]: mismatched types
2 --> $DIR/issue-35241.rs:3:20
5 | ---------- fn(u32) -> Foo {Foo} defined here
7 LL | fn test() -> Foo { Foo }
8 | --- ^^^ expected struct `Foo`, found fn item
10 | expected `Foo` because of return type
12 = note: expected struct `Foo`
13 found fn item `fn(u32) -> Foo {Foo}`
14 help: use parentheses to construct this tuple struct
16 LL | fn test() -> Foo { Foo(/* u32 */) }
19 error: aborting due to previous error
21 For more information about this error, try `rustc --explain E0308`.