rust/tests/ui/issues/issue-35241.stderr

22 lines
701 B
Plaintext
Raw Normal View History

error[E0308]: mismatched types
2018-12-25 09:56:47 -06:00
--> $DIR/issue-35241.rs:3:20
|
LL | struct Foo(u32);
| ---------- `Foo` defines a struct constructor here, which should be called
2022-06-08 13:07:59 -05:00
LL |
2019-03-09 06:03:44 -06:00
LL | fn test() -> Foo { Foo }
| --- ^^^ expected `Foo`, found struct constructor
| |
| expected `Foo` because of return type
|
= note: expected struct `Foo`
found struct constructor `fn(u32) -> Foo {Foo}`
2022-10-18 21:53:47 -05:00
help: use parentheses to construct this tuple struct
|
2022-08-27 20:22:51 -05:00
LL | fn test() -> Foo { Foo(/* u32 */) }
| +++++++++++
error: aborting due to previous error
2018-03-03 08:59:40 -06:00
For more information about this error, try `rustc --explain E0308`.