about summary refs log tree commit diff
path: root/tests/ui/coherence/const-errs-dont-conflict-103369.rs
blob: 14937e0f02ec3926f598872587f21faf1e8de604 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
// #103369: don't complain about conflicting implementations with [const error]

pub trait ConstGenericTrait<const N: u32> {}

impl ConstGenericTrait<{my_fn(1)}> for () {} //~ ERROR E0080

impl ConstGenericTrait<{my_fn(2)}> for () {} //~ ERROR E0080

const fn my_fn(v: u32) -> u32 {
    panic!("Some error occurred");
}

fn main() {}