diff options
-rw-r--r-- | etc/config/rust.amazon.properties | 7 | ||||
-rw-r--r-- | lib/formatters/rustfmt.ts | 4 |
2 files changed, 7 insertions, 4 deletions
diff --git a/etc/config/rust.amazon.properties b/etc/config/rust.amazon.properties index 02748e0b3..f08301c80 100644 --- a/etc/config/rust.amazon.properties +++ b/etc/config/rust.amazon.properties @@ -944,11 +944,14 @@ tools.osacatrunk.type=postcompilation tools.osacatrunk.class=osaca-tool tools.osacatrunk.stdinHint=disabled +# This tool has the "rustfmmt1436" name for legacy reasons. It was initially introduced when Rustfmt was a separate +# component, not distributed with the Rust compiler. The tool is still named "rustfmt1436" to avoid breaking existing +# shortlinks. tools.rustfmt1436.name=rustfmt (1.77.0) tools.rustfmt1436.exe=/opt/compiler-explorer/rust-1.77.0/bin/rustfmt tools.rustfmt1436.type=independent tools.rustfmt1436.class=rustfmt-tool tools.rustfmt1436.stdinHint=disabled tools.rustfmt1436.languageId=rust -# Force edition 2018 to support most modern syntax features -tools.rustfmt1436.options=--emit stdout --edition 2018 +# Force edition 2021 to support most modern syntax features +tools.rustfmt1436.options=--emit stdout --edition 2021 diff --git a/lib/formatters/rustfmt.ts b/lib/formatters/rustfmt.ts index cb8ad22d9..1cba03aad 100644 --- a/lib/formatters/rustfmt.ts +++ b/lib/formatters/rustfmt.ts @@ -41,8 +41,8 @@ export class RustFmtFormatter extends BaseFormatter { `hard_tabs=${options.useSpaces ? 'false' : 'true'}`, '--config', `tab_spaces=${options.tabWidth}`, - // Force edition 2018 to support most modern syntax features - '--edition 2018', + // Force edition 2021 to support most modern syntax features + '--edition 2021', ]; return await exec.execute(this.formatterInfo.exe, args, {input: source}); } |