We should consider using #[rustc_on_unimplemented]
on spirv-std
helper traits.
#983
Labels
t: enhancement
A new feature or improvement to an existing one.
I was reviewing this nightly bump PR:
And its diff shows some nightly diagnostic improvements of the form:
That's definitely better, but the trait can't really explain itself and its connection to the types (i.e. "
Image
types supportquery_levels
only if such and such parameters have these values" etc.).Except, in
core
/std
, traits can and very much do do this, using#[rustc_on_unimplemented]
!It's perma-unstable, and there might be efforts to stabilize a subset of it, but even ignoring that, we can still use it under
#[cfg_attr(target_arch = "spirv", ...)]
, just like all the other rustc internals we rely on.The text was updated successfully, but these errors were encountered: