Auto merge of #120486 - reitermarkus:use-generic-nonzero, r=dtolnay

Use generic `NonZero` internally.

Tracking issue: https://github.com/rust-lang/rust/issues/120257
This commit is contained in:
bors 2024-02-16 07:46:31 +00:00
commit 1be468815c
144 changed files with 636 additions and 628 deletions

View file

@ -31,6 +31,7 @@
#![feature(array_windows)]
#![feature(box_patterns)]
#![feature(control_flow_enum)]
#![feature(generic_nonzero)]
#![feature(if_let_guard)]
#![feature(iter_order_by)]
#![feature(let_chains)]

View file

@ -1,7 +1,6 @@
#![allow(rustc::diagnostic_outside_of_impl)]
#![allow(rustc::untranslatable_diagnostic)]
use std::num::NonZeroU32;
use std::num::NonZero;
use crate::errors::RequestedLevel;
use crate::fluent_generated as fluent;
@ -402,7 +401,7 @@ pub struct BuiltinIncompleteFeaturesHelp;
#[derive(Subdiagnostic)]
#[note(lint_note)]
pub struct BuiltinFeatureIssueNote {
pub n: NonZeroU32,
pub n: NonZero<u32>,
}
pub struct BuiltinUnpermittedTypeInit<'a> {