-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Make #[naked]
an unsafe attribute
#139753
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
base: master
Are you sure you want to change the base?
Make #[naked]
an unsafe attribute
#139753
Conversation
This comment has been minimized.
This comment has been minimized.
Hmm, how should this this error be resolved?
It's kind of a cyclic dependency: I can't update the compiler without updating compiler-builtins, but I can't update compiler builtins either without an updated compiler. What is the right approach here? |
Does |
☔ The latest upstream changes (presumably #139766) made this pull request unmergeable. Please resolve the merge conflicts. |
3f4bcfb
to
6a0c2ec
Compare
This comment has been minimized.
This comment has been minimized.
I thought that would not work because of the error that was emitted earlier (something with building miri), but it actually does appear to work (or at least, we get a different error now). @bjorn3 do you see a way to work around the latest error? apparently a compiler where |
That shouldn't happen. cg_clif should be tested using a stage1 rustc. |
6a0c2ec
to
f7f6d8d
Compare
This comment has been minimized.
This comment has been minimized.
f7f6d8d
to
b9f9059
Compare
The job Click to see the possible cause of the failure (guessed by this bot)
|
well, the |
…gross35 Allow (but don't require) `#[unsafe(naked)]` so that `compiler-builtins` can upgrade to it tracking issue: rust-lang#138997 Per rust-lang#134213 (comment), we want to make the `#[naked]` attribute an unsafe attribute. Making that change runs into a cyclic dependency with `compiler-builtins` which uses `#[naked]`, where `rustc` needs an updated `compiler-builtins` and vice versa. So based on rust-lang#139753 and [#t-compiler/help > updating &rust-lang#96;compiler-builtins&rust-lang#96; and &rust-lang#96;rustc&rust-lang#96;](https://rust-lang.zulipchat.com/#narrow/channel/182449-t-compiler.2Fhelp/topic/updating.20.60compiler-builtins.60.20and.20.60rustc.60), this PR allows, but does not require `#[unsafe(naked)]`, and makes that change for some of the tests to check that both `#[naked]` and `#[unsafe(naked)]` are accepted. Then we can upgrade and synchronize `compiler-builtins`, and then make `#[naked]` (without `unsafe`) invalid. r? `@traviscross` (or someone from t-compiler if you're faster and this look allright)
…gross35 Allow (but don't require) `#[unsafe(naked)]` so that `compiler-builtins` can upgrade to it tracking issue: rust-lang#138997 Per rust-lang#134213 (comment), we want to make the `#[naked]` attribute an unsafe attribute. Making that change runs into a cyclic dependency with `compiler-builtins` which uses `#[naked]`, where `rustc` needs an updated `compiler-builtins` and vice versa. So based on rust-lang#139753 and [#t-compiler/help > updating &rust-lang#96;compiler-builtins&rust-lang#96; and &rust-lang#96;rustc&rust-lang#96;](https://rust-lang.zulipchat.com/#narrow/channel/182449-t-compiler.2Fhelp/topic/updating.20.60compiler-builtins.60.20and.20.60rustc.60), this PR allows, but does not require `#[unsafe(naked)]`, and makes that change for some of the tests to check that both `#[naked]` and `#[unsafe(naked)]` are accepted. Then we can upgrade and synchronize `compiler-builtins`, and then make `#[naked]` (without `unsafe`) invalid. r? ``@traviscross`` (or someone from t-compiler if you're faster and this look allright)
Rollup merge of rust-lang#139797 - folkertdev:naked-allow-unsafe, r=tgross35 Allow (but don't require) `#[unsafe(naked)]` so that `compiler-builtins` can upgrade to it tracking issue: rust-lang#138997 Per rust-lang#134213 (comment), we want to make the `#[naked]` attribute an unsafe attribute. Making that change runs into a cyclic dependency with `compiler-builtins` which uses `#[naked]`, where `rustc` needs an updated `compiler-builtins` and vice versa. So based on rust-lang#139753 and [#t-compiler/help > updating &rust-lang#96;compiler-builtins&rust-lang#96; and &rust-lang#96;rustc&rust-lang#96;](https://rust-lang.zulipchat.com/#narrow/channel/182449-t-compiler.2Fhelp/topic/updating.20.60compiler-builtins.60.20and.20.60rustc.60), this PR allows, but does not require `#[unsafe(naked)]`, and makes that change for some of the tests to check that both `#[naked]` and `#[unsafe(naked)]` are accepted. Then we can upgrade and synchronize `compiler-builtins`, and then make `#[naked]` (without `unsafe`) invalid. r? `@traviscross` (or someone from t-compiler if you're faster and this look allright)
☔ The latest upstream changes (presumably #139826) made this pull request unmergeable. Please resolve the merge conflicts. |
tracking issue: #138997
blocked on #139797
Per #134213 (comment), the
#[naked]
attribute is now an unsafe attribute (in any edition).This can only be merged when the above PRs are merged, I'd just like to see if there are any CI surprises here, and maybe there is early review feedback too.
r? @traviscross