rust/tests/ui/consts/const_in_pattern/auxiliary/consts.rs

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

17 lines
346 B
Rust
Raw Normal View History

2020-04-07 15:01:41 -05:00
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);
}