2019-09-19 10:41:10 -05:00
|
|
|
// Regression test for issue #64433.
|
|
|
|
//
|
|
|
|
// See issue-64391-2.rs for more details, as that was fixed by the
|
|
|
|
// same PR.
|
|
|
|
//
|
|
|
|
// check-pass
|
2019-09-19 12:15:54 -05:00
|
|
|
// edition:2018
|
2019-09-19 10:41:10 -05:00
|
|
|
|
|
|
|
#[derive(Debug)]
|
|
|
|
struct A<'a> {
|
|
|
|
inner: Vec<&'a str>,
|
|
|
|
}
|
|
|
|
|
|
|
|
struct B {}
|
|
|
|
|
|
|
|
impl B {
|
|
|
|
async fn something_with_a(&mut self, a: A<'_>) -> Result<(), String> {
|
|
|
|
println!("{:?}", a);
|
|
|
|
Ok(())
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
async fn can_error(some_string: &str) -> Result<(), String> {
|
|
|
|
let a = A { inner: vec![some_string, "foo"] };
|
|
|
|
let mut b = B {};
|
2020-01-02 02:56:12 -06:00
|
|
|
Ok(b.something_with_a(a).await.map(drop)?)
|
2019-09-19 10:41:10 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
fn main() {
|
|
|
|
}
|