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 4 pull requests #116994

Closed
wants to merge 12 commits into from

Conversation

matthiaskrgr
Copy link
Member

Successful merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

estebank and others added 12 commits October 19, 2023 00:07
The `Instance::body()` returns a monomorphized body.

For that, we had to implement visitor that monomorphize types and
constants. We are also introducing the RustcInternal trait that will
allow us to convert back from Stable to Internal.

Note that this trait is not yet visible for our users as it depends on
Tables. We should probably add a new trait that can be exposed.
When encountering a binding that isn't found but has a typo suggestion
for a binding with a leading underscore, suggest changing the binding
definition instead of the use place.

Fix rust-lang#60164.
Suggest relaxing implicit `type Assoc: Sized;` bound

Fix rust-lang#85378.
Typo suggestion to change bindings with leading underscore

When encountering a binding that isn't found but has a typo suggestion for a binding with a leading underscore, suggest changing the binding definition instead of the use place.

Fix rust-lang#60164.
Add stable Instance::body() and RustcInternal trait

The `Instance::body()` returns a monomorphized body.

For that, we had to implement visitor that monomorphize types and constants. We are also introducing the RustcInternal trait that will allow us to convert back from Stable to Internal.

Note that this trait is not yet visible for our users as it depends on Tables. We should probably add a new trait that can be exposed.

The tests here are very simple, and I'm planning on creating more exhaustive tests in the project-mir repo. But I was hoping to get some feedback here first.

r? `@oli-obk`
coverage: Fix inconsistent handling of function signature spans

While doing some more cleanup of `spans`, I noticed a strange inconsistency in how function signatures are handled. Normally the function signature span is treated as though it were executable as part of the start of the function, but in some cases the signature span disappears entirely from coverage, for no obvious reason.

This is caused by the fact that spans created by `CoverageSpan::for_fn_sig` don't add the span to their `merged_spans` field (unlike normal statement/terminator spans). In cases where the span-processing code looks at those merged spans, it thinks the signature span is no longer visible and deletes it.

Adding the signature span to `merged_spans` resolves the inconsistency.

(Prior to rust-lang#116409 this wouldn't have been possible, because there was no case in the old `CoverageStatement` enum representing a signature. Now that `merged_spans` is just a list of spans, that's no longer an obstacle.)
@rustbot rustbot added 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. rollup A PR which is a rollup labels Oct 20, 2023
@matthiaskrgr
Copy link
Member Author

@bors r+ rollup=never p=4

@bors
Copy link
Contributor

bors commented Oct 20, 2023

📌 Commit a7bbf83 has been approved by matthiaskrgr

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 Oct 20, 2023
@bors
Copy link
Contributor

bors commented Oct 20, 2023

🔒 Merge conflict

This pull request and the master branch diverged in a way that cannot be automatically merged. Please rebase on top of the latest master branch, and let the reviewer approve again.

How do I rebase?

Assuming self is your fork and upstream is this repository, you can resolve the conflict following these steps:

  1. git checkout rollup-y1k6o76 (switch to your branch)
  2. git fetch upstream master (retrieve the latest master)
  3. git rebase upstream/master -p (rebase on top of it)
  4. Follow the on-screen instruction to resolve conflicts (check git status if you got lost).
  5. git push self rollup-y1k6o76 --force-with-lease (update this PR)

You may also read Git Rebasing to Resolve Conflicts by Drew Blessing for a short tutorial.

Please avoid the "Resolve conflicts" button on GitHub. It uses git merge instead of git rebase which makes the PR commit history more difficult to read.

Sometimes step 4 will complete without asking for resolution. This is usually due to difference between how Cargo.lock conflict is handled during merge and rebase. This is normal, and you should still perform step 5 to update this PR.

Error message
Auto-merging compiler/stable_mir/src/ty.rs
Auto-merging compiler/stable_mir/src/mir/body.rs
Auto-merging compiler/rustc_trait_selection/src/traits/error_reporting/suggestions.rs
Auto-merging compiler/rustc_smir/src/rustc_smir/mod.rs
Auto-merging compiler/rustc_smir/src/rustc_internal/mod.rs
Auto-merging compiler/rustc_mir_transform/src/coverage/spans/from_mir.rs
Auto-merging compiler/rustc_mir_transform/src/coverage/spans.rs
CONFLICT (content): Merge conflict in compiler/rustc_mir_transform/src/coverage/spans.rs
Automatic merge failed; fix conflicts and then commit the result.

@bors bors added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Oct 20, 2023
@bors
Copy link
Contributor

bors commented Oct 21, 2023

☔ The latest upstream changes (presumably #116958) made this pull request unmergeable. Please resolve the merge conflicts.

@matthiaskrgr matthiaskrgr deleted the rollup-y1k6o76 branch March 16, 2024 18:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
rollup A PR which is a rollup S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants