You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When both 'src/lib.rs' and 'src/main.rs' are present in the project, we
default to invoking `cargo rustc`. This command requires an explicit
binary name with the `--bin` flag, otherwise it causes the error
described in GH-23.
This commit adds logic to parse the output of `cargo read-manifest` to
determine the target type to check, based on the buffer file name. If
the file name matches one of the targets, this target is chosen.
Otherwise, the first target is chosen as a default.
If the target is a binary, we also extract the binary name and set a new
`flycheck-rust-binary-name` variable (see flycheck/flycheck#958) to
solve the error.
I've tested this work with 'src/main.rs' binaries as well as multiples
binaries under 'src/bin'.
ClosesGH-25, fixesGH-23, and adds logic to tackle GH-8.
0 commit comments