-
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 5 pull requests #111925
Rollup of 5 pull requests #111925
Conversation
This pulls in the weak-intrinsics feature (which currently defaults off), and a minor version update to libm for the compiler_builtins crate to 0.2.7.
"only accepted on the nightly compiler" is misleading when this *is* nightly.
…lcnr Use `ObligationCtxt` in custom type ops We already make one when evaluating the `CustomTypeOp`, so it's simpler to just pass it to the user. Removes a redundant `ObligationCtxt::new_in_snapshot` usage and simplifies some other code. This makes several refactorings related to opaque types in the new solver simpler, but those are not included in this PR.
Expose more information in `get_body_with_borrowck_facts` Verification tools for Rust such as, for example, Creusot or Prusti would benefit from having access to more information computed by the borrow checker. As a first step in that direction, rust-lang#86977 added the `get_body_with_borrowck_facts` API, allowing compiler consumers to obtain a `mir::Body` with accompanying borrow checker information. At RustVerify 2023, multiple people working on verification tools expressed their need for a more comprehensive API. While eventually borrow information could be part of Stable MIR, in the meantime, this PR proposes a more limited approach, extending the existing `get_body_with_borrowck_facts` API. In summary, we propose the following changes: - Permit obtaining the borrow-checked body without necessarily running Polonius - Return the `BorrowSet` and the `RegionInferenceContext` in `BodyWithBorrowckFacts` - Provide a way to compute the `borrows_out_of_scope_at_location` map - Make some helper methods public This is similar to rust-lang#108328 but smaller in scope. `@smoelius` Do you think these changes would also be sufficient for your needs? r? `@oli-obk` cc `@JonasAlaif`
Roll compiler_builtins to 0.1.92 This pulls in the weak-intrinsics feature (which currently defaults off), and a minor version update to libm for the compiler_builtins crate to 0.2.7.
…mpiler, r=petrochenkov Use `Option::is_some_and` and `Result::is_ok_and` in the compiler `.is_some_and(..)`/`.is_ok_and(..)` replace `.map_or(false, ..)` and `.map(..).unwrap_or(false)`, making the code more readable. This PR is a sibling of rust-lang#111873 (comment)
libtest: Improve error when missing `-Zunstable-options` "only accepted on the nightly compiler" is misleading when this *is* nightly.
☀️ Test successful - checks-actions |
📌 Perf builds for each rolled up PR: previous master: 096309e6dc In the case of a perf regression, run the following command for each PR you suspect might be the cause: |
Finished benchmarking commit (7664dfe): comparison URL. Overall result: no relevant changes - no action needed@rustbot label: -perf-regression Instruction countThis benchmark run did not return any relevant results for this metric. Max RSS (memory usage)This benchmark run did not return any relevant results for this metric. CyclesThis benchmark run did not return any relevant results for this metric. Binary sizeThis benchmark run did not return any relevant results for this metric. Bootstrap: 645.884s -> 646.176s (0.05%) |
Successful merges:
ObligationCtxt
in custom type ops #111741 (UseObligationCtxt
in custom type ops)get_body_with_borrowck_facts
#111840 (Expose more information inget_body_with_borrowck_facts
)Option::is_some_and
andResult::is_ok_and
in the compiler #111912 (UseOption::is_some_and
andResult::is_ok_and
in the compiler )-Zunstable-options
#111915 (libtest: Improve error when missing-Zunstable-options
)r? @ghost
@rustbot modify labels: rollup
Create a similar rollup