Skip to content

Conversation

arielb1
Copy link
Contributor

@arielb1 arielb1 commented Oct 12, 2015

This rather crucial requirement was not checked. In most cases, that
didn't cause any trouble because the argument types are required to
outlive the call and are subtypes of a subformula of the callee type.

However, binary ops are taken by ref only indirectly, without it being
marked in the argument types, which led to the argument types not being
constrained anywhere causing spurious errors (as these are basically
unconstrainable, I don't think this change can break code). Of course,
the old way was also incorrent with contravariance, but that is still
unsound for other reasons.

This also improves rustc::front to get RUST_LOG to somewhat work.

Fixes #28999. That issue is one of the several regression introduced by #28669.

r? @pnkfelix

This rather crucial requirement was not checked. In most cases, that
didn't cause any trouble because the argument types are required to
outlive the call and are subtypes of a subformula of the callee type.

However, binary ops are taken by ref only indirectly, without it being
marked in the argument types, which led to the argument types not being
constrained anywhere causing spurious errors (as these are basically
unconstrainable, I don't think this change can break code). Of course,
the old way was also incorrent with contravariance, but that is still
unsound for other reasons.

This also improves rustc::front to get RUST_LOG to *somewhat* work.

Fixes rust-lang#28999
@pnkfelix
Copy link
Contributor

cc @nikomatsakis

@pnkfelix
Copy link
Contributor

@bors r+

@arielb1
Copy link
Contributor Author

arielb1 commented Oct 13, 2015

@bors r=pnkfelix

@bors
Copy link
Collaborator

bors commented Oct 13, 2015

📌 Commit ed2a11d has been approved by pnkfelix

@nikomatsakis
Copy link
Contributor

lgtm, I was actually just writing this same PR

Manishearth added a commit to Manishearth/rust that referenced this pull request Oct 14, 2015
…felix

This rather crucial requirement was not checked. In most cases, that
didn't cause any trouble because the argument types are required to
outlive the call and are subtypes of a subformula of the callee type.

However, binary ops are taken by ref only indirectly, without it being
marked in the argument types, which led to the argument types not being
constrained anywhere causing spurious errors (as these are basically
unconstrainable, I don't think this change can break code). Of course,
the old way was also incorrent with contravariance, but that is still
unsound for other reasons.

This also improves rustc::front to get RUST_LOG to *somewhat* work.

Fixes rust-lang#28999. That issue is one of the several regression introduced by rust-lang#28669.

r? @pnkfelix
bors added a commit that referenced this pull request Oct 14, 2015
@bors bors merged commit ed2a11d into rust-lang:master Oct 14, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants