-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
Fix and enforce unsafe_op_in_unsafe_fn
in compiler
#127730
Merged
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
rustbot has assigned @petrochenkov. Use |
rustbot
added
S-waiting-on-review
Status: Awaiting review from the assignee but also interested parties.
T-bootstrap
Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
labels
Jul 14, 2024
backtrace needs to be updated in order to be able to |
I put up #127744 as a partial step since taking care of every platform's code will be a nightmare. |
This comment was marked as resolved.
This comment was marked as resolved.
compiler-errors
force-pushed
the
ed-2024-unsafe
branch
from
July 16, 2024 04:02
9a27435
to
28503d6
Compare
@bors r+ |
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 16, 2024
bors
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Jul 16, 2024
…iaskrgr Rollup of 8 pull requests Successful merges: - rust-lang#127669 (Fix the issue of invalid suggestion for a reference of iterator) - rust-lang#127707 (match lowering: Use an iterator to find `expand_until`) - rust-lang#127730 (Fix and enforce `unsafe_op_in_unsafe_fn` in compiler) - rust-lang#127789 (delete #![allow(unsafe_op_in_unsafe_fn)] in teeos) - rust-lang#127805 (run-make-support: update gimli to 0.31.0) - rust-lang#127808 (Make ErrorGuaranteed discoverable outside types, consts, and lifetimes) - rust-lang#127817 (Fix a bunch of sites that were walking instead of visiting, making it impossible for visitor impls to look at these values) - rust-lang#127818 (Various ast validation simplifications) r? `@ghost` `@rustbot` modify labels: rollup
rust-timer
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Jul 16, 2024
Rollup merge of rust-lang#127730 - compiler-errors:ed-2024-unsafe, r=petrochenkov Fix and enforce `unsafe_op_in_unsafe_fn` in compiler In preparation for edition 2024, this PR previews the fallout of enabling the `unsafe_op_in_unsafe_fn` lint in the compiler, since it's defaulting to warn in the new edition (rust-lang#112038). The major annoyance comes primarily from the `rustc_codegen_llvm` module, where there's a ton of unsafe calls. I tended to wrap individual calls to unsafe fns in `unsafe {}`, but there a handful of places I chose to just wrap several calls in an `unsafe {}` block just because it would've been excessive to wrap each call individually. This doesn't enable the lint for the standard library, since I'm not totally certain what T-libs prefers w/ this lint.
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-bootstrap
Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)
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.
In preparation for edition 2024, this PR previews the fallout of enabling the
unsafe_op_in_unsafe_fn
lint in the compiler, since it's defaulting to warn in the new edition (#112038).The major annoyance comes primarily from the
rustc_codegen_llvm
module, where there's a ton of unsafe calls. I tended to wrap individual calls to unsafe fns inunsafe {}
, but there a handful of places I chose to just wrap several calls in anunsafe {}
block just because it would've been excessive to wrap each call individually.This doesn't enable the lint for the standard library, since I'm not totally certain what T-libs prefers w/ this lint.