rust/tests/ui/wf/ice-hir-wf-check-anon-const-issue-122989.rs

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

14 lines
520 B
Rust
Raw Normal View History

// Regression test for ICE #122989
trait Foo<const N: Bar<2>> {
2024-06-04 08:10:08 +00:00
//~^ WARN trait objects without an explicit `dyn` are deprecated
//~| WARN this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021!
//~| ERROR cycle detected when computing type of `Foo::N`
fn func() {}
}
trait Bar<const M: Foo<2>> {}
//~^ WARN trait objects without an explicit `dyn` are deprecated
//~| WARN this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021!
fn main() {}