Skip to content

Commit 7353ef7

Browse files
committed
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.
1 parent 7719f53 commit 7353ef7

File tree

1 file changed

+1
-1
lines changed
  • src/librustc_typeck/check

1 file changed

+1
-1
lines changed

src/librustc_typeck/check/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -3639,7 +3639,7 @@ impl<'a, 'gcx, 'tcx> FnCtxt<'a, 'gcx, 'tcx> {
36393639
needs);
36403640

36413641
if !oprnd_t.references_error() {
3642-
oprnd_t = self.structurally_resolved_type(expr.span, oprnd_t);
3642+
oprnd_t = self.resolve_type_vars_with_obligations(&oprnd_t);
36433643
match unop {
36443644
hir::UnDeref => {
36453645
if let Some(mt) = oprnd_t.builtin_deref(true) {

0 commit comments

Comments
 (0)