Skip to content

Commit ac4a454

Browse files
committed
Consolidate equality constraints error message
1 parent d1b65fb commit ac4a454

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

src/librustc_passes/ast_validation.rs

+3-2
Original file line numberDiff line numberDiff line change
@@ -438,8 +438,9 @@ impl<'a> Visitor<'a> for AstValidator<'a> {
438438
}
439439
for predicate in &generics.where_clause.predicates {
440440
if let WherePredicate::EqPredicate(ref predicate) = *predicate {
441-
self.err_handler().span_err(predicate.span, "equality constraints are not yet \
442-
supported in where clauses (#20041)");
441+
self.err_handler()
442+
.span_err(predicate.span, "equality constraints are not yet \
443+
supported in where clauses (see #20041)");
443444
}
444445
}
445446
visit::walk_generics(self, generics)

src/test/ui/where-clauses/where-equality-constraints.stderr

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
error: equality constraints are not yet supported in where clauses (#20041)
1+
error: equality constraints are not yet supported in where clauses (see #20041)
22
--> $DIR/where-equality-constraints.rs:1:14
33
|
44
LL | fn f() where u8 = u16 {}
55
| ^^^^^^^^
66

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

0 commit comments

Comments
 (0)