summaryrefslogtreecommitdiffstats
path: root/tests/ui/async-await/issue-63832-await-short-temporary-lifetime-1.rs
blob: 54059b29f72e27fd476fe4f4c1fe0ea2dcce2577 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
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() { }