Skip to content

Enum variant ctor inherits the stability of the enum variant #100431

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Merged
merged 2 commits into from
Aug 14, 2022

Conversation

compiler-errors
Copy link
Member

@compiler-errors compiler-errors commented Aug 11, 2022

Fixes #100399
Fixes #100420

Context #71481 for why enum variants don't need stability

@rustbot rustbot added the T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. label Aug 11, 2022
@rust-highfive
Copy link
Contributor

r? @estebank

(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 Aug 11, 2022
@compiler-errors
Copy link
Member Author

cc @dtolnay and libs folks, may be worth revisiting whether we want to inherit stability on things like enum variants in the first place

@compiler-errors
Copy link
Member Author

Second commit is the missing check for why this turned into an ICE instead of an error.

@bors
Copy link
Collaborator

bors commented Aug 12, 2022

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

@estebank
Copy link
Contributor

r=me on the changes.

I believe the original code might have been buggy (which is why I couldn't land the stability attributes removal from stdlib).

@compiler-errors
Copy link
Member Author

I believe the original code might have been buggy

I can try to see if we can revive that PR with this change :)

@compiler-errors
Copy link
Member Author

@bors r=estebank

@bors
Copy link
Collaborator

bors commented Aug 12, 2022

📌 Commit 6925f41 has been approved by estebank

It is now in the queue for this repository.

@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 Aug 12, 2022
@compiler-errors
Copy link
Member Author

this is probably low perf risk

@bors rollup

bors added a commit to rust-lang-ci/rust that referenced this pull request Aug 14, 2022
…mpiler-errors

Rollup of 8 pull requests

Successful merges:

 - rust-lang#99646 (Only point out a single function parameter if we have a single arg incompatibility)
 - rust-lang#100299 (make `clean::Item::span` return `Option` instead of dummy span)
 - rust-lang#100335 (Rustdoc-Json: Add `Path` type for traits.)
 - rust-lang#100367 (Suggest the path separator when a dot is used on a trait)
 - rust-lang#100431 (Enum variant ctor inherits the stability of the enum variant)
 - rust-lang#100446 (Suggest removing a semicolon after impl/trait items)
 - rust-lang#100468 (Use an extensionless `x` script for non-Windows)
 - rust-lang#100479 (Argument type error improvements)

Failed merges:

 - rust-lang#100483 (Point to generic or arg if it's the self type of unsatisfied projection predicate)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit d46451c into rust-lang:master Aug 14, 2022
@rustbot rustbot added this to the 1.65.0 milestone Aug 14, 2022
@compiler-errors compiler-errors deleted the enum-ctor-variant-stab branch August 11, 2023 20:00
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. 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.

Enums with missing stability attributes on variants will compile and ICE only when used BacktraceStatus is borked
5 participants