Skip to content
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

Merged
merged 16 commits into from
May 25, 2023
Merged

Rollup of 5 pull requests #111925

merged 16 commits into from
May 25, 2023

Conversation

Manishearth
Copy link
Member

Successful merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

JonasAlaif and others added 16 commits May 23, 2023 13:11
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.
@rustbot rustbot added A-query-system Area: The rustc query system (https://rustc-dev-guide.rust-lang.org/query.html) S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-libs Relevant to the library team, which will review and decide on the PR/issue. WG-trait-system-refactor The Rustc Trait System Refactor Initiative (-Znext-solver) rollup A PR which is a rollup labels May 24, 2023
@Manishearth
Copy link
Member Author

@bors r+ rollup=never p=5

To run after #111919

@bors
Copy link
Contributor

bors commented May 24, 2023

📌 Commit 8038606 has been approved by Manishearth

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels May 24, 2023
@bors
Copy link
Contributor

bors commented May 25, 2023

⌛ Testing commit 8038606 with merge 7664dfe...

@bors
Copy link
Contributor

bors commented May 25, 2023

☀️ Test successful - checks-actions
Approved by: Manishearth
Pushing 7664dfe to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label May 25, 2023
@bors bors merged commit 7664dfe into rust-lang:master May 25, 2023
@rustbot rustbot added this to the 1.71.0 milestone May 25, 2023
@rust-timer
Copy link
Collaborator

📌 Perf builds for each rolled up PR:

PR# Perf Build Sha
#111915 6f856c535a22983685430ff6f49e01d38ece9154
#111912 4eafeead321afe3ef110466a2d1194d8b707737b
#111876 7a58ae3bb746f0ec78c1c0453a6709e7b1c7350f
#111840 3fde4f41f5b8812df3fe8c69eddb569a3de7974f
#111741 a4ceb2a7f9023fd7568b12d351ee7c68ee42bb83

previous master: 096309e6dc

In the case of a perf regression, run the following command for each PR you suspect might be the cause: @rust-timer build $SHA

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (7664dfe): comparison URL.

Overall result: no relevant changes - no action needed

@rustbot label: -perf-regression

Instruction count

This 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.

Cycles

This benchmark run did not return any relevant results for this metric.

Binary size

This benchmark run did not return any relevant results for this metric.

Bootstrap: 645.884s -> 646.176s (0.05%)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-query-system Area: The rustc query system (https://rustc-dev-guide.rust-lang.org/query.html) merged-by-bors This PR was explicitly merged by bors. rollup A PR which is a rollup S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-libs Relevant to the library team, which will review and decide on the PR/issue. WG-trait-system-refactor The Rustc Trait System Refactor Initiative (-Znext-solver)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

10 participants