about summary refs log tree commit diff
path: root/src/test
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2022-08-05 06:35:12 +0000
committerbors <bors@rust-lang.org>2022-08-05 06:35:12 +0000
commitcdfd675a63090182fd1c5f2ff58d8eaa115da156 (patch)
tree85180e0a30bcc147e3bfb6378eeb8d85870fb362 /src/test
parent6bcf01afdb1c21a30cdf1fd20f9cdef7c482e753 (diff)
parent4170d7390b90b5eee001d6292b3273dec6d67651 (diff)
downloadrust-cdfd675a63090182fd1c5f2ff58d8eaa115da156.tar.gz
rust-cdfd675a63090182fd1c5f2ff58d8eaa115da156.zip
Auto merge of #99867 - spastorino:refactor-remap-lifetimes, r=nikomatsakis
Split create_def and lowering of lifetimes for opaque types and bare async fns

r? `@cjgillot`

This work is kind of half-way, but I think it could be merged anyway.
I think we should be able to remove all the vacant arms in `new_named_lifetime_with_res`, if I'm not wrong that requires visiting more nodes. We can do that as a follow up.
In follow-up PRs, besides the thing mentioned previously, I'll be trying to remove `LifetimeCaptureContext`, `captured_lifetimes` as a global data structure, global `binders_to_ignore` and all their friends :).

Also try to remap in a more general way based on def-ids.
Diffstat (limited to 'src/test')
-rw-r--r--src/test/ui/impl-trait/rpit-assoc-pair-with-lifetime.rs7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/test/ui/impl-trait/rpit-assoc-pair-with-lifetime.rs b/src/test/ui/impl-trait/rpit-assoc-pair-with-lifetime.rs
new file mode 100644
index 00000000000..a4e603de1ac
--- /dev/null
+++ b/src/test/ui/impl-trait/rpit-assoc-pair-with-lifetime.rs
@@ -0,0 +1,7 @@
+// check-pass
+
+pub fn iter<'a>(v: Vec<(u32, &'a u32)>) -> impl DoubleEndedIterator<Item = (u32, &u32)> {
+    v.into_iter()
+}
+
+fn main() {}