Skip to content

Commit 5d08b16

Browse files
authored
Merge pull request #53 from andersk/cargo-metadata-nightly
Fix ‘cargo metadata’ call for cargo 0.19.0-nightly
2 parents 2c2dc64 + 9f61b40 commit 5d08b16

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

flycheck-rust.el

+7-5
Original file line numberDiff line numberDiff line change
@@ -80,9 +80,10 @@ root of the file hierarchy."
8080
8181
MANIFEST is the path to the Cargo.toml file of the project.
8282
83-
Calls `cargo metadata --no-deps --manifest MANIFEST', parses and
84-
collects the targets for the current workspace, and returns them
85-
in a list, or nil if no targets could be found."
83+
Calls `cargo metadata --no-deps --manifest-path MANIFEST
84+
--format-version 1', parses and collects the targets for the
85+
current workspace, and returns them in a list, or nil if no
86+
targets could be found."
8687
(let ((cargo (funcall flycheck-executable-find "cargo")))
8788
(unless cargo
8889
(user-error "flycheck-rust cannot find `cargo'. Please \
@@ -93,9 +94,10 @@ more information on setting your PATH with Emacs."))
9394
;; targets. We concatenate all targets, regardless of the package.
9495
(-when-let (packages (let-alist
9596
(with-temp-buffer
96-
(call-process cargo nil t nil
97+
(call-process cargo nil '(t nil) nil
9798
"metadata" "--no-deps"
98-
"--manifest-path" manifest)
99+
"--manifest-path" manifest
100+
"--format-version" "1")
99101
(goto-char (point-min))
100102
(let ((json-array-type 'list))
101103
(json-read)))

0 commit comments

Comments
 (0)