Skip to content

Implement "items do not inherit unsafety" note for THIR unsafeck #113663

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Merged
merged 1 commit into from
Jul 15, 2023

Conversation

syvb
Copy link
Contributor

@syvb syvb commented Jul 13, 2023

Implements the "items do not inherit unsafety from separate enclosing items" note from the MIR unsafety checker in the THIR unsafety checker (-Z thir-unsafeck) to maintain parity between the two unsafety checkers. The logic to find the separate enclosing item is nearly the same as in the MIR unsafety checker.

@rustbot
Copy link
Collaborator

rustbot commented Jul 13, 2023

r? @cjgillot

(rustbot has picked a reviewer for you, use r? to override)

@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 Jul 13, 2023
@@ -312,6 +312,8 @@ mir_build_unreachable_pattern = unreachable pattern
.label = unreachable pattern
.catchall_label = matches any value

mir_build_unsafe_not_inherited = items do not inherit unsafety from separate enclosing items
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@syvb syvb force-pushed the non_inherited_unsafe_thir branch 3 times, most recently from 34f07e1 to cbc48e7 Compare July 15, 2023 02:26
@rust-log-analyzer

This comment has been minimized.

@syvb syvb force-pushed the non_inherited_unsafe_thir branch from cbc48e7 to 2cfe8ed Compare July 15, 2023 16:10
@cjgillot
Copy link
Contributor

Thanks!
@bors r+ rollup

@bors
Copy link
Collaborator

bors commented Jul 15, 2023

📌 Commit 2cfe8ed has been approved by cjgillot

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 Jul 15, 2023
bors added a commit to rust-lang-ci/rust that referenced this pull request Jul 15, 2023
…iaskrgr

Rollup of 6 pull requests

Successful merges:

 - rust-lang#113625 (Structurally normalize in selection)
 - rust-lang#113644 (misc bootstrap cleanups)
 - rust-lang#113663 (Implement "items do not inherit unsafety" note for THIR unsafeck)
 - rust-lang#113683 (remove outdated `FIXME`s in bootstrap internals)
 - rust-lang#113709 (rustdoc: use src consistently over source in CSS/JS)
 - rust-lang#113724 (Migrate GUI colors test to original CSS color format)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 9b8be2f into rust-lang:master Jul 15, 2023
@rustbot rustbot added this to the 1.73.0 milestone Jul 15, 2023
# for free to join this conversation on GitHub. Already have an account? # 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