diff options
| author | Esteban Küber <esteban@kuber.com.ar> | 2023-01-02 18:00:33 -0800 |
|---|---|---|
| committer | Esteban Küber <esteban@kuber.com.ar> | 2023-01-30 20:12:19 +0000 |
| commit | 62ba3e70a1f01d801d068b84a097e38bd82a8c6e (patch) | |
| tree | e7834f2924d6a0aa0ef7eddb6bb9b2db50b2be1d /tests/ui/dst | |
| parent | 006ca9b14da1e0145844598b3d6a554c042c702a (diff) | |
| download | rust-62ba3e70a1f01d801d068b84a097e38bd82a8c6e.tar.gz rust-62ba3e70a1f01d801d068b84a097e38bd82a8c6e.zip | |
Modify primary span label for E0308
The previous output was unintuitive to users.
Diffstat (limited to 'tests/ui/dst')
| -rw-r--r-- | tests/ui/dst/dst-bad-assign-3.rs | 2 | ||||
| -rw-r--r-- | tests/ui/dst/dst-bad-assign-3.stderr | 2 | ||||
| -rw-r--r-- | tests/ui/dst/dst-bad-assign.rs | 2 | ||||
| -rw-r--r-- | tests/ui/dst/dst-bad-assign.stderr | 2 | ||||
| -rw-r--r-- | tests/ui/dst/dst-bad-coerce1.stderr | 4 | ||||
| -rw-r--r-- | tests/ui/dst/dst-bad-coerce4.rs | 4 | ||||
| -rw-r--r-- | tests/ui/dst/dst-bad-coerce4.stderr | 4 |
7 files changed, 10 insertions, 10 deletions
diff --git a/tests/ui/dst/dst-bad-assign-3.rs b/tests/ui/dst/dst-bad-assign-3.rs index d05b3937c99..d199864d99c 100644 --- a/tests/ui/dst/dst-bad-assign-3.rs +++ b/tests/ui/dst/dst-bad-assign-3.rs @@ -32,7 +32,7 @@ pub fn main() { let z: Box<dyn ToBar> = Box::new(Bar1 {f: 36}); f5.2 = Bar1 {f: 36}; //~^ ERROR mismatched types - //~| expected trait object `dyn ToBar`, found struct `Bar1` + //~| expected `dyn ToBar`, found `Bar1` //~| expected trait object `dyn ToBar` //~| found struct `Bar1` //~| ERROR the size for values of type diff --git a/tests/ui/dst/dst-bad-assign-3.stderr b/tests/ui/dst/dst-bad-assign-3.stderr index b326dbbbc14..6dd3434fd21 100644 --- a/tests/ui/dst/dst-bad-assign-3.stderr +++ b/tests/ui/dst/dst-bad-assign-3.stderr @@ -2,7 +2,7 @@ error[E0308]: mismatched types --> $DIR/dst-bad-assign-3.rs:33:12 | LL | f5.2 = Bar1 {f: 36}; - | ---- ^^^^^^^^^^^^ expected trait object `dyn ToBar`, found struct `Bar1` + | ---- ^^^^^^^^^^^^ expected `dyn ToBar`, found `Bar1` | | | expected due to the type of this binding | diff --git a/tests/ui/dst/dst-bad-assign.rs b/tests/ui/dst/dst-bad-assign.rs index 496e01ae005..c55fb2c3e57 100644 --- a/tests/ui/dst/dst-bad-assign.rs +++ b/tests/ui/dst/dst-bad-assign.rs @@ -34,7 +34,7 @@ pub fn main() { let z: Box<dyn ToBar> = Box::new(Bar1 {f: 36}); f5.ptr = Bar1 {f: 36}; //~^ ERROR mismatched types - //~| expected trait object `dyn ToBar`, found struct `Bar1` + //~| expected `dyn ToBar`, found `Bar1` //~| expected trait object `dyn ToBar` //~| found struct `Bar1` //~| ERROR the size for values of type diff --git a/tests/ui/dst/dst-bad-assign.stderr b/tests/ui/dst/dst-bad-assign.stderr index 614f2138751..d8d1057876f 100644 --- a/tests/ui/dst/dst-bad-assign.stderr +++ b/tests/ui/dst/dst-bad-assign.stderr @@ -2,7 +2,7 @@ error[E0308]: mismatched types --> $DIR/dst-bad-assign.rs:35:14 | LL | f5.ptr = Bar1 {f: 36}; - | ------ ^^^^^^^^^^^^ expected trait object `dyn ToBar`, found struct `Bar1` + | ------ ^^^^^^^^^^^^ expected `dyn ToBar`, found `Bar1` | | | expected due to the type of this binding | diff --git a/tests/ui/dst/dst-bad-coerce1.stderr b/tests/ui/dst/dst-bad-coerce1.stderr index 594acff853a..ff77bd4cef8 100644 --- a/tests/ui/dst/dst-bad-coerce1.stderr +++ b/tests/ui/dst/dst-bad-coerce1.stderr @@ -2,7 +2,7 @@ error[E0308]: mismatched types --> $DIR/dst-bad-coerce1.rs:16:29 | LL | let f3: &Fat<[usize]> = f2; - | ------------- ^^ expected slice `[usize]`, found array `[isize; 3]` + | ------------- ^^ expected `&Fat<[usize]>`, found `&Fat<[isize; 3]>` | | | expected due to this | @@ -21,7 +21,7 @@ error[E0308]: mismatched types --> $DIR/dst-bad-coerce1.rs:28:27 | LL | let f3: &([usize],) = f2; - | ----------- ^^ expected slice `[usize]`, found array `[isize; 3]` + | ----------- ^^ expected `&([usize],)`, found `&([isize; 3],)` | | | expected due to this | diff --git a/tests/ui/dst/dst-bad-coerce4.rs b/tests/ui/dst/dst-bad-coerce4.rs index f63da60d281..9f297915e58 100644 --- a/tests/ui/dst/dst-bad-coerce4.rs +++ b/tests/ui/dst/dst-bad-coerce4.rs @@ -11,7 +11,7 @@ pub fn main() { let f1: &Fat<[isize]> = &Fat { ptr: [1, 2, 3] }; let f2: &Fat<[isize; 3]> = f1; //~^ ERROR mismatched types - //~| expected array `[isize; 3]`, found slice `[isize]` + //~| expected `&Fat<[isize; 3]>`, found `&Fat<[isize]>` //~| expected reference `&Fat<[isize; 3]>` //~| found reference `&Fat<[isize]>` @@ -19,7 +19,7 @@ pub fn main() { let f1: &([isize],) = &([1, 2, 3],); let f2: &([isize; 3],) = f1; //~^ ERROR mismatched types - //~| expected array `[isize; 3]`, found slice `[isize]` + //~| expected `&([isize; 3],)`, found `&([isize],)` //~| expected reference `&([isize; 3],)` //~| found reference `&([isize],)` } diff --git a/tests/ui/dst/dst-bad-coerce4.stderr b/tests/ui/dst/dst-bad-coerce4.stderr index 4c9954f3520..46e7dba817c 100644 --- a/tests/ui/dst/dst-bad-coerce4.stderr +++ b/tests/ui/dst/dst-bad-coerce4.stderr @@ -2,7 +2,7 @@ error[E0308]: mismatched types --> $DIR/dst-bad-coerce4.rs:12:32 | LL | let f2: &Fat<[isize; 3]> = f1; - | ---------------- ^^ expected array `[isize; 3]`, found slice `[isize]` + | ---------------- ^^ expected `&Fat<[isize; 3]>`, found `&Fat<[isize]>` | | | expected due to this | @@ -13,7 +13,7 @@ error[E0308]: mismatched types --> $DIR/dst-bad-coerce4.rs:20:30 | LL | let f2: &([isize; 3],) = f1; - | -------------- ^^ expected array `[isize; 3]`, found slice `[isize]` + | -------------- ^^ expected `&([isize; 3],)`, found `&([isize],)` | | | expected due to this | |
