Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reference tracking issue for inherent associated types in diagnostic #57459

Merged
merged 2 commits into from
Jan 12, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
2 changes: 1 addition & 1 deletion src/librustc_typeck/collect.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1107,7 +1107,7 @@ fn report_assoc_ty_on_inherent_impl<'a, 'tcx>(tcx: TyCtxt<'a, 'tcx, 'tcx>, span:
tcx.sess,
span,
E0202,
"associated types are not allowed in inherent impls"
"associated types are not yet supported in inherent impls (see #8995)"
);
}

Expand Down
4 changes: 2 additions & 2 deletions src/test/ui/assoc-inherent.rs
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
// Test associated types are forbidden in inherent impls.
// Test associated types are, until #8995 is implemented, forbidden in inherent impls.

struct Foo;

impl Foo {
type Bar = isize; //~ERROR associated types are not allowed in inherent impls
type Bar = isize; //~ERROR associated types are not yet supported in inherent impls (see #8995)
}

fn main() {}
4 changes: 2 additions & 2 deletions src/test/ui/assoc-inherent.stderr
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
error[E0202]: associated types are not allowed in inherent impls
error[E0202]: associated types are not yet supported in inherent impls (see #8995)
--> $DIR/assoc-inherent.rs:6:5
|
LL | type Bar = isize; //~ERROR associated types are not allowed in inherent impls
LL | type Bar = isize; //~ERROR associated types are not yet supported in inherent impls (see #8995)
| ^^^^^^^^^^^^^^^^^

error: aborting due to previous error
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