From ac4a4547ba674b6d9d0e3b3e018be94d32766faa Mon Sep 17 00:00:00 2001 From: varkor Date: Tue, 8 Jan 2019 23:53:43 +0000 Subject: [PATCH] Consolidate equality constraints error message --- src/librustc_passes/ast_validation.rs | 5 +++-- src/test/ui/where-clauses/where-equality-constraints.stderr | 4 ++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/librustc_passes/ast_validation.rs b/src/librustc_passes/ast_validation.rs index 584f0ba0449e1..3d0e46d998622 100644 --- a/src/librustc_passes/ast_validation.rs +++ b/src/librustc_passes/ast_validation.rs @@ -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) diff --git a/src/test/ui/where-clauses/where-equality-constraints.stderr b/src/test/ui/where-clauses/where-equality-constraints.stderr index 56caaaeee401e..220447079c629 100644 --- a/src/test/ui/where-clauses/where-equality-constraints.stderr +++ b/src/test/ui/where-clauses/where-equality-constraints.stderr @@ -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, {}