Skip to content

Commit beda310

Browse files
committed
self apply
1 parent 30edae8 commit beda310

File tree

4 files changed

+17
-18
lines changed

4 files changed

+17
-18
lines changed

Cargo.toml

Lines changed: 11 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,13 @@
11
[package]
2-
32
name = "rustfmt-nightly"
43
version = "1.5.1"
5-
description = "Tool to find and fix Rust formatting issues"
6-
repository = "https://github.com/rust-lang/rustfmt"
7-
readme = "README.md"
8-
license = "Apache-2.0/MIT"
94
build = "build.rs"
105
categories = ["development-tools"]
116
edition = "2021"
7+
license = "Apache-2.0/MIT"
8+
readme = "README.md"
9+
repository = "https://github.com/rust-lang/rustfmt"
10+
description = "Tool to find and fix Rust formatting issues"
1211

1312
[[bin]]
1413
name = "rustfmt"
@@ -27,10 +26,10 @@ name = "git-rustfmt"
2726
path = "src/git-rustfmt/main.rs"
2827

2928
[features]
30-
default = ["cargo-fmt", "rustfmt-format-diff"]
3129
cargo-fmt = []
32-
rustfmt-format-diff = []
30+
default = ["cargo-fmt", "rustfmt-format-diff"]
3331
generic-simd = ["bytecount/generic-simd"]
32+
rustfmt-format-diff = []
3433

3534
[dependencies]
3635
annotate-snippets = { version = "0.9", features = ["color"] }
@@ -48,6 +47,11 @@ itertools = "0.10"
4847
lazy_static = "1.4"
4948
log = "0.4"
5049
regex = "1.5"
50+
# A noop dependency that changes in the Rust repository, it's a bit of a hack.
51+
# See the `src/tools/rustc-workspace-hack/README.md` file in `rust-lang/rust`
52+
# for more information.
53+
rustc-workspace-hack = "1.0.0"
54+
rustfmt-config_proc_macro = { version = "0.3", path = "config_proc_macro" }
5155
serde = { version = "1.0", features = ["derive"] }
5256
serde_json = "1.0"
5357
term = "0.7"
@@ -58,13 +62,6 @@ unicode-segmentation = "1.9"
5862
unicode-width = "0.1"
5963
unicode_categories = "0.1"
6064

61-
rustfmt-config_proc_macro = { version = "0.3", path = "config_proc_macro" }
62-
63-
# A noop dependency that changes in the Rust repository, it's a bit of a hack.
64-
# See the `src/tools/rustc-workspace-hack/README.md` file in `rust-lang/rust`
65-
# for more information.
66-
rustc-workspace-hack = "1.0.0"
67-
6865
# Rustc dependencies are loaded from the sysroot, Cargo doesn't know about them.
6966

7067
[package.metadata.rust-analyzer]

config_proc_macro/Cargo.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
[package]
22
name = "rustfmt-config_proc_macro"
33
version = "0.3.0"
4+
categories = ["development-tools::procedural-macro-helpers"]
45
edition = "2018"
5-
description = "A collection of procedural macros for rustfmt"
66
license = "Apache-2.0/MIT"
7-
categories = ["development-tools::procedural-macro-helpers"]
87
repository = "https://github.com/rust-lang/rustfmt"
8+
description = "A collection of procedural macros for rustfmt"
99

1010
[lib]
1111
proc-macro = true
@@ -19,5 +19,5 @@ syn = { version = "1.0", features = ["full", "visit"] }
1919
serde = { version = "1.0", features = ["derive"] }
2020

2121
[features]
22-
default = []
2322
debug-with-rustfmt = []
23+
default = []

src/formatting/cargo_toml.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ use toml_edit::{
66

77
use crate::{Config, ErrorKind};
88

9+
/// Format `Cargo.toml` according to [the Style Guide]
10+
///
11+
/// [the Style Guide]: https://github.com/rust-dev-tools/fmt-rfcs/blob/master/guide/cargo.md).
912
pub(crate) fn format_cargo_toml_inner(content: &str, config: &Config) -> Result<String, ErrorKind> {
1013
let mut doc = content.parse::<toml_edit::Document>()?;
1114
let rules = [

tests/mod-resolver/test-submodule-issue-5119/Cargo.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,4 @@ version = "0.1.0"
44
edition = "2018"
55

66
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
7-
87
[dependencies]

0 commit comments

Comments
 (0)