diff --git a/compiler/cargo.vim b/compiler/cargo.vim index e1c37538..0f31b60d 100644 --- a/compiler/cargo.vim +++ b/compiler/cargo.vim @@ -27,7 +27,13 @@ function! s:is_absolute(path) return a:path[0] == '/' || a:path =~ '[A-Z]\+:' endfunction -CompilerSet errorformat+=%-G%\\s%#Compiling%.%# +" Ignore general cargo progress messages +CompilerSet errorformat+= + \%-G%\\s%#Downloading%.%#, + \%-G%\\s%#Compiling%.%#, + \%-G%\\s%#Finished%.%#, + \%-G%\\s%#error:\ Could\ not\ compile\ %.%#, + \%-G%\\s%#To\ learn\ more\\,%.%# let s:local_manifest = findfile(s:cargo_manifest_name, '.;') if s:local_manifest != '' diff --git a/compiler/rustc.vim b/compiler/rustc.vim index 413e523b..ba291335 100644 --- a/compiler/rustc.vim +++ b/compiler/rustc.vim @@ -21,6 +21,7 @@ else CompilerSet makeprg=rustc\ \% endif +" Old errorformat (before nightly 2016/08/10) CompilerSet errorformat= \%f:%l:%c:\ %t%*[^:]:\ %m, \%f:%l:%c:\ %*\\d:%*\\d\ %t%*[^:]:\ %m, @@ -29,5 +30,16 @@ CompilerSet errorformat= \%-G%*[\ ]^%*[~], \%-G%*[\ ]... +" New errorformat (after nightly 2016/08/10) +CompilerSet errorformat+= + \%-G, + \%-Gerror:\ aborting\ %.%#, + \%-Gerror:\ Could\ not\ compile\ %.%#, + \%Eerror:\ %m, + \%Eerror[E%n]:\ %m, + \%Wwarning:\ %m, + \%Inote:\ %m, + \%C\ %#-->\ %f:%l:%c + let &cpo = s:cpo_save unlet s:cpo_save diff --git a/syntax_checkers/rust/rustc.vim b/syntax_checkers/rust/rustc.vim index 5d196086..e1e92038 100644 --- a/syntax_checkers/rust/rustc.vim +++ b/syntax_checkers/rust/rustc.vim @@ -16,11 +16,23 @@ set cpo&vim function! SyntaxCheckers_rust_rustc_GetLocList() dict let makeprg = self.makeprgBuild({ 'args': '-Zparse-only' }) + " Old errorformat (before nightly 2016/08/10) let errorformat = \ '%E%f:%l:%c: %\d%#:%\d%# %.%\{-}error:%.%\{-} %m,' . \ '%W%f:%l:%c: %\d%#:%\d%# %.%\{-}warning:%.%\{-} %m,' . - \ '%C%f:%l %m,' . - \ '%-Z%.%#' + \ '%C%f:%l %m' + + " New errorformat (after nightly 2016/08/10) + let errorformat .= + \ ',' . + \ '%-G,' . + \ '%-Gerror: aborting %.%#,' . + \ '%-Gerror: Could not compile %.%#,' . + \ '%Eerror: %m,' . + \ '%Eerror[E%n]: %m,' . + \ '%Wwarning: %m,' . + \ '%Inote: %m,' . + \ '%C %#--> %f:%l:%c' return SyntasticMake({ \ 'makeprg': makeprg,