Skip to content

Look at concrete lifetimes instead of whole type #52739

Closed
@Mark-Simulacrum

Description

@Mark-Simulacrum

https://play.rust-lang.org/?gist=f22ad481b8f2b0ff9c8a595815f156b3&version=nightly&mode=debug&edition=2015

#![feature(nll)]

struct Foo<'a, 'b> {
    x: &'a u32,
    y: &'b u32,
}

struct Bar<'b> {
    z: &'b u32
}

fn func(foo: Foo<'_, '_>, bar: Bar<'_>) {
    foo.y = bar.z;
}

fn main() { }

Example by @nikomatsakis , cc @davidtwco

Metadata

Metadata

Assignees

Labels

A-diagnosticsArea: Messages for errors, warnings, and lintsNLL-diagnosticsWorking towards the "diagnostic parity" goal

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions