@@ -21,31 +21,29 @@ to be a bit out of date). Version 0.1 of rustfmt-nightly is forked from version
21
21
22
22
## Quick start
23
23
24
- You must be using the latest nightly compiler toolchain.
24
+ Currently, you can use ` rustfmt ` on nightly and beta. Rust 1.24 stable will work,
25
+ but we're not quite there yet!
25
26
26
27
To install:
27
28
28
29
```
29
- cargo install rustfmt-nightly
30
+ rustup component add rustfmt-preview --toolchain= nightly
30
31
```
31
32
33
+ If ` nightly ` is your default toolchain, you can leave the ` --toolchain ` off.
34
+
32
35
to run on a cargo project in the current working directory:
33
36
34
37
```
35
- cargo fmt
38
+ cargo +nightly fmt
36
39
```
37
40
38
- ## Installation
39
-
40
- ```
41
- cargo install rustfmt-nightly
42
- ```
41
+ If ` nightly ` is your default toolchain, you can leave off the ` +nightly ` .
43
42
44
- or if you're using [ Rustup ] ( https://www.rustup.rs/ )
43
+ ## Installation
45
44
46
45
```
47
- rustup update
48
- rustup run nightly cargo install rustfmt-nightly
46
+ rustup component add rustfmt-preview --toolchain=nightly
49
47
```
50
48
51
49
If you don't have a nightly toolchain, you can add it using rustup:
@@ -63,12 +61,6 @@ rustup default nightly
63
61
If you choose not to do that you'll have to run rustfmt using ` rustup run ... `
64
62
or by adding ` +nightly ` to the cargo invocation.
65
63
66
- Usually cargo-fmt, which enables usage of Cargo subcommand ` cargo fmt ` , is
67
- installed alongside rustfmt. To only install rustfmt run
68
-
69
- ```
70
- cargo install --no-default-features rustfmt-nightly
71
- ```
72
64
## Installing from source
73
65
74
66
To install from source, first checkout to the tag or branch you want to install, then issue
0 commit comments