]> git.lizzy.rs Git - rust.git/commit
Rollup merge of #38245 - estebank:cast-deref-hint-2, r=nikomatsakis
authorAlex Crichton <alex@alexcrichton.com>
Tue, 20 Dec 2016 19:16:29 +0000 (11:16 -0800)
committerGitHub <noreply@github.com>
Tue, 20 Dec 2016 19:16:29 +0000 (11:16 -0800)
commit2f4ca4e2dfed77cd3b4785a616be3d12112fc41e
tree6cb7f14532db22e60b71a5df9bd0d5e6d21058d4
parent4cfb2b48fef7ea0ccc8ad7e236f9486f22831b14
parent868fb030cc565bc3c0204433eebf90808b21e41f
Rollup merge of #38245 - estebank:cast-deref-hint-2, r=nikomatsakis

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, as well as assign the error label to the correct span for proper coloring:

<img width="471" alt="error span pointing at the entire cast" src="https://cloud.githubusercontent.com/assets/1606434/21024245/8797fc2e-bd38-11e6-82c1-66c281c656c1.png">

instead of

<img width="471" alt="error span pointing at the type of the cast" src="https://cloud.githubusercontent.com/assets/1606434/21023777/d4814aa6-bd36-11e6-9fc3-b2a0ea5ee15d.png">

Move `compile-fail` test to `ui` test.