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

make NOP dyn casts not require anything about the vtable #100208

Merged
merged 1 commit into from
Aug 19, 2022

Conversation

RalfJung
Copy link
Member

@RalfJung RalfJung commented Aug 6, 2022

As suggested on Zulip. This matches what the codegen backends already do, and what Miri did do until #99420 when I made it super extra paranoid.

@rustbot rustbot added the T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. label Aug 6, 2022
@rustbot
Copy link
Collaborator

rustbot commented Aug 6, 2022

Some changes occurred in compiler/rustc_codegen_cranelift

cc @bjorn3

Some changes occurred to the CTFE / Miri engine

cc @rust-lang/miri

@rust-highfive
Copy link
Collaborator

r? @petrochenkov

(rust-highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Aug 6, 2022
@rust-log-analyzer

This comment has been minimized.

@petrochenkov
Copy link
Contributor

I'm not familiar with this part of the compiler, but the change seems simple enough.
r=me unless there are some open questions about semantics of this operation.
@rustbot author

@rustbot rustbot 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-review Status: Awaiting review from the assignee but also interested parties. labels Aug 7, 2022
@RalfJung
Copy link
Member Author

RalfJung commented Aug 7, 2022

This undoes a thing we recently changed, so I think it is fairly harmless. It's also a rather small low-priority PR though so we can wait for @bjorn3 or @oli-obk to take a look.

@RalfJung
Copy link
Member Author

No reply, so I guess let's just land this -- we can always adjust later.

@bors r=petrochenkov

@bors
Copy link
Contributor

bors commented Aug 18, 2022

📌 Commit 3c8563a has been approved by petrochenkov

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-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Aug 18, 2022
bors added a commit to rust-lang-ci/rust that referenced this pull request Aug 19, 2022
Rollup of 9 pull requests

Successful merges:

 - rust-lang#99576 (Do not allow `Drop` impl on foreign fundamental types)
 - rust-lang#100081 (never consider unsafe blocks unused if they would be required with deny(unsafe_op_in_unsafe_fn))
 - rust-lang#100208 (make NOP dyn casts not require anything about the vtable)
 - rust-lang#100494 (Cleanup rustdoc themes)
 - rust-lang#100522 (Only check the `DefId` for the recursion check in MIR inliner.)
 - rust-lang#100592 (Manually implement Debug for ImportKind.)
 - rust-lang#100598 (Don't fix builtin index when Where clause is found)
 - rust-lang#100721 (Add diagnostics lints to `rustc_type_ir` module)
 - rust-lang#100731 (rustdoc: count deref and non-deref as same set of used methods)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit c4707ff into rust-lang:master Aug 19, 2022
@rustbot rustbot added this to the 1.65.0 milestone Aug 19, 2022
bors added a commit to rust-lang/miri that referenced this pull request Aug 20, 2022
allow NOP-casts with mismatching vtables

The Miri side of rust-lang/rust#100208.
@RalfJung RalfJung deleted the dyn-upcast-nop branch August 21, 2022 12:52
bjorn3 pushed a commit to bjorn3/rust that referenced this pull request Aug 24, 2022
…enkov

make NOP dyn casts not require anything about the vtable

As suggested [on Zulip](https://rust-lang.zulipchat.com/#narrow/stream/144729-t-types/topic/dyn-upcasting.20stabilization/near/292151439). This matches what the codegen backends already do, and what Miri did do until rust-lang#99420 when I made it super extra paranoid.
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.

6 participants