Skip to content

Commit cf35cae

Browse files
committed
require cargo version >= 0.16.0, fix style nits
1 parent 9c9c38b commit cf35cae

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

syntax_checkers/rust/cargo.vim

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,18 @@
88
if exists("g:loaded_syntastic_rust_cargo_checker")
99
finish
1010
endif
11+
1112
let g:loaded_syntastic_rust_cargo_checker = 1
1213

14+
" Force syntastic to call cargo without a specific file name
1315
let g:syntastic_rust_cargo_fname = ""
1416

1517
let s:save_cpo = &cpo
1618
set cpo&vim
1719

1820
function! SyntaxCheckers_rust_cargo_IsAvailable() dict
19-
return executable(self.getExec())
21+
return executable(self.getExec()) &&
22+
\ syntastic#util#versionIsAtLeast(self.getVersion(), [0, 16, 0])
2023
endfunction
2124

2225
function! SyntaxCheckers_rust_cargo_GetLocList() dict
@@ -26,8 +29,7 @@ function! SyntaxCheckers_rust_cargo_GetLocList() dict
2629
let errorformat =
2730
\ '%-G,' .
2831
\ '%-Gerror: aborting %.%#,' .
29-
\ '%-Gerror: Could not compile %.%#,' .
30-
\ '%-Gwarning: the option `Z` is unstable %.%#,'
32+
\ '%-Gerror: Could not compile %.%#,'
3133

3234
" Meaningful lines (errors, notes, warnings, contextual information)
3335
let errorformat .=

0 commit comments

Comments
 (0)