-
Notifications
You must be signed in to change notification settings - Fork 13.1k
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 11 pull requests #98335
Merged
Merged
Rollup of 11 pull requests #98335
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
It's a weird function: it lets you modify the token stream in the middle of iteration. There is only one call site, and it is only used for the rare `ProceduralMasquerade` legacy case.
It's unused.
By inlining it into the only non-test call site. The one test call site is changed to use `TokenStreamBuilder`.
Both functions do some modifying of streams using `make_mut`: - `push` sometimes glues the first token of the next stream to the last token of the first stream. - `build` appends tokens to the first stream. By doing all of this in the one place, things are simpler. The first stream can be modified in both ways (if necessary) in the one place, and any next stream with the first token removed doesn't need to be stored.
Because that's the standard way of doing it.
rust-lang#97447 added folding of unevaluated constants, but did not include an override of the default (fallible) operation in the blanket impl of `FallibleTypeFolder` for infallible folders. Here we provide that missing override. r? @nnethercote
Now that the "All Crates" dropdown is only rendered on the search results page, there is no need to load crates.js on most pages. Load it only on crate pages. Also, add the `defer` attribute so it does not block page rendering. For sidebar-items.js, move the script tag to `<head>`. Since it already has the defer attribute it won't block loading. The defer attribute does preserve ordering between scripts, so instead of the callback on load, it can set a global variable on load, which is slightly simpler. Also, since it is required to finish rendering the page, beginning its load earlier is better. Remove generation and handling of sidebar-vars. Everything there can be computed with information available in JS via other means. Remove the "other" wrapper in the sidebar. It was unnecessary. Remove excess script fields
…ng-better-go-catch-it, r=m-ou-se Improve docs for `is_running` to explain use case
adjust transmute const stabilization version With 1.46, this became callable only in `const`/`static` items. Only since 1.56 is this callable in `const fn`: [changelog](https://github.com/rust-lang/rust/blob/master/RELEASES.md#version-1560-2021-10-21) Also see [Zulip discussion](https://rust-lang.zulipchat.com/#narrow/stream/122651-general/topic/transmute.20const.20fn.20stabilization).
…li-obk Add proper tracing spans to rustc_trait_selection::traits::error_reporting While I was trying to figure out rust-lang#97704 I did some of this to make the logs more legible, so I figured I'd do the whole module and open a PR with it. afaict this is an ongoing process in the compiler from the log->tracing transition? but lmk if there was a reason for the more verbose forms of logging as they are. Also, for some of the functions with only one log in them, I put the function name as a message for that log instead of `#[instrument]`-ing the whole function with a span? but maybe the latter would actually be preferable, I'm not actually sure.
…span, r=oli-obk Fix erroneous span for borrowck error I am not confident that this is the correct fix, but it does the job. Open to suggestions for a real fix instead. Fixes rust-lang#97997 The issue is that we pass a [dummy location](https://doc.rust-lang.org/nightly/nightly-rustc/src/rustc_middle/mir/visit.rs.html#302) when type-checking the ["required consts"](https://doc.rust-lang.org/nightly/nightly-rustc/rustc_middle/mir/struct.Body.html#structfield.required_consts) that are needed by the MIR body during borrowck. This means that when we fail to evaluate the constant, we use the span of `bb0[0]`, instead of the actual span of the constant. There are quite a few other places that use `START_BLOCK.start_location()`, `Location::START`, etc. when calling for a random/unspecified `Location` value. This is because, unlike (for example) `Span`, we don't have a dummy/miscellaneous value to use instead. I would appreciate guidance (either in this PR, or a follow-up) on what needs to be done to clean this up in general.
Improve loading of crates.js and sidebar-items.js Now that the "All Crates" dropdown is only rendered on the search results page, there is no need to load crates.js on most pages. Load it only on crate pages. Also, add the `defer` attribute so it does not block HTML parsing. For sidebar-items.js, move the script tag to `<head>`. Since it already has the defer attribute it won't block loading. The defer attribute does preserve ordering between scripts, so instead of the callback on load, it can set a global variable on load, which is slightly simpler. Also, since it is required to finish rendering the page, beginning its load earlier is better. Remove generation and handling of sidebar-vars. Everything there can be computed with information available in JS via other means. Remove the extra_scripts fields of the `Page` template. They were only used by source-script.js and source-files.js, which are now linked by the template based on whether it is rendering a source page. Remove the "other" wrapper in the sidebar. It was unnecessary. r? ```@GuillaumeGomez``` Demo: https://rustdoc.crud.net/jsha/defer-crates/std/index.html
…ups, r=petrochenkov Some token stream cleanups Best reviewed one commit at a time. r? ```@petrochenkov```
…allibletypefolder, r=nnethercote `try_fold_unevaluated` for infallible folders rust-lang#97447 added folding of unevaluated constants, but did not include an override of the default (fallible) operation in the blanket impl of `FallibleTypeFolder` for infallible folders. Here we provide that missing override. r? ```@nnethercote```
Remove lies in comments. > does not have a const constructor > pub const fn new() -> Self 🤔
…=lnicola ⬆️ rust-analyzer r? ``@ghost``
Avoid an ICE and instead let the compiler report a useful error Fixes rust-lang#98299
…Dylan-DPC update ioslice docs to use shared slices I noticed that IoSlice docs were taking unnecessary mut slices, when they only accept shared slices
@bors r+ p=11 rollup=never |
📌 Commit e509242 has been approved by |
☀️ Test successful - checks-actions |
Finished benchmarking commit (72fd41a): comparison url. Instruction count
Max RSS (memory usage)Results
CyclesResults
If you disagree with this performance assessment, please file an issue in rust-lang/rustc-perf. @rustbot label: -perf-regression Footnotes |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
merged-by-bors
This PR was explicitly merged by bors.
rollup
A PR which is a rollup
S-waiting-on-bors
Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
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:
is_running
to explain use case #94033 (Improve docs foris_running
to explain use case)try_fold_unevaluated
for infallible folders #98306 (try_fold_unevaluated
for infallible folders)Failed merges:
r? @ghost
@rustbot modify labels: rollup
Create a similar rollup