about summary refs log tree commit diff
path: root/tests/ui/traits/const-traits/imply-always-const.rs
blob: f6cab0681ec2ef0e79460d8a9a1309c0802250fd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
//@ check-pass

#![feature(const_trait_impl)]

#[const_trait]
trait A where Self::Assoc: const B {
    type Assoc;
}

#[const_trait]
trait B {}

fn needs_b<T: const B>() {}

fn test<T: A>() {
    needs_b::<T::Assoc>();
}

fn main() {}