Skip to content

Improve case with one named, one anonymous lifetime parameter - SubSupConflict Errors #42701

Closed
@gaurikholkar-zz

Description

@gaurikholkar-zz

Currently in #42669, we are handling only ConcreteFailure RegionResolution Errors. We need to detect and improve the error message for SubSupConflict Error as well.

struct Foo {
  field: i32
}
impl Foo{

  fn foo2<'a>(&self, x: &'a i32) -> &'a i32 {
    if true { &self.field } else { x }
  }
}

cc @nikomatsakis

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-diagnosticsArea: Messages for errors, warnings, and lintsC-enhancementCategory: An issue proposing an enhancement or a PR with one.WG-diagnosticsWorking group: Diagnostics

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions