We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents bdbe488 + 68ccc34 commit 089d160Copy full SHA for 089d160
coretests/tests/pin_macro.rs
@@ -47,3 +47,14 @@ fn temp_lifetime() {
47
}
48
async fn foo(_: &mut usize) {}
49
50
+
51
+#[test]
52
+fn transitive_extension() {
53
+ async fn temporary() {}
54
55
+ // `pin!` witnessed in the wild being used like this, even if it yields
56
+ // a `Pin<&mut &mut impl Unpin>`; it does work because `pin!`
57
+ // happens to transitively extend the lifespan of `temporary()`.
58
+ let p = pin!(&mut temporary());
59
+ let _use = p;
60
+}
0 commit comments