]> git.lizzy.rs Git - rust.git/blob - tests/ui/async-await/issue-63832-await-short-temporary-lifetime-1.rs
Rollup merge of #106854 - steffahn:drop_linear_arc_rebased, r=Mark-Simulacrum
[rust.git] / tests / ui / async-await / issue-63832-await-short-temporary-lifetime-1.rs
1 // check-pass
2 // edition:2018
3
4 struct Test(String);
5
6 impl Test {
7     async fn borrow_async(&self) {}
8
9     fn with(&mut self, s: &str) -> &mut Self {
10         self.0 = s.into();
11         self
12     }
13 }
14
15 async fn test() {
16     Test("".to_string()).with("123").borrow_async().await;
17 }
18
19 fn main() { }