]> git.proxmox.com Git - rustc.git/blame - src/test/ui/suggestions/impl-trait-return-trailing-semicolon.rs
New upstream version 1.62.1+dfsg1
[rustc.git] / src / test / ui / suggestions / impl-trait-return-trailing-semicolon.rs
CommitLineData
532ac7d7 1trait Bar {}
04454e1e
FG
2
3impl Bar for i32 {}
4
5struct Qux;
6
7impl Bar for Qux {}
8
532ac7d7 9fn foo() -> impl Bar {
04454e1e
FG
10 //~^ ERROR the trait bound `(): Bar` is not satisfied
11 5;
12 //~^ HELP remove this semicolon
13}
14
15fn bar() -> impl Bar {
16 //~^ ERROR the trait bound `(): Bar` is not satisfied
17 //~| HELP the following other types implement trait `Bar`:
18 "";
532ac7d7
XL
19}
20
21fn main() {}