mirror of
https://github.com/rust-lang/rust.git
synced 2024-12-06 05:33:59 +00:00
13 lines
254 B
Rust
13 lines
254 B
Rust
|
#![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() {}
|