fix tyvar_behind_raw_pointer error code

This commit is contained in:
csmoe 2018-02-18 11:07:52 +08:00
parent 2cf683edc0
commit 4370a5877c
2 changed files with 2 additions and 2 deletions

View File

@ -337,7 +337,7 @@ impl<'a, 'gcx, 'tcx> FnCtxt<'a, 'gcx, 'tcx> {
lint::builtin::TYVAR_BEHIND_RAW_POINTER, lint::builtin::TYVAR_BEHIND_RAW_POINTER,
scope_expr_id, scope_expr_id,
span, span,
&format!("the type of this value must be known in this context")); &format!("type annotations needed"));
} }
} else { } else {
let t = self.structurally_resolved_type(span, final_ty); let t = self.structurally_resolved_type(span, final_ty);

View File

@ -1,4 +1,4 @@
warning: the type of this value must be known in this context warning: type annotations needed
--> $DIR/inference-variable-behind-raw-pointer.rs:18:13 --> $DIR/inference-variable-behind-raw-pointer.rs:18:13
| |
18 | if data.is_null() {} 18 | if data.is_null() {}