msg_send
without explicit return types will break if/when !
is stabilized.
#2939
Labels
backend: Metal
client: request
feature request from a known client
platform: OSX
type: bug
value: high
Code like this has an unconstrained return type.
This presently will fall back to deducing
()
as the return type. Previous attempts to stabilize the!
type have involved unconstrained return types deducing to!
. This has directly caused UB in winit rust-windowing/winit#428 during both attempts to stabilize the never type.rust-lang/rust#48950 (comment)
One recommended fix is to change the code to explicitly deduce the return type as
()
where appropriate.The first example is already UB because the return type of
retain
is*mut c_void
but is currently being deduced as()
.So that should be changed to:
The text was updated successfully, but these errors were encountered: