rust/src/libcore/str
Mazdak Farrokhzad ecb6503169
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.
2019-02-13 04:37:03 +01:00
..
lossy.rs Remove licenses 2018-12-25 21:08:33 -07:00
mod.rs Rollup merge of #58200 - RalfJung:str-as-mut-ptr, r=SimonSapin 2019-02-13 04:37:03 +01:00
pattern.rs libs: doc comments 2019-02-10 23:57:25 +00:00