File tree Expand file tree Collapse file tree 2 files changed +2
-2
lines changed
branches/release-prep/src/librustc/middle/typeck/check Expand file tree Collapse file tree 2 files changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -29,4 +29,4 @@ refs/tags/0.9: 36870b185fc5f5486636d4515f0e22677493f225
29
29
refs/tags/0.10: ac33f2b15782272ae348dbd7b14b8257b2148b5a
30
30
refs/heads/libuv-update-temp-branch: 6ed22c618766f1f2a2e108eef8ce3f51be0f70b7
31
31
refs/tags/0.11.0: e1247cb1d0d681be034adb4b558b5a0c0d5720f9
32
- refs/heads/release-prep: 293b57701b7bcdd88e44ce8f671511ba35cac13e
32
+ refs/heads/release-prep: 7c9db32f828729a415f4c334cb69f485e3b84d3d
Original file line number Diff line number Diff line change @@ -1468,7 +1468,7 @@ fn check_cast(fcx: &FnCtxt,
1468
1468
// casts to scalars other than `char` and `bare fn` are trivial
1469
1469
let t_1_is_trivial = t_1_is_scalar && !t_1_is_char && !t_1_is_bare_fn;
1470
1470
if ty:: type_is_c_like_enum ( fcx. tcx ( ) , t_e) && t_1_is_trivial {
1471
- if t_1_is_float {
1471
+ if t_1_is_float || ty :: type_is_unsafe_ptr ( t_1 ) {
1472
1472
fcx. type_error_message ( span, |actual| {
1473
1473
format ! ( "illegal cast; cast through an \
1474
1474
integer first: `{}` as `{}`",
You can’t perform that action at this time.
0 commit comments