The Rust docs say:
Constants cannot refer to statics.
https://doc.rust-lang.org/reference/items/static-items.html#r-items.static.const
And yet the following works fine:
pub const A: i64 = 0; pub static B: i64 = A + 1; pub const C: i64 = B + 1;
[#]rust #rustlang
=> More informations about this toot | More toots from predrag@hachyderm.io
How the heck did I find this?
I want cargo-semver-checks to get all the edge cases right. This is what it takes.
When you become a GitHub Sponsor, you're funding that attention to detail: https://github.com/sponsors/obi1kenobi
[#]rust #rustlang #semver #sponsor
=> More informations about this toot | More toots from predrag@hachyderm.io
text/gemini
This content has been proxied by September (3851b).