Florian Diebold
Florian Diebold
Likely the same issue as #9990
https://github.com/rust-lang/chalk/issues/750 is the Chalk root cause. #11242 has a reproduction in a hir-ty test.
I'm not a big fan of making this a setting, because I think this is something you usually decide for each match or even match arm. I think the nicest...
> Personally I am not a big fan of the single-line match-arms for anything but the smallest values as they tend to be a lot less readable than using the...
If `HRESULT` is defined as shown in the screenshot, i.e. `struct HRESULT(i32)`, then RA's type error is correct. `#[repr(transparent)]` doesn't mean that an `i32` would be implicitly converted to it....
It seems to have both: https://github.com/microsoft/windows-rs/blob/c9ae41f507f41bf45d922b11b036f17435c419cc/crates/libs/result/src/bindings.rs#L51 and https://github.com/microsoft/windows-rs/blob/c9ae41f507f41bf45d922b11b036f17435c419cc/crates/libs/result/src/hresult.rs#L8 So probably some name resolution or conditional compilation problem?
The windows crate explicitly exports the newtype version: https://github.com/microsoft/windows-rs/blob/c9ae41f507f41bf45d922b11b036f17435c419cc/crates/libs/result/src/lib.rs#L32 and the `Error::new` definition uses `HRESULT` via `use super::*`: https://github.com/microsoft/windows-rs/blob/c9ae41f507f41bf45d922b11b036f17435c419cc/crates/libs/result/src/error.rs#L91 So I'm still confused why it would come up with the...
Ah wait, I was reading the error messages wrong and RA is the one defining HRESULT as the type alias, not the other way around. Yeah then this seems to...
well the relevant code seems to be basically this: ```rust mod bindings { pub type HRESULT = i32; } use bindings::*; mod hresult { pub struct HRESULT(i32); } pub use...
> This seems to be caused from coerce_unsize as you said. I'll try with the way rustc handles this 🤔 Our CoerceUnsized solving sadly isn't quite correct and probably can't...