diff --git a/src/librustc_typeck/check/method/probe.rs b/src/librustc_typeck/check/method/probe.rs index e8c3966f23f0..9f3e44f56dae 100644 --- a/src/librustc_typeck/check/method/probe.rs +++ b/src/librustc_typeck/check/method/probe.rs @@ -337,7 +337,7 @@ impl<'a, 'gcx, 'tcx> FnCtxt<'a, 'gcx, 'tcx> { lint::builtin::TYVAR_BEHIND_RAW_POINTER, scope_expr_id, span, - &format!("the type of this value must be known in this context")); + &format!("type annotations needed")); } } else { let t = self.structurally_resolved_type(span, final_ty); diff --git a/src/test/ui/inference-variable-behind-raw-pointer.stderr b/src/test/ui/inference-variable-behind-raw-pointer.stderr index d0ee55c092b2..bb1d921f1c61 100644 --- a/src/test/ui/inference-variable-behind-raw-pointer.stderr +++ b/src/test/ui/inference-variable-behind-raw-pointer.stderr @@ -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 | 18 | if data.is_null() {}