Skip to content

Commit

Permalink
Bail out early during ambiguous unification
Browse files Browse the repository at this point in the history
  • Loading branch information
aturon committed Jun 7, 2017
1 parent eac7a6c commit d236626
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/solve/infer/unify.rs
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@ impl<'t> Unifier<'t> {
if apply1.name != apply2.name {
if apply1.name.is_for_all() || apply2.name.is_for_all() {
self.ambiguous = true;
return Ok(());
} else {
bail!("cannot equate `{:?}` and `{:?}`", apply1.name, apply2.name);
}
Expand Down

0 comments on commit d236626

Please sign in to comment.