diff options
author | David LeGare <legare@google.com> | 2022-03-02 21:37:58 +0000 |
---|---|---|
committer | Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> | 2022-03-02 21:37:58 +0000 |
commit | 365fe11dc7cf47ae04d945af513246d19dfc00e8 (patch) | |
tree | 80c46c7f97eb0158db00b2c4710dd54073c36733 /tests/ui/unstable-features/trivial_bounds.rs | |
parent | 23cdec702c0235804c847247f16c7bc73f9d9fce (diff) | |
parent | ac81d17ea0cce1b865bbecae5677eeef7b1703e4 (diff) | |
download | pin-project-365fe11dc7cf47ae04d945af513246d19dfc00e8.tar.gz |
Update pin-project to 1.0.10 am: 8915193b0d am: ac81d17ea0
Original change: https://android-review.googlesource.com/c/platform/external/rust/crates/pin-project/+/2005953
Change-Id: I44e3dfdc6c005d46e30a740e77bb74955ccdfbd8
Diffstat (limited to 'tests/ui/unstable-features/trivial_bounds.rs')
-rw-r--r-- | tests/ui/unstable-features/trivial_bounds.rs | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/tests/ui/unstable-features/trivial_bounds.rs b/tests/ui/unstable-features/trivial_bounds.rs index 2323bab..41f885d 100644 --- a/tests/ui/unstable-features/trivial_bounds.rs +++ b/tests/ui/unstable-features/trivial_bounds.rs @@ -10,25 +10,29 @@ use std::marker::{PhantomData, PhantomPinned}; fn inner() { struct Inner(PhantomPinned); - struct A(Inner); + struct A(PhantomPinned); - impl Unpin for A where Inner: Unpin {} //~ ERROR std::marker::Unpin does not depend on any type or lifetime parameters + impl Unpin for A where PhantomPinned: Unpin {} //~ ERROR Unpin does not depend on any type or lifetime parameters + + struct B(Inner); + + impl Unpin for B where Inner: Unpin {} //~ ERROR Unpin does not depend on any type or lifetime parameters struct Wrapper<T>(T); impl<T> Unpin for Wrapper<T> where T: Unpin {} - struct B(Inner); + struct C(Inner); - impl Unpin for B where Wrapper<Inner>: Unpin {} //~ ERROR std::marker::Unpin does not depend on any type or lifetime parameters + impl Unpin for C where Wrapper<Inner>: Unpin {} //~ ERROR Unpin does not depend on any type or lifetime parameters struct WrapperWithLifetime<'a, T>(PhantomData<&'a ()>, T); impl<T> Unpin for WrapperWithLifetime<'_, T> where T: Unpin {} - struct C(Inner); + struct D(Inner); - impl<'a> Unpin for C where WrapperWithLifetime<'a, Inner>: Unpin {} // Ok + impl<'a> Unpin for D where WrapperWithLifetime<'a, Inner>: Unpin {} // Ok } fn main() {} |