Rollup merge of #125314 - jdonszelmann:global-registration-feature-gate, r=pnkfelix
Add an experimental feature gate for global registration See #125119 for the tracking issue.
This commit is contained in:
commit
a79737c3f0
5 changed files with 20 additions and 0 deletions
|
@ -560,6 +560,7 @@ pub fn check_crate(krate: &ast::Crate, sess: &Session, features: &Features) {
|
||||||
gate_all!(postfix_match, "postfix match is experimental");
|
gate_all!(postfix_match, "postfix match is experimental");
|
||||||
gate_all!(mut_ref, "mutable by-reference bindings are experimental");
|
gate_all!(mut_ref, "mutable by-reference bindings are experimental");
|
||||||
gate_all!(precise_capturing, "precise captures on `impl Trait` are experimental");
|
gate_all!(precise_capturing, "precise captures on `impl Trait` are experimental");
|
||||||
|
gate_all!(global_registration, "global registration is experimental");
|
||||||
|
|
||||||
if !visitor.features.never_patterns {
|
if !visitor.features.never_patterns {
|
||||||
if let Some(spans) = spans.get(&sym::never_patterns) {
|
if let Some(spans) = spans.get(&sym::never_patterns) {
|
||||||
|
|
|
@ -489,6 +489,8 @@ declare_features! (
|
||||||
(incomplete, generic_const_exprs, "1.56.0", Some(76560)),
|
(incomplete, generic_const_exprs, "1.56.0", Some(76560)),
|
||||||
/// Allows generic parameters and where-clauses on free & associated const items.
|
/// Allows generic parameters and where-clauses on free & associated const items.
|
||||||
(incomplete, generic_const_items, "1.73.0", Some(113521)),
|
(incomplete, generic_const_items, "1.73.0", Some(113521)),
|
||||||
|
/// Allows registering static items globally, possibly across crates, to iterate over at runtime.
|
||||||
|
(unstable, global_registration, "CURRENT_RUSTC_VERSION", Some(125119)),
|
||||||
/// Allows using `..=X` as a patterns in slices.
|
/// Allows using `..=X` as a patterns in slices.
|
||||||
(unstable, half_open_range_patterns_in_slices, "1.66.0", Some(67264)),
|
(unstable, half_open_range_patterns_in_slices, "1.66.0", Some(67264)),
|
||||||
/// Allows `if let` guard in match arms.
|
/// Allows `if let` guard in match arms.
|
||||||
|
|
|
@ -930,6 +930,7 @@ symbols! {
|
||||||
global_alloc_ty,
|
global_alloc_ty,
|
||||||
global_allocator,
|
global_allocator,
|
||||||
global_asm,
|
global_asm,
|
||||||
|
global_registration,
|
||||||
globs,
|
globs,
|
||||||
gt,
|
gt,
|
||||||
half_open_range_patterns,
|
half_open_range_patterns,
|
||||||
|
|
|
@ -0,0 +1,3 @@
|
||||||
|
todo!(); //~ ERROR
|
||||||
|
|
||||||
|
fn main() {}
|
|
@ -0,0 +1,13 @@
|
||||||
|
error: expected one of `!` or `::`, found `(`
|
||||||
|
--> $DIR/feature-gate-global-registration.rs:1:1
|
||||||
|
|
|
||||||
|
LL | todo!();
|
||||||
|
| ^^^^^^^
|
||||||
|
| |
|
||||||
|
| expected one of `!` or `::`
|
||||||
|
| in this macro invocation
|
||||||
|
|
|
||||||
|
= note: this error originates in the macro `todo` (in Nightly builds, run with -Z macro-backtrace for more info)
|
||||||
|
|
||||||
|
error: aborting due to 1 previous error
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue