-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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 10 pull requests #82262
Closed
Closed
Rollup of 10 pull requests #82262
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
Also make sure that type arguments of associated types are printed in some error messages.
Co-authored-by: Guillaume Gomez <guillaume1.gomez@gmail.com>
Co-authored-by: Guillaume Gomez <guillaume1.gomez@gmail.com>
Co-authored-by: Guillaume Gomez <guillaume1.gomez@gmail.com>
…-obk name async generators something more human friendly in type error diagnostic fixes rust-lang#81457 Some details: 1. I opted to load the generator kind from the hir in TyCategory. I also use 1 impl in the hir for the descr 2. I named both the source of the future, in addition to the general type (`future`), not sure what is preferred 3. I am not sure what is required to make sure "generator" is not referred to anywhere. A brief `rg "\"generator\"" showed me that most diagnostics correctly distinguish from generators and async generator, but the `descr` of `DefKind` is pretty general (not sure how thats used) 4. should the descr impl of AsyncGeneratorKind use its display impl instead of copying the string?
… r=Mark-Simulacrum [libtest] Run the test synchronously when hitting thread limit libtest currently panics if it hits the thread limit. This often results in spurious test failures (<code>thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: Os { code: 11, kind: WouldBlock, message: "Resource temporarily unavailable" }'</code> ... `error: test failed, to rerun pass '--lib'`). This PR makes it continue to run the test synchronously if it runs out of threads. Closes rust-lang#78165. `@rustbot` label: A-libtest T-libs
…h726 Ensure valid TraitRefs are created for GATs This fixes `ProjectionTy::trait_ref` to use the correct substs. Places that need all of the substs have been updated to not use `trait_ref`. r? ```@jackh726```
const_generics: Dont evaluate array length const when handling yet another error Same ICE as rust-lang#82009 except triggered by a different error. cc `@lcnr` r? `@varkor`
…n, r=petrochenkov In some limited cases, suggest `where` bounds for non-type params Partially address rust-lang#81971.
…=varkor Replace if-let and while-let with `if let` and `while let` This pull request replaces if-let and while-let with `if let` and `while let`. closes rust-lang#82205
Make sure pdbs are copied along with exe and dlls when bootstrapping This makes it easier to find the pdbs when wanting to debug the compiler on Windows.
avoid converting types into themselves (clippy::useless_conversion)
…549, r=GuillaumeGomez Add long explanation for E0549 Helps with rust-lang#61137
…rkor Optimize counting digits in line numbers during error reporting Replaces `.to_string().len()` with simple loop and integer division, which avoids an unnecessary allocation. Although I couldn't figure out how to directly profile `rustc`'s error reporting, I ran a microbenchmark on my machine (2.9 GHz Dual-Core Intel Core i5) on the two strategies for `0..100_000`, and the results seem promising: ``` test to_string_len ... bench: 12,124,792 ns/iter (+/- 700,652) test while_loop ... bench: 30,333 ns/iter (+/- 562) ``` The x86_64 disassembly reduces integer division to a multiplication + shift, so I don't think there's any problems with using integer division. For more (micro)optimization, it would be nice if we could avoid the initial check to see if the line number is nonzero, but I don't think `self.get_max_line_num(span, children)` _guarantees_ a nonzero line number.
@bors r+ rollup=never p=5 |
📌 Commit d744e0b has been approved by |
bors
added
the
S-waiting-on-bors
Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
label
Feb 18, 2021
The job Click to see the possible cause of the failure (guessed by this bot)
|
@bors r- |
bors
added
S-waiting-on-author
Status: This is awaiting some action (such as code changes or more information) from the author.
and removed
S-waiting-on-bors
Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
labels
Feb 18, 2021
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
S-waiting-on-author
Status: This is awaiting some action (such as code changes or more information) from the author.
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:
where
bounds for non-type params #82194 (In some limited cases, suggestwhere
bounds for non-type params)if let
andwhile let
#82215 (Replace if-let and while-let withif let
andwhile let
)Failed merges:
r? @ghost
@rustbot modify labels: rollup
Create a similar rollup