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

Conversation

@skinny121
Copy link
Contributor

commented Sep 22, 2019

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.
@varkor

This comment has been minimized.

Copy link
Member

commented Sep 22, 2019

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

@bors r+ rollup

@bors

This comment has been minimized.

Copy link
Contributor

commented Sep 22, 2019

📌 Commit 3f2855e has been approved by 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 22, 2019
Rollup of 9 pull requests

Successful merges:

 - #64158 (panic=abort support in libtest)
 - #64294 (Fix `Stdio::piped` example code and lint)
 - #64508 (or-patterns: Push `PatKind/PatternKind::Or` at top level to HIR & HAIR)
 - #64546 (Bugfix/rfc 2451 rerebalance tests)
 - #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)

Failed merges:

r? @ghost
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
4 checks passed
4 checks passed
pr Build #20190922.11 succeeded
Details
pr (Linux mingw-check) Linux mingw-check succeeded
Details
pr (Linux x86_64-gnu-llvm-6.0) Linux x86_64-gnu-llvm-6.0 succeeded
Details
pr (LinuxTools) LinuxTools succeeded
Details
@varkor varkor referenced this pull request Oct 19, 2019
1 of 15 tasks complete
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants
You can’t perform that action at this time.