You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
repro.rs.cc: In function ‘void cxxbridge02$unique_ptr$Virtual$new(std::unique_ptr<Virtual>*, Virtual*)’:repro.rs.cc:599:85: error: invalid new-expression of abstract class type ‘Virtual’ | new (ptr) ::std::unique_ptr<Virtual>(new Virtual(::std::move(*value))); | ^repro.h:11:8: note: because the following virtual functions are pure within ‘Virtual’: | struct Virtual { | ^~~~~~~repro.h:12:16: note: ‘virtual void Virtual::function()’ | virtual void function() = 0; | ^~~~~~~~
The error is inside of the shim we emit for UniquePtr::new:
But we should just not emit that shim for opaque C types. The signature of UniquePtr::new is fn(T) -> UniquePtr<T> which is uncallable when T is an opaque C type because those can never exist by value on the Rust side of the bridge.
The text was updated successfully, but these errors were encountered:
Repro:
This fails to compile with:
The error is inside of the shim we emit for
UniquePtr::new
:But we should just not emit that shim for opaque C types. The signature of
UniquePtr::new
isfn(T) -> UniquePtr<T>
which is uncallable whenT
is an opaque C type because those can never exist by value on the Rust side of the bridge.The text was updated successfully, but these errors were encountered: