Closed
Description
The following code causes a compiler panic.
trait AsOwned { type R; }
impl<'a> AsOwned for &'a str { type R = String; }
fn as_owned<'a>(a: &'a str) -> <&'a str as AsOwned>::R { a.to_owned() }
This should resolve to a concrete type but instead panics with: play.rust-lang.org
error: internal compiler error: fictitious type <&'static str as AsOwned>::R in
sizing_type_of()