rust/compiler
Matthias Krüger 089e8c03bc
Rollup merge of #107489 - compiler-errors:non_lifetime_binders, r=cjgillot
Implement partial support for non-lifetime binders

This implements support for non-lifetime binders. It's pretty useless currently, but I wanted to put this up so the implementation can be discussed.

Specifically, this piggybacks off of the late-bound lifetime collection code in `rustc_hir_typeck::collect::lifetimes`. This seems like a necessary step given the fact we don't resolve late-bound regions until this point, and binders are sometimes merged.

Q: I'm not sure if I should go along this route, or try to modify the earlier nameres code to compute the right bound var indices for type and const binders eagerly... If so, I'll need to rename all these queries to something more appropriate (I've done this for `resolve_lifetime::Region` -> `resolve_lifetime::ResolvedArg`)

cc rust-lang/types-team#81

r? `@ghost`
2023-02-17 00:19:34 +01:00
..
rustc
rustc_abi Rollup merge of #107163 - mikebenfield:parameters-pr, r=TaKO8Ki 2023-02-15 12:24:54 +05:30
rustc_apfloat
rustc_arena
rustc_ast
rustc_ast_lowering Better label for illegal impl trait types 2023-02-14 23:12:27 +00:00
rustc_ast_passes Rollup merge of #107489 - compiler-errors:non_lifetime_binders, r=cjgillot 2023-02-17 00:19:34 +01:00
rustc_ast_pretty
rustc_attr Add feature gate for non_lifetime_binders 2023-02-16 03:39:58 +00:00
rustc_baked_icu_data
rustc_borrowck Auto merge of #108127 - matthiaskrgr:rollup-kpzfc6j, r=matthiaskrgr 2023-02-16 19:21:02 +00:00
rustc_builtin_macros Replace some thens with some then_somes 2023-02-16 15:26:03 +00:00
rustc_codegen_cranelift if $c:expr { Some($r:expr) } else { None } =>> $c.then(|| $r) 2023-02-16 15:26:00 +00:00
rustc_codegen_gcc s/eval_usize/eval_target_usize/ for clarity 2023-02-14 08:51:19 +00:00
rustc_codegen_llvm Replace some thens with some then_somes 2023-02-16 15:26:03 +00:00
rustc_codegen_ssa Replace some thens with some then_somes 2023-02-16 15:26:03 +00:00
rustc_const_eval Auto merge of #108096 - matthiaskrgr:rollup-ncexzf6, r=matthiaskrgr 2023-02-16 00:12:54 +00:00
rustc_data_structures if $c:expr { Some($r:expr) } else { None } =>> $c.then(|| $r) 2023-02-16 15:26:00 +00:00
rustc_driver
rustc_driver_impl Remove save-analysis. 2023-02-16 15:14:45 +11:00
rustc_error_codes
rustc_error_messages Remove save-analysis. 2023-02-16 15:14:45 +11:00
rustc_errors Rollup merge of #108090 - WaffleLapkin:if_not_now_then_when…, r=oli-obk 2023-02-16 17:51:25 +01:00
rustc_expand Replace some thens with some then_somes 2023-02-16 15:26:03 +00:00
rustc_feature Rollup merge of #107489 - compiler-errors:non_lifetime_binders, r=cjgillot 2023-02-17 00:19:34 +01:00
rustc_fs_util
rustc_graphviz
rustc_hir if $c:expr { Some($r:expr) } else { None } =>> $c.then(|| $r) 2023-02-16 15:26:00 +00:00
rustc_hir_analysis Rollup merge of #107489 - compiler-errors:non_lifetime_binders, r=cjgillot 2023-02-17 00:19:34 +01:00
rustc_hir_pretty
rustc_hir_typeck Rollup merge of #107489 - compiler-errors:non_lifetime_binders, r=cjgillot 2023-02-17 00:19:34 +01:00
rustc_incremental
rustc_index
rustc_infer Rollup merge of #107489 - compiler-errors:non_lifetime_binders, r=cjgillot 2023-02-17 00:19:34 +01:00
rustc_interface Remove save-analysis. 2023-02-16 15:14:45 +11:00
rustc_lexer
rustc_lint Rollup merge of #107489 - compiler-errors:non_lifetime_binders, r=cjgillot 2023-02-17 00:19:34 +01:00
rustc_lint_defs
rustc_llvm
rustc_log
rustc_macros Use derive attributes for uninteresting traversals 2023-02-14 15:09:40 +00:00
rustc_metadata Rename some region-specific stuff 2023-02-16 03:39:59 +00:00
rustc_middle Rollup merge of #107489 - compiler-errors:non_lifetime_binders, r=cjgillot 2023-02-17 00:19:34 +01:00
rustc_mir_build Auto merge of #108127 - matthiaskrgr:rollup-kpzfc6j, r=matthiaskrgr 2023-02-16 19:21:02 +00:00
rustc_mir_dataflow Replace some thens with some then_somes 2023-02-16 15:26:03 +00:00
rustc_mir_transform Rollup merge of #107489 - compiler-errors:non_lifetime_binders, r=cjgillot 2023-02-17 00:19:34 +01:00
rustc_monomorphize Move query out of path. 2023-02-14 20:27:38 +00:00
rustc_parse Replace some thens with some then_somes 2023-02-16 15:26:03 +00:00
rustc_parse_format Replace some thens with some then_somes 2023-02-16 15:26:03 +00:00
rustc_passes Rollup merge of #107489 - compiler-errors:non_lifetime_binders, r=cjgillot 2023-02-17 00:19:34 +01:00
rustc_plugin_impl
rustc_privacy Deny some late-bound ty/ct in some positions, add tests 2023-02-16 03:39:59 +00:00
rustc_query_impl
rustc_query_system if $c:expr { Some($r:expr) } else { None } =>> $c.then(|| $r) 2023-02-16 15:26:00 +00:00
rustc_resolve Rollup merge of #107489 - compiler-errors:non_lifetime_binders, r=cjgillot 2023-02-17 00:19:34 +01:00
rustc_serialize
rustc_session Rollup merge of #107489 - compiler-errors:non_lifetime_binders, r=cjgillot 2023-02-17 00:19:34 +01:00
rustc_smir
rustc_span Rollup merge of #107489 - compiler-errors:non_lifetime_binders, r=cjgillot 2023-02-17 00:19:34 +01:00
rustc_symbol_mangling if $c:expr { Some($r:expr) } else { None } =>> $c.then(|| $r) 2023-02-16 15:26:00 +00:00
rustc_target Rollup merge of #107968 - ian-h-chamberlain:feature/3ds-enable-thread-local, r=Nilstrieb 2023-02-15 12:24:55 +05:30
rustc_trait_selection Rollup merge of #107489 - compiler-errors:non_lifetime_binders, r=cjgillot 2023-02-17 00:19:34 +01:00
rustc_traits Add specialized variants of mk_region. 2023-02-15 09:02:44 +11:00
rustc_transmute s/eval_usize/eval_target_usize/ for clarity 2023-02-14 08:51:19 +00:00
rustc_ty_utils Auto merge of #108127 - matthiaskrgr:rollup-kpzfc6j, r=matthiaskrgr 2023-02-16 19:21:02 +00:00
rustc_type_ir simplify some refs 2023-02-15 23:48:01 +01:00