Skip to content

Bump rustc to remove ShallowInitBox#1033

Draft
N1ark wants to merge 2 commits intoAeneasVerif:mainfrom
soteria-tools:bump-rustc-boxes
Draft

Bump rustc to remove ShallowInitBox#1033
N1ark wants to merge 2 commits intoAeneasVerif:mainfrom
soteria-tools:bump-rustc-boxes

Conversation

@N1ark
Copy link
Copy Markdown
Contributor

@N1ark N1ark commented Feb 24, 2026

Continuation of #1030
Fixes #973
Related to rust-lang/rust#148190

This is missing a transformation pass to make vec! safe. For the following original MIR:

((((*_4)).1).0).0 = [move _5]
storage_dead(_5)
_3 = move _4
conditional_drop[{impl Destruct for alloc::boxed::Box<T>[@TraitClause0, @TraitClause1]}<MaybeUninit<[u8; 1 : usize]>[{built_in impl Sized for [u8; 1 : usize]}], Global>[{built_in impl MetaSized for MaybeUninit<[u8; 1 : usize]>[{built_in impl Sized for [u8; 1 : usize]}]}, {built_in impl Sized for Global}]] _4
storage_dead(_4)
vec_2 = box_assume_init_into_vec_unsafe<u8, 1 : usize>[{built_in impl Sized for u8}](move _3)

we want something akin to

_T = [move _5]
_3 = Box::write(move _4, move _T)
_B = unsize<Box<[T; N]>, Box<[T]>>(move _3)
vec_2 = std::slice::{impl}::into_vec(move _B)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bug: Incorrect reconstruction of vec!

1 participant