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
impl::windows::core::AsImpl<Object1>forIStringable{fnas_impl(&self) -> &Object1{let this = ::windows::core::Interface::as_raw(self);unsafe{let this = (this as*mut*mut::core::ffi::c_void).sub(1 + 0)as*mutObject1_Impl;&(*this).this}}}
and allows getting a &Object1 from any&IStringable, regardless of whether the IStringable has actually been created from an Object1 or by the #[implement] macro at all. This is of course unsound.
Which crate is this about?
windows
Crate version
0.48.0
Summary
When using the
#[implement(IInterface)]
macro, e.g. like thisthe generated
AsImpl::as_impl
looks like thisand allows getting a
&Object1
from any&IStringable
, regardless of whether theIStringable
has actually been created from anObject1
or by the#[implement]
macro at all. This is of course unsound.Toolchain version/configuration
No response
Reproducible example
Crate manifest
Expected behavior
The example should not compile.
Actual behavior
The example does compile.
The text was updated successfully, but these errors were encountered: