diff --git a/.gitmodules b/.gitmodules index fbebccf408fb6..329fdd5d1e423 100644 --- a/.gitmodules +++ b/.gitmodules @@ -36,3 +36,6 @@ [submodule "src/tools/clippy"] path = src/tools/clippy url = https://github.com/rust-lang-nursery/rust-clippy.git +[submodule "src/tools/rustfmt"] + path = src/tools/rustfmt + url = git@github.com:rust-lang-nursery/rustfmt.git diff --git a/src/Cargo.toml b/src/Cargo.toml index 35ba022c4899a..e53b5c02c972f 100644 --- a/src/Cargo.toml +++ b/src/Cargo.toml @@ -18,6 +18,7 @@ members = [ "tools/cargo", "tools/rustdoc", "tools/rls", + "tools/rustfmt", # FIXME(https://github.com/rust-lang/cargo/issues/4089): move these to exclude "tools/rls/test_data/borrow_error", "tools/rls/test_data/completion", @@ -58,3 +59,9 @@ debug-assertions = false [patch.'https://github.com/rust-lang/cargo'] cargo = { path = "tools/cargo" } + +[patch.'https://github.com/rust-lang-nursery/rustfmt'] +rustfmt-nightly = { path = "tools/rustfmt" } + +[patch.crates-io] +rustfmt-nightly = { path = "tools/rustfmt" } diff --git a/src/tools/rustfmt b/src/tools/rustfmt new file mode 160000 index 0000000000000..a1fd68da464fc --- /dev/null +++ b/src/tools/rustfmt @@ -0,0 +1 @@ +Subproject commit a1fd68da464fc51585f351c81fc2b867211c197e