-
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
Rollup of 8 pull requests #101317
Closed
Closed
Rollup of 8 pull requests #101317
Conversation
This file contains 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
There are times where computing a value may be cheap, or where computing a reference may be expensive, so this fills out the possibilities.
…ref_of}` While the `provide_*` methods already short-circuit when a value has been provided, there are times where an expensive computation is needed to determine if the `provide_*` method can even be called.
Before, the MIR validator used RevealAll in its ParamEnv for type checking. This could cause false negatives in some cases due to RevealAll ParamEnvs not always use all predicates as expected here. Since some MIR passes like inlining use RevealAll as well, keep using it in the MIR validator too, but when it fails usign RevealAll, also try the check without it, to stop false negatives.
Before, it called `normalize_erasing_regions` twice since `equal_up_to_regions` called it as well for both types.
revealed by tests, manually add a panic to test for dead code
…ossible... - ... when creating diagnostics in rustc_metadata - use the error_code! macro - pass macro output to diag.code() - use fluent from within manual implementation of SessionDiagnostic - emit the untested errors in case they occur in the wild - stop panicking in the probably-not-dead code, add fixme to write test
This avoid unnecessarily getting the full reparse data when all we need is the tag.
This rule was added (actually, it was called `#main > .since` back then) with cdca084 and you can see an example of the bug it's intended to fix in <https://doc.rust-lang.org/1.9.0/std/fmt/fn.write.html> by looking at the `1.0.0` version marker. However, a5a2f2b changed it so that `<span class="since">` is always placed in an out-of-band wrapper, so it's never nested directly below `#main` / `#main-content` any more.
This commit removes many cases of MIR opt tests emitting `.diff`s for more than one pass. These tests cannot be `unit-test`s, and so they are easy to break, and they also provide little value due to having excessively strong opinions over *how* a piece of code should be optimized. Where reasonable, we instead add separate test files that only emit the `PreCodegen.after` MIR for code where we want to track what the result of the net result of the optimization pipeline's output is.
Add additional methods to the Demand type This adds on to the original tracking issue rust-lang#96024 r? ````@yaahc````
… r=oli-obk Try normalizing types without RevealAll in ParamEnv in MIR validation Before, the MIR validator used RevealAll in its ParamEnv for type checking. This could cause false negatives in some cases due to RevealAll ParamEnvs not always use all predicates as expected here. Since some MIR passes like inlining use RevealAll as well, keep using it in the MIR validator too, but when it fails usign RevealAll, also try the check without it, to stop false negatives. Fixes rust-lang#99866 cc ````@compiler-errors```` who nicely helped me on zulip
…imulacrum Change implementation of `-Z gcc-ld` and `lld-wrapper` again This PR partially reverts rust-lang#97375 and uses the strategy described in rust-lang#97402 (comment) instead, thus fixes rust-lang#97755.
…iser Simplify MIR opt tests This commit removes many cases of MIR opt tests emitting `.diff`s for more than one pass. These tests cannot be `unit-test`s, and so they are easy to break, and they also provide little value due to having excessively strong opinions over *how* a piece of code should be optimized. Where reasonable, we instead add separate test files that only emit the `PreCodegen.after` MIR for code where we want to track what the end to end effect of the optimization pipeline on the example code is. r? ````@wesleywiser````
…s, r=davidtwco Migrate rustc_metadata to SessionDiagnostics Migrate rustc_metadata to SessionDiagnostics. Part of rust-lang#100717
… r=notriddle Generate error index with mdbook instead of raw HTML pages This is a follow-up of rust-lang#100922. This comes from a remark from ```@estebank``` who said that the search was a nice thing on the previous version and that it wasn't possible anymore. An easy way to come around this limitation was to use `mdbook`, which is what I did here. Now some explanations on the code. I'll explain how I developed this and why I reached this solution. First I did it very basically by simply setting the source directory and the output directory, generated a `SUMMARY.md` manually which listed all error codes and that was it. Two problems arose from this: 1. A lot of new HTML files were generated at the top level 2. An `index.html` file was generated at the top-level (the summary in short). So for `1.`, it's not great to have too many files at the top-level as it could create file conflicts more easily. And for `2.`, this is actually a huge issue because <doc.rust-lang.org> generates an `index.html` file with a links to a few different resources, so it should never be overwritten. <s>Unfortunately, `mdbook` **always** generates an `index.html` file so the only solution I could see (except for sending them a contribution, I'll maybe do that later) was to temporaly move a potentially existing `index.html` file and then puts it back once done. For this last part, to ensure that we don't return *before* it has been put back, I wrapped the `mdbook` generation code inside `render_html_inner` which is called from `render_html` which in turn handle the "save" of `index.html`.</s> EDIT: `mdbook` completely deletes ALL the content in the target directory so I instead generate into a sub directory and then I move the files to the real target directory. To keep compatibility with the old version, I also put the `<script>` ```@notriddle``` nicely provided in the previous PR only into the `error-index.html` file to prevent unneeded repetition. I didn't use `mdbook` `additional-js` option because the JS is included at the end of all HTML files, which we don't want for two reasons: 1. It's slow. 2. We only want it to be run in `error-index.html` (even if we also ensure in the JS itself too!). <s>Now the last part: why we generate the summary twice. We actually generate it once to tell `mdbook` what the book will look like and a second time because a create a new chapter content which will actually list all the error codes (with the updated paths).</s> EDIT: I removed the need for two summaries. You can test it [here](https://rustdoc.crud.net/imperio/error-index-mdbook/error-index.html). r? ```@notriddle```
Use `FILE_ATTRIBUTE_TAG_INFO` to get reparse tag I've been looking at this code recently and it just occurred to me we don't actually use the full reparse data at this point, only the tag. [`GetFileInformationByHandleEx`](https://docs.microsoft.com/en-us/windows/win32/api/winbase/nf-winbase-getfileinformationbyhandleex) can do exactly that by filling a [`FILE_ATTRIBUTE_TAG_INFO`](https://docs.microsoft.com/en-us/windows/win32/api/winbase/ns-winbase-file_attribute_tag_info) struct. r? ```@thomcc``` since you've made changes here recently (which is why I have this code on my mind atm)
…ince, r=GuillaumeGomez rustdoc: remove unused CSS `#main-content > .since` This rule was added (actually, it was called `#main > .since` back then) with cdca084 and you can see an example of the bug it's intended to fix in <https://doc.rust-lang.org/1.9.0/std/fmt/fn.write.html> by looking at the `1.0.0` version marker. However, a5a2f2b changed it so that `<span class="since">` is always placed in an out-of-band wrapper, so it's never nested directly below `#main` / `#main-content` any more.
rustbot
added
T-bootstrap
Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)
A-translation
Area: Translation infrastructure, and migrating existing diagnostics to SessionDiagnostic
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
T-libs
Relevant to the library team, which will review and decide on the PR/issue.
labels
Sep 2, 2022
rustbot
added
T-rustdoc
Relevant to the rustdoc team, which will review and decide on the PR/issue.
rollup
A PR which is a rollup
labels
Sep 2, 2022
davidtwco
removed
the
A-translation
Area: Translation infrastructure, and migrating existing diagnostics to SessionDiagnostic
label
Oct 4, 2022
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
rollup
A PR which is a rollup
T-bootstrap
Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
T-libs
Relevant to the library team, which will review and decide on the PR/issue.
T-rustdoc
Relevant to the rustdoc team, which will review and decide on the PR/issue.
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:
-Z gcc-ld
andlld-wrapper
again #100200 (Change implementation of-Z gcc-ld
andlld-wrapper
again)FILE_ATTRIBUTE_TAG_INFO
to get reparse tag #101260 (UseFILE_ATTRIBUTE_TAG_INFO
to get reparse tag)#main-content > .since
#101298 (rustdoc: remove unused CSS#main-content > .since
)Failed merges:
r? @ghost
@rustbot modify labels: rollup
Create a similar rollup