-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
Implement "items do not inherit unsafety" note for THIR unsafeck #113663
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
r? @cjgillot (rustbot has picked a reviewer for you, use r? to override) |
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
syvb
commented
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note that this is duplicated in rustc_mir_transform
, along with all unsafety errors:
cjgillot
reviewed
Jul 14, 2023
syvb
force-pushed
the
non_inherited_unsafe_thir
branch
3 times, most recently
from
July 15, 2023 02:26
34f07e1
to
cbc48e7
Compare
This comment has been minimized.
This comment has been minimized.
syvb
force-pushed
the
non_inherited_unsafe_thir
branch
from
July 15, 2023 16:10
cbc48e7
to
2cfe8ed
Compare
Thanks! |
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
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.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.