Skip to content

Commit

Permalink
Replace structurally_resolve_type in unary expr check.
Browse files Browse the repository at this point in the history
`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.
  • Loading branch information
leoyvens committed Mar 22, 2018
1 parent 7719f53 commit 7353ef7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/librustc_typeck/check/mod.rs
Expand Up @@ -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) {
Expand Down

0 comments on commit 7353ef7

Please sign in to comment.