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

correctly handle enum variants in opt_const_param_of #87854

Merged
merged 2 commits into from Aug 11, 2021

Conversation

BoxyUwU
Copy link
Member

@BoxyUwU BoxyUwU commented Aug 7, 2021

Fixes #87542

opt_const_param_of was returning None for args on an enum variant Enum::Variant::<10> because we called generics_of on the enum variant which has no generics.

r? @oli-obk

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Aug 7, 2021
@oli-obk
Copy link
Contributor

oli-obk commented Aug 9, 2021

@bors r+ rollup

@bors
Copy link
Contributor

bors commented Aug 9, 2021

📌 Commit 5f61271 has been approved by oli-obk

@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 9, 2021
JohnTitor added a commit to JohnTitor/rust that referenced this pull request Aug 10, 2021
correctly handle enum variants in `opt_const_param_of`

Fixes rust-lang#87542

`opt_const_param_of` was returning `None` for args on an enum variant `Enum::Variant::<10>` because we called `generics_of` on the enum variant which has no generics.

r? ```@oli-obk```
JohnTitor added a commit to JohnTitor/rust that referenced this pull request Aug 10, 2021
correctly handle enum variants in `opt_const_param_of`

Fixes rust-lang#87542

`opt_const_param_of` was returning `None` for args on an enum variant `Enum::Variant::<10>` because we called `generics_of` on the enum variant which has no generics.

r? ````@oli-obk````
bors added a commit to rust-lang-ci/rust that referenced this pull request Aug 10, 2021
Rollup of 14 pull requests

Successful merges:

 - rust-lang#86840 (Constify implementations of `(Try)From` for int types)
 - rust-lang#87582 (Implement `Printer` for `&mut SymbolPrinter`)
 - rust-lang#87636 (Added the `Option::unzip()` method)
 - rust-lang#87700 (Expand explanation of E0530)
 - rust-lang#87811 (Do not ICE on HIR based WF check when involving lifetimes)
 - rust-lang#87848 (removed references to parent/child from std::thread documentation)
 - rust-lang#87854 (correctly handle enum variants in `opt_const_param_of`)
 - rust-lang#87861 (Fix heading colours in Ayu theme)
 - rust-lang#87865 (Clarify terms in rustdoc book)
 - rust-lang#87876 (add `windows` count test)
 - rust-lang#87880 (Remove duplicate trait bounds in `rustc_data_structures::graph`)
 - rust-lang#87881 (Proper table row formatting in platform support)
 - rust-lang#87889 (Use smaller spans when suggesting method call disambiguation)
 - rust-lang#87895 (typeck: don't suggest inaccessible fields in struct literals and suggest ignoring inaccessible fields in struct patterns)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 6c92656 into rust-lang:master Aug 11, 2021
@rustbot rustbot added this to the 1.56.0 milestone Aug 11, 2021
@lcnr lcnr added the A-const-generics Area: const generics (parameters and arguments) label Dec 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-const-generics Area: const generics (parameters and arguments) 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.

Enum with const generic generates "'no errors encountered even though delay_span_bug issued"
6 participants