-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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 9 pull requests #99462
Rollup of 9 pull requests #99462
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 <[email protected]>
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
@bors r+ rollup=never p=10 |
☀️ Test successful - checks-actions |
📣 Toolstate changed by #99462! Tested on commit a289cfc. 💔 reference on windows: test-pass → test-fail (cc @matthewjasper @steveklabnik @Havvy @ehuss). |
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).
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 |
Successful merges:
Symbol
to&str
conversions #99401 (AvoidSymbol
to&str
conversions)core::task::ready!
#99419 (Stabilizecore::task::ready!
)NonZeroT
<-T
coercion error #99438 (Improve suggestions forNonZeroT
<-T
coercion error)par_for_each_in
inpar_body_owners
andcollect_crate_mono_items
#99457 (usepar_for_each_in
inpar_body_owners
andcollect_crate_mono_items
)Failed merges:
r? @ghost
@rustbot modify labels: rollup
Create a similar rollup