rust/tests/ui/object-safety/assoc_const_bounds.rs

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

19 lines
264 B
Rust
Raw Normal View History

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