This is an archive of the discontinued Mercurial Phabricator instance.

examples: specify rustfmt nightly using a $() construct
ClosedPublic

Authored by durin42 on Jan 8 2020, 2:38 PM.

Diff Detail

Repository
rHG Mercurial
Branch
default
Lint
No Linters Available
Unit
No Unit Test Coverage

Event Timeline

durin42 created this revision.Jan 8 2020, 2:38 PM

thanks for the tip. Fun fact: rustup which doesn't have a --toolchain option on my system, so perhaps it needs to be itself upgraded, (and that might explain a few things.
I've been using rustmt nightly since forever, but maybe I'm stuck on an old version of it.

quark added a subscriber: quark.EditedJan 9 2020, 1:52 AM

You can use rustfmt +nightly if it's installed by rustup. It also runs on Windows.

Ok, so yes I had an old version of rustfmt-nightly, dating back to the days it wasn't managed by rustup (crate rustfmt-nightly).
Thanks for the heads up, guys.

Now I'm pretty sure that cargo +nightly fmt just calls rustup +nightly fmt.

pulkit added a subscriber: pulkit.Jan 13 2020, 11:17 AM

@gracinet Does this looks good to you?

@pulkit yes, after toolchain reinstall, this rustup which works for me

pulkit accepted this revision.Jan 14 2020, 9:52 AM
This revision is now accepted and ready to land.Jan 14 2020, 9:52 AM
This revision was automatically updated to reflect the committed changes.

I was just going to note that it seems like this would not work on Windows, but then I saw Jun's comment which seems to suggest the same. I'll send a patch to switch to Jun's proposal.