]> git.lizzy.rs Git - rust.git/blob - src/test/ui/issues/issue-35241.stderr
Require Drop impls to have the same constness on its bounds as the bounds on the...
[rust.git] / src / test / ui / issues / issue-35241.stderr
1 error[E0308]: mismatched types
2   --> $DIR/issue-35241.rs:3:20
3    |
4 LL | struct Foo(u32);
5    | ---------- fn(u32) -> Foo {Foo} defined here
6 LL |
7 LL | fn test() -> Foo { Foo }
8    |              ---   ^^^ expected struct `Foo`, found fn item
9    |              |
10    |              expected `Foo` because of return type
11    |
12    = note: expected struct `Foo`
13              found fn item `fn(u32) -> Foo {Foo}`
14 help: use parentheses to construct this tuple struct
15    |
16 LL | fn test() -> Foo { Foo(/* u32 */) }
17    |                       +++++++++++
18
19 error: aborting due to previous error
20
21 For more information about this error, try `rustc --explain E0308`.