2017-10-28 18:44:05 -05:00
|
|
|
error[E0308]: mismatched types
|
|
|
|
--> $DIR/issue-35241.rs:13:20
|
|
|
|
|
|
2018-02-22 18:42:32 -06:00
|
|
|
LL | fn test() -> Foo { Foo } //~ ERROR mismatched types
|
2017-10-28 18:44:05 -05:00
|
|
|
| --- ^^^
|
|
|
|
| | |
|
|
|
|
| | expected struct `Foo`, found fn item
|
|
|
|
| | did you mean `Foo(/* fields */)`?
|
|
|
|
| expected `Foo` because of return type
|
|
|
|
|
|
|
|
|
= note: expected type `Foo`
|
|
|
|
found type `fn(u32) -> Foo {Foo::{{constructor}}}`
|
|
|
|
|
|
|
|
error: aborting due to previous error
|
|
|
|
|
2018-02-19 14:40:25 -06:00
|
|
|
If you want more information on this error, try using "rustc --explain E0308"
|