]> git.lizzy.rs Git - rust.git/blob - tests/ui/wf/hir-wf-canonicalized.rs
Don't resolve type var roots in point_at_expr_source_of_inferred_type
[rust.git] / tests / ui / wf / hir-wf-canonicalized.rs
1 // incremental
2
3 trait Foo {
4     type V;
5 }
6
7 trait Callback<T: Foo>: Fn(&Bar<'_, T>, &T::V) {}
8
9 struct Bar<'a, T> {
10     callback: Box<dyn Callback<dyn Callback<Bar<'a, T>>>>,
11     //~^ ERROR the trait bound `Bar<'a, T>: Foo` is not satisfied
12     //~| ERROR the trait bound `(dyn Callback<Bar<'a, T>, for<'b, 'c, 'd> Output = ()> + 'static): Foo` is not satisfied
13     //~| ERROR the size for values of type `(dyn Callback<Bar<'a, T>, for<'b, 'c, 'd> Output = ()> + 'static)` cannot be known at compilation time
14 }
15
16 impl<T: Foo> Bar<'_, Bar<'_, T>> {}
17
18 fn main() {}