Skip to content

Add void pointer implicit conversion#231

Open
lucic71 wants to merge 1 commit into
Cpp2Rust:masterfrom
lucic71:implicit-void
Open

Add void pointer implicit conversion#231
lucic71 wants to merge 1 commit into
Cpp2Rust:masterfrom
lucic71:implicit-void

Conversation

@lucic71

@lucic71 lucic71 commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

No description provided.

pub fn bump_0(arg: AnyPtr) -> i32 {
let arg: Value<AnyPtr> = Rc::new(RefCell::new(arg));
let value: Value<Ptr<i32>> = Rc::new(RefCell::new(
((*arg.borrow()).reinterpret_cast::<i32>()).clone(),

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why is this clone appearing here?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It comes from ConvertVarInit. Initializers of variables are cloned in order to avoid moves

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.

2 participants