Skip to content

Commit f4951fd

Browse files
committed
---
yaml --- r: 38338 b: refs/heads/try c: 2d1ce01 h: refs/heads/master v: v3
1 parent 46c2b36 commit f4951fd

File tree

2 files changed

+11
-2
lines changed

2 files changed

+11
-2
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
refs/heads/master: 09bb07bed9166105ea961a42b5fff7739ae0d2e9
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: eb8fd119c65c67f3b1b8268cc7341c22d39b7b61
5-
refs/heads/try: b43e639bf65cb0935fa75da81d1da282c0cdc8f2
5+
refs/heads/try: 2d1ce01a8a8ef491d0490b5627c9b21076c03c10
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
88
refs/heads/try2: a810c03263670238bccd64cabb12a23a46e3a278

branches/try/src/librustc/middle/typeck/infer/mod.rs

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -737,10 +737,19 @@ impl infer_ctxt {
737737
fn type_error_message(sp: span, mk_msg: fn(~str) -> ~str,
738738
actual_ty: ty::t, err: Option<&ty::type_err>) {
739739
let actual_ty = self.resolve_type_vars_if_possible(actual_ty);
740+
let mut actual_sty = ty::get(copy actual_ty);
740741

741742
// Don't report an error if actual type is ty_err.
742-
match ty::get(actual_ty).sty {
743+
match actual_sty.sty {
743744
ty::ty_err => return,
745+
// Should really not report an error if the type
746+
// has ty_err anywhere as a component, but that's
747+
// annoying since we haven't written a visitor for
748+
// ty::t yet
749+
ty::ty_fn(ref fty) => match ty::get(fty.sig.output).sty {
750+
ty::ty_err => return,
751+
_ => ()
752+
},
744753
_ => ()
745754
}
746755
let error_str = err.map_default(~"", |t_err|

0 commit comments

Comments
 (0)