Account for type obligation coming from const and static

This commit is contained in:
Esteban Kuber 2021-11-21 01:49:51 +00:00
parent 37a11a96a1
commit 9cce7bb921
2 changed files with 51 additions and 26 deletions

View file

@ -1,10 +1,11 @@
error[E0308]: mismatched types
--> $DIR/static-mut-bad-types.rs:5:13
|
LL | static mut a: isize = 3;
| ----- expected due to this type
...
LL | a = true;
| - ^^^^ expected `isize`, found `bool`
| |
| expected due to the type of this binding
| ^^^^ expected `isize`, found `bool`
error: aborting due to previous error