-
Notifications
You must be signed in to change notification settings - Fork 12.5k
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 #120622
Rollup of 7 pull requests #120622
Commits on Jan 21, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 9099c94 - Browse repository at this point
Copy the full SHA 9099c94View commit details
Commits on Jan 25, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 3ea464f - Browse repository at this point
Copy the full SHA 3ea464fView commit details -
Configuration menu - View commit details
-
Copy full SHA for 96ff1a4 - Browse repository at this point
Copy the full SHA 96ff1a4View commit details -
Configuration menu - View commit details
-
Copy full SHA for e902878 - Browse repository at this point
Copy the full SHA e902878View commit details -
Configuration menu - View commit details
-
Copy full SHA for 09d4613 - Browse repository at this point
Copy the full SHA 09d4613View commit details -
Configuration menu - View commit details
-
Copy full SHA for 0825ad3 - Browse repository at this point
Copy the full SHA 0825ad3View commit details
Commits on Jan 26, 2024
-
Configuration menu - View commit details
-
Copy full SHA for cda3588 - Browse repository at this point
Copy the full SHA cda3588View commit details -
Configuration menu - View commit details
-
Copy full SHA for 1254ee4 - Browse repository at this point
Copy the full SHA 1254ee4View commit details -
Configuration menu - View commit details
-
Copy full SHA for 9f14fc4 - Browse repository at this point
Copy the full SHA 9f14fc4View commit details
Commits on Jan 27, 2024
-
Configuration menu - View commit details
-
Copy full SHA for adde32b - Browse repository at this point
Copy the full SHA adde32bView commit details -
make effect infer variables suggestable in diagnostics
it works when a non-const context that does not enable effects calls into a const effects-enabled trait. We'd simply suggest the non-const trait bound in this case consistent to its fallback.
Configuration menu - View commit details
-
Copy full SHA for b80d44e - Browse repository at this point
Copy the full SHA b80d44eView commit details -
these ui changes are closer to what was there before const_trait_impl changes.
Configuration menu - View commit details
-
Copy full SHA for 2e1e574 - Browse repository at this point
Copy the full SHA 2e1e574View commit details
Commits on Jan 28, 2024
-
Configuration menu - View commit details
-
Copy full SHA for c367983 - Browse repository at this point
Copy the full SHA c367983View commit details
Commits on Jan 30, 2024
-
limit the names_possiblilities to less than 3
Co-authored-by: Urgau <3616612+Urgau@users.noreply.github.com>
Configuration menu - View commit details
-
Copy full SHA for 0213c87 - Browse repository at this point
Copy the full SHA 0213c87View commit details -
Configuration menu - View commit details
-
Copy full SHA for ca243e7 - Browse repository at this point
Copy the full SHA ca243e7View commit details -
Configuration menu - View commit details
-
Copy full SHA for d34b0fa - Browse repository at this point
Copy the full SHA d34b0faView commit details -
Account for unbounded type param receiver in suggestions
When encountering ```rust fn f<T>(a: T, b: T) -> std::cmp::Ordering { a.cmp(&b) //~ ERROR E0599 } ``` output ``` error[E0599]: no method named `cmp` found for type parameter `T` in the current scope --> $DIR/method-on-unbounded-type-param.rs:2:7 | LL | fn f<T>(a: T, b: T) -> std::cmp::Ordering { | - method `cmp` not found for this type parameter LL | a.cmp(&b) | ^^^ method cannot be called on `T` due to unsatisfied trait bounds | = help: items from traits can only be used if the type parameter is bounded by the trait help: the following traits define an item `cmp`, perhaps you need to restrict type parameter `T` with one of them: | LL | fn f<T: Ord>(a: T, b: T) -> std::cmp::Ordering { | +++++ LL | fn f<T: Iterator>(a: T, b: T) -> std::cmp::Ordering { | ++++++++++ ``` Fix rust-lang#120186.
Configuration menu - View commit details
-
Copy full SHA for 20b1c2a - Browse repository at this point
Copy the full SHA 20b1c2aView commit details -
Configuration menu - View commit details
-
Copy full SHA for 9ccc770 - Browse repository at this point
Copy the full SHA 9ccc770View commit details
Commits on Jan 31, 2024
-
Configuration menu - View commit details
-
Copy full SHA for f622e83 - Browse repository at this point
Copy the full SHA f622e83View commit details -
Configuration menu - View commit details
-
Copy full SHA for 815d312 - Browse repository at this point
Copy the full SHA 815d312View commit details
Commits on Feb 2, 2024
-
Ignore test-panic-abort tests on Android
Until rust-lang#120567 is fixed.
Configuration menu - View commit details
-
Copy full SHA for 48f664b - Browse repository at this point
Copy the full SHA 48f664bView commit details
Commits on Feb 3, 2024
-
Rollup merge of rust-lang#116284 - RalfJung:no-nan-match, r=cjgillot
make matching on NaN a hard error, and remove the rest of illegal_floating_point_literal_pattern These arms would never be hit anyway, so the pattern makes little sense. We have had a future-compat lint against float matches in general for a *long* time, so I hope we can get away with immediately making this a hard error. This is part of implementing rust-lang/rfcs#3535. Closes rust-lang#41620 by removing the lint. rust-lang/reference#1456 updates the reference to match.
Configuration menu - View commit details
-
Copy full SHA for c873c12 - Browse repository at this point
Copy the full SHA c873c12View commit details -
Rollup merge of rust-lang#120060 - saethlin:mir-opt-bless-targets, r=…
…wesleywiser Use the same mir-opt bless targets on all platforms This undoes some of the implementation in rust-lang#119035, but not the effect. Sorry for the churn, I've learned a lot about how all this works over the past few weeks. The objective here is to make `x test mir-opt --bless` use the same set of targets on all platforms. It didn't do that from the start because bootstrap assumes that a target linker is available, so the availability of cross-linkers is how we ended up with `MIR_OPT_BLESS_TARGET_MAPPING` and poor support for blessing mir-opt tests from Aarch64 MacOS. This PR corrects that. So I've adjusted the bless targets for mir-opt tests, as well as tweaked some of the logic in bootstrap about linker configuration so that we don't try to access the cache of cc/linker configuration when doing the mir-opt builds. While working on that I realized that if I swapped from the `cargo rustc -p std` strategy to `cargo check` on the sysroot, I could use the existing code for check builds to bypass some linker logic. Sweet. But just doing that doesn't work, because then mir-opt tests complain that they can't find an rlib for any of the standard library crates. That happens because nearly all the mir-opt tests are attempting to build `CrateType::Executable`. We already have all the MIR required for mir-opt tests from the rmeta files, but since rustc think we're trying to build an executable it demands we have access to all the upstream monomorphizations that only exist in rlibs, not the meta files in a MIR-only sysroot. So to fix that, I've swapped all the mir-opt tests be passed `--crate-type=rlib`. That works, but leaves us with a few broken mir-opt tests which I've blessed or fixed up; we also lose MIR for some functions so I added `-Clink-dead-code` to paper over that. The inlining changes are because changing the crate-type perturbs the hashes that are compared here to sometimes let us do inlining even in a possibly-recursive call: https://github.com/rust-lang/rust/blob/4cb17b4e78e0540e49d2da884cc621a6bf6f47fa/compiler/rustc_mir_transform/src/inline.rs#L332-L341
Configuration menu - View commit details
-
Copy full SHA for 6e5c565 - Browse repository at this point
Copy the full SHA 6e5c565View commit details -
Rollup merge of rust-lang#120214 - Nadrieril:fix-120210, r=pnkfelix
match lowering: consistently lower bindings deepest-first Currently when lowering match expressions to MIR, we do a funny little dance with the order of bindings. I attempt to explain it in the third commit: we handle refutable (i.e. needing a test) patterns differently than irrefutable ones. This leads to inconsistencies, as reported in rust-lang#120210. The reason we need a dance at all is for situations like: ```rust fn foo1(x: NonCopyStruct) { let y @ NonCopyStruct { copy_field: z } = x; // the above should turn into let z = x.copy_field; let y = x; } ``` Here the `y `@`` binding will move out of `x`, so we need to copy the field first. I believe that the inconsistency came about when we fixed rust-lang#69971, and didn't notice that the fix didn't extend to refutable patterns. My guess then is that ordering bindings by "deepest-first, otherwise source order" is a sound choice. This PR implements that (at least I hope, match lowering is hard to follow 🥲). Fixes rust-lang#120210 r? `@oli-obk` since you merged the original fix to rust-lang#69971 cc `@matthewjasper`
Configuration menu - View commit details
-
Copy full SHA for 4790a1f - Browse repository at this point
Copy the full SHA 4790a1fView commit details -
Rollup merge of rust-lang#120326 - tmandry:abort-in-tests, r=cuviper
Actually abort in -Zpanic-abort-tests When a test fails in panic=abort, it can be useful to have a debugger or other tooling hook into the `abort()` call for debugging. Doing this some other way would require it to hard code details of Rust's panic machinery. There's no reason we couldn't have done this in the first place; using a single exit code for "success" or "failed" was just simpler. Now we are aware of the special exit codes for posix and windows platforms, logging a special error if an unrecognized code is used on those platforms, and falling back to just "failure" on other platforms. This continues to account for `#[should_panic]` inside the test process itself, so there's no risk of misinterpreting a random call to `abort()` as an expected panic. Any exit code besides `TR_OK` is logged as a test failure. As an added benefit, this would allow us to support panic=immediate_abort (but not `#[should_panic]`), without noise about unexpected exit codes when a test fails.
Configuration menu - View commit details
-
Copy full SHA for 2efd952 - Browse repository at this point
Copy the full SHA 2efd952View commit details -
Rollup merge of rust-lang#120381 - fee1-dead-contrib:reconstify-add, …
…r=compiler-errors Reconstify `Add` r? project-const-traits I'm not happy with the ui test changes (or failures because I did not bless them and include the diffs in this PR). There is at least some bugs I need to look and try fix: 1. A third duplicated diagnostic when a consumer crate that does not have `effects` enabled has a trait selection error for an upstream const_trait trait. See tests/ui/ufcs/ufcs-qpath-self-mismatch.rs. 2. For some reason, making `Add` a const trait would stop us from suggesting `T: Add` when we try to add two `T`s without that bound. See tests/ui/suggestions/issue-97677.rs
Configuration menu - View commit details
-
Copy full SHA for ada4d0d - Browse repository at this point
Copy the full SHA ada4d0dView commit details -
Rollup merge of rust-lang#120396 - estebank:method-on-unbounded-type-…
…param, r=nnethercote Account for unbounded type param receiver in suggestions When encountering ```rust fn f<T>(a: T, b: T) -> std::cmp::Ordering { a.cmp(&b) //~ ERROR E0599 } ``` output ``` error[E0599]: no method named `cmp` found for type parameter `T` in the current scope --> $DIR/method-on-unbounded-type-param.rs:2:7 | LL | fn f<T>(a: T, b: T) -> std::cmp::Ordering { | - method `cmp` not found for this type parameter LL | a.cmp(&b) | ^^^ method cannot be called on `T` due to unsatisfied trait bounds | = help: items from traits can only be used if the type parameter is bounded by the trait help: the following traits define an item `cmp`, perhaps you need to restrict type parameter `T` with one of them: | LL | fn f<T: Ord>(a: T, b: T) -> std::cmp::Ordering { | +++++ LL | fn f<T: Iterator>(a: T, b: T) -> std::cmp::Ordering { | ++++++++++ ``` Fix rust-lang#120186.
Configuration menu - View commit details
-
Copy full SHA for f42d6ca - Browse repository at this point
Copy the full SHA f42d6caView commit details -
Rollup merge of rust-lang#120435 - chenyukang:yukang-fix-120427-cfg-n…
…ame, r=Urgau,Nilstrieb Suggest name value cfg when only value is used for check-cfg Fixes rust-lang#120427 r? ````@Nilstrieb````
Configuration menu - View commit details
-
Copy full SHA for 622dad4 - Browse repository at this point
Copy the full SHA 622dad4View commit details