about summary refs log tree commit diff
path: root/tests/ui/const-generics/issues/cg-in-dyn-issue-128176.rs
blob: dac5429f678ea95830c11f0c5722749a51ece006 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
// Regression test for #128176. Previously we would call `type_of` on the `1` anon const
// before the anon const had been lowered and had the `type_of` fed with a result.

#![feature(generic_const_exprs)]
#![allow(incomplete_features)]

trait X {
    type Y<const N: i16>;
}

const _: () = {
    fn f2<'a>(arg: Box<dyn X<Y<1> = &'a ()>>) {}
    //~^ ERROR the trait `X` is not dyn compatible
};

fn main() {}