bevyengine / bevyengine/bevy

#[derive(ShaderType)] triggers compiler warning

Open
#20,400 2 comments 0 reactions 0 assignees View on GitHub
A-Rendering C-Bug C-Dependencies D-Macros D-Straightforward S-Ready-For-Implementation
Dominant language
Rust
Stars
48.2k
Forks
4.8k
Avg merge
3d 22h
Merged PRs (30d)
161

Description

## Bevy version

0.16.1

## What you did

```rust
#[derive(ShaderType, PartialEq, Clone, Copy)]
struct ShaderInputType {
position: Vec2,
factor: F32,
}
```

## What went wrong

Compiler warning
```
warning: function `check` is never used
```

## Additional information

`cargo expand` shows that the macro generates a `check` function, but it's not used and might be missing a `#[allow(dead_code)]` attribute or something like that.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.