diff options
Diffstat (limited to 'tests/ui/zero_ptr.fixed')
| -rw-r--r-- | tests/ui/zero_ptr.fixed | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/ui/zero_ptr.fixed b/tests/ui/zero_ptr.fixed index f2375d57f3a..f9d9d2db176 100644 --- a/tests/ui/zero_ptr.fixed +++ b/tests/ui/zero_ptr.fixed @@ -16,3 +16,11 @@ fn main() { let z = 0; let _ = z as *const usize; // this is currently not caught } + +const fn in_const_context() { + #[clippy::msrv = "1.23"] + let _: *const usize = 0 as *const _; + #[clippy::msrv = "1.24"] + let _: *const usize = std::ptr::null(); + //~^ zero_ptr +} |
