diff options
| author | bors <bors@rust-lang.org> | 2021-04-10 16:23:35 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2021-04-10 16:23:35 +0000 |
| commit | 72c63de2ccf8445bfe27dcfb4f712bc771da1b15 (patch) | |
| tree | 9ea548441ab9dd61eccf713ffc218535c62dd184 /compiler/rustc_parse/src | |
| parent | 4029d4d0be03b10edccb65588b522ad541b5ccaf (diff) | |
| parent | b35ac6949f341d072e45c3bf156c591613e5d928 (diff) | |
| download | rust-72c63de2ccf8445bfe27dcfb4f712bc771da1b15.tar.gz rust-72c63de2ccf8445bfe27dcfb4f712bc771da1b15.zip | |
Auto merge of #84052 - RalfJung:libcore-miri, r=Mark-Simulacrum
fix Miri errors in libcore doctests Now that Miri can run doctests, it found some issues in the libcore doctests: * The `AtomicPtr` tests accessed dangling memory! `AtomicPtr::new(&mut 10);` makes the `10` a temporary that is deallocated after the end of this expression. * The tests for `set_ptr_value` used `&array[0] as *const _` to get a pointer to the array; this needs to be `array.as_ptr()` instead (Cc https://github.com/rust-lang/unsafe-code-guidelines/issues/134). * I reduced a buffer size in a `MaybeUninit` test to make it less slow in Miri, and added a spin loop hint to fix a diverging loop in Miri.
Diffstat (limited to 'compiler/rustc_parse/src')
0 files changed, 0 insertions, 0 deletions
