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

MIR borrowck: spurious error with ref pattern in argument #46161

Closed
arielb1 opened this issue Nov 21, 2017 · 0 comments
Closed

MIR borrowck: spurious error with ref pattern in argument #46161

arielb1 opened this issue Nov 21, 2017 · 0 comments
Labels
A-borrow-checker Area: The borrow checker C-bug Category: This is a bug.
Milestone

Comments

@arielb1
Copy link
Contributor

arielb1 commented Nov 21, 2017

e.g. (or src/test/run-pass/issue-8860.rs)

fn main() {}
fn foo(ref x: Box<()>) {}

The problem is that region inference infers the borrow of x to ReEmpty (because it's live nowhere), which doesn't have an EndRegion. NLL mode (-Z nll) is not affected by this particular pathology, but I think this should still be fixed.

@arielb1 arielb1 added the A-borrow-checker Area: The borrow checker label Nov 21, 2017
@arielb1 arielb1 added this to the NLL prototype milestone Nov 21, 2017
@TimNN TimNN added the C-bug Category: This is a bug. label Nov 21, 2017
@bors bors closed this as completed in 25416c7 Dec 3, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-borrow-checker Area: The borrow checker C-bug Category: This is a bug.
Projects
None yet
Development

No branches or pull requests

2 participants