Closed
Description
I would expect it to be covariant. This seems to be an unintentional side-effect of using *mut
internally.
Code
use std::sync::Arc;
fn works<'r>(x: Box<&'static str>) -> Box<&'r str> {
x
}
fn also_works<'r,'w>(x: &'w &'static str) -> &'w &'r str {
x
}
fn breaks<'r>(x: Arc<&'static str>) -> Arc<&'r str> {
x
}
fn main() {}
Metadata
Metadata
Assignees
Labels
No labels