Skip to content

Only report error for first issued loan with conflict #28833

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

Merged
merged 1 commit into from
Oct 27, 2015

Conversation

jryans
Copy link
Contributor

@jryans jryans commented Oct 4, 2015

Change error reporting of conflicting loans to stop earlier after printing
an error for a given borrow, instead of proceeding to error on possibly every
issued loan. This keeps us down to O(n) errors (for n problem lines), instead
of O(n^2) errors in some cases.

Fixes #27485.

Change error reporting of conflicting loans to stop earlier after printing
an error for a given borrow, instead of proceeding to error on possibly every
issued loan.  This keeps us down to O(n) errors (for n problem lines), instead
of O(n^2) errors in some cases.

Fixes rust-lang#27485.
@rust-highfive
Copy link
Contributor

Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @jroesch (or someone else) soon.

If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. The way Github handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes.

Please see the contribution instructions for more information.

@alexcrichton
Copy link
Member

r? @pnkfelix

@rust-highfive rust-highfive assigned pnkfelix and unassigned jroesch Oct 4, 2015
@jryans
Copy link
Contributor Author

jryans commented Oct 26, 2015

@pnkfelix, I am sure you are quite busy, just curious if I should still expect a review to be coming in the future. It's my first Rust PR, so I wasn't sure what to expect. Thanks!

@pnkfelix
Copy link
Member

@jryans yeah sorry, I've been really bad about my backlog of PR's. I'm going through them all now.

@pnkfelix
Copy link
Member

I'm a little surprised that this didn't necessitate more changes to the tests. (That is, I would have thought at least one of our tests was exercising the prior behavior of printing more messages, even if that was not the intention of that test's author -- I know I certainly have just plugged in messages until they were all accounted for to get things to pass.)

@pnkfelix
Copy link
Member

(but, travis passed, so I guess none of the compile-fail tests were exercising this path...)

@pnkfelix
Copy link
Member

@bors r+

@bors
Copy link
Collaborator

bors commented Oct 27, 2015

📌 Commit ba9c383 has been approved by pnkfelix

bors added a commit that referenced this pull request Oct 27, 2015
Change error reporting of conflicting loans to stop earlier after printing
an error for a given borrow, instead of proceeding to error on possibly every
issued loan.  This keeps us down to O(n) errors (for n problem lines), instead
of O(n^2) errors in some cases.

Fixes #27485.
@bors
Copy link
Collaborator

bors commented Oct 27, 2015

⌛ Testing commit ba9c383 with merge 8a72584...

@bors bors merged commit ba9c383 into rust-lang:master Oct 27, 2015
@Gankra
Copy link
Contributor

Gankra commented Oct 28, 2015

Wow @jryans, thanks a ton!!! 💖

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants