rust/tests/ui/coherence/const-errs-dont-conflict-103369.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

15 lines
339 B
Rust
Raw Normal View History

2024-02-19 11:16:11 -06:00
// #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() {}