-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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 unneeded access to pretty printer's s
field in favor of deref
#91571
Conversation
r? @jackh726 (rust-highfive has picked a reviewer for you, use r? to override) |
This isn't code that I often touch. So let's r? @Mark-Simulacrum |
☔ The latest upstream changes (presumably #91565) made this pull request unmergeable. Please resolve the merge conflicts. |
|
@bors r+ rollup |
📌 Commit 1c96ef2a8d63f40da308500636b3fc01f2bd437b has been approved by |
…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
☔ The latest upstream changes (presumably #91627) made this pull request unmergeable. Please resolve the merge conflicts. |
|
@bors r=Mark-Simulacrum |
📌 Commit a79b702 has been approved by |
…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).
…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).
…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).
…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
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 theDeref
andDerefMut
impls introduced by #62532.