-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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 #90945
Merged
Merged
Rollup of 8 pull requests #90945
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
…ggest references When suggesting references, substitutions were being forgotten and some types were misused. This led to at least one ICE and other incorrectly emitted diagnostics. This has been fixed; in some cases this leads to diagnostics changing, and tests have been adjusted.
check if `String` or `&String` or `&str` Update compiler/rustc_typeck/src/check/method/suggest.rs Co-authored-by: Esteban Kuber <[email protected]> remove some trailing whitespace
No functional changes intended. I'm playing around with building compiler components using nightly rust (2021-11-02) in a non-standard way. I encountered the following error while trying to build rustc_mir_build: ``` error[E0597]: `wildcard` does not live long enough --> rust/src/nightly/compiler/rustc_mir_build/src/build/matches/mod.rs:1767:82 | 1767 | let mut otherwise_candidate = Candidate::new(expr_place_builder.clone(), &wildcard, false); | ^^^^^^^^^ borrowed value does not live long enough ... 1799 | } | - | | | `wildcard` dropped here while still borrowed | borrow might be used here, when `guard_candidate` is dropped and runs the destructor for type `Candidate<'_, '_>` | = note: values in a scope are dropped in the opposite order they are defined ``` I believe this flags an issue that may become an error in the future. Swapping the order of `wildcard` and `guard_candidate` resolves it.
The detectportal.firefox.com server seems to return a random-ish date; for example I see the following across 5 curl's done consecutively locally, where the real date is approximaly 15 Nov 2021 06:36 UTC. Date: Mon, 15 Nov 2021 13:34:53 GMT Date: Mon, 15 Nov 2021 12:20:21 GMT Date: Mon, 15 Nov 2021 00:06:47 GMT Date: Mon, 15 Nov 2021 17:14:33 GMT Date: Mon, 15 Nov 2021 13:33:21 GMT
…unsized, r=estebank check where-clause for explicit `Sized` before suggesting `?Sized` Fixes rust-lang#85945. Based on rust-lang#86454. ``@rustbot`` label +A-diagnostics +A-traits +A-typesystem +D-papercut +T-compiler
…e_inputs_output, r=jackh726 Normalize both arguments of `equate_normalized_input_or_output` Fixes rust-lang#90638 Fixes rust-lang#90612 Temporary fix for a more complex underlying problem stemming from an inability to normalize closure substs during typecheck. r? ````@jackh726````
…-iter, r=estebank Suggest `&str.chars()` on attempt to `&str.iter()` closes rust-lang#90786
Fixes incorrect handling of TraitRefs when emitting suggestions. Closes rust-lang#90804 , although there were more issues here that were hidden by the thing that caused this ICE. Underlying problem was that substitutions were being thrown out, which not only leads to an ICE but also incorrect diagnostics. On top of that, in some cases the self types from the root obligations were being mixed in with those from derived obligations. This makes a couple diagnostics arguable worse ("`B<C>` does not implement `Copy`" instead of "`C` does not implement `Copy`") but the worse diagnostics are at least still correct and that downside is in my opinion clearly outweighed by the benefits of fixing the ICE and unambiguously wrong diagnostics.
…num, r=petrochenkov fix getting the discriminant of a zero-variant enum Fixes rust-lang#89765
…etrochenkov rustc_mir_build: reorder bindings No functional changes intended. I'm playing around with building compiler components using nightly rust (2021-11-02) in a non-standard way. I encountered the following error while trying to build rustc_mir_build: ``` error[E0597]: `wildcard` does not live long enough --> rust/src/nightly/compiler/rustc_mir_build/src/build/matches/mod.rs:1767:82 | 1767 | let mut otherwise_candidate = Candidate::new(expr_place_builder.clone(), &wildcard, false); | ^^^^^^^^^ borrowed value does not live long enough ... 1799 | } | - | | | `wildcard` dropped here while still borrowed | borrow might be used here, when `guard_candidate` is dropped and runs the destructor for type `Candidate<'_, '_>` | = note: values in a scope are dropped in the opposite order they are defined ``` I believe this flags an issue that may become an error in the future. Swapping the order of `wildcard` and `guard_candidate` resolves it.
…=pietroalbini Use a different server for checking clock drift The detectportal.firefox.com server seems to return a random-ish date; for example I see the following across 5 curl's done consecutively locally, where the real date is approximately 15 Nov 2021 06:36 UTC. Date: Mon, 15 Nov 2021 13:34:53 GMT Date: Mon, 15 Nov 2021 12:20:21 GMT Date: Mon, 15 Nov 2021 00:06:47 GMT Date: Mon, 15 Nov 2021 17:14:33 GMT Date: Mon, 15 Nov 2021 13:33:21 GMT
…acrum Add a regression test for rust-lang#80772 Closes rust-lang#80772
@bors r+ p=8 rollup=never |
📌 Commit c73b35e 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
Nov 16, 2021
☀️ Test successful - checks-actions |
Finished benchmarking commit (934624f): comparison url. Summary: This benchmark run did not return any relevant changes. If you disagree with this performance assessment, please file an issue in rust-lang/rustc-perf. @rustbot label: -perf-regression |
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.
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:
Sized
before suggesting?Sized
#86455 (check where-clause for explicitSized
before suggesting?Sized
)equate_normalized_input_or_output
#90801 (Normalize both arguments ofequate_normalized_input_or_output
)&str.chars()
on attempt to&str.iter()
#90803 (Suggest&str.chars()
on attempt to&str.iter()
)Option::unwrap()
on aNone
value #80772)Failed merges:
r? @ghost
@rustbot modify labels: rollup
Create a similar rollup