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

22 lines
701 B
Plaintext
Raw Normal View History

error[E0308]: mismatched types
2018-12-25 15:56:47 +00:00
--> $DIR/issue-35241.rs:3:20
|
LL | struct Foo(u32);
| ---------- `Foo` defines a struct constructor here, which should be called
2022-06-08 18:07:59 +00:00
LL |
2019-03-09 12:03:44 +00: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-19 02:53:47 +00:00
help: use parentheses to construct this tuple struct
|
2022-08-28 01:22:51 +00:00
LL | fn test() -> Foo { Foo(/* u32 */) }
| +++++++++++
error: aborting due to previous error
2018-03-03 14:59:40 +00:00
For more information about this error, try `rustc --explain E0308`.