diff options
| author | bors <bors@rust-lang.org> | 2022-02-21 16:03:38 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2022-02-21 16:03:38 +0000 |
| commit | 03a8cc7df1d65554a4d40825b0490c93ac0f0236 (patch) | |
| tree | c56dda3c041905a13e82de2cf2961caf72f7b7cc /src/test/rustdoc-ui/macro-docs.rs | |
| parent | 1103d2e914b67c18b0deb86073c26c6aefda761d (diff) | |
| parent | 80f56cdc2a749f1262518d2aa7597cf908b9e059 (diff) | |
| download | rust-03a8cc7df1d65554a4d40825b0490c93ac0f0236.tar.gz rust-03a8cc7df1d65554a4d40825b0490c93ac0f0236.zip | |
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.
Diffstat (limited to 'src/test/rustdoc-ui/macro-docs.rs')
0 files changed, 0 insertions, 0 deletions
