diff --git a/src/tools/rust-analyzer/crates/hir-ty/src/layout/tests.rs b/src/tools/rust-analyzer/crates/hir-ty/src/layout/tests.rs index 6c1eccb75e631..2d4d1ed00e86a 100644 --- a/src/tools/rust-analyzer/crates/hir-ty/src/layout/tests.rs +++ b/src/tools/rust-analyzer/crates/hir-ty/src/layout/tests.rs @@ -440,9 +440,12 @@ fn tuple() { #[test] fn non_zero_and_non_null() { + use core::ptr::NonNull; + #[allow(deprecated)] + use core::num::NonZeroU8; + size_and_align! { minicore: non_zero, non_null, option; - use core::{num::NonZeroU8, ptr::NonNull}; struct Goal(Option, Option>); } } diff --git a/src/tools/rust-analyzer/crates/salsa/src/intern_id.rs b/src/tools/rust-analyzer/crates/salsa/src/intern_id.rs index b060d8aab6881..033db81fbe275 100644 --- a/src/tools/rust-analyzer/crates/salsa/src/intern_id.rs +++ b/src/tools/rust-analyzer/crates/salsa/src/intern_id.rs @@ -1,4 +1,5 @@ use std::fmt; +#[allow(deprecated)] use std::num::NonZeroU32; /// The "raw-id" is used for interned keys in salsa -- it is basically diff --git a/src/tools/rust-analyzer/crates/salsa/src/revision.rs b/src/tools/rust-analyzer/crates/salsa/src/revision.rs index 204c0883b852d..0a3001b26826f 100644 --- a/src/tools/rust-analyzer/crates/salsa/src/revision.rs +++ b/src/tools/rust-analyzer/crates/salsa/src/revision.rs @@ -1,3 +1,4 @@ +#[allow(deprecated)] use std::num::NonZeroU32; use std::sync::atomic::{AtomicU32, Ordering};