mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-04-24 11:41:15 -03:00
Commit1fe6b28877(rustfmt.toml: specify edition to allow 2024 syntax, 2025-10-19) mentions that "cargo fmt" has different behavior than "rustfmt" before that commit. Probably because when .rustfmt.toml exists, rustfmt implicitly uses a different edition (2018?) that doesn't support c"" yet. That commit bumped the edition to 2024, which caused yet another deviation from "cargo fmt": Error writing files: failed to resolve mod `tests`: cannot parse /home/johannes/git/fish-shell/src/wutil/tests.rs error: expected identifier, found reserved keyword `gen` --> /home/johannes/git/fish-shell/src/tests/topic_monitor.rs:48:9 | 48 | for gen in &mut gens_list { | ^^^ expected identifier, found reserved keyword This has since been fixed by00784248db(Update to rust 2024 edition, 2025-10-22). Let's add a test so that such changes won't randomly break "rustfmt" again. Fix that by using 2021 edition, like we do in Cargo.toml. In future, rustfmt should probably default to a current edition (or maybe read the edition from Cargo.toml?) Not yet sure which one is the upstream issue, maybe https://github.com/rust-lang/rustfmt/issues/5650
2 lines
17 B
TOML
2 lines
17 B
TOML
edition = "2024"
|