Remove unneeded access to pretty printer's s field in favor of deref#91571
Merged
bors merged 1 commit intorust-lang:masterfrom Dec 8, 2021
Merged
Remove unneeded access to pretty printer's s field in favor of deref#91571bors merged 1 commit intorust-lang:masterfrom
s field in favor of deref#91571bors merged 1 commit intorust-lang:masterfrom
Conversation
Contributor
|
r? @jackh726 (rust-highfive has picked a reviewer for you, use r? to override) |
Member
|
This isn't code that I often touch. So let's r? @Mark-Simulacrum |
Collaborator
|
☔ The latest upstream changes (presumably #91565) made this pull request unmergeable. Please resolve the merge conflicts. |
Member
Author
|
Member
|
@bors r+ rollup |
Collaborator
|
📌 Commit 1c96ef2a8d63f40da308500636b3fc01f2bd437b has been approved by |
bors
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Dec 7, 2021
…askrgr Rollup of 10 pull requests Successful merges: - rust-lang#87614 (Recommend fix `count()` -> `len()` on slices) - rust-lang#91065 (Add test for evaluate_obligation: Ok(EvaluatedToOkModuloRegions) ICE) - rust-lang#91312 (Fix AnonConst ICE) - rust-lang#91341 (Add `array::IntoIter::{empty, from_raw_parts}`) - rust-lang#91493 (Remove a dead code path.) - rust-lang#91503 (Tweak "call this function" suggestion to have smaller span) - rust-lang#91547 (Suggest try_reserve in try_reserve_exact) - rust-lang#91562 (Pretty print async block without redundant space) - rust-lang#91620 (Update books) - rust-lang#91622 (:arrow_up: rust-analyzer) Failed merges: - rust-lang#91571 (Remove unneeded access to pretty printer's `s` field in favor of deref) r? `@ghost` `@rustbot` modify labels: rollup
Collaborator
|
☔ The latest upstream changes (presumably #91627) made this pull request unmergeable. Please resolve the merge conflicts. |
Member
Author
|
Member
Author
|
@bors r=Mark-Simulacrum |
Collaborator
|
📌 Commit a79b702 has been approved by |
matthiaskrgr
added a commit
to matthiaskrgr/rust
that referenced
this pull request
Dec 8, 2021
…crum Remove unneeded access to pretty printer's `s` field in favor of deref I found it taxing in some of my recent PRs touching the pretty printer to maintain consistency with the surrounding code, since the current code is all over the place about whether it uses `self.s.…()` or `self.…()` for invoking methods of `rustc_ast_pretty::pp::Printer`. This PR standardizes on `self.…()` — relying on the `Deref` and `DerefMut` impls introduced by [rust-lang#62532](rust-lang@cab4532).
matthiaskrgr
added a commit
to matthiaskrgr/rust
that referenced
this pull request
Dec 8, 2021
…crum Remove unneeded access to pretty printer's `s` field in favor of deref I found it taxing in some of my recent PRs touching the pretty printer to maintain consistency with the surrounding code, since the current code is all over the place about whether it uses `self.s.…()` or `self.…()` for invoking methods of `rustc_ast_pretty::pp::Printer`. This PR standardizes on `self.…()` — relying on the `Deref` and `DerefMut` impls introduced by [rust-lang#62532](rust-lang@cab4532).
matthiaskrgr
added a commit
to matthiaskrgr/rust
that referenced
this pull request
Dec 8, 2021
…crum Remove unneeded access to pretty printer's `s` field in favor of deref I found it taxing in some of my recent PRs touching the pretty printer to maintain consistency with the surrounding code, since the current code is all over the place about whether it uses `self.s.…()` or `self.…()` for invoking methods of `rustc_ast_pretty::pp::Printer`. This PR standardizes on `self.…()` — relying on the `Deref` and `DerefMut` impls introduced by [rust-lang#62532](rust-lang@cab4532).
bors
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Dec 8, 2021
…askrgr Rollup of 7 pull requests Successful merges: - rust-lang#90709 (Only shown relevant type params in E0283 label) - rust-lang#91551 (Allow for failure of subst_normalize_erasing_regions in const_eval) - rust-lang#91570 (Evaluate inline const pat early and report error if too generic) - rust-lang#91571 (Remove unneeded access to pretty printer's `s` field in favor of deref) - rust-lang#91610 (Link to rustdoc_json_types docs instead of rustdoc-json RFC) - rust-lang#91619 (Update cargo) - rust-lang#91630 (Add missing whitespace before disabled HTML attribute) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
I found it taxing in some of my recent PRs touching the pretty printer to maintain consistency with the surrounding code, since the current code is all over the place about whether it uses
self.s.…()orself.…()for invoking methods ofrustc_ast_pretty::pp::Printer.This PR standardizes on
self.…()— relying on theDerefandDerefMutimpls introduced by #62532.