rust/tests/ui/dyn-compatibility/assoc_const_bounds.rs
2024-10-10 01:13:29 +02:00

19 lines
265 B
Rust

#![feature(generic_const_items)]
#![allow(incomplete_features, dead_code)]
//@ check-pass
trait Foo<T> {
const BAR: bool
where
Self: Sized;
}
trait Cake {}
impl Cake for () {}
fn foo(_: &dyn Foo<()>) {}
fn bar(_: &dyn Foo<i32>) {}
fn main() {}