blob: 3fb543e962411ac445be964c5c0b64779ce4fe2c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
// build-pass (FIXME(62277): could be check-pass?)
#![feature(impl_trait_in_assoc_type)]
#![feature(type_alias_impl_trait)]
#![deny(private_interfaces, private_bounds)]
pub type Pub = impl Default;
#[derive(Default)]
struct Priv;
fn check() -> Pub {
Priv
}
pub trait Trait {
type Pub: Default;
fn method() -> Self::Pub;
}
impl Trait for u8 {
type Pub = impl Default;
fn method() -> Self::Pub {
Priv
}
}
fn main() {}
|