rust/compiler/rustc_passes/src
bors 5b33de3340 Auto merge of #75384 - JulianKnodt:cg_def, r=varkor,lcnr
implement `feature(const_generics_defaults)`

Implements const generics defaults `struct Example<const N: usize=3>`, as well as a query for getting the default of a given const-parameter's def id. There are some remaining FIXME's but they were specified as not blocking for merging this PR. This also puts the defaults behind the unstable feature gate `#![feature(const_generics_defaults)]`.

~~This currently creates a field which is always false on `GenericParamDefKind` for future use when
consts are permitted to have defaults. I'm not sure if this is exactly what is best for adding default parameters, but I mimicked the style of type defaults, so hopefully this is ok.~~

r? `@lcnr`
2021-03-24 04:13:27 +00:00
..
liveness Move RWUTable to a separate module 2020-12-09 00:00:00 +00:00
check_attr.rs Fix comment. 2021-03-23 18:11:04 +01:00
check_const.rs remove redundant wrapping of return types of allow_internal_unstable() and rustc_allow_const_fn_unstable() 2021-02-21 18:11:27 +01:00
dead.rs ast/hir: Rename field-related structures 2021-03-16 11:41:24 +03:00
diagnostic_items.rs Access attrs directly from HirId in rustc_passes::diagnostic_item. 2021-03-09 19:09:32 +01:00
entry.rs Remove hir::Item::attrs. 2021-03-09 19:27:50 +01:00
hir_id_validator.rs Index Modules using their LocalDefId. 2021-02-15 19:32:30 +01:00
hir_stats.rs ast/hir: Rename field-related structures 2021-03-16 11:41:24 +03:00
intrinsicck.rs Use ty::{IntTy,UintTy,FloatTy} in rustc 2021-01-18 21:09:30 +01:00
lang_items.rs Access attrs directly from HirId in rustc_passes::lang_items. 2021-03-09 19:09:31 +01:00
layout_test.rs Only store a LocalDefId in hir::Item. 2021-02-15 19:32:10 +01:00
lib_features.rs Track HirId when visiting attributes. 2021-03-09 19:27:59 +01:00
lib.rs stabilize or_patterns 2021-03-19 19:45:32 -05:00
liveness.rs Replace closures_captures and upvar_capture with closure_min_captures 2021-03-18 20:45:49 -04:00
loops.rs Do not suggest using a break label when one is already present 2021-01-21 21:43:29 -08:00
naked_functions.rs Do not store attrs in FnKind. 2021-03-09 19:09:33 +01:00
reachable.rs Only store a LocalDefId in hir::ImplItem. 2021-02-15 19:32:29 +01:00
region.rs Rename HIR UnOp variants 2021-02-09 11:39:20 +03:00
stability.rs Some refactoring 2021-03-23 17:16:20 +00:00
upvars.rs
weak_lang_items.rs Remove hir::ForeignItem::attrs. 2021-03-09 19:23:07 +01:00