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
Remove comments from mir-opt MIR dumps #112346
Conversation
r? @eholk (rustbot has picked a reviewer for you, use r? to override) |
_2 = const {alloc2: *mut i32}; | ||
// mir::Constant | ||
// + span: $DIR/consts.rs:28:38: 28:39 | ||
// + literal: Const { ty: *mut i32, val: Value(Scalar(alloc2)) } |
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.
Can you put the // mir::Constant
on the same line as the _2 = const {alloc2: *mut i32};
?
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.
Ah I see I missed a few more places the comments are emitted.
This comment has been minimized.
This comment has been minimized.
5ff35a3
to
68d0af9
Compare
r? mir-opt |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
☔ The latest upstream changes (presumably #112418) made this pull request unmergeable. Please resolve the merge conflicts. |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
@bors r+ p=1 bitrotty |
📌 Commit e2fab8f0dcca015d83c83a06f5f25eb368b7bf5e has been approved by It is now in the queue for this repository. |
⌛ Testing commit e2fab8f0dcca015d83c83a06f5f25eb368b7bf5e with merge e72dff92be7b99d9222f4fdb685df5ca261c257a... |
This comment has been minimized.
This comment has been minimized.
💔 Test failed - checks-actions |
I goofed. I forgot that even with all the awesome improvements to blessing that @pietroalbini built, blessing with |
@bors r+ |
Not this PR, but maybe emitting a warning for that could make sense? (And I assume it's |
The problem is that the tests don't get blessed at all because they are Yes, it's the standard library code that's the problem, and I think this can be gracefully solved by piggybacking on the work Pietro did. |
☀️ Test successful - checks-actions |
Finished benchmarking commit (c84d5e7): comparison URL. Overall result: no relevant changes - no action needed@rustbot label: -perf-regression Instruction countThis benchmark run did not return any relevant results for this metric. Max RSS (memory usage)ResultsThis is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
CyclesResultsThis is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
Binary sizeThis benchmark run did not return any relevant results for this metric. Bootstrap: 649.004s -> 647.175s (-0.28%) |
It seems this PR removed comments from |
This also removed functionality from the playground. I'll delete that code now. |
See https://rust-lang.zulipchat.com/#narrow/stream/189540-t-compiler.2Fwg-mir-opt/topic/Line.20numbers.20in.20mir-opt.20tests/near/363849874
In #99780 there is mention that "there has been a zulip conversation about disabling line numbers with mixed opinions" which to me means that some people opposed this. I can't find the referenced conversation so... here we go.
The current situation is quite chaotic. It's not hard to find MIR diffs which contain
For example:
rust/tests/mir-opt/inline/inline_shims.drop.Inline.diff
Lines 10 to 17 in 408bbd0
And sometimes adding a comment at the top of a mir-opt test generates a diff in the test because a line number changed: https://github.com/rust-lang/rust/pull/98112/files#diff-b8cf4bcce95078e6a3faf075e9abf6864872fb28a64d95c04f04513b9e3bbd81
And irrelevant changes to the standard library can generate diffs in mir-opt tests: https://github.com/rust-lang/rust/pull/110694/files#diff-bf96b0e7c67b8b272814536888fd9428c314991e155beae1f0a2a67f0ac47b2c
769886c
I think we should, specifically in mir-opt tests, completely remove the comments, or insert placeholders for all line and column numbers.