rust/compiler
bors 6f388bb369 Auto merge of #88369 - lcnr:cec-rename, r=oli-obk
update const generics feature gates

**tl;dr: split const generics into three features: `adt_const_params`, `const_generics_defaults` and `generic_const_exprs`**

continuing the work of `@BoxyUwU` in #88324, this PR
- renames `feature(const_evaluatable_checked)` to `feature(generic_const_exprs)` which now doesn't need any other feature gate to work. Previously `feature(const_evaluatable_checked)` was only useful in combination with `feature(const_generics)`.
- completely removes `feature(lazy_normalization_consts)`. This feature only supplied the parents generics to anonymous constants, which is pretty useless as generic anon consts are only allowed with `feature(generic_const_exprs)` anyways.
- moves the ability to use additional const param types from `feature(const_generics)` into `feature(adt_const_params)`. As `feature(const_generics)` is now mostly useless without `feature(generic_const_exprs)` we also remove that feature flag.
- updates tests, removing duplicates and unnecessary revisions in some cases and also deletes all unused `*.stderr` files.

I not also remove the ordering restriction for const and type parameters if any of the three const generics features is active.
This ordering restriction feels like the only "real" use of the current `feature(const_generics)` right now so this change isn't a perfect solution, but as I intend to stabilize the ordering - and `feature(const_generics_defaults)` -  in the very near future, I think this is acceptable for now.

---

cc `@rust-lang/project-const-generics` about the new feature names and this change in general.

I don't think we need any external approval for this change but I do intend to publish an update to the const generics tracking issue the day this PR lands, so I don't want this merged yet.

Apologies to whoever ends up reviewing this PR 😅 ❤️

r? rust-lang/project-const-generics
2021-08-30 22:21:01 +00:00
..
rustc
rustc_apfloat
rustc_arena Auto merge of #85690 - bstrie:m2_arena, r=jackh726,nagisa 2021-08-28 20:58:12 +00:00
rustc_ast allow unordered const/ty params if any cg feature is active 2021-08-30 11:00:21 +02:00
rustc_ast_lowering ast_lowering: Introduce lower_span for catching all spans entering HIR 2021-08-29 10:49:40 +03:00
rustc_ast_passes allow unordered const/ty params if any cg feature is active 2021-08-30 11:00:21 +02:00
rustc_ast_pretty Auto merge of #88262 - klensy:pprust-cow, r=nagisa 2021-08-29 17:46:29 +00:00
rustc_attr Remove Session.used_attrs and move logic to CheckAttrVisitor 2021-08-21 13:27:27 -05:00
rustc_builtin_macros Move named_asm_labels to a HIR lint 2021-08-24 08:23:58 -04:00
rustc_codegen_cranelift rustc_target: TyAndLayout::field should never error. 2021-08-30 00:44:09 +03:00
rustc_codegen_llvm Auto merge of #88337 - eddyb:field-failure-is-not-an-option, r=nagisa 2021-08-29 22:54:26 +00:00
rustc_codegen_ssa Auto merge of #88337 - eddyb:field-failure-is-not-an-option, r=nagisa 2021-08-29 22:54:26 +00:00
rustc_data_structures Update stacker and psm crates 2021-08-28 00:40:49 +02:00
rustc_driver
rustc_error_codes feature(const_param_types) -> feature(adt_const_params) 2021-08-30 12:07:36 +02:00
rustc_errors Use if-let guards in the codebase 2021-08-25 20:24:35 +02:00
rustc_expand Auto merge of #88262 - klensy:pprust-cow, r=nagisa 2021-08-29 17:46:29 +00:00
rustc_feature feature(const_param_types) -> feature(adt_const_params) 2021-08-30 12:07:36 +02:00
rustc_fs_util
rustc_graphviz
rustc_hir remove lazy_normalization_consts 2021-08-30 11:00:21 +02:00
rustc_hir_pretty Remove obsolete MacroDef variant of OwnerNode 2021-08-28 00:24:30 -07:00
rustc_incremental Remove Session.used_attrs and move logic to CheckAttrVisitor 2021-08-21 13:27:27 -05:00
rustc_index
rustc_infer feature(const_generics) -> feature(const_param_types) 2021-08-30 11:00:21 +02:00
rustc_interface don't generate partially-undef consts 2021-08-25 17:49:28 -04:00
rustc_lexer Fix more “a”/“an” typos 2021-08-22 17:27:18 +02:00
rustc_lint feature(const_generics) -> feature(const_param_types) 2021-08-30 11:00:21 +02:00
rustc_lint_defs Tracking issue for UNSUPPORTED_CALLING_CONVENTIONS 2021-08-27 20:47:00 +03:00
rustc_llvm RustWrapper: adapt to LLVM change 0f45c16f2caa 2021-08-26 10:40:27 -04:00
rustc_macros Rollup merge of #86123 - Aaron1011:query-span, r=cjgillot 2021-08-19 19:30:04 +02:00
rustc_metadata Treat macros as HIR items 2021-08-28 00:16:34 -07:00
rustc_middle feature(const_generics) -> feature(const_param_types) 2021-08-30 11:00:21 +02:00
rustc_mir Auto merge of #88337 - eddyb:field-failure-is-not-an-option, r=nagisa 2021-08-29 22:54:26 +00:00
rustc_mir_build Auto merge of #88088 - nbdd0121:const2, r=nagisa 2021-08-29 02:21:07 +00:00
rustc_parse Auto merge of #88262 - klensy:pprust-cow, r=nagisa 2021-08-29 17:46:29 +00:00
rustc_parse_format
rustc_passes Auto merge of #88337 - eddyb:field-failure-is-not-an-option, r=nagisa 2021-08-29 22:54:26 +00:00
rustc_plugin_impl Remove Session.used_attrs and move logic to CheckAttrVisitor 2021-08-21 13:27:27 -05:00
rustc_privacy rename const_evaluatable_checked to generic_const_exprs 2021-08-30 11:00:21 +02:00
rustc_query_impl shrink ty::PredicateKind again 2021-08-26 11:00:30 +02:00
rustc_query_system
rustc_resolve feature(const_generics) -> feature(const_param_types) 2021-08-30 11:00:21 +02:00
rustc_save_analysis Treat macros as HIR items 2021-08-28 00:16:34 -07:00
rustc_serialize Fix more “a”/“an” typos 2021-08-22 16:35:29 +02:00
rustc_session Remove Session.if_let_suggestions 2021-08-27 18:28:22 -05:00
rustc_span feature(const_param_types) -> feature(adt_const_params) 2021-08-30 12:07:36 +02:00
rustc_symbol_mangling Rollup merge of #85534 - csmoe:demagnle-assert, r=michaelwoerister 2021-08-29 16:25:28 +02:00
rustc_target Auto merge of #88337 - eddyb:field-failure-is-not-an-option, r=nagisa 2021-08-29 22:54:26 +00:00
rustc_trait_selection rename const_evaluatable_checked to generic_const_exprs 2021-08-30 11:00:21 +02:00
rustc_traits Auto merge of #88371 - Manishearth:rollup-pkkjsme, r=Manishearth 2021-08-27 01:07:17 +00:00
rustc_ty_utils Auto merge of #88371 - Manishearth:rollup-pkkjsme, r=Manishearth 2021-08-27 01:07:17 +00:00
rustc_type_ir update TypeFlags to deal with missing ct substs 2021-08-26 11:00:30 +02:00
rustc_typeck Auto merge of #88369 - lcnr:cec-rename, r=oli-obk 2021-08-30 22:21:01 +00:00