]> git.lizzy.rs Git - rust.git/blobdiff - README.md
Merge pull request #2369 from davidalber/fix-configuration-snippets
[rust.git] / README.md
index 51e5d055ce60eb2a0bbacfb03d7385242b231af4..dca58cc620cba0da9a97f09471e426e6043eab3f 100644 (file)
--- a/README.md
+++ b/README.md
@@ -21,31 +21,29 @@ to be a bit out of date). Version 0.1 of rustfmt-nightly is forked from version
 
 ## Quick start
 
-You must be using the latest nightly compiler toolchain.
+Currently, you can use `rustfmt` on nightly and beta. Rust 1.24 stable will work,
+but we're not quite there yet!
 
 To install:
 
 ```
-cargo install rustfmt-nightly
+rustup component add rustfmt-preview --toolchain=nightly
 ```
 
+If `nightly` is your default toolchain, you can leave the `--toolchain` off.
+
 to run on a cargo project in the current working directory:
 
 ```
-cargo fmt
+cargo +nightly fmt
 ```
 
-## Installation
-
-```
-cargo install rustfmt-nightly
-```
+If `nightly` is your default toolchain, you can leave off the `+nightly`.
 
-or if you're using [Rustup](https://www.rustup.rs/)
+## Installation
 
 ```
-rustup update
-rustup run nightly cargo install rustfmt-nightly
+rustup component add rustfmt-preview --toolchain=nightly
 ```
 
 If you don't have a nightly toolchain, you can add it using rustup:
@@ -63,12 +61,6 @@ rustup default nightly
 If you choose not to do that you'll have to run rustfmt using `rustup run ...`
 or by adding `+nightly` to the cargo invocation.
 
-Usually cargo-fmt, which enables usage of Cargo subcommand `cargo fmt`, is
-installed alongside rustfmt. To only install rustfmt run
-
-```
-cargo install --no-default-features rustfmt-nightly
-```
 ## Installing from source
 
 To install from source, first checkout to the tag or branch you want to install, then issue