summary refs log tree commit diff
path: root/src/test/ui/numeric
diff options
context:
space:
mode:
authorBastian Kauschke <bastian_kauschke@hotmail.de>2020-05-20 15:59:57 +0200
committerBastian Kauschke <bastian_kauschke@hotmail.de>2020-05-20 16:08:09 +0200
commitecb593379c3ab075940a3fbf2e980ec5260b6ca4 (patch)
tree5d7c76477914aaa2a09b1243ac1caa8554204d8f /src/test/ui/numeric
parent72a2d35f165a94e17cd17e56cb61e3dcbef7eb2d (diff)
downloadrust-ecb593379c3ab075940a3fbf2e980ec5260b6ca4.tar.gz
rust-ecb593379c3ab075940a3fbf2e980ec5260b6ca4.zip
refactor check_for_cast
Diffstat (limited to 'src/test/ui/numeric')
-rw-r--r--src/test/ui/numeric/const-scope.stderr10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/test/ui/numeric/const-scope.stderr b/src/test/ui/numeric/const-scope.stderr
index 6e1990e3a72..d7f18e19b41 100644
--- a/src/test/ui/numeric/const-scope.stderr
+++ b/src/test/ui/numeric/const-scope.stderr
@@ -3,6 +3,11 @@ error[E0308]: mismatched types
    |
 LL | const C: i32 = 1i8;
    |                ^^^ expected `i32`, found `i8`
+   |
+help: change the type of the numeric literal from `i8` to `i32`
+   |
+LL | const C: i32 = 1i32;
+   |                ^^^^
 
 error[E0308]: mismatched types
   --> $DIR/const-scope.rs:2:15
@@ -17,6 +22,11 @@ LL |     let c: i32 = 1i8;
    |            ---   ^^^ expected `i32`, found `i8`
    |            |
    |            expected due to this
+   |
+help: change the type of the numeric literal from `i8` to `i32`
+   |
+LL |     let c: i32 = 1i32;
+   |                  ^^^^
 
 error[E0308]: mismatched types
   --> $DIR/const-scope.rs:6:17