Skip to content

Commit

Permalink
Add generic_nonzero to feature list.
Browse files Browse the repository at this point in the history
  • Loading branch information
reitermarkus committed Feb 23, 2024
1 parent 26719f0 commit 6b3c695
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 0 deletions.
2 changes: 2 additions & 0 deletions compiler/rustc_feature/src/unstable.rs
Original file line number Diff line number Diff line change
Expand Up @@ -483,6 +483,8 @@ declare_features! (
(incomplete, generic_const_exprs, "1.56.0", Some(76560)),
/// Allows generic parameters and where-clauses on free & associated const items.
(incomplete, generic_const_items, "1.73.0", Some(113521)),
/// Allows usage of the generic `NonZero<T>` type.
(unstable, generic_nonzero, "1.77.0", Some(120257)),
/// Allows using `..=X` as a patterns in slices.
(unstable, half_open_range_patterns_in_slices, "1.66.0", Some(67264)),
/// Allows `if let` guard in match arms.
Expand Down
1 change: 1 addition & 0 deletions compiler/rustc_span/src/symbol.rs
Original file line number Diff line number Diff line change
Expand Up @@ -845,6 +845,7 @@ symbols! {
generic_associated_types_extended,
generic_const_exprs,
generic_const_items,
generic_nonzero,
generic_param_attrs,
get_context,
global_allocator,
Expand Down
6 changes: 6 additions & 0 deletions tests/ui/feature-gates/feature-gate-generic_nonzero.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
//@ check-pass
#![feature(generic_nonzero)]

use std::num::NonZero;

fn main() {}

0 comments on commit 6b3c695

Please sign in to comment.