Skip to content

Commit

Permalink
Consolidate equality constraints error message
Browse files Browse the repository at this point in the history
  • Loading branch information
varkor committed Jan 8, 2019
1 parent d1b65fb commit ac4a454
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
5 changes: 3 additions & 2 deletions src/librustc_passes/ast_validation.rs
Original file line number Diff line number Diff line change
Expand Up @@ -438,8 +438,9 @@ impl<'a> Visitor<'a> for AstValidator<'a> {
}
for predicate in &generics.where_clause.predicates {
if let WherePredicate::EqPredicate(ref predicate) = *predicate {
self.err_handler().span_err(predicate.span, "equality constraints are not yet \
supported in where clauses (#20041)");
self.err_handler()
.span_err(predicate.span, "equality constraints are not yet \
supported in where clauses (see #20041)");
}
}
visit::walk_generics(self, generics)
Expand Down
4 changes: 2 additions & 2 deletions src/test/ui/where-clauses/where-equality-constraints.stderr
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
error: equality constraints are not yet supported in where clauses (#20041)
error: equality constraints are not yet supported in where clauses (see #20041)
--> $DIR/where-equality-constraints.rs:1:14
|
LL | fn f() where u8 = u16 {}
| ^^^^^^^^

error: equality constraints are not yet supported in where clauses (#20041)
error: equality constraints are not yet supported in where clauses (see #20041)
--> $DIR/where-equality-constraints.rs:3:14
|
LL | fn g() where for<'a> &'static (u8,) == u16, {}
Expand Down

0 comments on commit ac4a454

Please sign in to comment.