An example project to demonstrate a warning produced by swift-bridge
when compiled on
nightly rust:
- rust version:
rustc 1.80.0-nightly (f705de596 2024-04-30)
$ cargo +nightly build -Zbuild-std --target aarch64-apple-darwin
Compiling swift-bridge-example v0.0.0 (/.../workspace/gist/9c4b3b841d15ed62fde135da28b783fa)
error: field `0` is never read
--> lib.rs:6:16
|
3 | #[swift_bridge::bridge]
| ----------------------- field in this variant
...
6 | pub struct BridgedError {
| ^^^^^^^^^^^^
|
note: the lint level is defined here
--> lib.rs:1:38
|
1 | #![cfg_attr(feature = "strict", deny(warnings))]
| ^^^^^^^^
= note: `#[deny(dead_code)]` implied by `#[deny(warnings)]`
help: consider changing the field to be of unit type to suppress this warning while preserving the field numbering, or remove the field
|
6 | pub struct () {
| ~~
error: could not compile `swift-bridge-example` (lib) due to 1 previous error