diff options
| author | Esteban Küber <esteban@kuber.com.ar> | 2016-12-08 11:06:18 -0800 |
|---|---|---|
| committer | Esteban Küber <esteban@kuber.com.ar> | 2016-12-14 17:33:03 -0800 |
| commit | 868fb030cc565bc3c0204433eebf90808b21e41f (patch) | |
| tree | bf0c089ce7c35e3ca6466f595cb8ba5844d4b120 /src/test/incremental/thinlto | |
| parent | 6483bdd860fd89fc68846d4cc94c7ae3307a84c1 (diff) | |
| download | rust-868fb030cc565bc3c0204433eebf90808b21e41f.tar.gz rust-868fb030cc565bc3c0204433eebf90808b21e41f.zip | |
When cast needs a dereference point at full cast
After the fix of #37453 in PR #37369, instead of pointing at only the
cast type, point at the full cast span when a cast needs a dereference:
```
error: casting `&{float}` as `f32` is invalid
--> ../../../src/test/ui/mismatched_types/cast-rfc0401.rs:81:30
|
81 | vec![0.0].iter().map(|s| s as f32).collect::<Vec<f32>>();
| ^^^^^^^^ cannot cast `&{float}` as `f32`
|
help: did you mean `*s`?
--> ../../../src/test/ui/mismatched_types/cast-rfc0401.rs:81:30
|
81 | vec![0.0].iter().map(|s| s as f32).collect::<Vec<f32>>();
| ^
```
instead of
```
error: casting `&{float}` as `f32` is invalid
--> ../../../src/test/ui/mismatched_types/cast-rfc0401.rs:81:35
|
81 | vec![0.0].iter().map(|s| s as f32).collect::<Vec<f32>>();
| - ^^^
| |
| |
| did you mean `*s`?
| cannot cast `&{float}` as `f32`
```
Diffstat (limited to 'src/test/incremental/thinlto')
0 files changed, 0 insertions, 0 deletions
