2 // Test that we handle binder levels correctly when checking whether a
3 // type can implement `Copy`. In particular, we had a bug where we failed to
4 // liberate the late-bound regions from the impl, and thus wound up
5 // searching for an impl of `for<'tcx> Foo<&'tcx T>`. The impl that
6 // exists however is `impl<T> Copy for Foo<T>` and the current rules
7 // did not consider that a match (something I would like to revise in
12 use std::marker::PhantomData;
14 #[derive(Copy, Clone)]
15 struct Foo<T> { x: T }
17 type Ty<'tcx> = &'tcx TyS<'tcx>;
20 Boop(PhantomData<*mut &'tcx ()>)
23 #[derive(Copy, Clone)]