Open
Description
Summary
ver: windows-rs 0.58
use windows::core::*;
#[interface("094d70d6-5202-44b8-abb8-43860da5aca2")]
unsafe trait IValue: IUnknown {
fn GetValue(&self, value: *mut i32) -> HRESULT;
}
#[implement(IValue)]
struct Value(i32);
impl IValue_Impl for Value {
unsafe fn GetValue(&self, value: *mut i32) -> HRESULT {
*value = self.0;
HRESULT(0)
}
}
get compile error=>
error[E0277]: the trait bound `Value_Impl: IValue_Impl` is not satisfied
--> src\test.rs:8:1
|
8 | #[implement(IValue)]
| ^^^^^^^^^^^^^^^^^^^^ the trait `IValue_Impl` is not implemented for `Value_Impl`
|
= help: the trait `IValue_Impl` is implemented for `arc_stream::Value`
note: required by a bound in `IValue_Vtbl::new`
--> src\test.rs:4:14
|
3 | #[interface("094d70d6-5202-44b8-abb8-43860da5aca2")]
| ---------------------------------------------------- required by a bound in this associated function
4 | unsafe trait IValue: IUnknown {
| ^^^^^^ required by this bound in `IValue_Vtbl::new`
= note: this error originates in the attribute macro `implement` (in Nightly builds, run with -Z macro-backtrace for more info)
Crate manifest
No response
Crate code
No response
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment