about summary refs log tree commit diff
path: root/tests/ui/traits/const-traits/dont-ice-on-const-pred-for-bounds.rs
blob: d39e661ed9205514f019b0415c32275cdab4638a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
// Regression test for <https://github.com/rust-lang/rust/issues/133526>.

// Ensures we don't ICE when we encounter a `HostEffectPredicate` when computing
// the "item super predicates" for `Assoc`.

//@ compile-flags: -Znext-solver
//@ check-pass

#![feature(const_trait_impl)]

#[const_trait]
trait Trait {
    type Assoc: const Trait;
}

const fn needs_trait<T: [const] Trait>() {}

fn test<T: Trait>() {
    const { needs_trait::<T::Assoc>() };
}

fn main() {}