rust/compiler/rustc_mir_build/src
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
..
build Auto merge of #93505 - lcnr:substsref-vs-ty-list, r=michaelwoerister 2022-02-21 16:03:38 +00:00
thir Auto merge of #93505 - lcnr:substsref-vs-ty-list, r=michaelwoerister 2022-02-21 16:03:38 +00:00
check_unsafety.rs Remove deprecated LLVM-style inline assembly 2022-01-12 18:51:31 +01:00
lib.rs add a rustc::query_stability lint 2022-02-01 10:15:59 +01:00
lints.rs Check the number of arguments first in is_recursive_call 2022-01-29 23:00:54 +01:00