Merge pull request #512 from untitaker/curse-you-hirvec

Nightly fixes
This commit is contained in:
Manish Goregaokar 2015-12-22 10:00:41 +05:30
commit 5c090c3f48
2 changed files with 3 additions and 3 deletions

View File

@ -82,7 +82,7 @@ fn expr_eq_ident(expr: &Expr, id: Ident) -> bool {
match expr.node {
ExprPath(None, ref path) => {
let arg_segment = [PathSegment { identifier: id, parameters: PathParameters::none() }];
!path.global && path.segments == arg_segment
!path.global && path.segments[..] == arg_segment
}
_ => false,
}

View File

@ -435,9 +435,9 @@ impl OutType {
fn matches(&self, ty: &FunctionRetTy) -> bool {
match (self, ty) {
(&UnitType, &DefaultReturn(_)) => true,
(&UnitType, &Return(ref ty)) if ty.node == TyTup(vec![]) => true,
(&UnitType, &Return(ref ty)) if ty.node == TyTup(vec![].into()) => true,
(&BoolType, &Return(ref ty)) if is_bool(ty) => true,
(&AnyType, &Return(ref ty)) if ty.node != TyTup(vec![]) => true,
(&AnyType, &Return(ref ty)) if ty.node != TyTup(vec![].into()) => true,
(&RefType, &Return(ref ty)) => {
if let TyRptr(_, _) = ty.node { true } else { false }
}