aboutsummaryrefslogtreecommitdiff
path: root/tests/ui/unstable-features/trivial_bounds.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/unstable-features/trivial_bounds.rs')
-rw-r--r--tests/ui/unstable-features/trivial_bounds.rs16
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() {}