-
Notifications
You must be signed in to change notification settings - Fork 360
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
Rustup #3049
Merged
Merged
Rustup #3049
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
Some SMIR Const cleanups Only e1def3bd41b021ce87a5d639b10cdf4a7df1d0b5 is new logic, everywhere else I just used the implementations that y'all had already written. r? `@spastorino` cc `@ouz-a`
`rustc_layout_scalar_valid_range` makes ctors unsafe We already validate this when we use the ctor in a call, e.g. `Variant(1)`, but not if we use the ctor as a fn ptr, e.g. `.map(Variant)`. The easiest way to fix the latter is (afaict) is by marking the ctor as unsafe itself. Fixes #115284
update Miri r? `@ghost`
Work around ICE in diagnostics for local super-universes missing `UniverseInfo`s In issue #114907, canonicalization of liveness dropck-outlives results (IIUC) encounters universes absent from the original query. Some local universes [are created](https://github.com/lqd/rust/blob/f3a1bae88c617330b8956818da3cea256336c1cf/compiler/rustc_infer/src/infer/canonical/query_response.rs#L417-L425) for the mapping, but importantly, they won't have associated causes. These missing `UniverseInfo`s can be [needed](https://github.com/lqd/rust/blob/f3a1bae88c617330b8956818da3cea256336c1cf/compiler/rustc_borrowck/src/diagnostics/region_errors.rs#L376) during diagnostics, [causing the `IndexMap: key not found` ICE](https://github.com/lqd/rust/blob/d55522aad87c5605d7edd5dd4b37926e8b446117/compiler/rustc_borrowck/src/region_infer/mod.rs#L2252) seen in the issue. This PR works around this by returning the suboptimal catch-all cause, to avoid the ICE. It does results in suboptimal diagnostics right now, but it's better than an ICE. r? `@matthewjasper.` Let me know if there's a good easy-ish way to fix this, but I believe that for some of these erroneous cases and diagnostics, that inference/canonicalization/higher-ranked subtyping/etc may not behave exactly the same with the new trait solver? If that's the case then it'd probably be best to wait a bit more to do the correct fix. Fixes #114907. cc `@aliemjay`
fix(resolve): update def if binding is warning ambiguity Fixes #115380
…t-lifetimes, r=jackh726 Capture lifetimes for associated type bounds destined to be lowered to opaques Some associated type bounds get lowered to opaques, but they're not represented in the AST as opaques. That means that we never collect lifetimes for them (`record_lifetime_params_for_impl_trait`) which are used currently for RPITITs, which capture all of their in-scope lifetimes[^1]. This means that the nested RPITITs that arise from some type like `impl Foo<Type: Bar>` (~> `impl Foo<Type = impl Bar>`) don't capture any lifetimes, leading to ICEs. This PR makes sure we collect the lifetimes for associated type bounds as well, and make sure that they are set up correctly for opaque type lowering later. Fixes #115360 [^1]: #114489
Return ident for ExprField and PatField HIR nodes Fixes #115264
docs: improve std::fs::read doc #### What does this PR do 1. Rephrase a confusing sentence in the document of `std::fs::read()` ----- Closes #114432 cc `@Dexus0` `@saethlin`
…iler-errors Permit recursive weak type aliases I saw #63097 and thought "we can do ~~better~~ funnier". So here it is. It's not useful, but it's certainly something. This may actually become feasible with lazy norm (so in 5 years (constant, not reducing over time)). r? `@estebank` cc `@GuillaumeGomez`
Lower `Or` pattern without allocating place cc `@azizghuloum` `@cjgillot` Related to #111583 and #111644 While reviewing #111644, it occurs to me that while we directly lower conjunctive predicates, which are connected with `&&`, into the desirable control flow, today we don't directly lower the disjunctive predicates, which are connected with `||`, in the similar fashion. Instead, we allocate a place for the boolean temporary to hold the result of evaluating the `||` expression. Usually I would expect optimization at later stages to "inline" the evaluation of boolean predicates into simple CFG, but #111583 is an example where `&&` is failing to be optimized away and the assembly shows that both the expensive operands are evaluated. Therefore, I would like to make a small change to make the CFG a bit more straight-forward without invoking the `as_temp` machinery, and plus avoid allocating the place to hold the boolean result as well.
Replace old private-in-public diagnostic with type privacy lints Next part of RFC rust-lang/rust#48054. r? `@petrochenkov`
`impl TryFrom<char> for u16` This PR implements the final missing `char` -> unsigned integer conversion. ACP: rust-lang/libs-team#146 r? libs-api `@rustbot` label +T-libs-api +needs-fcp -T-libs
miri ABI check: fix handling of 1-ZST; don't accept sign differences r? `@oli-obk`
diagnostics: avoid wrong `unused_parens` on `x as (T) < y` Fixes #106413 Fixes #80636
remove unnecessary heap allocation
fix version for abi_thiscall to 1.73.0, which was forgotten to change when stabilized and (later) moved to beta See: rust-lang/rust#114562 (comment) rust-lang/rust#115056 (comment) https://rust-lang.zulipchat.com/#narrow/stream/241545-t-release/topic/1.2E72.2E0/near/387695644 Should be backported to beta too.
Add comment so pub items are not removed As suggested in rust-lang/rust#115393, add a comment so someone doesn't clean these up.
Rollup of 5 pull requests Successful merges: - #115411 (miri ABI check: fix handling of 1-ZST; don't accept sign differences) - #115424 (diagnostics: avoid wrong `unused_parens` on `x as (T) < y`) - #115425 (remove unnecessary heap allocation) - #115446 (fix version for abi_thiscall to 1.73.0, which was forgotten to change when stabilized and (later) moved to beta) - #115447 (Add comment so pub items are not removed) r? `@ghost` `@rustbot` modify labels: rollup
…ams, r=GuillaumeGomez rustdoc: correctly deal with self ty params when eliding default object lifetimes Fixes #115179.
@bors r+ |
☀️ Test successful - checks-actions |
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.
No description provided.