mirror of
https://github.com/storytold/wgpu.git
synced 2026-11-24 16:31:11 +01:00
* feat: parse and enforce `@must_use` attribute * feat: refuse `@must_use` of void function * generated naga/tests/out/ir * revert extraneous changes * fix clippy * update repeated attribute error to trunk format * struct members can't have `@must_use` * review fixes * Remove must_use from FunctionResult and revert the related changes --------- Co-authored-by: turbocrime <turbocrime@users.noreply.github.com> Co-authored-by: Jamie Nicol <jnicol@mozilla.com>
24 lines
316 B
WebGPU Shading Language
24 lines
316 B
WebGPU Shading Language
@compute @workgroup_size(1)
|
|
fn main() {}
|
|
|
|
@must_use
|
|
fn use_me() -> i32 { return 10; }
|
|
|
|
fn use_return() -> i32 {
|
|
return use_me();
|
|
}
|
|
|
|
fn use_assign_var() -> i32 {
|
|
var q = use_me();
|
|
return q;
|
|
}
|
|
|
|
fn use_assign_let() -> i32 {
|
|
let q = use_me();
|
|
return q;
|
|
}
|
|
|
|
fn use_phony_assign() {
|
|
_ = use_me();
|
|
}
|