1 error[E0308]: mismatched types
2 --> $DIR/issue-35241.rs:13:20
4 13 | fn test() -> Foo { Foo }
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