File tree Expand file tree Collapse file tree 2 files changed +11
-2
lines changed
trunk/src/librustc/middle/typeck/infer Expand file tree Collapse file tree 2 files changed +11
-2
lines changed Original file line number Diff line number Diff line change 1
1
---
2
- refs/heads/master: b43e639bf65cb0935fa75da81d1da282c0cdc8f2
2
+ refs/heads/master: 2d1ce01a8a8ef491d0490b5627c9b21076c03c10
3
3
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
4
4
refs/heads/snap-stage3: 2f46b763da2c098913884f101b6d71d69af41b49
5
5
refs/heads/try: 3d5418789064fdb463e872a4e651af1c628a3650
Original file line number Diff line number Diff line change @@ -737,10 +737,19 @@ impl infer_ctxt {
737
737
fn type_error_message ( sp : span , mk_msg : fn ( ~str ) -> ~str ,
738
738
actual_ty : ty:: t , err : Option < & ty:: type_err > ) {
739
739
let actual_ty = self . resolve_type_vars_if_possible ( actual_ty) ;
740
+ let mut actual_sty = ty:: get ( copy actual_ty) ;
740
741
741
742
// Don't report an error if actual type is ty_err.
742
- match ty :: get ( actual_ty ) . sty {
743
+ match actual_sty . sty {
743
744
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
+ } ,
744
753
_ => ( )
745
754
}
746
755
let error_str = err. map_default ( ~"", |t_err|
You can’t perform that action at this time.
0 commit comments