]> git.lizzy.rs Git - rust.git/blob - tests/ui/higher-rank-trait-bounds/due-to-where-clause.rs
Auto merge of #105716 - chriswailes:ndk-update-redux, r=pietroalbini
[rust.git] / tests / ui / higher-rank-trait-bounds / due-to-where-clause.rs
1 fn main() {
2     test::<FooS>(&mut 42); //~ ERROR implementation of `Foo` is not general enough
3 }
4
5 trait Foo<'a> {}
6
7 struct FooS<'a> {
8     data: &'a mut u32,
9 }
10
11 impl<'a, 'b: 'a> Foo<'b> for FooS<'a> {}
12
13 fn test<'a, F>(data: &'a mut u32) where F: for<'b> Foo<'b> {}