Closed
Description
Originally reported in #361 (comment)
#[test]
fn struct_f32_return() {
val(r#"
#[derive(Copy, Clone)]
#[repr(C)]
pub struct S {
x: f32,
}
fn f() -> S { S { x: 2.0 } }
#[allow(unused_attributes)]
#[spirv(fragment)]
pub fn main() {
f();
}
"#);
}
error: Cannot cast between pointer types
--> src/lib.rs:14:29
|
14 | fn f() -> S { S { x: 2.0 } }
| ^
|
= note: from: *{Function} struct S { x: f32 }
= note: to: *{Function} u32
error: Cannot cast between pointer types
--> src/lib.rs:18:5
|
18 | f();
| ^^^
|
= note: from: *{Function} struct S { x: f32 }
= note: to: *{Function} u32