Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Look at concrete lifetimes instead of whole type #52739

Closed
Mark-Simulacrum opened this issue Jul 26, 2018 · 0 comments
Closed

Look at concrete lifetimes instead of whole type #52739

Mark-Simulacrum opened this issue Jul 26, 2018 · 0 comments
Assignees
Labels
A-diagnostics Area: Messages for errors, warnings, and lints NLL-diagnostics Working towards the "diagnostic parity" goal

Comments

@Mark-Simulacrum
Copy link
Member

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

@Mark-Simulacrum Mark-Simulacrum added A-diagnostics Area: Messages for errors, warnings, and lints NLL-diagnostics Working towards the "diagnostic parity" goal labels Jul 26, 2018
@davidtwco davidtwco self-assigned this Jul 26, 2018
bors added a commit that referenced this issue Aug 6, 2018
Disable some nice region errors in NLL mode.

Fixes #52739. cc #52742.

r? @nikomatsakis
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-diagnostics Area: Messages for errors, warnings, and lints NLL-diagnostics Working towards the "diagnostic parity" goal
Projects
None yet
Development

No branches or pull requests

2 participants