blob: 1b85644e72f3c33434e9e2cef4fc278fe5ad2b48 [file]
// Regression test for <https://github.com/rust-lang/rust/issues/119686>.
//@ edition: 2024
struct A;
pub trait Trait1 {
async fn func() -> ();
}
impl Trait1 for A {
async fn func() -> () {
let p = std::convert::identity(&("".to_string()));
//~^ ERROR temporary value dropped while borrowed
let _q = p;
}
}
fn main() {}