about summary refs log tree commit diff
path: root/tests/ui/traits/const-traits/const-via-item-bound.rs
blob: 23f122b741308f6f142aa578d6442f52eb76a461 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
//@ check-pass
//@ revisions: current next
//@ ignore-compare-mode-next-solver (explicit revisions)
//@[next] compile-flags: -Znext-solver

#![feature(const_trait_impl)]

#[const_trait]
trait Bar {}

trait Baz: const Bar {}

trait Foo {
    // Well-formedenss of `Baz` requires `<Self as Foo>::Bar: const Bar`.
    // Make sure we assemble a candidate for that via the item bounds.
    type Bar: Baz;
}

fn main() {}