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 8 pull requests #118720

Closed

Conversation

compiler-errors
Copy link
Member

Successful merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

bvanjoi and others added 21 commits November 15, 2023 15:28
Co-authored-by: Michael Goulet <michael@errs.io>
These files were added to the repository but never wired up so they could
be used - and that was a few years ago without anyone noticing - so let's
remove these, they can be re-added if someone wants them.

Signed-off-by: David Wood <david@davidtw.co>
- Take more things by self, not &self
- Clone more things
- Rework namespacing so we can use `ty::` in the canonicalizer
discard invalid spans in external blocks

Fixes rust-lang#116203

This PR has discarded the invalid `const_span`, thereby making the format more neat.

r? `@Nilstrieb`
… r=lcnr

Uplift the (new solver) canonicalizer into `rustc_next_trait_solver`

Uplifts the new trait solver's canonicalizer into a new crate called `rustc_next_trait_solver`.

The crate name is literally a bikeshed-avoidance name, so let's not block this PR on that -- renames are welcome later.

There are a host of other changes that were required to make this possible:
* Expose a `ConstTy` trait to get the `Interner::Ty` from a `Interner::Const`.
* Expose some constructor methods to construct `Bound` variants. These are currently methods defined on the interner themselves, but they could be pulled into traits later.
* Expose a `IntoKind` trait to turn a `Ty`/`Const`/`Region` into their corresponding `*Kind`s.
* Some minor tweaks to other APIs in `rustc_type_ir`.

The canonicalizer code itself is best reviewed **with whitespace ignored.**

r? `@lcnr`
Only check principal trait ref for object safety

It should make things a bit faster, in case we end up registering a bunch of object safety preds.

r? ``@ghost``
…r-errors

Add method to get type of an Rvalue in StableMIR

Provide a method to StableMIR users to retrieve the type of an Rvalue operation. There were two possible implementation:

1. Create the logic inside stable_mir to process the type according to the Rvalue semantics, which duplicates the logic of `rustc_middle::mir::Rvalue::ty()`.
2. Implement the Rvalue translation from StableMIR back to internal representation, invoke the `rustc_middle::mir::Rvalue::ty()`, and translate the return value to StableMIR.

I chose the first one for now since the duplication was fairly small, and the option 2 would require way more work to translate everything back to rustc internal representation. If we eventually add those translations, we could easily swap to the option 2.

``@compiler-errors`` / ``@ouz-a`` Please let me know if you have any strong opinion here.

r? ``@compiler-errors``
…-dead

Fix const drop checking

Fixes confirmation of `~const Destruct` and const drops.

r? fee1-dead
…achable, r=bjorn3

Tell MirUsedCollector that the pointer alignment checks calls its panic symbol

Fixes rust-lang#118683 (not an issue, but that PR is a basically a bug report)

When we had `panic_immediate_abort` start adding `#[inline]` to this panic function, builds started breaking because we failed to write up the MIR assert terminator to the correct panic shim. Things happened to work before by pure luck because without this feature enabled, the function we're inserting calls to is `#[inline(never)]` so we always generated code for it.

r? bjorn3
Ping GuillaumeGomez for changes in rustc_codegen_gcc

Since I work on it and also added its testsuite into rustc's CI, I'd like to know if there are changes.
…, r=compiler-errors

targets: remove not-added {i386,i486}-unknown-linux-gnu

These files were added to the repository but never wired up so they could be used - and that was a few years ago without anyone noticing - so let's remove these, they can be re-added if someone wants them.

cc rust-lang#80662
r? ``@pnkfelix`` (familiar with the tier policy and Wesley is on vacation)
@rustbot rustbot added A-meta Area: Issues & PRs about the rust-lang/rust repository itself 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. WG-trait-system-refactor The Rustc Trait System Refactor Initiative (-Znext-solver) rollup A PR which is a rollup labels Dec 7, 2023
@compiler-errors
Copy link
Member Author

@bors r+ rollup=never p=8

@bors
Copy link
Contributor

bors commented Dec 7, 2023

📌 Commit 2bea220 has been approved by compiler-errors

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

bors commented Dec 7, 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-qji64gi (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-qji64gi --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
Removing tests/ui/rfcs/rfc-2632-const-trait-impl/effects/minicore.stderr
Removing tests/ui/consts/precise-drop-with-promoted.stderr
Removing compiler/rustc_target/src/spec/targets/i486_unknown_linux_gnu.rs
Removing compiler/rustc_target/src/spec/targets/i386_unknown_linux_gnu.rs
Auto-merging compiler/rustc_monomorphize/src/collector.rs
Auto-merging compiler/rustc_middle/src/ty/consts.rs
CONFLICT (content): Merge conflict in compiler/rustc_middle/src/ty/consts.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 Dec 7, 2023
@compiler-errors
Copy link
Member Author

:(

@bors
Copy link
Contributor

bors commented Dec 7, 2023

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-meta Area: Issues & PRs about the rust-lang/rust repository itself 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. 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.

8 participants