about summary refs log tree commit diff
path: root/tests/ui/traits/const-traits/match-non-const-eq.rs
blob: 03adb8dc5a4e5e8df72651d845f1a26a4b653a24 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
//@ revisions: stock gated
#![cfg_attr(gated, feature(const_trait_impl, const_cmp))]
//@[gated] check-pass

const fn foo(input: &'static str) {
    match input {
        "a" => (),
        //[stock]~^ ERROR cannot match on `str` in constant functions
        //[stock]~| ERROR `PartialEq` is not yet stable as a const trait
        _ => (),
    }
}

fn main() {}