rust/compiler
bors 58bdb08947 Auto merge of #84299 - lcnr:const-generics-defaults-name-res, r=varkor
various const parameter defaults improvements

Actually resolve names in const parameter defaults, fixing `struct Foo<const N: usize = { usize::MAX }>`.

---
Split generic parameter ban rib for types and consts, allowing
```rust
#![feature(const_generics_defaults)]
struct Q;
struct Foo<T = Q, const Q: usize = 3>(T);
```

---
Remove the type/const ordering restriction if `const_generics_defaults` is active, even if `const_generics` is not. allowing us to stabilize and test const param defaults separately.

---
Check well formedness of const parameter defaults, eagerly emitting an error for `struct Foo<const N: usize = { 0 - 1 }>`

---
Do not forbid const parameters in param defaults, allowing `struct Foo<const N: usize, T = [u8; N]>(T)` and `struct Foo<const N: usize, const M: usize = N>`. Note that this should not change anything which is stabilized, as on stable, type parameters must be in front of const parameters, which means that type parameter defaults are only allowed if no const parameters exist.

We still forbid generic parameters inside of const param types.

r? `@varkor` `@petrochenkov`
2021-04-25 14:00:49 +00:00
..
rustc
rustc_apfloat
rustc_arena
rustc_ast Auto merge of #84310 - RalfJung:const-fn-feature-flags, r=oli-obk 2021-04-24 23:16:03 +00:00
rustc_ast_lowering Lower async fn in traits. 2021-04-13 20:57:44 +02:00
rustc_ast_passes Auto merge of #84299 - lcnr:const-generics-defaults-name-res, r=varkor 2021-04-25 14:00:49 +00:00
rustc_ast_pretty Use AnonConst for asm! constants 2021-04-06 12:35:41 +01:00
rustc_attr Allow specifying alignment for functions 2021-04-05 17:36:51 -04:00
rustc_builtin_macros builtin derive macros: fix error with const generics default 2021-04-16 16:29:11 +02:00
rustc_codegen_cranelift Add more SIMD math.h intrinsics 2021-04-14 15:25:06 -07:00
rustc_codegen_llvm Disable LLVM's new fptoint intrinsics on riscv64 2021-04-23 07:45:23 -07:00
rustc_codegen_ssa Auto merge of #84339 - alexcrichton:llvm-fptoint-sat, r=nagisa 2021-04-23 18:35:49 +00:00
rustc_data_structures Use arrayvec 0.7, drop smallvec 0.6 2021-04-21 22:39:08 -07:00
rustc_driver Rollup merge of #83895 - eggyal:issue-83883, r=jyn514 2021-04-06 17:42:31 +02:00
rustc_error_codes Auto merge of #84310 - RalfJung:const-fn-feature-flags, r=oli-obk 2021-04-24 23:16:03 +00:00
rustc_errors fix few typos 2021-04-19 15:57:08 +03:00
rustc_expand fix few typos 2021-04-19 15:57:08 +03:00
rustc_feature Auto merge of #84299 - lcnr:const-generics-defaults-name-res, r=varkor 2021-04-25 14:00:49 +00:00
rustc_fs_util
rustc_graphviz
rustc_hir Auto merge of #84299 - lcnr:const-generics-defaults-name-res, r=varkor 2021-04-25 14:00:49 +00:00
rustc_hir_pretty Use AnonConst for asm! constants 2021-04-06 12:35:41 +01:00
rustc_incremental
rustc_index fix sanitizer tests 2021-04-25 11:08:33 +02:00
rustc_infer Auto merge of #84310 - RalfJung:const-fn-feature-flags, r=oli-obk 2021-04-24 23:16:03 +00:00
rustc_interface Track -C link-dead-code during incremental compilation 2021-04-15 15:05:26 -04:00
rustc_lexer Fix outdated crate names in compiler docs 2021-04-08 11:12:14 -05:00
rustc_lint fix few typos 2021-04-19 15:57:08 +03:00
rustc_lint_defs Typo 2021-04-20 09:30:28 -04:00
rustc_llvm RustWrapper: work around unification of diagnostic handlers 2021-04-22 15:46:47 -04:00
rustc_macros
rustc_metadata Implement #[rustc_skip_array_during_method_dispatch] 2021-04-16 11:11:59 -07:00
rustc_middle Auto merge of #84299 - lcnr:const-generics-defaults-name-res, r=varkor 2021-04-25 14:00:49 +00:00
rustc_mir Auto merge of #84310 - RalfJung:const-fn-feature-flags, r=oli-obk 2021-04-24 23:16:03 +00:00
rustc_mir_build Auto merge of #84310 - RalfJung:const-fn-feature-flags, r=oli-obk 2021-04-24 23:16:03 +00:00
rustc_parse fix few typos 2021-04-19 15:57:08 +03:00
rustc_parse_format
rustc_passes Auto merge of #84310 - RalfJung:const-fn-feature-flags, r=oli-obk 2021-04-24 23:16:03 +00:00
rustc_plugin_impl
rustc_privacy fix few typos 2021-04-19 15:57:08 +03:00
rustc_query_impl Introduce CompileMonoItem DepNode 2021-04-12 13:58:12 +02:00
rustc_query_system fix feature use in rustc libs 2021-04-18 22:05:45 +02:00
rustc_resolve Auto merge of #84299 - lcnr:const-generics-defaults-name-res, r=varkor 2021-04-25 14:00:49 +00:00
rustc_save_analysis
rustc_serialize
rustc_session Rollup merge of #83519 - oli-obk:assign_shrink_your_normal_code, r=pnkfelix 2021-04-25 01:53:09 +09:00
rustc_span Auto merge of #84147 - cuviper:array-method-dispatch, r=nikomatsakis,m-ou-se 2021-04-25 07:26:49 +00:00
rustc_symbol_mangling
rustc_target Auto merge of #84310 - RalfJung:const-fn-feature-flags, r=oli-obk 2021-04-24 23:16:03 +00:00
rustc_trait_selection Rollup merge of #84343 - camsteffen:closure-tree, r=varkor 2021-04-22 18:14:32 +02:00
rustc_traits
rustc_ty_utils
rustc_type_ir
rustc_typeck Auto merge of #84299 - lcnr:const-generics-defaults-name-res, r=varkor 2021-04-25 14:00:49 +00:00