rust/compiler
bors 03a8cc7df1 Auto merge of #93505 - lcnr:substsref-vs-ty-list, r=michaelwoerister
safely `transmute<&List<Ty<'tcx>>, &List<GenericArg<'tcx>>>`

This PR has 3 relevant steps which are is split in distinct commits.

The first commit now interns `List<Ty<'tcx>>` and `List<GenericArg<'tcx>>` together, potentially reusing memory while allowing free conversions between these two using `List<Ty<'tcx>>::as_substs()` and `SubstsRef<'tcx>::try_as_type_list()`.

Using this, we then use `&'tcx List<Ty<'tcx>>` instead of a `SubstsRef<'tcx>` for tuple fields, simplifying a bunch of code.

Finally, as tuple fields and other generic arguments now use a different `TypeFoldable<'tcx>` impl, we optimize the impl for `List<Ty<'tcx>>` improving perf by slightly less than 1% in tuple heavy benchmarks.
2022-02-21 16:03:38 +00:00
..
rustc remove unused jemallocator crate 2022-01-28 16:56:05 +01:00
rustc_apfloat
rustc_arena Remove unused dep from rustc_arena 2022-02-02 17:37:14 +01:00
rustc_ast Rollup merge of #93634 - matthiaskrgr:clippy_complexity_jan_2022, r=oli-obk 2022-02-18 16:23:33 +01:00
rustc_ast_lowering Rollup merge of #94146 - est31:let_else, r=cjgillot 2022-02-20 00:37:34 +01:00
rustc_ast_passes Rollup merge of #94146 - est31:let_else, r=cjgillot 2022-02-20 00:37:34 +01:00
rustc_ast_pretty Pretty print ItemKind::Use in rustfmt style 2022-02-07 21:51:05 -08:00
rustc_attr Rollup merge of #94146 - est31:let_else, r=cjgillot 2022-02-20 00:37:34 +01:00
rustc_borrowck use List<Ty<'tcx>> for tuples 2022-02-21 07:09:11 +01:00
rustc_builtin_macros Rollup merge of #94146 - est31:let_else, r=cjgillot 2022-02-20 00:37:34 +01:00
rustc_codegen_cranelift use List<Ty<'tcx>> for tuples 2022-02-21 07:09:11 +01:00
rustc_codegen_gcc Move ty::print methods to Drop-based scope guards 2022-02-16 17:24:23 -05:00
rustc_codegen_llvm use List<Ty<'tcx>> for tuples 2022-02-21 07:09:11 +01:00
rustc_codegen_ssa use List<Ty<'tcx>> for tuples 2022-02-21 07:09:11 +01:00
rustc_const_eval Auto merge of #94062 - Mark-Simulacrum:drop-print-cfg, r=oli-obk 2022-02-20 18:12:59 +00:00
rustc_data_structures Auto merge of #93934 - rusticstuff:inline_ensure_sufficient_stack, r=estebank 2022-02-20 15:10:19 +00:00
rustc_driver Rollup merge of #94146 - est31:let_else, r=cjgillot 2022-02-20 00:37:34 +01:00
rustc_error_codes Revert "Auto merge of #91403 - cjgillot:inherit-async, r=oli-obk" 2022-02-17 16:00:04 +00:00
rustc_errors Adopt let else in more places 2022-02-19 17:27:43 +01:00
rustc_expand Rollup merge of #94146 - est31:let_else, r=cjgillot 2022-02-20 00:37:34 +01:00
rustc_feature Rollup merge of #93658 - cchiw:issue-77443-fix, r=joshtriplett 2022-02-19 06:45:29 +01:00
rustc_fs_util
rustc_graphviz
rustc_hir Adopt let else in more places 2022-02-19 17:27:43 +01:00
rustc_hir_pretty Rollup merge of #93746 - cjgillot:nodefii, r=nikomatsakis 2022-02-09 14:12:22 +09:00
rustc_incremental Adopt let else in more places 2022-02-19 17:27:43 +01:00
rustc_index Adopt let else in more places 2022-02-19 17:27:43 +01:00
rustc_infer use List<Ty<'tcx>> for tuples 2022-02-21 07:09:11 +01:00
rustc_interface Rollup merge of #94146 - est31:let_else, r=cjgillot 2022-02-20 00:37:34 +01:00
rustc_lexer
rustc_lint use List<Ty<'tcx>> for tuples 2022-02-21 07:09:11 +01:00
rustc_lint_defs Implement --check-cfg option (RFC 3013) 2022-02-16 13:03:12 +01:00
rustc_llvm Rollup merge of #91675 - ivanloz:memtagsan, r=nagisa 2022-02-18 23:23:03 +01:00
rustc_log
rustc_macros Move ty::print methods to Drop-based scope guards 2022-02-16 17:24:23 -05:00
rustc_metadata Adopt let else in more places 2022-02-19 17:27:43 +01:00
rustc_middle Auto merge of #93505 - lcnr:substsref-vs-ty-list, r=michaelwoerister 2022-02-21 16:03:38 +00:00
rustc_mir_build Auto merge of #93505 - lcnr:substsref-vs-ty-list, r=michaelwoerister 2022-02-21 16:03:38 +00:00
rustc_mir_dataflow use List<Ty<'tcx>> for tuples 2022-02-21 07:09:11 +01:00
rustc_mir_transform use List<Ty<'tcx>> for tuples 2022-02-21 07:09:11 +01:00
rustc_monomorphize Auto merge of #94062 - Mark-Simulacrum:drop-print-cfg, r=oli-obk 2022-02-20 18:12:59 +00:00
rustc_parse Rollup merge of #94146 - est31:let_else, r=cjgillot 2022-02-20 00:37:34 +01:00
rustc_parse_format Correctly mark the span of captured arguments in format_args!() 2022-02-16 07:34:06 +00:00
rustc_passes Adopt let else in more places 2022-02-19 17:27:43 +01:00
rustc_plugin_impl
rustc_privacy Overhaul Const. 2022-02-15 16:19:59 +11:00
rustc_query_impl Auto merge of #94066 - Mark-Simulacrum:factor-out-simple-def-kind, r=davidtwco 2022-02-21 03:36:55 +00:00
rustc_query_system Remove SimpleDefKind 2022-02-17 18:08:45 -05:00
rustc_resolve Rollup merge of #94146 - est31:let_else, r=cjgillot 2022-02-20 00:37:34 +01:00
rustc_save_analysis Auto merge of #94062 - Mark-Simulacrum:drop-print-cfg, r=oli-obk 2022-02-20 18:12:59 +00:00
rustc_serialize Adopt let else in more places 2022-02-19 17:27:43 +01:00
rustc_session Rollup merge of #94146 - est31:let_else, r=cjgillot 2022-02-20 00:37:34 +01:00
rustc_span Rollup merge of #94146 - est31:let_else, r=cjgillot 2022-02-20 00:37:34 +01:00
rustc_symbol_mangling use List<Ty<'tcx>> for tuples 2022-02-21 07:09:11 +01:00
rustc_target Rollup merge of #94146 - est31:let_else, r=cjgillot 2022-02-20 00:37:34 +01:00
rustc_trait_selection Auto merge of #93505 - lcnr:substsref-vs-ty-list, r=michaelwoerister 2022-02-21 16:03:38 +00:00
rustc_traits use List<Ty<'tcx>> for tuples 2022-02-21 07:09:11 +01:00
rustc_ty_utils use List<Ty<'tcx>> for tuples 2022-02-21 07:09:11 +01:00
rustc_type_ir Inline UnifyKey::index and UnifyKey::from_index 2022-02-15 19:07:06 +01:00
rustc_typeck use List<Ty<'tcx>> for tuples 2022-02-21 07:09:11 +01:00