Replace structurally_resolve_type in unary expr check.

`resolve_type_vars_with_obligations` is the same but doesn't error on unresolved type variables.
In theory this could make more code compile because we don't error or could ommit an otherwise useful error.
In practice I couldn't observe any effect.
This commit is contained in:
leonardo.yvens 2018-02-18 10:39:26 -03:00
parent 7719f53419
commit 7353ef744e

View file

@ -3639,7 +3639,7 @@ impl<'a, 'gcx, 'tcx> FnCtxt<'a, 'gcx, 'tcx> {
needs);
if !oprnd_t.references_error() {
oprnd_t = self.structurally_resolved_type(expr.span, oprnd_t);
oprnd_t = self.resolve_type_vars_with_obligations(&oprnd_t);
match unop {
hir::UnDeref => {
if let Some(mt) = oprnd_t.builtin_deref(true) {