summaryrefslogtreecommitdiffstats
path: root/tests/ui/object-safety/assoc_const_bounds.rs
blob: bfa21fd9aeacb403168d95bf048cee16c5b0bc1c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#![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() {}