summaryrefslogtreecommitdiffstats
path: root/src/test/ui/suggestions/call-on-unimplemented-ctor.rs
blob: 5f811044eb349a14105043175417716b2314d646 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
fn main() {
    insert_resource(Marker);
    insert_resource(Time);
    //~^ ERROR the trait bound `fn(u32) -> Time {Time}: Resource` is not satisfied
    //~| HELP use parentheses to construct this tuple struct
}

trait Resource {}

fn insert_resource<R: Resource>(resource: R) {}

struct Marker;
impl Resource for Marker {}

struct Time(u32);

impl Resource for Time {}