about summary refs log tree commit diff
path: root/tests/ui/const-generics/mgca/projection-error.rs
blob: d1c4fa8a492d33363a85331743f0539b7c1ffd1f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#![feature(min_generic_const_args)]
#![expect(incomplete_features)]

// Regression test for #140642. Test that normalizing const aliases
// containing erroneous types normalizes to a const error instead of
// a type error.


pub trait Tr<A> {
    const SIZE: usize;
}

fn mk_array(_x: T) -> [(); <T as Tr<bool>>::SIZE] {}
//~^ ERROR: cannot find type `T` in this scope
//~| ERROR: cannot find type `T` in this scope

fn main() {}