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

Avoid exponential behaviour when relating types #68772

Merged
merged 1 commit into from Feb 3, 2020

Conversation

@matthewjasper
Copy link
Contributor

matthewjasper commented Feb 2, 2020

When equating bound types we check subtyping in both directions. Since closures are invariant in their substs, we end up comparing the two types an exponential number of times. If there are no bound variables this isn't needed.

Closes #68061

@rust-highfive

This comment has been minimized.

Copy link
Collaborator

rust-highfive commented Feb 2, 2020

r? @davidtwco

(rust_highfive has picked a reviewer for you, use r? to override)

Copy link
Member

davidtwco left a comment

r=me when CI passes

@jonas-schievink

This comment has been minimized.

Copy link
Member

jonas-schievink commented Feb 2, 2020

@bors rollup=never

To capture perf stats on merge

@Centril

This comment has been minimized.

Copy link
Member

Centril commented Feb 2, 2020

@bors r=davidtwco

@bors

This comment has been minimized.

Copy link
Contributor

bors commented Feb 2, 2020

📌 Commit a606ffd has been approved by davidtwco

@bors

This comment has been minimized.

Copy link
Contributor

bors commented Feb 3, 2020

⌛️ Testing commit a606ffd with merge 0d34a87...

bors added a commit that referenced this pull request Feb 3, 2020
Avoid exponential behaviour when relating types

When equating bound types we check subtyping in both directions. Since closures are invariant in their substs, we end up comparing the two types an exponential number of times. If there are no bound variables this isn't needed.

Closes #68061
@bors

This comment has been minimized.

Copy link
Contributor

bors commented Feb 3, 2020

☀️ Test successful - checks-azure
Approved by: davidtwco
Pushing 0d34a87 to master...

@bors bors added the merged-by-bors label Feb 3, 2020
@bors bors merged commit a606ffd into rust-lang:master Feb 3, 2020
5 checks passed
5 checks passed
homu Test successful
Details
pr Build #20200202.35 succeeded
Details
pr (Linux mingw-check) Linux mingw-check succeeded
Details
pr (Linux x86_64-gnu-llvm-7) Linux x86_64-gnu-llvm-7 succeeded
Details
pr (Linux x86_64-gnu-tools) Linux x86_64-gnu-tools succeeded
Details
@rust-highfive

This comment has been minimized.

Copy link
Collaborator

rust-highfive commented Feb 3, 2020

📣 Toolstate changed by #68772!

Tested on commit 0d34a87.
Direct link to PR: #68772

💔 rls on linux: test-pass → test-fail (cc @Xanewok, @rust-lang/infra).

rust-highfive added a commit to rust-lang-nursery/rust-toolstate that referenced this pull request Feb 3, 2020
Tested on commit rust-lang/rust@0d34a87.
Direct link to PR: <rust-lang/rust#68772>

💔 rls on linux: test-pass → test-fail (cc @Xanewok, @rust-lang/infra).
@matthewjasper matthewjasper deleted the matthewjasper:relate-opt branch Feb 4, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

6 participants
You can’t perform that action at this time.