-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
Rid the AST & HIR pretty printer of cruft #119169
Conversation
(rustbot has picked a reviewer for you, use r? to override) |
@@ -553,17 +553,7 @@ impl<'a> State<'a> { | |||
} | |||
hir::ItemKind::OpaqueTy(opaque_ty) => { |
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.
Is this branch reachable in practice? 🤔 type T = impl B;
gets printed as type T = /*impl Trait*/;
since the item gets to interpreted as a normal type alias in this specific case with a RHS of hir::TyKind::OpaqueDef
. Doesn't matter anyway.
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.
🆒 🆒
r=me |
☔ The latest upstream changes (presumably #119163) made this pull request unmergeable. Please resolve the merge conflicts. |
78ca460
to
b09889b
Compare
@bors r=compiler-errors rollup |
…iaskrgr Rollup of 5 pull requests Successful merges: - rust-lang#117601 (Add support for hexagon-unknown-none-elf as target) - rust-lang#119169 (Rid the AST & HIR pretty printer of cruft) - rust-lang#119194 (Run fuchsia tests only on nightly) - rust-lang#119201 (tests: fix overaligned-constant to not over-specify getelementptr instr) - rust-lang#119215 (Emits error if has bound regions) r? `@ghost` `@rustbot` modify labels: rollup
Rollup merge of rust-lang#119169 - fmease:pretty-yeet-syntactic-cruft, r=compiler-errors Rid the AST & HIR pretty printer of cruft Found while working on rust-lang#119163. For `trait Trait: ?Sized {}` (semantically malformed), we currently output `trait Trait for ? Sized {}` (sic!) / `trait Trait for ? Sized { }` (sic!) if `-Zunpretty=expanded` / `-Zunpretty=hir` is passed. `trait Tr for Sized? {}` (rust-lang#15521) and later also `trait Tr for ?Sized {}` (I guess, rust-lang#20194) is former Rust syntax. Hence I'm removing these outdated branches. ~~This will conflict with rust-lang#119163, therefore marking this PR as blocked.~~ Rebased
Found while working on #119163.
For
trait Trait: ?Sized {}
(semantically malformed), we currently outputtrait Trait for ? Sized {}
(sic!) /trait Trait for ? Sized { }
(sic!) if-Zunpretty=expanded
/-Zunpretty=hir
is passed.trait Tr for Sized? {}
(#15521) and later alsotrait Tr for ?Sized {}
(I guess, #20194) is former Rust syntax. Hence I'm removing these outdated branches.This will conflict with #119163, therefore marking this PR as blocked.Rebased