2019-02-05 15:17:08 -08:00
|
|
|
trait Bar {}
|
2022-04-07 01:21:35 -07:00
|
|
|
|
|
|
|
impl Bar for i32 {}
|
|
|
|
|
|
|
|
struct Qux;
|
|
|
|
|
|
|
|
impl Bar for Qux {}
|
|
|
|
|
2019-02-05 15:17:08 -08:00
|
|
|
fn foo() -> impl Bar {
|
2022-04-07 01:21:35 -07:00
|
|
|
//~^ ERROR the trait bound `(): Bar` is not satisfied
|
|
|
|
5;
|
|
|
|
//~^ HELP remove this semicolon
|
|
|
|
}
|
|
|
|
|
|
|
|
fn bar() -> impl Bar {
|
|
|
|
//~^ ERROR the trait bound `(): Bar` is not satisfied
|
|
|
|
//~| HELP the following other types implement trait `Bar`:
|
|
|
|
"";
|
2019-02-05 15:17:08 -08:00
|
|
|
}
|
|
|
|
|
|
|
|
fn main() {}
|