Skip to content
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

Refactored verbose print into a function #79999

Merged
merged 3 commits into from
Dec 25, 2020
Merged

Conversation

hencrice
Copy link
Contributor

Also handle Tuple and Array separately, which was not explicitly checked.

Fixes #79799.

Also handle Tuple and Array separately, which was not explicitly checked.

Fixes rust-lang#79799.
@rust-highfive
Copy link
Collaborator

Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @eddyb (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. Due to 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.

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Dec 13, 2020
@hencrice
Copy link
Contributor Author

x.py check and x.py test src/test/ui passed.

@oli-obk
Copy link
Contributor

oli-obk commented Dec 14, 2020

Awesome! Thanks for doing this.

I think the only tests that should be affected are mir-opt tests, so running ./x.py test src/tests/mir-opt --bless and then ./x.py test src/tests/mir-opt --bless --target i686-unknown-linux-gnu should update anything that needs updating. The second run is so the 32 bit tests are updated, too.

@oli-obk
Copy link
Contributor

oli-obk commented Dec 14, 2020

r? @oli-obk

@rust-highfive rust-highfive assigned oli-obk and unassigned eddyb Dec 14, 2020
@hencrice
Copy link
Contributor Author

Thanks for the feedbacks. I will take a look!

Also updated the mir-opt test output files.
@hencrice
Copy link
Contributor Author

@oli-obk I'm not familiar with mir. Could you verify the changes to the diff file are expected? Thanks!

@rust-log-analyzer
Copy link
Collaborator

The job mingw-check failed! Check out the build log: (web) (plain)

Click to see the possible cause of the failure (guessed by this bot)
configure: rust.channel         := nightly
configure: rust.debug-assertions := True
configure: llvm.assertions      := True
configure: dist.missing-tools   := True
configure: build.configure-args := ['--enable-sccache', '--disable-manage-submodu ...
configure: writing `config.toml` in current directory
configure: 
configure: run `python /checkout/x.py --help`
configure: 
---
skip untracked path cpu-usage.csv during rustfmt invocations
skip untracked path src/doc/book/ during rustfmt invocations
skip untracked path src/doc/rust-by-example/ during rustfmt invocations
skip untracked path src/llvm-project/ during rustfmt invocations
Diff in /checkout/compiler/rustc_mir/src/util/pretty.rs at line 413:
         ty::Int(_) | ty::Uint(_) | ty::Bool | ty::Char | ty::Float(_) => false,
Running `"/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/rustfmt" "--config-path" "/checkout" "--edition" "2018" "--unstable-features" "--skip-children" "--check" "/checkout/compiler/rustc_mir/src/util/pretty.rs"` failed.
If you're running `tidy`, try again with `--bless`. Or, if you just want to format code, run `./x.py fmt` instead.
         // Unit type
         ty::Tuple(g_args) if g_args.is_empty() => false,
-        ty::Tuple(g_args) => g_args.iter().any(|g_arg| {
-            use_verbose(&g_arg.expect_ty())
-        }),
+        ty::Tuple(g_args) => g_args.iter().any(|g_arg| use_verbose(&g_arg.expect_ty())),
         ty::Array(ty, _) => use_verbose(ty),
         ty::FnDef(..) => false,
failed to run: /checkout/obj/build/bootstrap/debug/bootstrap test --stage 2 src/tools/tidy
Build completed unsuccessfully in 0:00:18

@oli-obk
Copy link
Contributor

oli-obk commented Dec 23, 2020

@oli-obk I'm not familiar with mir. Could you verify the changes to the diff file are expected? Thanks!

The changes look exactly right to me. Ah, and just saw that you fixed the formatting, thanks!

@bors r+

@bors
Copy link
Contributor

bors commented Dec 23, 2020

📌 Commit ecba49c has been approved by oli-obk

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Dec 23, 2020
@Mark-Simulacrum
Copy link
Member

@bors squash

No need for stray formatting commit :)

Dylan-DPC-zz pushed a commit to Dylan-DPC-zz/rust that referenced this pull request Dec 23, 2020
Refactored verbose print into a function

Also handle Tuple and Array separately, which was not explicitly checked.

Fixes rust-lang#79799.
Dylan-DPC-zz pushed a commit to Dylan-DPC-zz/rust that referenced this pull request Dec 24, 2020
Refactored verbose print into a function

Also handle Tuple and Array separately, which was not explicitly checked.

Fixes rust-lang#79799.
Dylan-DPC-zz pushed a commit to Dylan-DPC-zz/rust that referenced this pull request Dec 24, 2020
Refactored verbose print into a function

Also handle Tuple and Array separately, which was not explicitly checked.

Fixes rust-lang#79799.
Dylan-DPC-zz pushed a commit to Dylan-DPC-zz/rust that referenced this pull request Dec 24, 2020
Refactored verbose print into a function

Also handle Tuple and Array separately, which was not explicitly checked.

Fixes rust-lang#79799.
bors added a commit to rust-lang-ci/rust that referenced this pull request Dec 25, 2020
Rollup of 11 pull requests

Successful merges:

 - rust-lang#79213 (Stabilize `core::slice::fill`)
 - rust-lang#79999 (Refactored verbose print into a function)
 - rust-lang#80160 (Implemented a compiler diagnostic for move async mistake)
 - rust-lang#80274 (Rename rustc_middle::lint::LintSource)
 - rust-lang#80280 (Add installation commands to `x` tool README)
 - rust-lang#80319 (Fix elided lifetimes shown as `'_` on async functions)
 - rust-lang#80327 (Updated the match with the matches macro)
 - rust-lang#80330 (Fix typo in simplify_try.rs)
 - rust-lang#80340 (Don't unnecessarily override attrs for Module)
 - rust-lang#80342 (Fix typo)
 - rust-lang#80352 (BTreeMap: make test cases more explicit on failure)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 787b016 into rust-lang:master Dec 25, 2020
@bors
Copy link
Contributor

bors commented Dec 25, 2020

🔒 Squashing failed

@rustbot rustbot added this to the 1.50.0 milestone Dec 25, 2020
@bors bors added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Dec 25, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Some MIR dumps differ between little and big endian
8 participants