You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As in the title, when trying to use Rng::gen() I'm getting a compilation error:
error: `gen` is a keyword in the 2024 edition
--> libraries/database/src/tests/insert_generic_metrics.rs:26:51
|
26 | value: GenericMetricValue::Number(rng.gen()),
| ^^^ help: you can use a raw identifier to stay compatible: `r#gen`
|
= warning: this is accepted in the current edition (Rust 2021) but is a hard error in Rust 2024!
= note: for more information, see issue #49716 <https://github.com/rust-lang/rust/issues/49716>
= note: `-F keyword-idents-2024` implied by `-F keyword-idents`
Using a raw identifier as a workaround is fine, but I believe there should be a new name for the method (generate()?).
Since this could lead to a breaking API change, it may be worth holding back #1165 until there is a decision what to do.
The text was updated successfully, but these errors were encountered:
playground link
As in the title, when trying to use
Rng::gen()
I'm getting a compilation error:Using a raw identifier as a workaround is fine, but I believe there should be a new name for the method (
generate()
?).Since this could lead to a breaking API change, it may be worth holding back #1165 until there is a decision what to do.
The text was updated successfully, but these errors were encountered: