Skip to content

Fix typo that resulted in comparison-to-self #37358

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

Merged
merged 1 commit into from
Oct 23, 2016

Conversation

isabelmu
Copy link
Contributor

This line was introduced in commit 843db01, rebased from eddyb's c5f6f84.

I don't know whether this fixes anything in practice, but it seems like the changed version was what was intended originally.

r? @eddyb

@eddyb
Copy link
Member

eddyb commented Oct 22, 2016

The bug would allow Box<Trait> to be cast to Box<DifferentTrait>, if not for the subtyping check later.
That is, Trait<A> vs Trait<B> is checked later anyway, all this does is have a superfluous candidate.
What it could affect is ambiguity, but Unsize is built-in anyway, so I can't even think of a testcase.

Thanks for finding this! Even if the check is ultimately pointless, still better to keep it correct 😆.

@bors r+ rollup

@bors
Copy link
Collaborator

bors commented Oct 22, 2016

📌 Commit f9cb7df has been approved by eddyb

@isabelmu
Copy link
Contributor Author

Thanks for explaining :-)

@bors
Copy link
Collaborator

bors commented Oct 23, 2016

⌛ Testing commit f9cb7df with merge 1e5dab1...

bors added a commit that referenced this pull request Oct 23, 2016
Fix typo that resulted in comparison-to-self

This line was introduced in commit 843db01, rebased from eddyb's c5f6f84.

I don't know whether this fixes anything in practice, but it seems like the changed version was what was intended originally.

r? @eddyb
@bors bors merged commit f9cb7df into rust-lang:master Oct 23, 2016
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.

3 participants