Skip to content

Commit

Permalink
analyze: rewrite::ty: use std::boxed::Box instead of alloc::boxed::Box
Browse files Browse the repository at this point in the history
This avoids the need for an `extern crate alloc` when testing rewritten
code.
  • Loading branch information
spernsteiner committed Oct 22, 2024
1 parent 0c4533a commit adf8f7c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion c2rust-analyze/src/rewrite/ty.rs
Original file line number Diff line number Diff line change
Expand Up @@ -588,7 +588,7 @@ fn rewrite_ty<'tcx>(
Ownership::Cell => Rewrite::TyRef(lifetime_type, Box::new(rw), Mutability::Not),
Ownership::Mut => Rewrite::TyRef(lifetime_type, Box::new(rw), Mutability::Mut),
Ownership::Rc => todo!(),
Ownership::Box => Rewrite::TyCtor("alloc::boxed::Box".into(), vec![rw]),
Ownership::Box => Rewrite::TyCtor("std::boxed::Box".into(), vec![rw]),
};

if dyn_owned {
Expand Down

0 comments on commit adf8f7c

Please sign in to comment.