-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
stabilize const_extern_fn
#129753
stabilize const_extern_fn
#129753
Conversation
Failed to set assignee to
|
The unstable book is auto-generated, AFAIK. Cc @rust-lang/wg-const-eval |
This comment has been minimized.
This comment has been minimized.
@folkertdev: Perhaps you're working on it in parallel, but you'll want to add more in the way of a stabilization report to the PR description here (see e.g. the recent stabilizations from RalfJ for some examples). |
Some changes occurred in src/tools/clippy cc @rust-lang/clippy |
1,81,0 { LINT_REASONS_STABILIZATION } | ||
1,82,0 { CONST_EXTERN_FN } | ||
1,81,0 { LINT_REASONS_STABILIZATION } |
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.
if anyone from clippy is following along, is there some equivalent of CURRENT_RUSTC_VERSION
here? In any case given that we're close to a rust release this may or may not be accurate when merged
@traviscross allright I copied and slightly updated some text from the tracking issue. Let me know if there's something else that should be included. |
Why hadn't we stabilized this any sooner? I.e., are there any tricky questions here, open questions that have recently been answered, or recent implementation work done to make this ready? (Or has this been in good shape for a long time and was just waiting on a stabilization PR?) |
I have no idea why #95346 only stabilized "Rust" and "C". Maybe @Aaron1011 remembers? |
@rfcbot fcp merge We talked about this in triage, and this sounded good to us all. |
Team member @traviscross has proposed to merge this. The next step is review by the rest of the tagged team members: No concerns currently listed. Once a majority of reviewers approve (and at most 2 approvals are outstanding), this will enter its final comment period. If you spot a major issue that hasn't been raised at any point in this process, please speak up! cc @rust-lang/lang-advisors: FCP proposed for lang, please feel free to register concerns. |
@rfcbot reviewed |
🔔 This is now entering its final comment period, as per the review above. 🔔 |
☔ The latest upstream changes (presumably #130312) made this pull request unmergeable. Please resolve the merge conflicts. |
The final comment period, with a disposition to merge, as per the review above, is now complete. As the automated representative of the governance process, I would like to thank the author for their work and everyone else who contributed. This will be merged soon. |
4dd8337
to
027a557
Compare
cool, just fixed a merge conflict and squashed all commits into one |
src/tools/clippy/tests/ui/missing_const_for_fn/could_be_const_with_const_extern_fn.fixed
Outdated
Show resolved
Hide resolved
r=me for the rustc side. The clippy side seems reasonably simple but I think the test can be merged with another test file now. |
027a557
to
a528f4e
Compare
@bors r+ |
☀️ Test successful - checks-actions |
Finished benchmarking commit (4f1be92): comparison URL. Overall result: ❌ regressions - no action needed@rustbot label: -perf-regression Instruction countThis is a highly reliable metric that was used to determine the overall result at the top of this comment.
Max RSS (memory usage)Results (primary 2.4%)This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
CyclesThis benchmark run did not return any relevant results for this metric. Binary sizeThis benchmark run did not return any relevant results for this metric. Bootstrap: 758.697s -> 760.09s (0.18%) |
closes #64926
tracking issue: #64926
reference PR: rust-lang/reference#1596
Stabilizaton Report
Summary
Using
const extern "Rust"
andconst extern "C"
was already stabilized (since version 1.62.0, see #95346). This PR stabilizes the other calling conventions: it is now possible to writeconst unsafe extern "calling-convention" fn
andconst extern "calling-convention" fn
for any supported calling convention:This can be used to const-ify an
extern fn
, or conversely, to make aconst fn
callable from external code.r? T-lang
cc @RalfJung