about summary refs log tree commit diff
path: root/tests/ui/lint/missing_copy_impl_trivial_bounds.rs
blob: 9b743417bd52b4fc21a988520af56ec5bf3e72e4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
//@ check-pass

#![feature(trivial_bounds)]
#![allow(trivial_bounds)]

// Make sure that we still use the where-clauses from the struct when checking
// if it may implement `Copy` unconditionally.
// Fix for <https://github.com/rust-lang/rust/issues/125394>.

pub trait Foo {
    type Assoc;
}

pub struct Bar;

// This needs to be public
pub struct Baz2(<Bar as Foo>::Assoc)
where
    Bar: Foo;

fn main() {}