about summary refs log tree commit diff
path: root/tests/ui/structs
diff options
context:
space:
mode:
authorEsteban Küber <esteban@kuber.com.ar>2024-07-03 23:23:38 +0000
committerEsteban Küber <esteban@kuber.com.ar>2024-07-04 05:19:35 +0000
commit2699d8108cee47a86de22d8ac29344bcadfdbd45 (patch)
treefc32d4a141e7fb946bbe157a105af3607feceed9 /tests/ui/structs
parenta06a18a47fc36b6c2c7c317c7611fe0a2960765b (diff)
downloadrust-2699d8108cee47a86de22d8ac29344bcadfdbd45.tar.gz
rust-2699d8108cee47a86de22d8ac29344bcadfdbd45.zip
Use shorter span for float literal suggestion
Diffstat (limited to 'tests/ui/structs')
-rw-r--r--tests/ui/structs/structure-constructor-type-mismatch.stderr80
1 files changed, 48 insertions, 32 deletions
diff --git a/tests/ui/structs/structure-constructor-type-mismatch.stderr b/tests/ui/structs/structure-constructor-type-mismatch.stderr
index 63dda459396..cb957487347 100644
--- a/tests/ui/structs/structure-constructor-type-mismatch.stderr
+++ b/tests/ui/structs/structure-constructor-type-mismatch.stderr
@@ -2,55 +2,67 @@ error[E0308]: mismatched types
   --> $DIR/structure-constructor-type-mismatch.rs:17:12
    |
 LL |         x: 1,
-   |            ^
-   |            |
-   |            expected `f32`, found integer
-   |            help: use a float literal: `1.0`
+   |            ^ expected `f32`, found integer
+   |
+help: use a float literal
+   |
+LL |         x: 1.0,
+   |             ++
 
 error[E0308]: mismatched types
   --> $DIR/structure-constructor-type-mismatch.rs:20:12
    |
 LL |         y: 2,
-   |            ^
-   |            |
-   |            expected `f32`, found integer
-   |            help: use a float literal: `2.0`
+   |            ^ expected `f32`, found integer
+   |
+help: use a float literal
+   |
+LL |         y: 2.0,
+   |             ++
 
 error[E0308]: mismatched types
   --> $DIR/structure-constructor-type-mismatch.rs:26:12
    |
 LL |         x: 3,
-   |            ^
-   |            |
-   |            expected `f32`, found integer
-   |            help: use a float literal: `3.0`
+   |            ^ expected `f32`, found integer
+   |
+help: use a float literal
+   |
+LL |         x: 3.0,
+   |             ++
 
 error[E0308]: mismatched types
   --> $DIR/structure-constructor-type-mismatch.rs:29:12
    |
 LL |         y: 4,
-   |            ^
-   |            |
-   |            expected `f32`, found integer
-   |            help: use a float literal: `4.0`
+   |            ^ expected `f32`, found integer
+   |
+help: use a float literal
+   |
+LL |         y: 4.0,
+   |             ++
 
 error[E0308]: mismatched types
   --> $DIR/structure-constructor-type-mismatch.rs:35:12
    |
 LL |         x: 5,
-   |            ^
-   |            |
-   |            expected `f32`, found integer
-   |            help: use a float literal: `5.0`
+   |            ^ expected `f32`, found integer
+   |
+help: use a float literal
+   |
+LL |         x: 5.0,
+   |             ++
 
 error[E0308]: mismatched types
   --> $DIR/structure-constructor-type-mismatch.rs:42:12
    |
 LL |         x: 7,
-   |            ^
-   |            |
-   |            expected `f32`, found integer
-   |            help: use a float literal: `7.0`
+   |            ^ expected `f32`, found integer
+   |
+help: use a float literal
+   |
+LL |         x: 7.0,
+   |             ++
 
 error[E0107]: type alias takes 0 generic arguments but 1 generic argument was supplied
   --> $DIR/structure-constructor-type-mismatch.rs:48:15
@@ -70,19 +82,23 @@ error[E0308]: mismatched types
   --> $DIR/structure-constructor-type-mismatch.rs:49:12
    |
 LL |         x: 9,
-   |            ^
-   |            |
-   |            expected `f32`, found integer
-   |            help: use a float literal: `9.0`
+   |            ^ expected `f32`, found integer
+   |
+help: use a float literal
+   |
+LL |         x: 9.0,
+   |             ++
 
 error[E0308]: mismatched types
   --> $DIR/structure-constructor-type-mismatch.rs:50:12
    |
 LL |         y: 10,
-   |            ^^
-   |            |
-   |            expected `f32`, found integer
-   |            help: use a float literal: `10.0`
+   |            ^^ expected `f32`, found integer
+   |
+help: use a float literal
+   |
+LL |         y: 10.0,
+   |              ++
 
 error[E0107]: type alias takes 0 generic arguments but 1 generic argument was supplied
   --> $DIR/structure-constructor-type-mismatch.rs:54:9