about summary refs log tree commit diff
path: root/src/libsyntax_ext
diff options
context:
space:
mode:
authorMazdak Farrokhzad <twingoow@gmail.com>2019-02-13 04:37:03 +0100
committerGitHub <noreply@github.com>2019-02-13 04:37:03 +0100
commitecb650316983697cca65b9b265692e4385a67d9c (patch)
treedc518ed04ee8f7339609b579cdc543a56bf31da2 /src/libsyntax_ext
parent856e41142cad7b3ce2494ee8edd7d1c1d1e58a44 (diff)
parent66c894e07f95a324a39bb4c281c8db4c8842689b (diff)
downloadrust-ecb650316983697cca65b9b265692e4385a67d9c.tar.gz
rust-ecb650316983697cca65b9b265692e4385a67d9c.zip
Rollup merge of #58200 - RalfJung:str-as-mut-ptr, r=SimonSapin
fix str mutating through a ptr derived from &self

Found by Miri: In `get_unchecked_mut` (also used by the checked variants internally) uses `str::as_ptr` to create a mutable reference, but `as_ptr` takes `&self`.  This means the mutable references we return here got created from a shared reference, which violates the shared-references-are-read-only discipline!

For this by using a newly introduced `as_mut_ptr` instead.
Diffstat (limited to 'src/libsyntax_ext')
0 files changed, 0 insertions, 0 deletions