From cc7fb196fd3cf971f33a428def373f9ca27673e6 Mon Sep 17 00:00:00 2001 From: Gabriel Goller Date: Wed, 29 May 2024 14:18:32 +0200 Subject: [PATCH] fix: rust: removed deprecated rustc arguments The `--pretty` and `--xpretty` arguments have been deprecated [0] and removed [1]. They have been renamed to '-Zunpretty' and moved to nightly [2]. This means that currently, with the default stable compiler this won't work. You will have to use nightly or wait until it is stabilized (which is an ongoing effort [3]). [0]: https://github.com/rust-lang/rust/pull/21441 [1]: https://github.com/rust-lang/rust/pull/83491 [2]: https://github.com/rust-lang/rust/pull/27392 [3]: https://github.com/rust-lang/rust/issues/43364 Signed-off-by: Gabriel Goller --- runtime/autoload/rust.vim | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/runtime/autoload/rust.vim b/runtime/autoload/rust.vim index 5ccbf4b3829773..4b05c1d9da9bb7 100644 --- a/runtime/autoload/rust.vim +++ b/runtime/autoload/rust.vim @@ -144,14 +144,8 @@ endfunction function! s:Expand(dict, pretty, args) try let rustc = exists("g:rustc_path") ? g:rustc_path : "rustc" - - if a:pretty =~? '^\%(everybody_loops$\|flowgraph=\)' - let flag = '--xpretty' - else - let flag = '--pretty' - endif let relpath = get(a:dict, 'tmpdir_relpath', a:dict.path) - let args = [relpath, '-Z', 'unstable-options', l:flag, a:pretty] + a:args + let args = [relpath, $"-Zunpretty={a:pretty}"] + a:args let pwd = a:dict.istemp ? a:dict.tmpdir : '' let output = s:system(pwd, shellescape(rustc) . " " . join(map(args, 'shellescape(v:val)'))) if v:shell_error