-
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
All verbosity checks in PrettyPrinter
now go through PrettyPrinter::should_print_verbose
#103764
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…::should_print_verbose`
rustbot
added
S-waiting-on-review
Status: Awaiting review from the assignee but also interested parties.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
labels
Oct 30, 2022
Some changes occurred to the CTFE / Miri engine cc @rust-lang/miri |
This looks good to me. Thanks! @bors r+ |
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
Oct 30, 2022
@bors rollup |
notriddle
added a commit
to notriddle/rust
that referenced
this pull request
Oct 30, 2022
…mpiler-errors All verbosity checks in `PrettyPrinter` now go through `PrettyPrinter::should_print_verbose` Follow-up to rust-lang#103428. That pr only partially fixed rust-lang#94187. In some cases (like closures) `std::any::type_name` was still producing a different output when `-Zverbose` was enabled. This pr fixes those cases and adds a new function `PrettyPrinter::should_print_verbose`. This function should always be used over `self.tcx().sess.verbose()` inside a `impl PrettyPrinter`. Maybe closes rust-lang#94187 now. r? `@compiler-errors`
bors
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Oct 31, 2022
Rollup of 8 pull requests Successful merges: - rust-lang#97971 (Enable varargs support for calling conventions other than C or cdecl ) - rust-lang#101428 (Add mir building test directory) - rust-lang#101944 (rustdoc: clean up `#toggle-all-docs`) - rust-lang#102101 (check lld version to choose correct option to disable multi-threading in tests) - rust-lang#102689 (Add a tier 3 target for the Sony PlayStation 1) - rust-lang#103746 (rustdoc: add support for incoherent impls on structs and traits) - rust-lang#103758 (Add regression test for reexports in search results) - rust-lang#103764 (All verbosity checks in `PrettyPrinter` now go through `PrettyPrinter::should_print_verbose`) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
Dylan-DPC
added a commit
to Dylan-DPC/rust
that referenced
this pull request
Nov 2, 2022
…name, r=eholk Format `dyn Trait` better in `type_name` intrinsic Noticed this in rust-lang#103764 (though not related to that PR at all!) ```rust trait Foo { type Bar; } fn main() { println!( "`dyn Fn(i32, i32) -> i32` => `{}`", std::any::type_name::<dyn Fn(i32, i32) -> i32>() ); println!( "`dyn Foo<Bar = i32> + Send + Sync` => `{}`", std::any::type_name::<dyn Foo<Bar = i32> + Send + Sync>() ); } ``` ``` `dyn Fn(i32, i32) -> i32` => `dyn core::ops::function::Fn<(i32, i32)>+Output = i32` `dyn Foo<Bar = i32> + Send + Sync` => `dyn playground::Foo+Bar = i32+core::marker::Sync+core::marker::Send` ``` Just reuse `pretty_print_dyn_existential` which already makes an attempt to make its output stable.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
S-waiting-on-bors
Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Follow-up to #103428. That pr only partially fixed #94187. In some cases (like closures)
std::any::type_name
was still producing a different output when-Zverbose
was enabled.This pr fixes those cases and adds a new function
PrettyPrinter::should_print_verbose
. This function should always be used overself.tcx().sess.verbose()
inside aimpl PrettyPrinter
.Maybe closes #94187 now.
r? @compiler-errors