Skip to content

Commit ba836f4

Browse files
committed
update FIXME(rust-lang#15760) to point to issue 27336 (tracking issue for Default Type Parameter Fallback)
1 parent 7278e37 commit ba836f4

File tree

1 file changed

+3
-8
lines changed
  • src/librustc_typeck/check

1 file changed

+3
-8
lines changed

src/librustc_typeck/check/mod.rs

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2869,27 +2869,22 @@ impl<'a, 'gcx, 'tcx> FnCtxt<'a, 'gcx, 'tcx> {
28692869
let origin = self.misc(call_span);
28702870
let ures = self.at(&origin, self.param_env).sup(ret_ty, formal_ret);
28712871

2872-
// FIXME(#15760) can't use try! here, FromError doesn't default
2872+
// FIXME(#27336) can't use ? here, Try::from_error doesn't default
28732873
// to identity so the resulting type is not constrained.
28742874
match ures {
28752875
Ok(ok) => {
28762876
// Process any obligations locally as much as
28772877
// we can. We don't care if some things turn
28782878
// out unconstrained or ambiguous, as we're
28792879
// just trying to get hints here.
2880-
let result = self.save_and_restore_in_snapshot_flag(|_| {
2880+
self.save_and_restore_in_snapshot_flag(|_| {
28812881
let mut fulfill = FulfillmentContext::new();
28822882
let ok = ok; // FIXME(#30046)
28832883
for obligation in ok.obligations {
28842884
fulfill.register_predicate_obligation(self, obligation);
28852885
}
28862886
fulfill.select_where_possible(self)
2887-
});
2888-
2889-
match result {
2890-
Ok(()) => { }
2891-
Err(_) => return Err(()),
2892-
}
2887+
}).map_err(|_| ())?;
28932888
}
28942889
Err(_) => return Err(()),
28952890
}

0 commit comments

Comments
 (0)