Skip to content

Commit 8d7f3bd

Browse files
committed
Disallow type parameters to self. Closes #2422.
1 parent f2ad7c3 commit 8d7f3bd

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/rustc/middle/typeck/astconv.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -302,6 +302,7 @@ fn ast_ty_to_ty<AC: ast_conv, RS: region_scope copy>(
302302
// n.b.: resolve guarantees that the self type only appears in an
303303
// iface, which we rely upon in various places when creating
304304
// substs
305+
check_path_args(tcx, path, NO_TPS | NO_REGIONS);
305306
ty::mk_self(tcx)
306307
}
307308
_ {

0 commit comments

Comments
 (0)