Require exact type equality + add tests

+ Rebase fixes
This commit is contained in:
Vadim Petrochenkov
2015-12-18 20:00:19 +03:00
parent e0ceef5a9e
commit 95fdaf2375
9 changed files with 188 additions and 43 deletions

View File

@@ -2791,7 +2791,8 @@ impl<'a> Parser<'a> {
continue
} else if op == AssocOp::Colon {
let rhs = try!(self.parse_ty());
lhs = self.mk_expr(lhs.span.lo, rhs.span.hi, ExprType(lhs, rhs));
lhs = self.mk_expr(lhs.span.lo, rhs.span.hi,
ExprType(lhs, rhs), None);
continue
} else if op == AssocOp::DotDot {
// If we didnt have to handle `x..`, it would be pretty easy to generalise