Skip to content

ICE: trait fn returning &'self => 'region parameterization should have inferred that this type is RP' #6551

Closed
@ben0x539

Description

@ben0x539
Contributor

sample code:

trait Tr<'self> {
    fn f(&self) -> &'self int;
}

fn g<T: Tr<'self>>() {}

fn main() {}

rustc ICE:

rust: task failed at 'region parameterization should have inferred that this type is RP', [...]/rust/src/librustc/middle/typeck/rscope.rs:230

Activity

metajack

metajack commented on Jul 11, 2013

@metajack
Contributor

Still an ICE.

not sure if this is important, but nominating for discussing to production ready

catamorphism

catamorphism commented on Aug 29, 2013

@catamorphism
Contributor

Sub-bug of #4846, de-nominating

ben0x539

ben0x539 commented on Dec 5, 2013

@ben0x539
ContributorAuthor

The example code doesn't compile anymore and I can't get it to throw that error anymore by fiddling with it, so I assume this was fixed at some point but I'm not sure what a regression test would look like. Do we need one?

alexcrichton

alexcrichton commented on Dec 18, 2013

@alexcrichton
Member

This fails with a legitimate error today, and I've seen relevant tests for this in the tests suite, so closing.

added a commit that references this issue on Jan 15, 2021

Auto merge of rust-lang#6551 - phansch:tiny-symbol-cleanup, r=flip1995

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-lifetimesArea: Lifetimes / regionsI-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

        Participants

        @ben0x539@metajack@alexcrichton@catamorphism

        Issue actions

          ICE: trait fn returning &'self => 'region parameterization should have inferred that this type is RP' · Issue #6551 · rust-lang/rust