mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-22 23:04:33 +00:00
22 lines
410 B
Rust
22 lines
410 B
Rust
//@ 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() {}
|