fixup! Note numeric literals that can never fit in an expected type

This commit is contained in:
Ayaz Hafiz 2020-06-16 23:10:41 -07:00
parent d7277df3ac
commit 7a89a33823
No known key found for this signature in database
GPG key ID: B443F7A3030C9AED

View file

@ -40,11 +40,7 @@ error[E0308]: mismatched types
LL | let f = [0; -4_isize];
| ^^^^^^^^ expected `usize`, found `isize`
|
note: `-4_isize` cannot fit into type `usize`
--> $DIR/repeat_count.rs:19:17
|
LL | let f = [0; -4_isize];
| ^^^^^^^^
= note: `-4_isize` cannot fit into type `usize`
error[E0308]: mismatched types
--> $DIR/repeat_count.rs:22:23
@ -52,11 +48,7 @@ error[E0308]: mismatched types
LL | let f = [0_usize; -1_isize];
| ^^^^^^^^ expected `usize`, found `isize`
|
note: `-1_isize` cannot fit into type `usize`
--> $DIR/repeat_count.rs:22:23
|
LL | let f = [0_usize; -1_isize];
| ^^^^^^^^
= note: `-1_isize` cannot fit into type `usize`
error[E0308]: mismatched types
--> $DIR/repeat_count.rs:25:17