commit
5c090c3f48
@ -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,
|
||||
}
|
||||
|
@ -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 }
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user