rust/tests/ui/async-await/issue-63832-await-short-temporary-lifetime-1.rs
2024-02-16 20:02:50 +00:00

20 lines
294 B
Rust

//@ 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() { }