Skip to content

Remove unnecessary unsafe block around calls to discriminant_value #77821

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

Merged
merged 1 commit into from
Oct 12, 2020

Conversation

tmiasko
Copy link
Contributor

@tmiasko tmiasko commented Oct 11, 2020

Since 63793 the discriminant_value intrinsic is safe to call. Remove
unnecessary unsafe block around calls to this intrinsic in built-in
derive macros.

Since 63793 the discriminant_value intrinsic is safe to call. Remove
unnecessary unsafe block around calls to this intrinsic in built-in
derive macros.
@rust-highfive
Copy link
Contributor

r? @varkor

(rust_highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Oct 11, 2020
@tmiasko tmiasko force-pushed the discriminant-value-is-safe branch from 493bfad to 50da126 Compare October 11, 2020 15:54
@jonas-schievink
Copy link
Contributor

Seems like this might impact perf due to the reduced amount of code generated.

@bors try @rust-timer queue

@rust-timer
Copy link
Collaborator

Awaiting bors try build completion

@bors
Copy link
Collaborator

bors commented Oct 11, 2020

⌛ Trying commit 50da126 with merge 90c516e222e0c4c6698cf58b124d30881de8bf3c...

@bors
Copy link
Collaborator

bors commented Oct 11, 2020

☀️ Try build successful - checks-actions, checks-azure
Build commit: 90c516e222e0c4c6698cf58b124d30881de8bf3c (90c516e222e0c4c6698cf58b124d30881de8bf3c)

@rust-timer
Copy link
Collaborator

Queued 90c516e222e0c4c6698cf58b124d30881de8bf3c with parent bc74dd7, future comparison URL.

@rust-timer
Copy link
Collaborator

Finished benchmarking try commit (90c516e222e0c4c6698cf58b124d30881de8bf3c): comparison url.

Benchmarking this pull request likely means that it is perf-sensitive, so we're automatically marking it as not fit for rolling up. Please note that if the perf results are neutral, you should likely undo the rollup=never given below by specifying rollup- to bors.

Importantly, though, if the results of this run are non-neutral do not roll this PR up -- it will mask other regressions or improvements in the roll up.

@bors rollup=never

@jonas-schievink
Copy link
Contributor

@bors r+

@bors
Copy link
Collaborator

bors commented Oct 12, 2020

📌 Commit 50da126 has been approved by jonas-schievink

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Oct 12, 2020
@bors
Copy link
Collaborator

bors commented Oct 12, 2020

⌛ Testing commit 50da126 with merge d6b5ffb...

@bors
Copy link
Collaborator

bors commented Oct 12, 2020

☀️ Test successful - checks-actions, checks-azure
Approved by: jonas-schievink
Pushing d6b5ffb to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Oct 12, 2020
@bors bors merged commit d6b5ffb into rust-lang:master Oct 12, 2020
@rustbot rustbot added this to the 1.49.0 milestone Oct 12, 2020
@tmiasko tmiasko deleted the discriminant-value-is-safe branch October 18, 2020 00:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merged-by-bors This PR was explicitly merged by bors. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants