Created
June 16, 2011 18:49
-
-
Save eholk/1029944 to your computer and use it in GitHub Desktop.
Rust Issue 506
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/src/comp/middle/trans.rs b/src/comp/middle/trans.rs | |
index a83469e..9376f61 100644 | |
--- a/src/comp/middle/trans.rs | |
+++ b/src/comp/middle/trans.rs | |
@@ -6796,6 +6796,7 @@ fn arg_tys_of_fn(&@crate_ctxt ccx, ast::ann ann) -> vec[ty | |
fn ret_ty_of_fn_ty(&@crate_ctxt ccx, ty::t t) -> ty::t { | |
alt (ty::struct(ccx.tcx, t)) { | |
case (ty::ty_fn(_, _, ?ret_ty, _, _)) { ret ret_ty; } | |
+ case (ty::ty_native_fn(_, _, ?ret_ty)) { ret ret_ty; } | |
case (_) { | |
ccx.sess.bug("ret_ty_of_fn_ty() called on non-function type: " | |
+ ty_to_str(ccx.tcx, t)); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment