1 error[E0308]: mismatched types
2 --> $DIR/issue-35241.rs:13:20
4 LL | fn test() -> Foo { Foo } //~ ERROR mismatched types
7 | | expected struct `Foo`, found fn item
8 | | did you mean `Foo(/* fields */)`?
9 | expected `Foo` because of return type
11 = note: expected type `Foo`
12 found type `fn(u32) -> Foo {Foo::{{constructor}}}`
14 error: aborting due to previous error
16 For more information about this error, try `rustc --explain E0308`.