2022-10-09 16:02:12 -05:00
|
|
|
fn main() {
|
|
|
|
insert_resource(Marker);
|
|
|
|
insert_resource(Time);
|
|
|
|
//~^ ERROR the trait bound `fn(u32) -> Time {Time}: Resource` is not satisfied
|
2022-10-18 21:53:47 -05:00
|
|
|
//~| HELP use parentheses to construct this tuple struct
|
2022-10-09 16:02:12 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
trait Resource {}
|
|
|
|
|
|
|
|
fn insert_resource<R: Resource>(resource: R) {}
|
|
|
|
|
|
|
|
struct Marker;
|
|
|
|
impl Resource for Marker {}
|
|
|
|
|
|
|
|
struct Time(u32);
|
|
|
|
|
|
|
|
impl Resource for Time {}
|