mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-01 06:51:58 +00:00
20 lines
292 B
Rust
20 lines
292 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() { }
|