-
Notifications
You must be signed in to change notification settings - Fork 13.4k
Remove support for extern "rust-intrinsic"
blocks
#132735
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Comments
I do wonder if there's some way we could have body-less free function items when users write |
Yeah that would be nice. But I guess the parser will reject body-less fn items (with ";" instead of a block) pretty early?
|
We actually reject them after expansion but before ast lowering. We could perhaps intercept these bodyless functions during ast lowering and fill them with a dummy body like |
Obviously only intercepting them if they're marked with |
That's way beyond my knowledge of those parts of the compiler. ;) So sure, sounds great. :D
I was actually going to suggest that a |
Oh, that works too. |
hmm do we have the notion of a builtin attribute macro...? |
@workingjubilee: Yes |
@rustbot claim |
Ok so basically I tried porting the first block of `error[E0308]: intrinsic has wrong type
and `` pub fn prefetch_write_data(data: *const T, locality: i32) { `` |
Yes, the intrinsics need to be marked as |
Change intrinsic declarations to new style Pr is for issue rust-lang#132735 This changes the first `extern "rust-intrinsic"` block to the new style. r? `@RalfJung`
Rollup merge of rust-lang#132907 - BLANKatGITHUB:intrinsic, r=saethlin Change intrinsic declarations to new style Pr is for issue rust-lang#132735 This changes the first `extern "rust-intrinsic"` block to the new style. r? `@RalfJung`
changes old intrinsic declaration to new declaration This pr is for issue rust-lang#132735 It changes old `extern "intrinsic"` code block with new declaration. There are other blocks that use old declaration but as the changes needed in single block is quite large I do them in parts
changes old intrinsic declaration to new declaration This pr is for issue rust-lang#132735 It changes old `extern "intrinsic"` code block with new declaration. There are other blocks that use old declaration but as the changes needed in single block is quite large I do them in parts
Rollup merge of rust-lang#133106 - BLANKatGITHUB:intrinsic, r=RalfJung changes old intrinsic declaration to new declaration This pr is for issue rust-lang#132735 It changes old `extern "intrinsic"` code block with new declaration. There are other blocks that use old declaration but as the changes needed in single block is quite large I do them in parts
Adds new intrinsic declaration This pr is for rust-lang#132735 removes removes `extern "intrinsic"` I think its the last block of this file and was kind of asking for advice how to handle other files as mentioned in the issue .
Rollup merge of rust-lang#134013 - BLANKatGITHUB:intrinsic, r=saethlin Adds new intrinsic declaration This pr is for rust-lang#132735 removes removes `extern "intrinsic"` I think its the last block of this file and was kind of asking for advice how to handle other files as mentioned in the issue .
#135031 implements that. |
Rollup merge of rust-lang#138364 - BLANKatGITHUB:compiler, r=RalfJung ports the compiler test cases to new rust_intrinsic format pr is part of rust-lang#132735
@Skgland you opened #139455. Given that the issue here still has someone assigned, please always ask the assignee (@BLANKatGITHUB) in the issue first before assuming they have stopped working on this! |
… r=oli-obk Remove support for `extern "rust-intrinsic"` blocks Part of rust-lang#132735 Looked manageable and there didn't appear to have been progress in the last two weeks, so decided to give it a try.
… r=oli-obk Remove support for `extern "rust-intrinsic"` blocks Part of rust-lang#132735 Looked manageable and there didn't appear to have been progress in the last two weeks, so decided to give it a try.
Well , I was busy with college, that's quite a big pr though, does this pr finally close the issue? Or there are some more files left |
No worries. I hope you're fine with someone else taking over. :) That PR entirely removes "rust-intrinsics" from the compiler so it has to fix all the remaining files. The only thing that's left is the last (5th) checkbox in the issue description. |
No problem |
Rollup merge of rust-lang#139455 - Skgland:remove_rust-intrinsic_ABI, r=oli-obk Remove support for `extern "rust-intrinsic"` blocks Part of rust-lang#132735 Looked manageable and there didn't appear to have been progress in the last two weeks, so decided to give it a try.
Besides looking for further cleanup potential, the following things are still to be done
And I noticed is that rust-analyser still checks for
|
RA has its own repo so this might be worth an issue there. They usually wait a bit before removing language features since they want to support using a current RA on older versions of Rust, which still use the old features (and even on stable Rust, those features are present in the standard library). So RA is out-of-scope for this issue. Regarding the nomicon, could you make a PR? I can reword that comment in |
Uh-oh, then 51b51b5 probably went too far as well and should maybe be reverted until rust-analyzer is ready to remove support for the "rust-intrinsic" ABI. |
Opened rust-lang/nomicon#485 |
…kril Revert r-a changes of rust-lang#139455 I discovered rust-lang#132735 (comment) that I might have done too much in rust-lang#132735 by also removing support in r-a. So this reverts the commit with the changes to r-a. r? RalfJung
…kril Revert r-a changes of rust-lang#139455 I discovered rust-lang#132735 (comment) that I might have done too much in rust-lang#132735 by also removing support in r-a. So this reverts the commit with the changes to r-a. r? RalfJung
Rollup merge of rust-lang#139496 - Skgland:139455-went-too-far, r=Veykril Revert r-a changes of rust-lang#139455 I discovered rust-lang#132735 (comment) that I might have done too much in rust-lang#132735 by also removing support in r-a. So this reverts the commit with the changes to r-a. r? RalfJung
…=RalfJung Remove some dead or leftover code related to rustc-intrinsic abi removal r? `@RalfJung` PR that removed the ABI: rust-lang#139455 tracking issue: rust-lang#132735
…=RalfJung Remove some dead or leftover code related to rustc-intrinsic abi removal r? ``@RalfJung`` PR that removed the ABI: rust-lang#139455 tracking issue: rust-lang#132735
…=RalfJung Remove some dead or leftover code related to rustc-intrinsic abi removal r? ```@RalfJung``` PR that removed the ABI: rust-lang#139455 tracking issue: rust-lang#132735
Rollup merge of rust-lang#139530 - oli-obk:rustc-intrinsic-cleanup, r=RalfJung Remove some dead or leftover code related to rustc-intrinsic abi removal r? ```@RalfJung``` PR that removed the ABI: rust-lang#139455 tracking issue: rust-lang#132735
… r=oli-obk Remove support for `extern "rust-intrinsic"` blocks Part of rust-lang#132735 Looked manageable and there didn't appear to have been progress in the last two weeks, so decided to give it a try.
Remove support for `extern "rust-intrinsic"` blocks Part of rust-lang/rust#132735 Looked manageable and there didn't appear to have been progress in the last two weeks, so decided to give it a try.
Revert r-a changes of rust-lang/rust#139455 I discovered rust-lang/rust#132735 (comment) that I might have done too much in rust-lang/rust#132735 by also removing support in r-a. So this reverts the commit with the changes to r-a. r? RalfJung
@oli-obk do you know of anything left to do here? I think it is all done, isn't it? |
Nope, this is done |
Uh oh!
There was an error while loading. Please reload this page.
We currently have two ways to declare symbols that are invoked as intrinsics. The old way:
The new way:
The goal of this issue is to remove support for the old style, and consistently use the new style.
extern "rust-intrinsic"
intrinsics inlibrary
to the new style, updating them using the pattern described above. This can be a PR on its own. (Implemented in Change intrinsic declarations to new style #132907, changes old intrinsic declaration to new declaration #133106, ports last few library files to new intrinsic style #136005)extern "rust-intrinsic"
insrc/tools/miri
andtests/ui/simd
to the new style.This is implemented in Partial progress on #132735: Replace extern "rust-intrinsic" with #[rustc_intrinsic] across the codebase #135333, Port ui/simd tests to use the intrinsic macro #136022.
extern "rust-intrinsic"
in this file (note that this is a separate repository)extern "rust-intrinsic"
blocks from the compiler -- in particular, remove this. A bunch of tests will still need updating; you can grep forrust-intrinsic
to find them all. They should all be ported to the new style, similar to the PR in step 2.Abi::RustIntrinsic
entirely?The text was updated successfully, but these errors were encountered: