Skip to content

Commit cc7fb19

Browse files
committed
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]: rust-lang/rust#21441 [1]: rust-lang/rust#83491 [2]: rust-lang/rust#27392 [3]: rust-lang/rust#43364 Signed-off-by: Gabriel Goller <[email protected]>
1 parent f55767a commit cc7fb19

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

runtime/autoload/rust.vim

+1-7
Original file line numberDiff line numberDiff line change
@@ -144,14 +144,8 @@ endfunction
144144
function! s:Expand(dict, pretty, args)
145145
try
146146
let rustc = exists("g:rustc_path") ? g:rustc_path : "rustc"
147-
148-
if a:pretty =~? '^\%(everybody_loops$\|flowgraph=\)'
149-
let flag = '--xpretty'
150-
else
151-
let flag = '--pretty'
152-
endif
153147
let relpath = get(a:dict, 'tmpdir_relpath', a:dict.path)
154-
let args = [relpath, '-Z', 'unstable-options', l:flag, a:pretty] + a:args
148+
let args = [relpath, $"-Zunpretty={a:pretty}"] + a:args
155149
let pwd = a:dict.istemp ? a:dict.tmpdir : ''
156150
let output = s:system(pwd, shellescape(rustc) . " " . join(map(args, 'shellescape(v:val)')))
157151
if v:shell_error

0 commit comments

Comments
 (0)