-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
[StableMIR] A few fixes to pretty printing #132161
base: master
Are you sure you want to change the base?
Conversation
Improve identation, and a few other rvalue printing
r? @wesleywiser rustbot has assigned @wesleywiser. Use |
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.
LGTM, but this doesn't actually exercise most of the new code it adds, does it?
@@ -0,0 +1,25 @@ | |||
//@ compile-flags: -Z unpretty=stable-mir --crate-type lib -C panic=abort |
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 please add some examples for more aggregates. Ideas that come to mind are:
- Structs w braced args {}
- Structs w no args
- Closures that capture values
- Arrays constructed per-element (
[1, 2, 3]
) style
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.
BTW, for 1, this will still print Struct ()
. But I can add more tests
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.
That's fine, I just want to see how the existing behavior is exercised. Better to have tests that are wrong so we can see when they become right, rather than have no tests at all for things we explicitly know act weirdly...
@rustbot author |
Add a comma between function arguments
@rustbot ready |
LGTM @bors r+ rollup |
thx @bors r+ |
…er-errors [StableMIR] A few fixes to pretty printing Improve identation, and a few other rvalue printing
…iaskrgr Rollup of 8 pull requests Successful merges: - rust-lang#131375 (compiler: apply clippy::clone_on_ref_ptr for CI) - rust-lang#131984 (Stabilize if_let_rescope) - rust-lang#132151 (Ensure that resume arg outlives region bound for coroutines) - rust-lang#132161 ([StableMIR] A few fixes to pretty printing) - rust-lang#132194 (Collect item bounds for RPITITs from trait where clauses just like associated types) - rust-lang#132233 (Split `boxed.rs` into a few modules) - rust-lang#132270 (clarified doc for `std::fs::OpenOptions.truncate()`) - rust-lang#132284 (Remove my ping for rustdoc/clean/types.rs) r? `@ghost` `@rustbot` modify labels: rollup
@bors r- |
Failed in #132288 (comment) ---- [ui] tests\ui\stable-mir-print\operands.rs stdout ----
$DIR\operands.rs
$DIR\operands.rs
\a\rust\rust\tests\ui\stable-mir-print\operands.rs
$DIR\operands.rs
Saved the actual stdout to "C:\\a\\rust\\rust\\build\\x86_64-pc-windows-msvc\\test\\ui\\stable-mir-print\\operands\\operands.stdout"
226 debug x => _1;
227 debug z => _2;
228 bb0: {
- _0 = {closure@Span { id: 105, repr: "$DIR/operands.rs:44:5: 44:19" }}(_1, _2);
+ _0 = {closure@Span { id: 105, repr: "C:/a/rust/rust/tests/ui/stable-mir-print/operands.rs:44:5: 44:19" }}(_1, _2);
231 }
232 } |
🤔 path normalization needs to be more generic i guess??? |
Still haven't figured out how to fix this. The test passes in my development machine (Linux) and it looks like one of the linux jobs have passed as well, which makes me wonder if this can only be reproduced in Windows |
Improve identation, and a few other rvalue printing