Files
rust/tests/ui/const-generics/issues/cg-in-dyn-issue-128176.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

17 lines
410 B
Rust
Raw Normal View History

2024-12-04 00:19:26 +00:00
// 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.
2024-08-04 21:25:49 +02:00
#![feature(generic_const_exprs)]
#![allow(incomplete_features)]
2024-08-04 21:25:49 +02:00
trait X {
type Y<const N: i16>;
}
const _: () = {
fn f2<'a>(arg: Box<dyn X<Y<1> = &'a ()>>) {}
2025-02-04 02:37:13 +00:00
//~^ ERROR the trait `X` is not dyn compatible
2024-08-04 21:25:49 +02:00
};
fn main() {}