-
Notifications
You must be signed in to change notification settings - Fork 12.6k
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 #122206
Rollup of 9 pull requests #122206
Commits on Mar 8, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 4bef0cc - Browse repository at this point
Copy the full SHA 4bef0ccView commit details -
Configuration menu - View commit details
-
Copy full SHA for 0b6006e - Browse repository at this point
Copy the full SHA 0b6006eView commit details -
Tweak the way we protect in-place function arguments in interpreters
Use `MPlaceTy` instead of `PlaceTy` in `FnArg` and ignore (copy) locals in an earlier step ("Locals that don't have their address taken are as protected as they can ever be"). This seems to be crucial for tail call support (as they can't refer to caller's locals which are killed when replacing the stack frame).
Configuration menu - View commit details
-
Copy full SHA for a984322 - Browse repository at this point
Copy the full SHA a984322View commit details -
Configuration menu - View commit details
-
Copy full SHA for 07bd05e - Browse repository at this point
Copy the full SHA 07bd05eView commit details -
Configuration menu - View commit details
-
Copy full SHA for 8dd4e2b - Browse repository at this point
Copy the full SHA 8dd4e2bView commit details -
Configuration menu - View commit details
-
Copy full SHA for 309d85b - Browse repository at this point
Copy the full SHA 309d85bView commit details -
Configuration menu - View commit details
-
Copy full SHA for 507583a - Browse repository at this point
Copy the full SHA 507583aView commit details -
Add the new description field to Target::to_json, and add description…
…s for some MSVC targets
Configuration menu - View commit details
-
Copy full SHA for d6b597b - Browse repository at this point
Copy the full SHA d6b597bView commit details -
Configuration menu - View commit details
-
Copy full SHA for ffd30e0 - Browse repository at this point
Copy the full SHA ffd30e0View commit details -
Rollup merge of rust-lang#121201 - RalfJung:align_offset_contract, r=…
…cuviper align_offset, align_to: no longer allow implementations to spuriously fail to align For a long time, we have allowed `align_offset` to fail to compute a properly aligned offset, and `align_to` to return a smaller-than-maximal "middle slice". This was done to cover the implementation of `align_offset` in const-eval and Miri. See rust-lang#62420 for more background. For about the same amount of time, this has caused confusion and surprise, where people didn't realize they have to write their code to be defensive against `align_offset` failures. Another way to put this is: the specification is effectively non-deterministic, and non-determinism is hard to test for -- in particular if the implementation everyone uses to test always produces the same reliable result, and nobody expects it to be non-deterministic to begin with. With rust-lang#117840, Miri has stopped making use of this liberty in the spec; it now always behaves like rustc. That only leaves const-eval as potential motivation for this behavior. I do not think this is sufficient motivation. Currently, none of the relevant functions are stably const: `align_offset` is unstably const, `align_to` is not const at all. I propose that if we ever want to make these const-stable, we just accept the fact that they can behave differently at compile-time vs at run-time. This is not the end of the world, and it seems to be much less surprising to programmers than unexpected non-determinism. (Related: rust-lang/rfcs#3352.) `@thomcc` has repeatedly made it clear that they strongly dislike the non-determinism in align_offset, so I expect they will support this. `@oli-obk,` what do you think? Also, whom else should we involve? The primary team responsible is clearly libs-api, so I will nominate this for them. However, allowing const-evaluated code to behave different from run-time code is t-lang territory. The thing is, this is not stabilizing anything t-lang-worthy immediately, but it still does make a decision we will be bound to: if we accept this change, then - either `align_offset`/`align_to` can never be called in const fn, - or we allow compile-time behavior to differ from run-time behavior. So I will nominate for t-lang as well, with the question being: are you okay with accepting either of these outcomes (without committing to which one, just accepting that it has to be one of them)? This closes the door to "have `align_offset` and `align_to` at compile-time and also always have compile-time behavior match run-time behavior". Closes rust-lang#62420
Configuration menu - View commit details
-
Copy full SHA for 948d32d - Browse repository at this point
Copy the full SHA 948d32dView commit details -
Rollup merge of rust-lang#122076 - WaffleLapkin:mplace-args, r=RalfJung
Tweak the way we protect in-place function arguments in interpreters Use `MPlaceTy` instead of `PlaceTy` in `FnArg` and ignore (copy) locals in an earlier step ("Locals that don't have their address taken are as protected as they can ever be"). This seems to be crucial for tail call support (as they can't refer to caller's locals which are killed when replacing the stack frame). r? `@RalfJung` cc `@oli-obk` see rust-lang#121273 (comment)
Configuration menu - View commit details
-
Copy full SHA for 2c3ca09 - Browse repository at this point
Copy the full SHA 2c3ca09View commit details -
Rollup merge of rust-lang#122100 - compiler-errors:better-capture, r=…
…oli-obk Better comment for implicit captures in RPITIT Improve the error message for implicit captures. Also always set E0657. r? oli-obk
Configuration menu - View commit details
-
Copy full SHA for e76bd62 - Browse repository at this point
Copy the full SHA e76bd62View commit details -
Rollup merge of rust-lang#122157 - dpaoliello:targetdesc, r=Nilstrieb
Add the new description field to Target::to_json, and add descriptions for some MSVC targets The original PR to add a `description` field to `Target` (<rust-lang#121905>) didn't add the field to `Target::to_json`, which meant that the `check_consistency` testwould fail if you tried to set a description as it wouldn't survive round-tripping via JSON: https://github.com/rust-lang/rust/actions/runs/8180997936/job/22370052535#step:27:4967 This change adds the field to `Target::to_json`, and sets some descriptions to verify that it works correctly.
Configuration menu - View commit details
-
Copy full SHA for b9a3952 - Browse repository at this point
Copy the full SHA b9a3952View commit details -
Rollup merge of rust-lang#122164 - beetrees:uefi-argv-align, r=workin…
…gjubilee Fix misaligned loads when loading UEFI arg pointers Currently, the two UEFI argument pointers are stored in an `alloca` of alignment 1, a pointer to which is then passed as `argv`. However, [the library code](https://github.com/rust-lang/rust/blob/9c3ad802d9b9633d60d3a74668eb1be819212d34/library/std/src/sys/pal/uefi/mod.rs#L60-L61) treats `argv` as a pointer to an array of pointers and dereferences it as such, meaning that it presumes the `alloca` is aligned to at least the alignment of a pointer. This PR fixes this mismatch by aligning the `alloca` to the alignment of a pointer. This PR also changed the `gep` to use the new `inbounds_ptradd` method.
Configuration menu - View commit details
-
Copy full SHA for 2b6ae95 - Browse repository at this point
Copy the full SHA 2b6ae95View commit details -
Rollup merge of rust-lang#122171 - compiler-errors:next-solver-tests,…
… r=lcnr Add some new solver tests Fixes rust-lang#119607 Fixes rust-lang#119608 r? lcnr
Configuration menu - View commit details
-
Copy full SHA for 9829ff6 - Browse repository at this point
Copy the full SHA 9829ff6View commit details -
Rollup merge of rust-lang#122172 - compiler-errors:rpitit-collect-ice…
…, r=fmease Don't ICE if we collect no RPITITs unless there are no unification errors Move an assertion in `collect_return_position_impl_trait_in_trait_tys` to after the `ObligationCtxt::eq` calls, so that we only assert and ICE if we have unification errors. Fixes rust-lang#121468
Configuration menu - View commit details
-
Copy full SHA for 02b89d1 - Browse repository at this point
Copy the full SHA 02b89d1View commit details -
Rollup merge of rust-lang#122197 - lcnr:proof-tree-braces, r=BoxyUwU
inspect formatter: add braces This makes it easier to hide subtrees when looking through proof trees. Looking at the proof tree for `usize: Clone`: nightly: ``` ROOT GOAL: Goal { predicate: Binder { value: TraitPredicate(<usize as std::clone::Clone>, polarity:Positive), bound_vars: [] }, param_env: ParamEnv { caller_bounds: [], reveal: UserFacing } } GOAL: Canonical { value: QueryInput { goal: Goal { predicate: Binder { value: TraitPredicate(<usize as std::clone::Clone>, polarity:Positive), bound_vars: [] }, param_env: ParamEnv { caller_bounds: [], reveal: UserFacing } }, anchor: Bind(DefId(0:5 ~ main[8e4b]::main)), predefined_opaques_in_body: PredefinedOpaques(PredefinedOpaquesData { opaque_types: [] }) }, max_universe: U0, variables: [] } REVISION 0 INSTANTIATED: QueryInput { goal: Goal { predicate: Binder { value: TraitPredicate(<usize as std::clone::Clone>, polarity:Positive), bound_vars: [] }, param_env: ParamEnv { caller_bounds: [], reveal: UserFacing } }, anchor: Bind(DefId(0:5 ~ main[8e4b]::main)), predefined_opaques_in_body: PredefinedOpaques(PredefinedOpaquesData { opaque_types: [] }) } ROOT RESULT: Ok(Canonical { value: Response { certainty: Yes, var_values: CanonicalVarValues { var_values: [] }, external_constraints: ExternalConstraints(ExternalConstraintsData { region_constraints: QueryRegionConstraints { outlives: [], member_constraints: [] }, opaque_types: [] }) }, max_universe: U0, variables: [] }) CANDIDATE Impl(DefId(2:30665 ~ core[a9f5]::clone::impls::{impl#5})): Ok(Canonical { value: Response { certainty: Yes, var_values: CanonicalVarValues { var_values: [] }, external_constraints: ExternalConstraints(ExternalConstraintsData { region_constraints: QueryRegionConstraints { outlives: [], member_constraints: [] }, opaque_types: [] }) }, max_universe: U0, variables: [] }) TRY_EVALUATE_ADDED_GOALS: Ok(Yes) ITERATION 0 CANDIDATE constituent tys: Err(NoSolution) NORMALIZING SELF TY FOR ASSEMBLY: NORMALIZING SELF TY FOR ASSEMBLY: RESULT: Ok(Canonical { value: Response { certainty: Yes, var_values: CanonicalVarValues { var_values: [] }, external_constraints: ExternalConstraints(ExternalConstraintsData { region_constraints: QueryRegionConstraints { outlives: [], member_constraints: [] }, opaque_types: [] }) }, max_universe: U0, variables: [] }) ``` with this PR: ``` ROOT GOAL: Goal { predicate: Binder { value: TraitPredicate(<usize as std::clone::Clone>, polarity:Positive), bound_vars: [] }, param_env: ParamEnv { caller_bounds: [], reveal: UserFacing } } { GOAL: Canonical { value: QueryInput { goal: Goal { predicate: Binder { value: TraitPredicate(<usize as std::clone::Clone>, polarity:Positive), bound_vars: [] }, param_env: ParamEnv { caller_bounds: [], reveal: UserFacing } }, anchor: Bind(DefId(0:5 ~ main[4f74]::main)), predefined_opaques_in_body: PredefinedOpaques(PredefinedOpaquesData { opaque_types: [] }) }, max_universe: U0, variables: [] } REVISION 0: { INSTANTIATED: QueryInput { goal: Goal { predicate: Binder { value: TraitPredicate(<usize as std::clone::Clone>, polarity:Positive), bound_vars: [] }, param_env: ParamEnv { caller_bounds: [], reveal: UserFacing } }, anchor: Bind(DefId(0:5 ~ main[4f74]::main)), predefined_opaques_in_body: PredefinedOpaques(PredefinedOpaquesData { opaque_types: [] }) } ROOT RESULT: Ok(Canonical { value: Response { certainty: Yes, var_values: CanonicalVarValues { var_values: [] }, external_constraints: ExternalConstraints(ExternalConstraintsData { region_constraints: QueryRegionConstraints { outlives: [], member_constraints: [] }, opaque_types: [] }) }, max_universe: U0, variables: [] }) { CANDIDATE Impl(DefId(2:30468 ~ core[d1d7]::clone::impls::{impl#5})): Ok(Canonical { value: Response { certainty: Yes, var_values: CanonicalVarValues { var_values: [] }, external_constraints: ExternalConstraints(ExternalConstraintsData { region_constraints: QueryRegionConstraints { outlives: [], member_constraints: [] }, opaque_types: [] }) }, max_universe: U0, variables: [] }) { TRY_EVALUATE_ADDED_GOALS: Ok(Yes) ITERATION 0 {} } CANDIDATE constituent tys: Err(NoSolution) {} NORMALIZING SELF TY FOR ASSEMBLY: {} NORMALIZING SELF TY FOR ASSEMBLY: {} } } RESULT: Ok(Canonical { value: Response { certainty: Yes, var_values: CanonicalVarValues { var_values: [] }, external_constraints: ExternalConstraints(ExternalConstraintsData { region_constraints: QueryRegionConstraints { outlives: [], member_constraints: [] }, opaque_types: [] }) }, max_universe: U0, variables: [] }) } ``` r? `@BoxyUwU`
Configuration menu - View commit details
-
Copy full SHA for bf939fc - Browse repository at this point
Copy the full SHA bf939fcView commit details -
Rollup merge of rust-lang#122198 - beetrees:no-llvm-14, r=cuviper
Remove handling for previously dropped LLVM version LLVM 14 support was dropped in rust-lang#114148, so this LLVM version check is no longer required.
Configuration menu - View commit details
-
Copy full SHA for b61edb9 - Browse repository at this point
Copy the full SHA b61edb9View commit details