rust/tests/ui/traits/alias/self-in-const-generics.rs

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

13 lines
254 B
Rust
Raw Normal View History

2022-08-17 19:50:59 +00:00
#![allow(incomplete_features)]
#![feature(generic_const_exprs)]
#![feature(trait_alias)]
trait Bar<const N: usize> {}
trait BB = Bar<{ 2 + 1 }>;
fn foo(x: &dyn BB) {}
//~^ ERROR the trait alias `BB` cannot be made into an object [E0038]
fn main() {}