Closed
Conversation
This removes the need to maintain a list of all other OSs which ignore the tests.
DIV tags have block display by default. It is from when this rule used to target a SPAN tag, but became redundant in 4bd6748.
`#![custom_mir]`: Various improvements
This PR makes a bunch of improvements to `#![custom_mir]`. Ideally this would be 4 PRs, one for each commit, but those would take forever to get merged and be a pain to juggle. Should still be reviewed one commit at a time though.
### Commit 1: Support arbitrary `let`
Before this change, all locals used in the body need to be declared at the top of the `mir!` invocation, which is rather annoying. We attempt to change that.
Unfortunately, we still have the requirement that the output of the `mir!` macro must resolve, typecheck, etc. Because of that, we can't just accept this in the THIR -> MIR parser because something like
```rust
{
let x = 0;
Goto(other)
}
other = {
RET = x;
Return()
}
```
will fail to resolve. Instead, the implementation does macro shenanigans to find the let declarations and extract them as part of the `mir!` macro. That *works*, but it is fairly complicated and degrades debuginfo by quite a bit. Specifically, the spans for any statements and declarations that are affected by this are completely wrong. My guess is that this is a net improvement though.
One way to recover some of the debuginfo would be to not support type annotations in the `let` statements, which would allow us to parse like `let $stmt:stmt`. That seems quite surprising though.
### Commit 2: Parse consts
Reuses most of the const parsing from regular Mir building for building custom mir
### Commit 3: Parse statics
Statics are slightly weird because the Mir primitive associated with them is a reference/pointer to them, so this is factored out separately.
### Commit 4: Fix some spans
A bunch of the spans were non-ideal, so we adjust them to be much more helpful.
r? `@oli-obk`
…acrum Run Windows-only tests only on Windows This removes the need to maintain an ignore-list of all other OSs. See rust-lang#102305 for a similar change.
Fix `expr_to_spanned_string` ICE Fixes rust-lang#105011
Extract llvm datalayout parsing out of spec module fix rust-lang#103693 (comment)
…-div-desc, r=GuillaumeGomez
rustdoc: remove redundant CSS `div.desc { display: block }`
DIV tags have block display by default. It is from when this rule used to target a SPAN tag, but became redundant in 4bd6748.
Fix ICE from rust-lang#105101 Fixes rust-lang#105101 Rather than comparing idents, compare spans, which should be unique to each variant.
Member
Author
|
@bors r+ rollup=never p=5 |
Collaborator
Member
Author
|
ah there's already a rollup running, oops :P |
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:
#![custom_mir]: Various improvements #104975 (#![custom_mir]: Various improvements)expr_to_spanned_stringICE #105078 (Fixexpr_to_spanned_stringICE)div.desc { display: block }#105088 (rustdoc: remove redundant CSSdiv.desc { display: block })#[derive(Default)]on enum with repeated variant names #105101)Failed merges:
r? @ghost
@rustbot modify labels: rollup
Create a similar rollup