-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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 7 pull requests #126951
Rollup of 7 pull requests #126951
Commits on Jun 18, 2024
-
Configuration menu - View commit details
-
Copy full SHA for a264bff - Browse repository at this point
Copy the full SHA a264bffView commit details
Commits on Jun 20, 2024
-
Configuration menu - View commit details
-
Copy full SHA for dd557d8 - Browse repository at this point
Copy the full SHA dd557d8View commit details
Commits on Jun 23, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 594fa01 - Browse repository at this point
Copy the full SHA 594fa01View commit details
Commits on Jun 24, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 8cfd4b1 - Browse repository at this point
Copy the full SHA 8cfd4b1View commit details -
Configuration menu - View commit details
-
Copy full SHA for 273447c - Browse repository at this point
Copy the full SHA 273447cView commit details -
Do not ICE when suggesting dereferencing closure arg
Account for `for` lifetimes when constructing closure to see if dereferencing the return value would be valid. Fix rust-lang#125634, fix rust-lang#124563.
Configuration menu - View commit details
-
Copy full SHA for a2298a6 - Browse repository at this point
Copy the full SHA a2298a6View commit details -
Configuration menu - View commit details
-
Copy full SHA for 6521c39 - Browse repository at this point
Copy the full SHA 6521c39View commit details -
Configuration menu - View commit details
-
Copy full SHA for 26677eb - Browse repository at this point
Copy the full SHA 26677ebView commit details
Commits on Jun 25, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 604caa0 - Browse repository at this point
Copy the full SHA 604caa0View commit details -
Rollup merge of rust-lang#126618 - mu001999-contrib:dead/enhance, r=p…
…nkfelix Mark assoc tys live only if the corresponding trait is live r? ````@pnkfelix````
Configuration menu - View commit details
-
Copy full SHA for 2724aea - Browse repository at this point
Copy the full SHA 2724aeaView commit details -
Rollup merge of rust-lang#126746 - compiler-errors:no-rpitit, r=oli-obk
Deny `use<>` for RPITITs Precise capturing `use<>` syntax is currently a no-op on RPITITs, since GATs have no variance, so all captured lifetimes are captured invariantly. We don't currently *need* to support `use<>` on RPITITs, since `use<>` is initially intended for migrating RPIT *overcaptures* from edition 2021->2024, but since RPITITs currently capture all in-scope lifetimes, we'll never need to write `use<>` on an RPITIT. Eventually, though, it would be desirable to support precise capturing on RPITITs, since RPITITs overcapturing by default can be annoying to some folks. But let's separate that (which will likely require some delicate types team work for adding variances to GATs and adjusting the refinement rules) from the stabilization of the feature for edition 2024. r? oli-obk cc ``@traviscross`` Tracking: - rust-lang#123432
Configuration menu - View commit details
-
Copy full SHA for 8b72058 - Browse repository at this point
Copy the full SHA 8b72058View commit details -
Rollup merge of rust-lang#126868 - bvanjoi:fix-126764, r=davidtwco
not use offset when there is not ends with brace Fixes rust-lang#126764
Configuration menu - View commit details
-
Copy full SHA for 52e6f9c - Browse repository at this point
Copy the full SHA 52e6f9cView commit details -
Rollup merge of rust-lang#126884 - estebank:issue-125634, r=Nadrieril
Do not ICE when suggesting dereferencing closure arg Account for `for` lifetimes when constructing closure to see if dereferencing the return value would be valid. Fix rust-lang#125634, fix rust-lang#124563.
Configuration menu - View commit details
-
Copy full SHA for 175756f - Browse repository at this point
Copy the full SHA 175756fView commit details -
Rollup merge of rust-lang#126893 - dtolnay:prec, r=compiler-errors
Eliminate the distinction between PREC_POSTFIX and PREC_PAREN precedence level I have been tangling with precedence as part of porting some pretty-printer improvements from syn back to rustc (related to parenthesization of closures, returns, and breaks by the AST pretty-printer). As far as I have been able to tell, there is no difference between the 2 different precedence levels that rustc identifies as `PREC_POSTFIX` (field access, square bracket index, question mark, method call) and `PREC_PAREN` (loops, if, paths, literals). There are a bunch of places that look at either `prec < PREC_POSTFIX` or `prec >= PREC_POSTFIX`. But there is nothing that needs to distinguish PREC_POSTFIX and PREC_PAREN from one another. https://github.com/rust-lang/rust/blob/d49994b060684af423339b55769439b2f444a7b9/compiler/rustc_ast/src/util/parser.rs#L236-L237 https://github.com/rust-lang/rust/blob/d49994b060684af423339b55769439b2f444a7b9/compiler/rustc_hir_typeck/src/fn_ctxt/suggestions.rs#L2829 https://github.com/rust-lang/rust/blob/d49994b060684af423339b55769439b2f444a7b9/compiler/rustc_hir_typeck/src/fn_ctxt/suggestions.rs#L1290 In the interest of eliminating a distinction without a difference, this PR collapses these 2 levels down to 1. There is exactly 1 case where an expression with PREC_POSTFIX precedence needs to be parenthesized in a location that an expression with PREC_PAREN would not, and that's when the receiver of ExprKind::MethodCall is ExprKind::Field. `x.f()` means a different thing than `(x.f)()`. But this does not justify having separate precedence levels because this special case in the grammar is not governed by precedence. Field access does not have "lower precedence than" method call syntax — you can tell because if it did, then `x.f[0].f()` wouldn't be able to have its unparenthesized field access in the receiver of a method call. Because this Field/MethodCall special case is not governed by precedence, it already requires special handling and is not affected by eliminating the PREC_POSTFIX precedence level. https://github.com/rust-lang/rust/blob/d49994b060684af423339b55769439b2f444a7b9/compiler/rustc_ast_pretty/src/pprust/state/expr.rs#L217-L221
Configuration menu - View commit details
-
Copy full SHA for 709baae - Browse repository at this point
Copy the full SHA 709baaeView commit details -
Rollup merge of rust-lang#126915 - SparkyPotato:fix-126903, r=compile…
…r-errors Don't suggest awaiting in closure patterns Fixes rust-lang#126903. For ```rust async fn do_async() {} fn main() { Some(do_async()).map(|()| {}); } ``` the error is now ```rust error[E0308]: mismatched types --> src/main.rs:4:27 | 4 | Some(do_async()).map(|()| {}); | ^^ | | | expected future, found `()` | expected due to this | = note: expected opaque type `impl Future<Output = ()>` found unit type `()` ``` Ideally, if `main` were to be `async`, it should be ```rs error[E0308]: mismatched types --> src/main.rs:4:27 | 4 | Some(do_async()).map(|()| {}); | ^^ | | | expected future, found `()` | expected due to this | = note: expected opaque type `impl Future<Output = ()>` found unit type `()` help: consider `await`ing on the `Future` | 4 | Some(do_async().await).map(|()| {}); | ++++++ ``` However, this would mean `FnCtx::check_pat_top` would have to be called with an `origin_expr` in `rustc_hir_typeck::check::check_fn`, and that expr would have to be somehow plumbed through `FnCtxt::check_expr_closure` and closure signature deduction. I'm willing to work on the plumbing but unsure how to start.
Configuration menu - View commit details
-
Copy full SHA for dad39e8 - Browse repository at this point
Copy the full SHA dad39e8View commit details -
Rollup merge of rust-lang#126943 - Urgau:dedup-all, r=petrochenkov
De-duplicate all consecutive native libs regardless of their options Address rust-lang#126913 (comment) by no longer de-duplicating based on the "options" but by only looking at the generated link args, as to avoid consecutive libs that originated from different native-lib with different options (like `raw-dylib` on Windows) but isn't relevant for `--print=native-static-libs`. r? ``@petrochenkov``
Configuration menu - View commit details
-
Copy full SHA for 812b8b4 - Browse repository at this point
Copy the full SHA 812b8b4View commit details