Merged
Conversation
This reverts commit 9edaa76.
- Use `expr.hir_id.owner` instead of `self.tcx.parent_module(expr.hir_id)` - Use `.type_at()` instead of `.first()` + `.expect_ty()` - Use single `.find()` with `&&` condition Co-authored-by: Michael Goulet <michael@errs.io>
Add E0790 as more specific variant of E0283 Fixes rust-lang#81701 I think this should be good to go, there are only two things where I am somewhat unsure: - Is there a better way to get the fully-qualified path for the suggestion? I tried `self.tcx.def_path_str`, but that didn't seem to always give a correct path for the context. - Should all this be extracted into it's own method or is it fine where it is? r? `@estebank`
use body's param-env when checking if type needs drop The type comes from the body, so we should be using the body's param-env, as opposed to the ADT's param env, because we know less in the latter compared to the former. Fixes rust-lang#99375
…sions, r=nnethercote Avoid `Symbol` to `&str` conversions `Symbol::as_str` is a slowish operation, so this patch removes some usages of it.
…=Mark-Simulacrum Stabilize `core::task::ready!` This stabilizes `core::task::ready!` for Rust 1.64. The FCP for stabilization was just completed here rust-lang#70922 (comment). Thanks! Closes rust-lang#70922 cc/ ``@rust-lang/libs-api``
…=Mark-Simulacrum Revert "Stabilize $$ in Rust 1.63.0" This mechanically reverts commit 9edaa76, the one commit from rust-lang#95860. rust-lang#99035; the behavior of `$$crate` is potentially unexpected and not ready to be stabilized. rust-lang#99193 attempts to forbid `$$crate` without also destabilizing `$$` more generally. `@rustbot` modify labels +T-compiler +T-lang +P-medium +beta-nominated +relnotes (applying the labels I think are accurate from the issue and alternative partial revert) cc `@Mark-Simulacrum`
… r=compiler-errors
Improve suggestions for `NonZeroT` <- `T` coercion error
Currently, when encountering a type mismatch error with `NonZeroT` and `T` (for example `NonZeroU8` and `u8`) we errorneusly suggest wrapping expression in `NonZeroT`:
```text
error[E0308]: mismatched types
--> ./t.rs:7:35
|
7 | let _: std::num::NonZeroU64 = 1;
| -------------------- ^ expected struct `NonZeroU64`, found integer
| |
| expected due to this
|
help: try wrapping the expression in `std::num::NonZeroU64`
|
7 | let _: std::num::NonZeroU64 = std::num::NonZeroU64(1);
| +++++++++++++++++++++ +
```
I've removed this suggestion and added suggestions to call `new` (for `Option<NonZeroT>` <- `T` case) or `new` and `unwrap` (for `NonZeroT` <- `T` case):
```text
error[E0308]: mismatched types
--> ./t.rs:7:35
|
7 | let _: std::num::NonZeroU64 = 1;
| -------------------- ^ expected struct `NonZeroU64`, found integer
| |
| expected due to this
|
help: Consider calling `NonZeroU64::new`
|
7 | let _: std::num::NonZeroU64 = NonZeroU64::new(1).unwrap();
| ++++++++++++++++ ++++++++++
error[E0308]: mismatched types
--> ./t.rs:8:43
|
8 | let _: Option<std::num::NonZeroU64> = 1;
| ---------------------------- ^ expected enum `Option`, found integer
| |
| expected due to this
|
= note: expected enum `Option<NonZeroU64>`
found type `{integer}`
help: Consider calling `NonZeroU64::new`
|
8 | let _: Option<std::num::NonZeroU64> = NonZeroU64::new(1);
| ++++++++++++++++ +
```
r? `@compiler-errors`
Update mdbook Updates mdbook from 0.4.18 to 0.4.20. Changelog: https://github.com/rust-lang/mdBook/blob/master/CHANGELOG.md#mdbook-0420 This mainly includes some minor formatting and display changes.
…=lnicola ⬆️ rust-analyzer r? `@ghost`
use `par_for_each_in` in `par_body_owners` and `collect_crate_mono_items`
Using `par_iter` in non-parallel mode will cause the entire process to abort when any iteration panics. So we can use `par_for_each_in` instead to make the error message consistent with parallel mode. This means that the compiler will output more error messages in some cases. This fixes the following ui tests when set `parallel-compiler = true`:
```
[ui] src/test\ui\privacy\privacy2.rs
[ui] src/test\ui\privacy\privacy3.rs
[ui] src/test\ui\type_length_limit.rs
```
This refers to rust-lang#68171
Updates rust-lang#75760
Member
Author
|
@bors r+ rollup=never p=10 |
Collaborator
Collaborator
Collaborator
|
☀️ Test successful - checks-actions |
Contributor
|
📣 Toolstate changed by #99462! Tested on commit a289cfc. 💔 reference on windows: test-pass → test-fail (cc @matthewjasper @steveklabnik @Havvy @ehuss). |
rust-highfive
added a commit
to rust-lang-nursery/rust-toolstate
that referenced
this pull request
Jul 19, 2022
Tested on commit rust-lang/rust@a289cfc. Direct link to PR: <rust-lang/rust#99462> 💔 reference on windows: test-pass → test-fail (cc @matthewjasper @steveklabnik @Havvy @ehuss). 💔 reference on linux: test-pass → test-fail (cc @matthewjasper @steveklabnik @Havvy @ehuss).
This was referenced Jul 19, 2022
Collaborator
|
Finished benchmarking commit (a289cfc): 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 |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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:
Symbolto&strconversions #99401 (AvoidSymbolto&strconversions)core::task::ready!#99419 (Stabilizecore::task::ready!)NonZeroT<-Tcoercion error #99438 (Improve suggestions forNonZeroT<-Tcoercion error)par_for_each_ininpar_body_ownersandcollect_crate_mono_items#99457 (usepar_for_each_ininpar_body_ownersandcollect_crate_mono_items)Failed merges:
r? @ghost
@rustbot modify labels: rollup
Create a similar rollup