about summary refs log tree commit diff
path: root/tests/ui/traits/unconstrained-projection-normalization.rs
blob: 8e9444533a8af1e38be3c1be0598bb2403a9d9fc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
// Make sure we don't ICE in `normalize_erasing_regions` when normalizing
// an associated type in an impl with unconstrained non-lifetime params.

//@ revisions: current next
//@ ignore-compare-mode-next-solver (explicit revisions)
//@[next] compile-flags: -Znext-solver

struct Thing;

pub trait Every {
    type Assoc;
}
impl<T: ?Sized> Every for Thing {
    //~^ ERROR the type parameter `T` is not constrained
    type Assoc = T;
    //~^ ERROR: the size for values of type `T` cannot be known at compilation time
}

static I: <Thing as Every>::Assoc = 3;

fn main() {}