summaryrefslogtreecommitdiffstats
path: root/tests/ui/union/projection-as-union-type-error.rs
blob: 17091c35fb230d0cd73d0e6f191cbebebcd38d57 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
// Test to ensure that there is no ICE when normalizing a projection
// which is invalid (from <https://github.com/rust-lang/rust/pull/106938>).

#![crate_type = "lib"]

pub trait Identity {
    type Identity;
}

pub type Foo = u8;

pub union Bar {
    a:  <Foo as Identity>::Identity, //~ ERROR
    b: u8,
}