Currently, if Result is redefined in the same context #[dll] is used, it will cause a compiler error:
error[E0107]: wrong number of type arguments: expected 1, found 2
--> src/lib.rs:4:1
|
4 | #[dll("user32.dll")]
| ^^^^^^^^^^^^^^^^^^^^^^ unexpected type argument
|
= note: this error originates in an attribute macro (in Nightly builds, run with -Z macro-backtrace for more info)
To avoid this, we reexport Result from our crate, and access it through our crate name.
We don't use it through std to avoid cases where std might be renamed (unsure if it can happen, but better safe than sorry).
Currently, if
Result
is redefined in the same context#[dll]
is used, it will cause a compiler error:To avoid this, we reexport
Result
from our crate, and access it through our crate name.We don't use it through
std
to avoid cases where std might be renamed (unsure if it can happen, but better safe than sorry).