4

Stabilize `const_fn_transmute`, `const_fn_union` by jhpratt · Pull Request #8576...

 3 years ago
source link: https://github.com/rust-lang/rust/pull/85769
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

Copy link

Contributor

jhpratt commented on May 28

edited

This PR stabilizes the const_fn_transmute and const_fn_union features. It does not stabilize any methods (obviously aside from transmute) that are blocked on only these features.

Closes #53605. Closes #51909.

Copy link

Collaborator

rust-highfive commented on May 28

Some changes occurred in src/tools/clippy.

cc @rust-lang/clippy

Copy link

Collaborator

rust-highfive commented on May 28

r? @yaahc

(rust-highfive has picked a reviewer for you, use r? to override)

Copy link

Contributor

Author

jhpratt commented on May 28

@rustbot label: -S-waiting-on-review +S-waiting-on-author +A-const-fn +T-compiler

This comment has been hidden.

jhpratt

force-pushed the

jhpratt:stabilize-const-transmute-union

branch from 25f21ed to 2fb3304

on May 31

This comment has been hidden.

jhpratt

force-pushed the

jhpratt:stabilize-const-transmute-union

branch from 2fb3304 to 990a295

on Jun 1

This comment has been hidden.

Copy link

Contributor

Author

jhpratt commented on Jun 2

Looking at the failure, I'm not really sure what should be done about this. It's wholly unrelated to this PR (it's only being run because I remove the feature gate) and the lints are objectively correct — but it's also what's being tested. I think it's an issue with the script that's running the tests: -D warnings shouldn't be passed when clippy warnings are being checked.

When running x t --stage 2 locally, everything succeeds. I use Fedora 34/x64_64-unknown-linux-gnu if that's relevant.

r? @oli-obk

jhpratt

marked this pull request as ready for review

on Jun 2

Copy link

Member

RalfJung commented on Jun 2

It's wholly unrelated to this PR (it's only being run because I remove the feature gate)

The test will get run by bors either way, so even if it wouldn't be run here we'd still get the same failure later. Therefore it is definitely related to the PR, in the sense that these warnings do not show up on master, but they do show up with your PR applied.
@rust-lang/clippy what do you recommend we do with these -D warning failures in clippy tests? Somehow just stabilizing a feature makes new warnings show up...?

Copy link

Member

RalfJung commented on Jun 2

Oh wait, I misread... these ware not new warnings, the line numbers are just wrong.
Sadly I don't know how to auto---bless clippy tests, so I think you will have to adjust the line numbers in the stderr files by hand.

Copy link

Contributor

Author

jhpratt commented on Jun 2

Huh, you're right. Not sure why the lines removed weren't shown by rustbot. All I saw was the additions and assumed it was an error.

Copy link

Member

flip1995 commented on Jun 2

./x.py test --bless src/tools/clippy should work.

Copy link

Contributor

Author

jhpratt commented on Jun 2

Thanks @flip1995! I incidentally just tried that figuring it can't hurt and found it helped :)

jhpratt

force-pushed the

jhpratt:stabilize-const-transmute-union

branch from 990a295 to 3d7fdc3

on Jun 2

Copy link

Member

flip1995 commented on Jun 2

Great! Clippy changes LGTM. +1

This comment has been hidden.

Copy link

Contributor

bors commented 10 days ago

umbrella The latest upstream changes (presumably #86522) made this pull request unmergeable. Please resolve the merge conflicts.

Copy link

Contributor

Author

jhpratt commented 10 days ago

At this point I'm going to stop playing whack-a-mole and just rebase one final time once requested. I know this PR is nominated, so I'll hold off until that discussion takes place.

Copy link

Member

RalfJung commented 10 days ago

@rust-lang/lang this is waiting on someone starting FCP :)

Copy link

Member

cramertj commented 7 days ago

@rfcbot fcp merge

Link to stabilization report
Tests are visible in the changed files of this PR.

Copy link

rfcbot commented 7 days ago

edited by joshtriplett

Team member @cramertj 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!

See this document for info about what commands tagged team members can give me.

Copy link

rfcbot commented 3 days ago

bellThis is now entering its final comment period, as per the review above. bell

Copy link

Contributor

oli-obk commented 3 days ago

Hey @jhpratt, I'm assuming that this FCP will run through smoothly, so if you rebase and fix the conflicts, we can r+ right now and revert if anything comes up within the FCP.

jhpratt

force-pushed the

jhpratt:stabilize-const-transmute-union

branch from 6ebd00a to c6cdf74

2 days ago

Copy link

Contributor

Author

jhpratt commented 2 days ago

Rebased and green.

Copy link

Contributor

oli-obk commented yesterday

@bors r+ Thanks!

Copy link

Contributor

bors commented yesterday

pushpin Commit c6cdf74 has been approved by oli-obk

Copy link

Member

RalfJung commented yesterday

@bors r-
FCP is still ongoing...

Copy link

Member

RalfJung commented yesterday

we can r+ right now and revert if anything comes up within the FCP

oO really? We do such things? That seems strange... why would we not follow the usual process and merge after FCP is done?

Copy link

Contributor

oli-obk commented yesterday

we can r+ right now and revert if anything comes up within the FCP

oO really? We do such things? That seems strange... why would we not follow the usual process and merge after FCP is done?

because I'm excited for this. We did such a thing before... I don't remember for which FCPs tho...

Copy link

Contributor

Author

jhpratt commented yesterday

With due respect, being excited really isn't a good reason. FCP will likely finish soon enough and it can be merged then. It's not like this PR is critical to something.

Copy link

Contributor

oli-obk commented yesterday

With due respect, being excited really isn't a good reason

:D you are right. Thanks for keeping me in check

@bors r-

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK