summaryrefslogtreecommitdiffstats
path: root/src/test/ui/async-await/issue-63832-await-short-temporary-lifetime-1.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/ui/async-await/issue-63832-await-short-temporary-lifetime-1.rs')
-rw-r--r--src/test/ui/async-await/issue-63832-await-short-temporary-lifetime-1.rs19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/test/ui/async-await/issue-63832-await-short-temporary-lifetime-1.rs b/src/test/ui/async-await/issue-63832-await-short-temporary-lifetime-1.rs
new file mode 100644
index 000000000..54059b29f
--- /dev/null
+++ b/src/test/ui/async-await/issue-63832-await-short-temporary-lifetime-1.rs
@@ -0,0 +1,19 @@
+// check-pass
+// edition:2018
+
+struct Test(String);
+
+impl Test {
+ async fn borrow_async(&self) {}
+
+ fn with(&mut self, s: &str) -> &mut Self {
+ self.0 = s.into();
+ self
+ }
+}
+
+async fn test() {
+ Test("".to_string()).with("123").borrow_async().await;
+}
+
+fn main() { }