...
help: trait `Interface` which provides `cast` is implemented but not in scope; perhaps you want to import it
|
+ use windows::core::Interface;
|
...
Instead, this happened:
error[E0599]: no method named `cast` found for struct `IDXGISwapChain1` in the current scope
--> src\main.rs:107:36
|
107 | let y: IDXGISwapChain3 = x.cast()?;
| ^^^^ method not found in `IDXGISwapChain1`
|
::: C:\Users\nxcy\.cargo\registry\src\index.crates.io-6f17d22bba15001f\windows-core-0.56.0\src\interface.rs:80:8
|
80 | fn cast<T: Interface>(&self) -> Result<T> {
| ---- the method is available for `IDXGISwapChain1` here
|
= help: items from traits can only be used if the trait is in scope
help: trait `Interface` which provides `cast` is implemented but not in scope; perhaps you want to import it
|
3 + use windows::windows_core::interface::Interface;
|
I tried this code: https://github.com/rust-lang/rust-analyzer/issues/17293
I expected to see this happen:
Instead, this happened:
Meta
rustc --version --verbose
: