]> git.lizzy.rs Git - rust.git/blob - tests/ui/suggestions/impl-trait-return-trailing-semicolon.stderr
Rollup merge of #106670 - albertlarsan68:check-docs-in-pr-ci, r=Mark-Simulacrum
[rust.git] / tests / ui / suggestions / impl-trait-return-trailing-semicolon.stderr
1 error[E0277]: the trait bound `(): Bar` is not satisfied
2   --> $DIR/impl-trait-return-trailing-semicolon.rs:9:13
3    |
4 LL | fn foo() -> impl Bar {
5    |             ^^^^^^^^ the trait `Bar` is not implemented for `()`
6 LL |
7 LL |     5;
8    |     -- help: remove this semicolon
9    |     |
10    |     this expression has type `{integer}`, which implements `Bar`
11
12 error[E0277]: the trait bound `(): Bar` is not satisfied
13   --> $DIR/impl-trait-return-trailing-semicolon.rs:15:13
14    |
15 LL | fn bar() -> impl Bar {
16    |             ^^^^^^^^ the trait `Bar` is not implemented for `()`
17    |
18    = help: the following other types implement trait `Bar`:
19              Qux
20              i32
21
22 error: aborting due to 2 previous errors
23
24 For more information about this error, try `rustc --explain E0277`.