-
Couldn't load subscription status.
- Fork 13.9k
Rollup of 8 pull requests #90945
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
Conversation
…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 |
|
☀️ 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 |
Successful merges:
Sizedbefore suggesting?Sized#86455 (check where-clause for explicitSizedbefore 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 aNonevalue #80772)Failed merges:
r? @ghost
@rustbot modify labels: rollup
Create a similar rollup