2022-02-16 09:48:46 -06:00
|
|
|
error[E0277]: the trait bound `(): Bar` is not satisfied
|
2022-04-07 03:21:35 -05:00
|
|
|
--> $DIR/impl-trait-return-trailing-semicolon.rs:9:13
|
2022-02-16 09:48:46 -06:00
|
|
|
|
|
|
|
|
LL | fn foo() -> impl Bar {
|
|
|
|
| ^^^^^^^^ the trait `Bar` is not implemented for `()`
|
2022-04-28 08:25:36 -05:00
|
|
|
LL |
|
2022-02-16 09:48:46 -06:00
|
|
|
LL | 5;
|
2022-04-07 03:21:35 -05:00
|
|
|
| -- help: remove this semicolon
|
|
|
|
| |
|
|
|
|
| this expression has type `{integer}`, which implements `Bar`
|
2022-02-16 09:48:46 -06:00
|
|
|
|
2019-02-05 17:17:08 -06:00
|
|
|
error[E0277]: the trait bound `(): Bar` is not satisfied
|
2022-04-28 08:25:36 -05:00
|
|
|
--> $DIR/impl-trait-return-trailing-semicolon.rs:15:13
|
2022-04-07 03:21:35 -05:00
|
|
|
|
|
|
|
|
LL | fn bar() -> impl Bar {
|
|
|
|
| ^^^^^^^^ the trait `Bar` is not implemented for `()`
|
|
|
|
|
|
|
|
|
= help: the following other types implement trait `Bar`:
|
|
|
|
i32
|
2023-06-27 18:31:06 -05:00
|
|
|
Qux
|
2022-04-07 03:21:35 -05:00
|
|
|
|
2022-04-28 08:25:36 -05:00
|
|
|
error: aborting due to 2 previous errors
|
2019-02-05 17:17:08 -06:00
|
|
|
|
|
|
|
For more information about this error, try `rustc --explain E0277`.
|