about summary refs log tree commit diff
path: root/tests/ui/traits/const-traits/reservation-impl-ice.rs
blob: efaea1cc6b2bf9f6f050ad5d27e4364e336d1d7d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
//@ compile-flags: -Znext-solver
#![feature(const_from, never_type, const_trait_impl)]

const fn impls_from<T: ~const From<!>>() {}

const fn foo() {
    // This previously ICE'd when encountering the reservation impl
    // from the standard library.
    impls_from::<()>();
    //~^ ERROR the trait bound `(): From<!>` is not satisfied
}

fn main() {}