-
-
Notifications
You must be signed in to change notification settings - Fork 470
Closed
Description
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.
Metadata
Metadata
Assignees
Labels
No labels