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

Infer consts more consistently #64679

Merged
merged 1 commit into from
Sep 23, 2019
Merged

Conversation

BenLewis-Seequent
Copy link

Moved some duplicated logic in TypeRelation methods into super_combined_consts. Before some TypeRelations like Lub wasn't using replace_if_possible, meaning some inference types were staying around longer than they should be.

Fixes #64519

r? @varkor

also removed some duplicated logic from TypeRelation methods.
@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Sep 22, 2019
@varkor
Copy link
Member

varkor commented Sep 22, 2019

@Skinny121: thank you for looking into this! This looks great.

@bors r+ rollup

@bors
Copy link
Contributor

bors commented Sep 22, 2019

📌 Commit 3f2855e has been approved by varkor

@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 Sep 22, 2019
Centril added a commit to Centril/rust that referenced this pull request Sep 22, 2019
Infer consts more consistently

Moved some duplicated logic in `TypeRelation` methods into `super_combined_consts`. Before some `TypeRelation`s like `Lub` wasn't using `replace_if_possible`, meaning some inference types were staying around longer than they should be.

Fixes rust-lang#64519

r? @varkor
Centril added a commit to Centril/rust that referenced this pull request Sep 22, 2019
Infer consts more consistently

Moved some duplicated logic in `TypeRelation` methods into `super_combined_consts`. Before some `TypeRelation`s like `Lub` wasn't using `replace_if_possible`, meaning some inference types were staying around longer than they should be.

Fixes rust-lang#64519

r? @varkor
bors added a commit that referenced this pull request Sep 23, 2019
Rollup of 7 pull requests

Successful merges:

 - #64294 (Fix `Stdio::piped` example code and lint)
 - #64670 (Cleanup syntax::ext::build)
 - #64674 (Propagate `types.err` in locals further to avoid spurious knock-down errors)
 - #64676 (Parse assoc type bounds in generic params and provide custom diagnostic)
 - #64677 (remove outdated comment)
 - #64679 (Infer consts more consistently)
 - #64688 (Clarify the "since" tidy check)

Failed merges:

r? @ghost
@bors bors merged commit 3f2855e into rust-lang:master Sep 23, 2019
@varkor varkor added the F-const_generics `#![feature(const_generics)]` label Oct 19, 2019
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.

ICE with const_generic + associated type + double return statement
5 participants