summaryrefslogtreecommitdiffstats
path: root/tests/ui/issues/issue-28828.rs
blob: 03968809eb724ace65f7f475952199506f3f2d38 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
// run-pass
pub trait Foo {
    type Out;
}

impl Foo for () {
    type Out = bool;
}

fn main() {
    type Bool = <() as Foo>::Out;

    let x: Bool = true;
    assert!(x);

    let y: Option<Bool> = None;
    assert_eq!(y, None);
}