mirror of
https://github.com/rust-lang/rust
synced 2024-09-06 01:11:17 +00:00
22 lines
289 B
Rust
22 lines
289 B
Rust
//@ compile-flags: --crate-type=lib
|
|
//@ check-pass
|
|
|
|
#![feature(type_alias_impl_trait)]
|
|
type Alias = impl Sized;
|
|
|
|
fn constrain() -> Alias {
|
|
1i32
|
|
}
|
|
|
|
trait HideIt {
|
|
type Assoc;
|
|
}
|
|
|
|
impl HideIt for () {
|
|
type Assoc = Alias;
|
|
}
|
|
|
|
pub trait Yay {}
|
|
|
|
impl Yay for <() as HideIt>::Assoc {}
|