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

Silence TooGeneric error #67906

Merged
merged 1 commit into from
Jan 6, 2020
Merged

Silence TooGeneric error #67906

merged 1 commit into from
Jan 6, 2020

Conversation

varkor
Copy link
Member

@varkor varkor commented Jan 5, 2020

This error may be produced during intermediate failed attempts at evaluation of a generic const, which may nevertheless succeed later.

Fixes #66962.

r? @eddyb

This error may be produced during intermediate failed attempts at evaluation of a generic const, which may nevertheless succeed later.
@varkor varkor added the F-const_generics `#![feature(const_generics)]` label Jan 5, 2020
@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jan 5, 2020
@nagisa
Copy link
Member

nagisa commented Jan 5, 2020

@bors r+

@bors
Copy link
Contributor

bors commented Jan 5, 2020

📌 Commit adb46fd has been approved by nagisa

@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 Jan 5, 2020
Dylan-DPC-zz pushed a commit to Dylan-DPC-zz/rust that referenced this pull request Jan 6, 2020
Silence `TooGeneric` error

This error may be produced during intermediate failed attempts at evaluation of a generic const, which may nevertheless succeed later.

Fixes rust-lang#66962.

r? @eddyb
bors added a commit that referenced this pull request Jan 6, 2020
Rollup of 6 pull requests

Successful merges:

 - #67800 (Fix ICE involving calling `Instance.ty` during const evaluation)
 - #67873 (change remove to have a PartialEq bound)
 - #67897 (Use `as_deref()` to replace `as_ref().map(...)`)
 - #67906 (Silence `TooGeneric` error)
 - #67912 (macros: typo fix)
 - #67915 (Use Self instead of $type)

Failed merges:

r? @ghost
@bors bors merged commit adb46fd into rust-lang:master Jan 6, 2020
@varkor varkor deleted the silence-toogeneric branch January 6, 2020 14:59
@djugei
Copy link
Contributor

djugei commented Jan 7, 2020

thank you @varkor ! a lot of my work was blocked on this :)

@eddyb
Copy link
Member

eddyb commented Jan 18, 2020

This PR needs to be reverted, and the ICE be replaced by a real error.

TooGeneric is not an error for normalization, which can keep the original form.

But for ConstEvaluatable WF predicates, that's what protects us from post-monomorphization errors! It forces the "burden of proof" to be bubbled up to the monomorphic users, where the constant can be evaluated during type-checking.

@varkor
Copy link
Member Author

varkor commented Jan 20, 2020

#68388 should fix this mistake.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
F-const_generics `#![feature(const_generics)]` 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.

Const generic ICE: constant in type had an ignored error: TooGeneric
6 participants