aboutsummaryrefslogtreecommitdiff
path: root/tests/ui/unstable-features/trivial_bounds-bug.rs
diff options
context:
space:
mode:
authorDavid LeGare <legare@google.com>2022-03-02 20:59:51 +0000
committerAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>2022-03-02 20:59:51 +0000
commitac81d17ea0cce1b865bbecae5677eeef7b1703e4 (patch)
tree80c46c7f97eb0158db00b2c4710dd54073c36733 /tests/ui/unstable-features/trivial_bounds-bug.rs
parent23cdec702c0235804c847247f16c7bc73f9d9fce (diff)
parent8915193b0de5f14b58aea0cd7bd72a6083529dc2 (diff)
downloadpin-project-ac81d17ea0cce1b865bbecae5677eeef7b1703e4.tar.gz
Update pin-project to 1.0.10 am: 8915193b0d
Original change: https://android-review.googlesource.com/c/platform/external/rust/crates/pin-project/+/2005953 Change-Id: I3c1379108ed7a86c8c877b70d6c1d516280db2e5
Diffstat (limited to 'tests/ui/unstable-features/trivial_bounds-bug.rs')
-rw-r--r--tests/ui/unstable-features/trivial_bounds-bug.rs33
1 files changed, 0 insertions, 33 deletions
diff --git a/tests/ui/unstable-features/trivial_bounds-bug.rs b/tests/ui/unstable-features/trivial_bounds-bug.rs
deleted file mode 100644
index 5e821c4..0000000
--- a/tests/ui/unstable-features/trivial_bounds-bug.rs
+++ /dev/null
@@ -1,33 +0,0 @@
-// Note: If you change this test, change 'trivial_bounds-feature-gate.rs' at the same time.
-
-// trivial_bounds
-// Tracking issue: https://github.com/rust-lang/rust/issues/48214
-#![feature(trivial_bounds)]
-
-mod phantom_pinned {
- use std::marker::{PhantomData, PhantomPinned};
-
- struct A(PhantomPinned);
-
- // bug of trivial_bounds?
- impl Unpin for A where PhantomPinned: Unpin {} //~ ERROR E0277
-
- struct Wrapper<T>(T);
-
- impl<T> Unpin for Wrapper<T> where T: Unpin {}
-
- struct B(PhantomPinned);
-
- impl Unpin for B where Wrapper<PhantomPinned>: Unpin {} // Ok
-
- struct WrapperWithLifetime<'a, T>(PhantomData<&'a ()>, T);
-
- impl<T> Unpin for WrapperWithLifetime<'_, T> where T: Unpin {}
-
- struct C(PhantomPinned);
-
- // Ok
- impl<'a> Unpin for C where WrapperWithLifetime<'a, PhantomPinned>: Unpin {}
-}
-
-fn main() {}