diff options
| author | James Miller <james@aatch.net> | 2016-05-01 17:56:07 +1200 |
|---|---|---|
| committer | James Miller <james@aatch.net> | 2016-05-01 17:56:07 +1200 |
| commit | 3906aef5c6df5a6d71d0a6b0c9c816b9160f9de1 (patch) | |
| tree | f17635ca646ea2ce7a2352389d6892ce70237144 /src/libstd/sys/unix/stack_overflow.rs | |
| parent | 2a815a26c8ce70e1aede585827c020d9775a8faf (diff) | |
| download | rust-3906aef5c6df5a6d71d0a6b0c9c816b9160f9de1.tar.gz rust-3906aef5c6df5a6d71d0a6b0c9c816b9160f9de1.zip | |
Handle coercion casts properly when building the MIR
Coercion casts (`expr as T` where the type of `expr` can be coerced to `T`) are essentially no-ops, as the actual work is done by a coercion. Previously a check for type equality was used to avoid emitting the redundant cast in the MIR, but this failed for coercion casts of function items that had lifetime parameters. The MIR trans code doesn't handle `FnPtr -> FnPtr` casts and produced an error. Also fixes a bug with type ascription expressions not having any adjustments applied. Fixes #33295
Diffstat (limited to 'src/libstd/sys/unix/stack_overflow.rs')
0 files changed, 0 insertions, 0 deletions
