Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: remove deprecated rustc arguments #513

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 1 addition & 7 deletions 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
4 changes: 2 additions & 2 deletions doc/rust.txt
Original file line number Diff line number Diff line change
Expand Up @@ -394,7 +394,7 @@ functionality from other plugins.

:RustExpand [args] *:RustExpand*
:RustExpand! [TYPE] [args]
Expands the current file using --pretty and displays the
Expands the current file using --Zunpretty and displays the
results in a new split. If the current file has unsaved
changes, it will be saved first using |:update|. If the
current file is an unnamed buffer, it will be written to a
Expand All @@ -405,7 +405,7 @@ functionality from other plugins.
configurations.

If ! is specified, the first argument is the expansion type to
pass to rustc --pretty. Otherwise it will default to
pass to rustc --Zunpretty. Otherwise it will default to
"expanded".

If |g:rustc_path| is defined, it is used as the path to rustc.
Expand Down