mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-25 16:24:46 +00:00
Add the full issue reference to equality constraints in where
clauses
This commit is contained in:
parent
a916ac22b9
commit
a5991c57cf
@ -737,8 +737,14 @@ 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 (see #20041)");
|
||||
.struct_span_err(
|
||||
predicate.span,
|
||||
"equality constraints are not yet supported in `where` clauses",
|
||||
)
|
||||
.note(
|
||||
"for more information, see https://github.com/rust-lang/rust/issues/20041",
|
||||
)
|
||||
.emit();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
fn f() where u8 = u16 {}
|
||||
//~^ ERROR equality constraints are not yet supported in where clauses
|
||||
//~^ ERROR equality constraints are not yet supported in `where` clauses
|
||||
fn g() where for<'a> &'static (u8,) == u16, {}
|
||||
//~^ ERROR equality constraints are not yet supported in where clauses
|
||||
//~^ ERROR equality constraints are not yet supported in `where` clauses
|
||||
|
||||
fn main() {}
|
||||
|
@ -1,14 +1,18 @@
|
||||
error: equality constraints are not yet supported in where clauses (see #20041)
|
||||
error: equality constraints are not yet supported in `where` clauses
|
||||
--> $DIR/where-equality-constraints.rs:1:14
|
||||
|
|
||||
LL | fn f() where u8 = u16 {}
|
||||
| ^^^^^^^^
|
||||
|
|
||||
= note: for more information, see https://github.com/rust-lang/rust/issues/20041
|
||||
|
||||
error: equality constraints are not yet supported in where clauses (see #20041)
|
||||
error: equality constraints are not yet supported in `where` clauses
|
||||
--> $DIR/where-equality-constraints.rs:3:14
|
||||
|
|
||||
LL | fn g() where for<'a> &'static (u8,) == u16, {}
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= note: for more information, see https://github.com/rust-lang/rust/issues/20041
|
||||
|
||||
error: aborting due to 2 previous errors
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user