Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion ci/miri.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ rustup default "$MIRI_NIGHTLY"
rustup component add miri
cargo miri setup

cargo miri test --all-features
MIRIFLAGS='-Zmiri-strict-provenance' cargo miri test --all-features
4 changes: 3 additions & 1 deletion src/traits.rs
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,9 @@ pub(crate) mod internal {
U: Capacity,
{
// Convert to `String::into_raw_parts` once stabilized
let mut owned = ManuallyDrop::new(owned);
// We need to go through Vec here to get provenance for the entire allocation
// instead of just the initialized parts.
let mut owned = ManuallyDrop::new(owned.into_bytes());
let (fat, cap) = U::store(owned.len(), owned.capacity());

(
Expand Down