diff options
author | John Hodge <tpg@mutabah.net> | 2015-04-05 11:42:01 +0800 |
---|---|---|
committer | John Hodge <tpg@mutabah.net> | 2015-04-05 11:42:01 +0800 |
commit | 0a5017bee88d6bf4acaf78a784c2d978ee71a87e (patch) | |
tree | 7cf22013380ef05d34267872887fc4b8b64fafad /src/ast/ast.cpp | |
parent | 59cfce08eb46088f6fd1d4049cc8c7dbce355374 (diff) | |
download | mrust-0a5017bee88d6bf4acaf78a784c2d978ee71a87e.tar.gz |
Convert invocations of find_impl, to use the bool version
Diffstat (limited to 'src/ast/ast.cpp')
-rw-r--r-- | src/ast/ast.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/ast/ast.cpp b/src/ast/ast.cpp index 58c0a74b..9aa02fe1 100644 --- a/src/ast/ast.cpp +++ b/src/ast/ast.cpp @@ -284,10 +284,10 @@ bool Crate::check_impls_wildcard(const Path& trait, const TypeRef& type) return true;
}
else if( type.is_reference() ) {
- return find_impl(trait, type.sub_types()[0]).is_some();
+ return find_impl(trait, type.sub_types()[0], nullptr);
}
else if( type.is_pointer() ) {
- return find_impl(trait, type.sub_types()[0]).is_some();
+ return find_impl(trait, type.sub_types()[0], nullptr);
}
else if( type.is_type_param() ) {
// TODO: Include an annotation to the TypeParams structure relevant to this type
@@ -310,7 +310,7 @@ bool Crate::check_impls_wildcard(const Path& trait, const TypeRef& type) fld_ty.resolve_args( resolve_fn );
DEBUG("- Fld '" << fld.name << "' := " << fld.data << " => " << fld_ty);
// TODO: Defer failure until after all fields are processed
- if( !find_impl(trait, fld_ty).is_some() )
+ if( !find_impl(trait, fld_ty, nullptr) )
return false;
}
return true; }
@@ -325,7 +325,7 @@ bool Crate::check_impls_wildcard(const Path& trait, const TypeRef& type) real_ty.resolve_args( resolve_fn );
DEBUG("- Var '" << var.m_name << "' := " << ty << " => " << real_ty);
// TODO: Defer failure until after all fields are processed
- if( !find_impl(trait, real_ty).is_some() )
+ if( !find_impl(trait, real_ty, nullptr) )
return false;
}
}
|