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
Unsafe extern blocks #124482
base: master
Are you sure you want to change the base?
Unsafe extern blocks #124482
Conversation
|
This comment has been minimized.
This comment has been minimized.
Ohh I forgot to mention this. I'd need to land some PRs, at least to stdarch so it doesn't warn for the usages of |
eff0aa5
to
4db4aac
Compare
This comment has been minimized.
This comment has been minimized.
4db4aac
to
109be86
Compare
This comment has been minimized.
This comment has been minimized.
109be86
to
429a626
Compare
This comment has been minimized.
This comment has been minimized.
429a626
to
b4828d8
Compare
This comment has been minimized.
This comment has been minimized.
b4828d8
to
e7d5d4e
Compare
This comment has been minimized.
This comment has been minimized.
e7d5d4e
to
cc91d7f
Compare
This comment has been minimized.
This comment has been minimized.
cc91d7f
to
542a307
Compare
This comment has been minimized.
This comment has been minimized.
542a307
to
7b82197
Compare
This comment has been minimized.
This comment has been minimized.
7b82197
to
8f0c075
Compare
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
876b476
to
b23643b
Compare
This comment has been minimized.
This comment has been minimized.
b23643b
to
f6f8e91
Compare
This comment has been minimized.
This comment has been minimized.
☔ The latest upstream changes (presumably #123602) made this pull request unmergeable. Please resolve the merge conflicts. |
The Miri subtree was changed cc @rust-lang/miri |
06ee971
to
95c0f41
Compare
☔ The latest upstream changes (presumably #124631) made this pull request unmergeable. Please resolve the merge conflicts. |
☔ The latest upstream changes (presumably #124754) made this pull request unmergeable. Please resolve the merge conflicts. |
95c0f41
to
c04eca6
Compare
Some changes occurred to the CTFE / Miri engine cc @rust-lang/miri |
The job Click to see the possible cause of the failure (guessed by this bot)
|
@@ -342,6 +342,7 @@ fn jemalloc_magic() { | |||
// linking, so we need to explicitly depend on the function. | |||
#[cfg(target_os = "macos")] | |||
{ | |||
#[allow(missing_unsafe_on_extern)] |
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.
Instead of adding an enormous amount of allow
, what about keeping the lint allow-by-default until the bootstrap compiler has unsafe extern
, so that then we can start using it in the codebase? That avoids having to change everything twice...
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.
Yeah, totally. I guess that depends when do we want to land this change and then how much do we want to wait but yeah :).
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.
On old editions I think the RFC says it should be allow-by-default for now anyway?
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.
Ohh good catch. I've implemented Felix's proposal rust-lang/rfcs#3484 (comment) which I see now is out of sync.
Going to fix this accordingly when I have some time.
☔ The latest upstream changes (presumably #124934) made this pull request unmergeable. Please resolve the merge conflicts. |
This implements RFC 3484.
Tracking issue #123743 and RFC rust-lang/rfcs#3484
This is better reviewed commit by commit, the first 2 commits live also in a separate PR #124455.
This is a first working version that needs:
missing_unsafe_on_extern
attribute.