-
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
Don't allow unsafe statics outside of extern blocks #127943
Conversation
Could not assign reviewer from: |
rustbot has assigned @michaelwoerister. Use |
The PR is fine to me, feel free to r=me but ... can't we make |
@bors r=spastorino rollup |
🌲 The tree is currently closed for pull requests below priority 100. This pull request will be tested once the tree is reopened. |
…orino Don't allow unsafe statics outside of extern blocks This PR fixes a regression where we allowed `unsafe static` items in top-level modules (i.e. outside of `unsafe extern` blocks). It's harder IMO to integrate this into the `check_item_safety` function, so I opted to just put this check on the `static` item itself. Beta version of this lives at rust-lang#127944. r? `@oli-obk` or `@spastorino`
…rk-Simulacrum Don't allow unsafe statics outside of extern blocks (beta version) This PR fixes a regression where we allowed `unsafe static` items in top-level modules (i.e. outside of `unsafe extern` blocks). rust-lang#127943 does not rebase cleanly, so I've prepared an extremely pared down version of this PR for beta purposes.
…orino Don't allow unsafe statics outside of extern blocks This PR fixes a regression where we allowed `unsafe static` items in top-level modules (i.e. outside of `unsafe extern` blocks). It's harder IMO to integrate this into the `check_item_safety` function, so I opted to just put this check on the `static` item itself. Beta version of this lives at rust-lang#127944. r? ``@oli-obk`` or ``@spastorino``
Rollup of 7 pull requests Successful merges: - rust-lang#123196 (Add Process support for UEFI) - rust-lang#127350 (Parser: Suggest Placing the Return Type After Function Parameters) - rust-lang#127523 (Migrate `dump-ice-to-disk` and `panic-abort-eh_frame` `run-make` tests to rmake) - rust-lang#127662 (When finding item gated behind a `cfg` flag, point at it) - rust-lang#127903 (`force_collect` improvements) - rust-lang#127932 (rustdoc: fix `current` class on sidebar modnav) - rust-lang#127943 (Don't allow unsafe statics outside of extern blocks) r? `@ghost` `@rustbot` modify labels: rollup
…iaskrgr Rollup of 6 pull requests Successful merges: - rust-lang#127350 (Parser: Suggest Placing the Return Type After Function Parameters) - rust-lang#127621 (Rewrite and rename `issue-22131` and `issue-26006` `run-make` tests to rmake) - rust-lang#127662 (When finding item gated behind a `cfg` flag, point at it) - rust-lang#127903 (`force_collect` improvements) - rust-lang#127932 (rustdoc: fix `current` class on sidebar modnav) - rust-lang#127943 (Don't allow unsafe statics outside of extern blocks) r? `@ghost` `@rustbot` modify labels: rollup
Rollup merge of rust-lang#127943 - compiler-errors:no-unsafe, r=spastorino Don't allow unsafe statics outside of extern blocks This PR fixes a regression where we allowed `unsafe static` items in top-level modules (i.e. outside of `unsafe extern` blocks). It's harder IMO to integrate this into the `check_item_safety` function, so I opted to just put this check on the `static` item itself. Beta version of this lives at rust-lang#127944. r? ```@oli-obk``` or ```@spastorino```
This PR fixes a regression where we allowed
unsafe static
items in top-level modules (i.e. outside ofunsafe extern
blocks).It's harder IMO to integrate this into the
check_item_safety
function, so I opted to just put this check on thestatic
item itself.Beta version of this lives at #127944.
r? @oli-obk or @spastorino