rust/src/librustc_typeck
Esteban Küber 868fb030cc 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`
```
2016-12-14 17:33:03 -08:00
..
check When cast needs a dereference point at full cast 2016-12-14 17:33:03 -08:00
coherence Auto merge of #38053 - eddyb:lazy-9, r=nikomatsakis 2016-12-02 15:06:36 +00:00
variance Refactor ty::FnSig to privatize all fields 2016-12-05 22:22:49 -07:00
astconv.rs Auto merge of #38036 - Mark-Simulacrum:polish-2, r=nagisa,eddyb 2016-12-06 17:38:26 +00:00
Cargo.toml move the impl-params-constrained check out of collect 2016-11-16 13:57:46 -05:00
check_unused.rs rustc: desugar use a::{b,c}; into use a::b; use a::c; in HIR. 2016-11-28 04:18:10 +02:00
collect.rs Refactor FnSig to contain a Slice for its inputs and outputs. 2016-12-05 22:33:38 -07:00
constrained_type_params.rs move the impl-params-constrained check out of collect 2016-11-16 13:57:46 -05:00
diagnostics.rs Change error to E0572 2016-12-08 21:03:46 -08:00
impl_wf_check.rs hash the contents of impl-item-ref by adding them to visitor 2016-11-17 13:44:22 -05:00
lib.rs Refactor FnSig to contain a Slice for its inputs and outputs. 2016-12-05 22:33:38 -07:00
rscope.rs fix feature error, test fallout 2016-09-08 22:59:21 +02:00