about summary refs log tree commit diff
path: root/tests/ui/str
diff options
context:
space:
mode:
authorEsteban Küber <esteban@kuber.com.ar>2023-01-02 18:00:33 -0800
committerEsteban Küber <esteban@kuber.com.ar>2023-01-30 20:12:19 +0000
commit62ba3e70a1f01d801d068b84a097e38bd82a8c6e (patch)
treee7834f2924d6a0aa0ef7eddb6bb9b2db50b2be1d /tests/ui/str
parent006ca9b14da1e0145844598b3d6a554c042c702a (diff)
downloadrust-62ba3e70a1f01d801d068b84a097e38bd82a8c6e.tar.gz
rust-62ba3e70a1f01d801d068b84a097e38bd82a8c6e.zip
Modify primary span label for E0308
The previous output was unintuitive to users.
Diffstat (limited to 'tests/ui/str')
-rw-r--r--tests/ui/str/str-lit-type-mismatch.stderr6
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/ui/str/str-lit-type-mismatch.stderr b/tests/ui/str/str-lit-type-mismatch.stderr
index 6b56cd6f3fc..5ae7df5a2ec 100644
--- a/tests/ui/str/str-lit-type-mismatch.stderr
+++ b/tests/ui/str/str-lit-type-mismatch.stderr
@@ -2,7 +2,7 @@ error[E0308]: mismatched types
   --> $DIR/str-lit-type-mismatch.rs:2:20
    |
 LL |     let x: &[u8] = "foo";
-   |            -----   ^^^^^ expected slice `[u8]`, found `str`
+   |            -----   ^^^^^ expected `&[u8]`, found `&str`
    |            |
    |            expected due to this
    |
@@ -17,7 +17,7 @@ error[E0308]: mismatched types
   --> $DIR/str-lit-type-mismatch.rs:3:23
    |
 LL |     let y: &[u8; 4] = "baaa";
-   |            --------   ^^^^^^ expected array `[u8; 4]`, found `str`
+   |            --------   ^^^^^^ expected `&[u8; 4]`, found `&str`
    |            |
    |            expected due to this
    |
@@ -32,7 +32,7 @@ error[E0308]: mismatched types
   --> $DIR/str-lit-type-mismatch.rs:4:19
    |
 LL |     let z: &str = b"foo";
-   |            ----   ^^^^^^ expected `str`, found array `[u8; 3]`
+   |            ----   ^^^^^^ expected `&str`, found `&[u8; 3]`
    |            |
    |            expected due to this
    |