rust/tests/ui/coherence/const-errs-dont-conflict-103369.rs
2024-02-19 18:16:11 +01:00

15 lines
339 B
Rust

// #103369: don't complain about conflicting implementations with [const error]
pub trait ConstGenericTrait<const N: u32> {}
impl ConstGenericTrait<{my_fn(1)}> for () {}
impl ConstGenericTrait<{my_fn(2)}> for () {}
const fn my_fn(v: u32) -> u32 {
panic!("Some error occurred"); //~ ERROR E0080
//~| ERROR E0080
}
fn main() {}