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

Adjust orphan rules to consider all input types, not just self type. #18223

Closed

Conversation

nikomatsakis
Copy link
Contributor

Adjust orphan rules to consider all input types, not just self type.

Fixes #18222.

r? @pcwalton

@nikomatsakis
Copy link
Contributor Author

cc @aturon this fixes that coherence failure we saw with the Index trait

@nikomatsakis nikomatsakis force-pushed the coherence-orphan-18222 branch from 790c8e2 to aeba2cc Compare October 22, 2014 03:52
return ty_is_local(tcx, self_ty);
// Otherwise, at least one of the input types must be local to the
// crate.
trait_ref.input_types().iter().any(|&t| ty_is_local(tcx, t))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Now that is some readable code :-)

bors added a commit that referenced this pull request Oct 22, 2014
…walton

Adjust orphan rules to consider all input types, not just self type.

Fixes #18222.

r? @pcwalton
@bors bors closed this Oct 22, 2014
@nikomatsakis nikomatsakis deleted the coherence-orphan-18222 branch March 30, 2016 16:12
lnicola pushed a commit to lnicola/rust that referenced this pull request Oct 8, 2024
…lbasi

Use external stack in borrowck DFS

Because damnit, it can crash r-a. Why do people make this stupid DFSes anyway (I get it, it's easier until it blows).

Fixes rust-lang#18223 (who thought DFS will be the problem).
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.

Orphan rules in coherence do not account for multidispatch
4 participants