2021-03-12 11:53:51 +01:00
|
|
|
// revisions: min_tait full_tait
|
|
|
|
#![feature(min_type_alias_impl_trait)]
|
|
|
|
#![cfg_attr(full_tait, feature(type_alias_impl_trait))]
|
|
|
|
//[full_tait]~^ WARN incomplete
|
2019-07-02 23:30:28 +02:00
|
|
|
// build-pass (FIXME(62277): could be check-pass?)
|
2018-07-23 17:38:45 +02:00
|
|
|
|
|
|
|
trait Bar {}
|
|
|
|
struct Dummy;
|
|
|
|
impl Bar for Dummy {}
|
|
|
|
|
|
|
|
trait Foo {
|
|
|
|
type Assoc: Bar;
|
|
|
|
fn foo() -> Self::Assoc;
|
|
|
|
}
|
|
|
|
|
|
|
|
impl Foo for i32 {
|
2019-07-30 01:11:58 +02:00
|
|
|
type Assoc = impl Bar;
|
2018-07-23 17:38:45 +02:00
|
|
|
fn foo() -> Self::Assoc {
|
|
|
|
Dummy
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
fn main() {}
|