Skip to content

Infer consts more consistently - #64679

Merged
bors merged 1 commit into
rust-lang:masterfrom
BenLewis-Seequent:const-infer
Sep 23, 2019
Merged

Infer consts more consistently#64679
bors merged 1 commit into
rust-lang:masterfrom
BenLewis-Seequent:const-infer

Conversation

@BenLewis-Seequent

Copy link
Copy Markdown

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-highfiverust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Sep 22, 2019
@varkor

Copy link
Copy Markdown
Contributor

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

@bors r+ rollup

@bors

bors commented Sep 22, 2019

Copy link
Copy Markdown
Collaborator

📌 Commit 3f2855e has been approved by varkor

@borsbors 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.
Fixesrust-lang#64519
r? @varkor
@CentrilCentril mentioned this pull request 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.
Fixesrust-lang#64519
r? @varkor
@CentrilCentril mentioned this pull request Sep 22, 2019
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:masterSep 23, 2019
@varkorvarkor added the F-const_generics `#![feature(const_generics)]` label Oct 19, 2019
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

F-const_generics`#![feature(const_generics)]`S-waiting-on-borsStatus: 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

@BenLewis-Seequent@varkor@bors@rust-highfive@skinnyBat