-
Notifications
You must be signed in to change notification settings - Fork 13.5k
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
Conversation
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.
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. |
r? @pnkfelix |
@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! |
@jryans yeah sorry, I've been really bad about my backlog of PR's. I'm going through them all now. |
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.) |
(but, travis passed, so I guess none of the compile-fail tests were exercising this path...) |
@bors r+ |
📌 Commit ba9c383 has been approved by |
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.
Wow @jryans, thanks a ton!!! 💖 |
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.