summaryrefslogtreecommitdiffstats
path: root/src/test/ui/hrtb/due-to-where-clause.rs
blob: 1afd15613b51c301643befc0db04542813a037c9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
fn main() {
    test::<FooS>(&mut 42); //~ ERROR implementation of `Foo` is not general enough
}

trait Foo<'a> {}

struct FooS<'a> {
    data: &'a mut u32,
}

impl<'a, 'b: 'a> Foo<'b> for FooS<'a> {}

fn test<'a, F>(data: &'a mut u32) where F: for<'b> Foo<'b> {}