Skip to content

Commit

Permalink
Allow deprecated NonZero aliases in rust-analyzer.
Browse files Browse the repository at this point in the history
  • Loading branch information
reitermarkus committed May 1, 2024
1 parent a1160ba commit 364d54e
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/tools/rust-analyzer/crates/hir-ty/src/layout/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<NonZeroU8>, Option<NonNull<i32>>);
}
}
Expand Down
1 change: 1 addition & 0 deletions src/tools/rust-analyzer/crates/salsa/src/intern_id.rs
Original file line number Diff line number Diff line change
@@ -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
Expand Down
1 change: 1 addition & 0 deletions src/tools/rust-analyzer/crates/salsa/src/revision.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#[allow(deprecated)]
use std::num::NonZeroU32;
use std::sync::atomic::{AtomicU32, Ordering};

Expand Down

0 comments on commit 364d54e

Please sign in to comment.