rust/compiler
Mara Bos f783871ab1
Rollup merge of #79298 - lcnr:new-elysium, r=matthewjasper
correctly deal with late-bound lifetimes in anon consts

adds support for using late bound lifetimes of the parent context in anon consts.
```rust
#![feature(const_generics)]
const fn inner<'a>() -> usize where &'a (): Sized { 3 }

fn test<'a>() {
    let _: [u8; inner::<'a>()];
}
```
The lifetime `'a` is late bound in `test` so it's not included in its generics but is instead dealt with separately in borrowck.
This didn't previously work for anon consts as they have to use the late bound lifetimes of their parent which has
to be explicitly handled.

r? ```@matthewjasper``` cc ```@varkor``` ```@eddyb```
2021-01-17 12:24:39 +00:00
..
rustc
rustc_apfloat
rustc_arena
rustc_ast Remove unnecessary manual shrink_to_fit calls 2021-01-16 14:02:36 +01:00
rustc_ast_lowering Use Option::map_or instead of .map(..).unwrap_or(..) 2021-01-14 19:23:59 +01:00
rustc_ast_passes Use Option::map_or instead of .map(..).unwrap_or(..) 2021-01-14 19:23:59 +01:00
rustc_ast_pretty ast: Remove some indirection layers from values in key-value attributes 2021-01-09 21:50:39 +03:00
rustc_attr
rustc_builtin_macros resolve: Simplify built-in macro table 2021-01-10 14:48:47 +03:00
rustc_codegen_cranelift codegen_cranelift: Fix redundant semicolon warn 2021-01-16 07:17:13 +03:00
rustc_codegen_llvm Auto merge of #77885 - erikdesjardins:probeasm, r=cuviper 2021-01-16 03:10:52 +00:00
rustc_codegen_ssa Use Option::map_or instead of .map(..).unwrap_or(..) 2021-01-14 19:23:59 +01:00
rustc_data_structures Use Option::map_or instead of .map(..).unwrap_or(..) 2021-01-14 19:23:59 +01:00
rustc_driver Rollup merge of #80944 - LingMan:map_or, r=nagisa 2021-01-15 18:26:14 +09:00
rustc_error_codes Rollup merge of #80614 - 1000teslas:issue-78938-fix, r=tmandry 2021-01-16 17:29:49 +00:00
rustc_errors Use Option::map_or instead of .map(..).unwrap_or(..) 2021-01-14 19:23:59 +01:00
rustc_expand Use Option::map_or instead of .map(..).unwrap_or(..) 2021-01-14 19:23:59 +01:00
rustc_feature Allow #[rustc_builtin_macro = "name"]. 2021-01-09 19:50:06 +01:00
rustc_fs_util Optimize away a fs::metadata call. 2021-01-06 08:33:15 -08:00
rustc_graphviz remove redundant closures (clippy::redundant_closure) 2021-01-03 13:34:24 +01:00
rustc_hir Use Option::map_or instead of .map(..).unwrap_or(..) 2021-01-14 19:23:59 +01:00
rustc_hir_pretty Auto merge of #79328 - c410-f3r:hir-if, r=matthewjasper 2021-01-14 14:41:58 +00:00
rustc_incremental Remove DepKind::CrateMetadata and pre-allocation of DepNodes 2021-01-12 11:22:57 -08:00
rustc_index
rustc_infer Use Option::map_or instead of .map(..).unwrap_or(..) 2021-01-14 19:23:59 +01:00
rustc_interface Remove DepKind::CrateMetadata and pre-allocation of DepNodes 2021-01-12 11:22:57 -08:00
rustc_lexer Return EOF_CHAR constant instead of magic char. 2021-01-07 13:20:04 +01:00
rustc_lint Use Option::map_or instead of .map(..).unwrap_or(..) 2021-01-14 19:23:59 +01:00
rustc_lint_defs Introduce missing ABI lint on extern blocks 2021-01-13 07:49:16 -05:00
rustc_llvm Use probe-stack=inline-asm in LLVM 11+ 2021-01-14 22:49:16 -05:00
rustc_macros Use Option::map_or instead of .map(..).unwrap_or(..) 2021-01-14 19:23:59 +01:00
rustc_metadata Auto merge of #80602 - tgnottingham:cratemetadata_you_aint_special, r=michaelwoerister 2021-01-15 21:13:35 +00:00
rustc_middle correctly deal with late-bound lifetimes in anon consts 2021-01-16 19:27:42 +01:00
rustc_mir Rollup merge of #79298 - lcnr:new-elysium, r=matthewjasper 2021-01-17 12:24:39 +00:00
rustc_mir_build Auto merge of #80290 - RalfJung:less-intrinsic-write, r=lcnr 2021-01-16 17:28:32 +00:00
rustc_parse Rollup merge of #80944 - LingMan:map_or, r=nagisa 2021-01-15 18:26:14 +09:00
rustc_parse_format Use Option::map_or instead of .map(..).unwrap_or(..) 2021-01-14 19:23:59 +01:00
rustc_passes Auto merge of #79328 - c410-f3r:hir-if, r=matthewjasper 2021-01-14 14:41:58 +00:00
rustc_plugin_impl
rustc_privacy Separate out a hir::Impl struct 2021-01-12 20:32:33 -05:00
rustc_query_system Use Option::map_or instead of .map(..).unwrap_or(..) 2021-01-14 19:23:59 +01:00
rustc_resolve correctly deal with late-bound lifetimes in anon consts 2021-01-16 19:27:42 +01:00
rustc_save_analysis Use Option::map_or instead of .map(..).unwrap_or(..) 2021-01-14 19:23:59 +01:00
rustc_serialize rustc_serialize: fix incorrect signed LEB128 decoding 2021-01-11 12:13:26 -08:00
rustc_session Use Option::map_or instead of .map(..).unwrap_or(..) 2021-01-14 19:23:59 +01:00
rustc_span Auto merge of #80290 - RalfJung:less-intrinsic-write, r=lcnr 2021-01-16 17:28:32 +00:00
rustc_symbol_mangling Rollup merge of #79968 - bjorn3:better_drop_glue_debuginfo, r=matthewjasper 2021-01-10 16:55:55 +09:00
rustc_target Rollup merge of #80662 - rxrbln:master, r=estebank 2021-01-13 03:20:15 +01:00
rustc_trait_selection Rollup merge of #80944 - LingMan:map_or, r=nagisa 2021-01-15 18:26:14 +09:00
rustc_traits
rustc_ty_utils Auto merge of #77524 - Patryk27:fixes/66228, r=estebank 2021-01-13 20:35:58 +00:00
rustc_type_ir
rustc_typeck Auto merge of #80290 - RalfJung:less-intrinsic-write, r=lcnr 2021-01-16 17:28:32 +00:00