rust/tests/ui/consts/const_in_pattern/auxiliary/consts.rs
2023-01-11 09:32:08 +00:00

17 lines
346 B
Rust

pub struct CustomEq;
impl Eq for CustomEq {}
impl PartialEq for CustomEq {
fn eq(&self, _: &Self) -> bool {
false
}
}
pub const NONE: Option<CustomEq> = None;
pub const SOME: Option<CustomEq> = Some(CustomEq);
pub trait AssocConst {
const NONE: Option<CustomEq> = None;
const SOME: Option<CustomEq> = Some(CustomEq);
}