Skip to content

Region#subst ICE: trait A<'self, T> { fn f() -> &'self T;} #5518

Closed
@nielsle

Description

@nielsle

The following program causes a compiler error

#[crate_type = "lib"];
trait A<'self, T> { fn f() -> &'self T;}

$ rustc --version
/home/niels/local/src/rust/x86_64-unknown-linux-gnu/stage2/bin/rustc 0.6 (28efc23 2013-03-22 23:09:15 -0700)

$ rustc tests.rs
error: internal compiler error: ty::subst: Reference to self region when given substs with no self region, ty = &'self 'a

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

    No branches or pull requests

    Issue actions