flycheck / flycheck-rust

Better Rust/Cargo support for Flycheck
GNU General Public License v3.0
121 stars 19 forks source link

some benefit from "cargo check"? #51

Closed ghost closed 7 years ago

ghost commented 7 years ago

Is possible to improve flycheck-rust with the introduction of the command cargo check on rust 1.16?

ghost commented 7 years ago

that would be awesome

fmdkdd commented 7 years ago

Thanks for reminding me of this.

We already pass -Z no-trans to rustc in Flycheck to avoid compiling binaries and taking too much time. I suspect we won't see a significant improvement by using cargo check; the only benefit would be to support some advanced uses that -Z no-trans did not.

fmdkdd commented 7 years ago

I just tested it, and cargo check cannot currently check code inside #[cfg(test], so that would be a regression in functionality. I think we better to stick to -Z no-trans until this is resolved at least.

ghost commented 7 years ago

Thanks, then I think we will wait :)

fmdkdd commented 7 years ago

Update: using -Z flags on stable may soon be an error, rather than a warning. Thus, we will then have to migrate to cargo check.

However, at the moment cargo check still does not check unit tests, but there is an ongoing PR.

thejefflarson commented 7 years ago

Hi, it is now an error in the rust version released today.

I'll hold off on using 1.19 for now, as it looks like the upstream PR is still not merged https://github.com/rust-lang/rust/pull/41751 but it looks like a tricky one to fix without that. Thanks for flycheck-rust it is great!

fmdkdd commented 7 years ago

Argh! Thanks for the heads-up. Looks like we'll have to use cargo check without unit tests then. I'll try to make a PR tomorrow.