Skip to content

Commit

Permalink
fix: rust: removed deprecated rustc arguments
Browse files Browse the repository at this point in the history
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]: rust-lang/rust#21441
[1]: rust-lang/rust#83491
[2]: rust-lang/rust#27392
[3]: rust-lang/rust#43364

Signed-off-by: Gabriel Goller <g.goller@proxmox.com>
  • Loading branch information
kaffarell committed May 29, 2024
1 parent f55767a commit cc7fb19
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions runtime/autoload/rust.vim
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit cc7fb19

Please sign in to comment.