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

Add retag in MIR transform: Adt for Unique may contain a reference #112844

Merged
merged 1 commit into from
Jun 21, 2023
Merged

Add retag in MIR transform: Adt for Unique may contain a reference #112844

merged 1 commit into from
Jun 21, 2023

Conversation

Vanille-N
Copy link
Contributor

Following #112662 , may_contain_reference in rustc_mir_transform::add_retag underapproximates too much the types that require retagging.

r? @RalfJung

@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. labels Jun 20, 2023
@rustbot
Copy link
Collaborator

rustbot commented Jun 20, 2023

Some changes occurred to MIR optimizations

cc @rust-lang/wg-mir-opt

@thomcc
Copy link
Member

thomcc commented Jun 20, 2023

We should consider not using this inside some parts of the stdlib (and switching to NonNull) if it's going to get special semantics. Certainly we've never documented Vec as having noalias.

@RalfJung
Copy link
Member

This is an experiment to see what the consequences are of giving it special semantics, in particular in Vec. This remains off-by-default in Miri for now, so this PR here itself is a NOP -- it just lets us implement an opt-in flag in Miri for further experiments (see rust-lang/miri#2936).

@bors r+

@bors
Copy link
Contributor

bors commented Jun 20, 2023

📌 Commit 74aad5c has been approved by RalfJung

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 Jun 20, 2023
@RalfJung
Copy link
Member

@bors rollup

compiler-errors added a commit to compiler-errors/rust that referenced this pull request Jun 20, 2023
Add retag in MIR transform: `Adt` for `Unique` may contain a reference

Following rust-lang#112662 , `may_contain_reference` in `rustc_mir_transform::add_retag` underapproximates too much the types that require retagging.

r? `@RalfJung`
bors added a commit to rust-lang-ci/rust that referenced this pull request Jun 21, 2023
Rollup of 6 pull requests

Successful merges:

 - rust-lang#112632 (Implement PartialOrd for `Vec`s over different allocators)
 - rust-lang#112759 (Make closure_saved_names_of_captured_variables a query. )
 - rust-lang#112772 (Add a fully fledged `Clause` type, rename old `Clause` to `ClauseKind`)
 - rust-lang#112790 (Syntactically accept `become` expressions (explicit tail calls experiment))
 - rust-lang#112830 (More codegen cleanups)
 - rust-lang#112844 (Add retag in MIR transform: `Adt` for `Unique` may contain a reference)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 82e6a16 into rust-lang:master Jun 21, 2023
@rustbot rustbot added this to the 1.72.0 milestone Jun 21, 2023
flip1995 pushed a commit to flip1995/rust that referenced this pull request Jun 30, 2023
Rollup of 6 pull requests

Successful merges:

 - rust-lang#112632 (Implement PartialOrd for `Vec`s over different allocators)
 - rust-lang#112759 (Make closure_saved_names_of_captured_variables a query. )
 - rust-lang#112772 (Add a fully fledged `Clause` type, rename old `Clause` to `ClauseKind`)
 - rust-lang#112790 (Syntactically accept `become` expressions (explicit tail calls experiment))
 - rust-lang#112830 (More codegen cleanups)
 - rust-lang#112844 (Add retag in MIR transform: `Adt` for `Unique` may contain a reference)

r? `@ghost`
`@rustbot` modify labels: rollup
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants