Skip to content
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

Add explicit_extern_abis Feature and Enforce Explicit ABIs #135340

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

obeis
Copy link
Contributor

@obeis obeis commented Jan 10, 2025

Introduces the unstable explicit_extern_abis feature, requiring explicit ABIs in extern blocks. Hard errors are enforced with the feature enabled, and the 2027 edition prepares for full adoption.

RFC rust-lang/rfcs#3722

Update #134986

@rustbot
Copy link
Collaborator

rustbot commented Jan 10, 2025

r? @wesleywiser

rustbot has assigned @wesleywiser.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-libs Relevant to the library team, which will review and decide on the PR/issue. labels Jan 10, 2025
@rustbot
Copy link
Collaborator

rustbot commented Jan 10, 2025

Some changes occurred in src/tools/rustfmt

cc @rust-lang/rustfmt

@traviscross traviscross added the F-explicit_extern_abis `#![feature(explicit_extern_abis)]` label Jan 10, 2025
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

rustfmt changes look good 👍🏼

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't we need to mark style edition 2027 as unstable, @ytmimi?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You're totally right. I take back what I said 😅

@traviscross
Copy link
Contributor

@rustbot labels +S-blocked
@rustbot author

We're still finalizing the timing and name of the next edition, and in any case, I think I'd like to see a separate PR for adding the various bits for the next edition that's separate from any edition item.

@rustbot rustbot added S-blocked Status: Blocked on something else such as an RFC or other implementation work. S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jan 10, 2025
@rust-log-analyzer

This comment has been minimized.

@obeis obeis force-pushed the explicit-extern-abis branch from 938c721 to b327d2d Compare January 10, 2025 18:14
@rust-log-analyzer

This comment has been minimized.

@workingjubilee
Copy link
Member

I do not think we will accept the edition changes being folded into this PR, @obeis

@obeis obeis force-pushed the explicit-extern-abis branch from b327d2d to e25d0af Compare January 10, 2025 19:42
Comment on lines 522 to 526
#[value = "2027"]
#[doc_hint = "2027"]
/// [Edition 2027]().
Edition2027,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As @compiler-errors mentioned, we'd need to mark this as an unstable option in rustfmt.

Suggested change
#[value = "2027"]
#[doc_hint = "2027"]
/// [Edition 2027]().
Edition2027,
#[value = "2027"]
#[doc_hint = "2027"]
#[unstable_variant]
/// [Edition 2027]().
Edition2027,

Though, If we're not moving forward with the edition implementation in this PR, then we can revert these rustfmt changes since we've already got an unstable 2027 style edition implemented in the upstream rustfmt

@obeis obeis force-pushed the explicit-extern-abis branch from e25d0af to 20f28b1 Compare January 10, 2025 19:55
@rust-log-analyzer

This comment has been minimized.

@obeis obeis force-pushed the explicit-extern-abis branch 2 times, most recently from fe8b62b to bc8ed0e Compare January 10, 2025 20:30
@rust-log-analyzer

This comment has been minimized.

@obeis obeis force-pushed the explicit-extern-abis branch from bc8ed0e to e1db710 Compare January 11, 2025 15:05
@rustbot rustbot added the A-run-make Area: port run-make Makefiles to rmake.rs label Jan 11, 2025
@rustbot
Copy link
Collaborator

rustbot commented Jan 11, 2025

This PR modifies tests/run-make/. If this PR is trying to port a Makefile
run-make test to use rmake.rs, please update the
run-make port tracking issue
so we can track our progress. You can either modify the tracking issue
directly, or you can comment on the tracking issue and link this PR.

cc @jieyouxu

@traviscross traviscross added S-waiting-on-team Status: Awaiting decision from the relevant subteam (see the T-<team> label). and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Jan 12, 2025
@Amanieu Amanieu removed the T-libs Relevant to the library team, which will review and decide on the PR/issue. label Jan 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-run-make Area: port run-make Makefiles to rmake.rs F-explicit_extern_abis `#![feature(explicit_extern_abis)]` S-blocked Status: Blocked on something else such as an RFC or other implementation work. S-waiting-on-team Status: Awaiting decision from the relevant subteam (see the T-<team> label). T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants