rustc: Enable writing "unsafe extern fn() {}"#14005
Merged
bors merged 1 commit intorust-lang:masterfrom May 7, 2014
Merged
Conversation
Member
Author
|
A consequence of this is that |
Contributor
There was a problem hiding this comment.
This could be
match decl.abi.as_slice() {
"" => " extern ".to_owned(),
"\"Rust\"" => "".to_owned(),
s => format!(" extern {} ", s)
}Previously, the parser would not allow you to simultaneously implement a
function with a different abi as well as being unsafe at the same time. This
extends the parser to allow functions of the form:
unsafe extern fn foo() {
// ...
}
The closure type grammar was also changed to reflect this reversal, types
previously written as "extern unsafe fn()" must now be written as
"unsafe extern fn()". The parser currently has a hack which allows the old
style, but this will go away once a snapshot has landed.
Closes rust-lang#10025
[breaking-change]
Contributor
There was a problem hiding this comment.
This has been bugging me for a while, thanks :).
bors
added a commit
that referenced
this pull request
May 7, 2014
Previously, the parser would not allow you to simultaneously implement a
function with a different abi as well as being unsafe at the same time. This
extends the parser to allow functions of the form:
unsafe extern fn foo() {
// ...
}
The closure type grammar was also changed to reflect this reversal, types
previously written as "extern unsafe fn()" must now be written as
"unsafe extern fn()". The parser currently has a hack which allows the old
style, but this will go away once a snapshot has landed.
Closes #10025
[breaking-change]
bors
pushed a commit
to rust-lang-ci/rust
that referenced
this pull request
Jan 28, 2025
I'll take a short break from auto assignments. My last few weeks have been busy and I feel like getting my inbox back in order and taking a short breather will be the best for me. I still plan to review the PRs I'm currently assigned to and writing the changelogs. Jup that's it, have a good day, who ever is reading this =^.^= changelog: none
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Previously, the parser would not allow you to simultaneously implement a
function with a different abi as well as being unsafe at the same time. This
extends the parser to allow functions of the form:
The closure type grammar was also changed to reflect this reversal, types
previously written as "extern unsafe fn()" must now be written as
"unsafe extern fn()". The parser currently has a hack which allows the old
style, but this will go away once a snapshot has landed.
Closes #10025
[breaking-change]