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

Internal error looking up a definition [E0242] with where clause on type alias #22471

Closed
nwoeanhinnogaehr opened this issue Feb 18, 2015 · 1 comment · Fixed by #24979
Closed
Labels
A-typesystem Area: The type system E-needs-test Call for participation: An issue has been fixed and does not reproduce, but no test has been added. I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️

Comments

@nwoeanhinnogaehr
Copy link

Trying to compile this:

type Foo<T> where T: Copy = Box<T>;

gives the following:

<anon>:1:22: 1:26 error: internal error looking up a definition [E0242]
<anon>:1 type Foo<T> where T: Copy = Box<T>;
                              ^~~~

I'm not entirely sure if this is actually legal, but regardless it seems odd that an "internal error" is exposed to the user in the same way that regular compiler errors are.

rustc 1.0.0-nightly (b63cee4a1 2015-02-14 17:01:11 +0000)

@kmcallister kmcallister added A-typesystem Area: The type system I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ labels Feb 18, 2015
@nagisa
Copy link
Member

nagisa commented Feb 18, 2015

Something completely useless, but possibly fun: the line of code responsible for this error is almost 4 years old now, introduced in 48a69d2. During all those years it survived at least 4 switches to and from ~"" strings.

@ghost ghost added the E-needs-test Call for participation: An issue has been fixed and does not reproduce, but no test has been added. label Apr 3, 2015
jooert added a commit to jooert/rust that referenced this issue Apr 30, 2015
Manishearth added a commit to Manishearth/rust that referenced this issue May 1, 2015
jooert added a commit to jooert/rust that referenced this issue May 1, 2015
jooert added a commit to jooert/rust that referenced this issue May 2, 2015
jooert added a commit to jooert/rust that referenced this issue May 4, 2015
bors added a commit that referenced this issue May 5, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-typesystem Area: The type system E-needs-test Call for participation: An issue has been fixed and does not reproduce, but no test has been added. I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants