Skip to content

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

Closed
@ben0x539

Description

@ben0x539

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

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

    Issue actions