Info
This post is auto-generated from RSS feed The Rust Programming Language Forum - Latest topics. Source: Returned reference independent of parameter
fn foo<'a>(&self, arg: &’a mut Type) → &’a mut Type {
// …
return arg;
}
This demands &self
outlives ’a
. Is there any way or any planned way to specify that the return is independent of the lifetime of the first argument?
3 posts - 2 participants
🏷️ Rust_feed