SUMMARY *** NOTE: If you are reporting a crash, please try to attach a backtrace with debug symbols. See https://community.kde.org/Guidelines_and_HOWTOs/Debugging/How_to_create_useful_crash_reports *** Encountering an error when trying to use `async fn` feature in Rust (2021) with Kate 23.04.3 STEPS TO REPRODUCE 1. Open Kate 23.04.3 2. Try to use the `async fn` feature in Rust (2021) OBSERVED RESULT Error message (in `Output`): ``` \[13:50:11  Format Error\] /home/tjw123hh/.cargo/bin/rustfmt --color=never --check error\[E0670\]: `async fn` is not permitted in Rust 2015 --> :11:1 | 11 | async fn main() { | ^^^^^ to use `async fn`, switch to Rust 2018 or later | = help: pass `--edition 2021` to `rustc` = note: for more on editions, read https://doc.rust-lang.org/edition-guide ``` No edition argument is passed to rustc EXPECTED RESULT The `async fn` feature in Rust (2021) should work without error. SOFTWARE/OS VERSIONS Linux/KDE Plasma: Kubuntu 23.04 (available in About System) Operating System: Ubuntu 23.04 KDE Plasma Version: 5.27.7 KDE Frameworks Version: 5.108.0 Qt Version: 5.15.8 Kernel Version: 6.2.0-27-generic (64-bit) Graphics Platform: X11
Your project makes rustfmt think that it's using Rust-2015 for whatever reason (incorrectly specified somewhere perhaps?). You can either fix that OR: - go to: Main Menu -> Configure Kate... -> Formatting - Override the default "command" for rustfmt. See clang-format in the page as an example