Skip to content

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

@nwoeanhinnogaehr

Description

@nwoeanhinnogaehr

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)

Activity

nagisa

nagisa commented on Feb 18, 2015

@nagisa
Member

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 added
E-needs-testCall for participation: An issue has been fixed and does not reproduce, but no test has been added.
on Apr 3, 2015
added a commit that references this issue on Apr 30, 2015
added a commit that references this issue on May 1, 2015
bc19f68
added a commit that references this issue on May 1, 2015
added a commit that references this issue on May 2, 2015
added a commit that references this issue on May 4, 2015
added a commit that references this issue on May 5, 2015
6cd7486
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-type-systemArea: Type systemE-needs-testCall for participation: An issue has been fixed and does not reproduce, but no test has been added.I-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      Participants

      @kmcallister@nagisa@nwoeanhinnogaehr

      Issue actions

        Internal error looking up a definition [E0242] with where clause on type alias · Issue #22471 · rust-lang/rust