diff options
| author | Alex Crichton <alex@alexcrichton.com> | 2017-09-18 11:04:25 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2017-09-18 11:04:25 -0500 |
| commit | 64c9fd6832b305983ad638c3c3b10aef4c276443 (patch) | |
| tree | 633ca515683c860a67e1aaf373897c16418786b4 /src/rustllvm/RustWrapper.cpp | |
| parent | d5b0cbbeea9e792ba6bef27927abd2d6566800fc (diff) | |
| parent | 38fa340ba263612a6f7351d4800d6d4f57ac1cdf (diff) | |
| download | rust-64c9fd6832b305983ad638c3c3b10aef4c276443.tar.gz rust-64c9fd6832b305983ad638c3c3b10aef4c276443.zip | |
Rollup merge of #44657 - Ixrec:patch-1, r=eddyb
Replace str's transmute() calls with pointer casts After the following conversation in #rust-lang: ``` [14:43:50] <Ixrec> TIL the implementation of from_utf_unchecked is literally just "mem::transmute(x)" [14:43:59] <Ixrec> no wonder people keep saying transmute is overpowered [15:15:30] <eddyb> Ixrec: it should be a pointer cast lol [15:15:46] <eddyb> unless it doesn't let you [16:50:34] <Ixrec> https://play.rust-lang.org/?gist=d1e6b629ad9ec1baf64ce261c63845e6&version=stable seems like it does let me [16:52:35] <eddyb> Ixrec: yeah that's the preferred impl [16:52:46] <eddyb> Ixrec: it just wasn't in 1.0 [16:52:50] <eddyb> IIRC [16:53:00] <eddyb> (something something fat pointers) ``` Since I already wrote half of the preferred impls in the playground, might as well make an actual PR.
Diffstat (limited to 'src/rustllvm/RustWrapper.cpp')
0 files changed, 0 insertions, 0 deletions
