mirror of
https://github.com/rust-lang/rust.git
synced 2024-12-03 04:04:06 +00:00
25 lines
382 B
Rust
25 lines
382 B
Rust
//@ compile-flags: -Zinline-mir --emit=mir
|
|
//@ build-pass
|
|
|
|
pub trait Associate {
|
|
type Associated;
|
|
}
|
|
|
|
pub struct Wrap<'a> {
|
|
pub field: &'a i32,
|
|
}
|
|
|
|
pub trait Create<T> {
|
|
fn create() -> Self;
|
|
}
|
|
|
|
pub fn oh_no<'a, T>()
|
|
where
|
|
Wrap<'a>: Associate,
|
|
<Wrap<'a> as Associate>::Associated: Create<T>,
|
|
{
|
|
<Wrap<'a> as Associate>::Associated::create();
|
|
}
|
|
|
|
pub fn main() {}
|