Rollup of 4 pull requests#155990
Closed
jhpratt wants to merge 11 commits intorust-lang:mainfrom
Closed
Conversation
`rustc_error_messages` currently depends on `rustc_ast`/`rustc_ast_pretty`. This is odd, because `rustc_error_messages` feels like a very low-level module but `rustc_ast`/`rustc_ast_pretty` do not. The reason is that a few AST types impl `IntoDiagArg` via pretty-printing. `rustc_error_messages` can define `IntoDiagArg` and then impl it for the AST types. But if we invert the dependency we hit a problem with the orphan rule: `rustc_ast` must impl `IntoDiagArg` for the AST types, but that requires calling pretty-printing code which is in `rustc_ast_pretty`, a downstream crate. This commit avoids this problem by just removing the `IntoDiagArg` impls for these AST types. There aren't that many of them, and we can just use `String` in the relevant error structs and use the pretty printer in the downstream crates that construct the error structs. There are plenty of existing examples where `String` is used in error structs. There is now no dependency between `rustc_ast*` and `rustc_error_messages`.
It currently only depends on two things: - `rustc_ast::AttrId`: this is just a re-export of `rustc_span::AttrId`, so we can import the original instead. - `rustc_ast::AttributeExt`: needed only for the `name` and `id` methods. We can instead pass in the `name` and `id` directly.
…trochenkov Disentangle AST crates and error crates Currently the `rustc_ast*` crates and the `rustc_error*` crates (and `rustc_lint_defs`) are quite intertwined. This PR disentangles them. Details in individual commits. r? @davidtwco
Use `_mcount` as the mcount symbol name on RISC-V Linux GNU targets Fixes rust-lang#155830 glibc on RISC-V exports `_mcount`, not `mcount`. https://sourceware.org/git/?p=glibc.git;a=blob;f=sysdeps/riscv/machine-gmon.h;hb=HEAD r? mati865 (I think you're well-suited to review this area, but feel free to reroll)
…r=nikomatsakis Add feature gate for view_types experiment
…02, r=Kivooeo Reorganize `tests/ui/issues/` - 02 | old-name | new-sub-dir | new-name | |-|-|-| | `issue-19001.rs` [issue](rust-lang#19001) | `recursion/` | `recursive-struct-with-raw-pointer-field.rs` | | `issue-31769.rs` [issue](rust-lang#31769) | `attributes/` | `dont-allow-inline-and-repr-at-invalid-positions.rs` | | `issue-31769.stderr` | `attributes/` | `dont-allow-inline-and-repr-at-invalid-positions.stderr` | | `issue-33202.rs` [issue](rust-lang#33202) | `attributes/` | `repr-on-single-variant-Enum.rs` | | `issue-38763.rs` [issue](rust-lang#38763) | `foreign/` | `foreign-fn-with-more-than-8-byte-arg-size.rs` | r? Kivooeo
Member
Author
|
@bors r+ rollup=never p=5 |
Contributor
Contributor
|
☔ The latest upstream changes (presumably #155018) made this pull request unmergeable. Please resolve the merge conflicts. This pull request was unapproved. |
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.
Successful merges:
_mcountas the mcount symbol name on RISC-V Linux GNU targets #155853 (Use_mcountas the mcount symbol name on RISC-V Linux GNU targets)tests/ui/issues/- 02 #155523 (Reorganizetests/ui/issues/- 02)r? @ghost
Create a similar rollup