]> git.lizzy.rs Git - rust.git/blob - src/test/ui/issues/issue-35241.stderr
Auto merge of #54720 - davidtwco:issue-51191, r=nikomatsakis
[rust.git] / src / test / ui / issues / issue-35241.stderr
1 error[E0308]: mismatched types
2   --> $DIR/issue-35241.rs:13:20
3    |
4 LL | fn test() -> Foo { Foo } //~ ERROR mismatched types
5    |              ---   ^^^
6    |              |     |
7    |              |     expected struct `Foo`, found fn item
8    |              |     did you mean `Foo(/* fields */)`?
9    |              expected `Foo` because of return type
10    |
11    = note: expected type `Foo`
12               found type `fn(u32) -> Foo {Foo::{{constructor}}}`
13
14 error: aborting due to previous error
15
16 For more information about this error, try `rustc --explain E0308`.