]> git.lizzy.rs Git - rust.git/blob - src/test/ui/consts/const-eval/ice-generic-assoc-const.rs
e92de84c27984ef521b2d1ac2f22729b04f519c1
[rust.git] / src / test / ui / consts / const-eval / ice-generic-assoc-const.rs
1 // compile-pass
2
3 pub trait Nullable {
4     const NULL: Self;
5
6     fn is_null(&self) -> bool;
7 }
8
9 impl<T> Nullable for *const T {
10     const NULL: Self = 0 as *const T;
11
12     fn is_null(&self) -> bool {
13         *self == Self::NULL
14     }
15 }
16
17 fn main() {
18 }