Skip to content

Commit c2402dc

Browse files
committed
Replace "native pointer" in error message with "raw pointer"
1 parent d99a320 commit c2402dc

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

src/librustc_typeck/check/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3387,7 +3387,7 @@ impl<'a, 'gcx, 'tcx> FnCtxt<'a, 'gcx, 'tcx> {
33873387
}
33883388
ty::RawPtr(..) => {
33893389
let base = self.tcx.hir().node_to_pretty_string(base.id);
3390-
let msg = format!("`{}` is a native pointer; try dereferencing it", base);
3390+
let msg = format!("`{}` is a raw pointer; try dereferencing it", base);
33913391
let suggestion = format!("(*{}).{}", base, field);
33923392
err.span_suggestion_with_applicability(
33933393
field.span,

src/test/ui/issues/issue-11004.stderr

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@ error[E0609]: no field `x` on type `*mut A`
22
--> $DIR/issue-11004.rs:17:21
33
|
44
LL | let x : i32 = n.x; //~ no field `x` on type `*mut A`
5-
| ^ help: `n` is a native pointer; try dereferencing it: `(*n).x`
5+
| ^ help: `n` is a raw pointer; try dereferencing it: `(*n).x`
66

77
error[E0609]: no field `y` on type `*mut A`
88
--> $DIR/issue-11004.rs:18:21
99
|
1010
LL | let y : f64 = n.y; //~ no field `y` on type `*mut A`
11-
| ^ help: `n` is a native pointer; try dereferencing it: `(*n).y`
11+
| ^ help: `n` is a raw pointer; try dereferencing it: `(*n).y`
1212

1313
error: aborting due to 2 previous errors
1414

src/test/ui/unsafe/unsafe-fn-autoderef.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ error[E0609]: no field `f` on type `*const Rec`
22
--> $DIR/unsafe-fn-autoderef.rs:29:14
33
|
44
LL | return p.f; //~ ERROR no field `f` on type `*const Rec`
5-
| ^ help: `p` is a native pointer; try dereferencing it: `(*p).f`
5+
| ^ help: `p` is a raw pointer; try dereferencing it: `(*p).f`
66

77
error: aborting due to previous error
88

0 commit comments

Comments
 (0)