Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ICE: fictitious type <&'static str as AsOwned>::R in sizing_type_of() #29832

Closed
WildCryptoFox opened this issue Nov 14, 2015 · 2 comments
Closed
Labels
A-trait-system Area: Trait system I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️

Comments

@WildCryptoFox
Copy link
Contributor

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()
@Manishearth Manishearth added I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ A-trait-system Area: Trait system labels Nov 14, 2015
@eddyb
Copy link
Member

eddyb commented Nov 14, 2015

cc @jroesch @nikomatsakis This looks like should've been normalized quite early, what's stopping it, the 'a lifetime param?

@arielb1
Copy link
Contributor

arielb1 commented Nov 14, 2015

@eddyb

Right. I had a branch fixing this, but it was killed due to rebase damage.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-trait-system Area: Trait system I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️
Projects
None yet
Development

No branches or pull requests

4 participants