-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
Make the output of the column! macro 1 based #46977
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
I agree that this change is sufficiently tested by the existing tests.
src/libstd/macros.rs
Outdated
/// The expanded expression has type `u32` and is 1-based, so the first line | ||
/// in each file evaluates to 1, the second to 2, etc. This is consistent | ||
/// with error messages by common compilers or popular editors. | ||
/// The returned column is not the invocation of the `line!` macro itself, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should say the returned *line*.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since we are touching this line anyway, I find "not the invocation of the `line!` macro itself" a bit misleading, because it is totally possible and expected for the return value to be the line of the invocation of the line macro itself when not being called from another macro. It may be clearer as "not necessarily the line of the `line!` invocation itself".
(Okay to ignore this if you want, since it was that way before.)
I've fixed the pointed out mistake. General improvement of the docs is best done in a separate PR IMO. re-r? @dtolnay |
@bors r+ |
📌 Commit 6081989 has been approved by |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! I filed #46997 to follow up on the other sentence.
⌛ Testing commit 6081989 with merge cfdebb52f3018996c2d5cf9566019bb18607dc26... |
💔 Test failed - status-travis |
⌛ Testing commit 6081989 with merge 870b94f02d866df47ec5335f08a1348e5703448e... |
💔 Test failed - status-travis |
@bors retry |
☀️ Test successful - status-appveyor, status-travis |
Fixes #46868.
I didn't add any regression tests as the change already had to change tests inside the codebase.
r? @dtolnay