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

const_generics: assert resolve hack causes an error #79236

Merged
merged 2 commits into from Nov 23, 2020

Conversation

lcnr
Copy link
Contributor

@lcnr lcnr commented Nov 20, 2020

prevent the min_const_generics HACKs in resolve from triggering a fallback path which successfully compiles so that we don't have to worry about future compat issues when removing it

r? @eddyb cc @varkor

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Nov 20, 2020
Comment on lines 2642 to 2643
} else {
self.session.delay_span_bug(span, CG_BUG_STR);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You don't need this in an else, delay_span_bug will early exit if an error has already been emitted.
(same for the other case)

Copy link
Contributor Author

@lcnr lcnr Nov 20, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i personally prefer delay span in an else branch if the other branch "obviously" emits an error.

That's just a stylistic preference though. Changed it.

@eddyb
Copy link
Member

eddyb commented Nov 23, 2020

@bors r+

@bors
Copy link
Contributor

bors commented Nov 23, 2020

📌 Commit c85af74 has been approved by eddyb

@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 Nov 23, 2020
bors added a commit to rust-lang-ci/rust that referenced this pull request Nov 23, 2020
…as-schievink

Rollup of 10 pull requests

Successful merges:

 - rust-lang#76829 (stabilize const_int_pow)
 - rust-lang#79080 (MIR visitor: Don't treat debuginfo field access as a use of the struct)
 - rust-lang#79236 (const_generics: assert resolve hack causes an error)
 - rust-lang#79287 (Allow using generic trait methods in `const fn`)
 - rust-lang#79324 (Use Option::and_then instead of open-coding it)
 - rust-lang#79325 (Reduce boilerplate with the `?` operator)
 - rust-lang#79330 (Fix typo in comment)
 - rust-lang#79333 (doc typo)
 - rust-lang#79337 (Use Option::map instead of open coding it)
 - rust-lang#79343 (Add my (`@flip1995)` work mail to the mailmap)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit c58c245 into rust-lang:master Nov 23, 2020
@rustbot rustbot added this to the 1.50.0 milestone Nov 23, 2020
@lcnr lcnr deleted the mcg-resolve-dsb branch November 23, 2020 19:06
@lcnr lcnr added the A-const-generics Area: const generics (parameters and arguments) label Aug 26, 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.

None yet

5 participants