about summary refs log tree commit diff
diff options
context:
space:
mode:
authorvarkor <github@varkor.com>2018-12-18 22:58:49 +0000
committervarkor <github@varkor.com>2018-12-18 22:58:49 +0000
commitc2402dca85716aa4b452352bec11ff949c5a1cbb (patch)
tree9ebb2bfd0c9f4286f1417e5e8453f0cba3c094b8
parentd99a320cba42f661aebfa1293b7b2ec3603dda75 (diff)
downloadrust-c2402dca85716aa4b452352bec11ff949c5a1cbb.tar.gz
rust-c2402dca85716aa4b452352bec11ff949c5a1cbb.zip
Replace "native pointer" in error message with "raw pointer"
-rw-r--r--src/librustc_typeck/check/mod.rs2
-rw-r--r--src/test/ui/issues/issue-11004.stderr4
-rw-r--r--src/test/ui/unsafe/unsafe-fn-autoderef.stderr2
3 files changed, 4 insertions, 4 deletions
diff --git a/src/librustc_typeck/check/mod.rs b/src/librustc_typeck/check/mod.rs
index 957c8d9f19f..cb14078fb93 100644
--- a/src/librustc_typeck/check/mod.rs
+++ b/src/librustc_typeck/check/mod.rs
@@ -3387,7 +3387,7 @@ impl<'a, 'gcx, 'tcx> FnCtxt<'a, 'gcx, 'tcx> {
                     }
                     ty::RawPtr(..) => {
                         let base = self.tcx.hir().node_to_pretty_string(base.id);
-                        let msg = format!("`{}` is a native pointer; try dereferencing it", base);
+                        let msg = format!("`{}` is a raw pointer; try dereferencing it", base);
                         let suggestion = format!("(*{}).{}", base, field);
                         err.span_suggestion_with_applicability(
                             field.span,
diff --git a/src/test/ui/issues/issue-11004.stderr b/src/test/ui/issues/issue-11004.stderr
index 215120c9c25..46b4c4bdba2 100644
--- a/src/test/ui/issues/issue-11004.stderr
+++ b/src/test/ui/issues/issue-11004.stderr
@@ -2,13 +2,13 @@ error[E0609]: no field `x` on type `*mut A`
   --> $DIR/issue-11004.rs:17:21
    |
 LL |     let x : i32 = n.x; //~ no field `x` on type `*mut A`
-   |                     ^ help: `n` is a native pointer; try dereferencing it: `(*n).x`
+   |                     ^ help: `n` is a raw pointer; try dereferencing it: `(*n).x`
 
 error[E0609]: no field `y` on type `*mut A`
   --> $DIR/issue-11004.rs:18:21
    |
 LL |     let y : f64 = n.y; //~ no field `y` on type `*mut A`
-   |                     ^ help: `n` is a native pointer; try dereferencing it: `(*n).y`
+   |                     ^ help: `n` is a raw pointer; try dereferencing it: `(*n).y`
 
 error: aborting due to 2 previous errors
 
diff --git a/src/test/ui/unsafe/unsafe-fn-autoderef.stderr b/src/test/ui/unsafe/unsafe-fn-autoderef.stderr
index 13fcbb347c9..81f15b2931d 100644
--- a/src/test/ui/unsafe/unsafe-fn-autoderef.stderr
+++ b/src/test/ui/unsafe/unsafe-fn-autoderef.stderr
@@ -2,7 +2,7 @@ error[E0609]: no field `f` on type `*const Rec`
   --> $DIR/unsafe-fn-autoderef.rs:29:14
    |
 LL |     return p.f; //~ ERROR no field `f` on type `*const Rec`
-   |              ^ help: `p` is a native pointer; try dereferencing it: `(*p).f`
+   |              ^ help: `p` is a raw pointer; try dereferencing it: `(*p).f`
 
 error: aborting due to previous error