about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorDylan DPC <99973273+Dylan-DPC@users.noreply.github.com>2022-08-30 16:56:06 +0530
committerGitHub <noreply@github.com>2022-08-30 16:56:06 +0530
commit548ed409af7fc161859ffd864cedacd7af8748d6 (patch)
tree84b6329ba2fab1fee108715835396d8e8bb3942f /src
parent0631ea5d73f4a3199c776687b12c20c50a91f0d2 (diff)
parent5021dcd7998ff721a247369bca601bd001a1a3e0 (diff)
downloadrust-548ed409af7fc161859ffd864cedacd7af8748d6.tar.gz
rust-548ed409af7fc161859ffd864cedacd7af8748d6.zip
Rollup merge of #99517 - Nilstrieb:display-raw-ptr, r=compiler-errors
Display raw pointer as *{mut,const} T instead of *-ptr in errors

The `*-ptr` is rather confusing, and we have the full information for properly displaying the information.
Diffstat (limited to 'src')
-rw-r--r--src/test/ui/asm/type-check-1.stderr4
-rw-r--r--src/test/ui/dst/dst-bad-coercions.stderr8
-rw-r--r--src/test/ui/mismatched_types/issue-19109.stderr2
3 files changed, 7 insertions, 7 deletions
diff --git a/src/test/ui/asm/type-check-1.stderr b/src/test/ui/asm/type-check-1.stderr
index 162ff1d32bc..1845139659d 100644
--- a/src/test/ui/asm/type-check-1.stderr
+++ b/src/test/ui/asm/type-check-1.stderr
@@ -106,7 +106,7 @@ error[E0308]: mismatched types
   --> $DIR/type-check-1.rs:60:26
    |
 LL |         asm!("{}", const 0 as *mut u8);
-   |                          ^^^^^^^^^^^^ expected integer, found *-ptr
+   |                          ^^^^^^^^^^^^ expected integer, found `*mut u8`
    |
    = note:     expected type `{integer}`
            found raw pointer `*mut u8`
@@ -133,7 +133,7 @@ error[E0308]: mismatched types
   --> $DIR/type-check-1.rs:78:25
    |
 LL | global_asm!("{}", const 0 as *mut u8);
-   |                         ^^^^^^^^^^^^ expected integer, found *-ptr
+   |                         ^^^^^^^^^^^^ expected integer, found `*mut u8`
    |
    = note:     expected type `{integer}`
            found raw pointer `*mut u8`
diff --git a/src/test/ui/dst/dst-bad-coercions.stderr b/src/test/ui/dst/dst-bad-coercions.stderr
index 01f862ed516..0d6f4d0209f 100644
--- a/src/test/ui/dst/dst-bad-coercions.stderr
+++ b/src/test/ui/dst/dst-bad-coercions.stderr
@@ -2,7 +2,7 @@ error[E0308]: mismatched types
   --> $DIR/dst-bad-coercions.rs:14:17
    |
 LL |     let y: &S = x;
-   |            --   ^ expected `&S`, found *-ptr
+   |            --   ^ expected `&S`, found `*const S`
    |            |
    |            expected due to this
    |
@@ -13,7 +13,7 @@ error[E0308]: mismatched types
   --> $DIR/dst-bad-coercions.rs:15:21
    |
 LL |     let y: &dyn T = x;
-   |            ------   ^ expected `&dyn T`, found *-ptr
+   |            ------   ^ expected `&dyn T`, found `*const S`
    |            |
    |            expected due to this
    |
@@ -24,7 +24,7 @@ error[E0308]: mismatched types
   --> $DIR/dst-bad-coercions.rs:19:17
    |
 LL |     let y: &S = x;
-   |            --   ^ expected `&S`, found *-ptr
+   |            --   ^ expected `&S`, found `*mut S`
    |            |
    |            expected due to this
    |
@@ -35,7 +35,7 @@ error[E0308]: mismatched types
   --> $DIR/dst-bad-coercions.rs:20:21
    |
 LL |     let y: &dyn T = x;
-   |            ------   ^ expected `&dyn T`, found *-ptr
+   |            ------   ^ expected `&dyn T`, found `*mut S`
    |            |
    |            expected due to this
    |
diff --git a/src/test/ui/mismatched_types/issue-19109.stderr b/src/test/ui/mismatched_types/issue-19109.stderr
index c25e2687b75..5cef64bb169 100644
--- a/src/test/ui/mismatched_types/issue-19109.stderr
+++ b/src/test/ui/mismatched_types/issue-19109.stderr
@@ -4,7 +4,7 @@ error[E0308]: mismatched types
 LL | fn function(t: &mut dyn Trait) {
    |                                - help: try adding a return type: `-> *mut dyn Trait`
 LL |     t as *mut dyn Trait
-   |     ^^^^^^^^^^^^^^^^^^^ expected `()`, found *-ptr
+   |     ^^^^^^^^^^^^^^^^^^^ expected `()`, found `*mut dyn Trait`
    |
    = note: expected unit type `()`
             found raw pointer `*mut dyn Trait`