Skip to content

Commit fe0b844

Browse files
committed
Auto merge of #8739 - ehuss:normalize-raw-strings, r=alexcrichton
Normalize raw string indentation. It has always slightly bugged me how strings were indented after rustfmt was run across the repo (#5176). This attempts to normalize the strings so that they open and close on the same column. This only touches the `tests` directory.
2 parents fd0628b + 6f8c7d5 commit fe0b844

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

86 files changed

+12666
-12629
lines changed

tests/testsuite/alt_registry.rs

Lines changed: 154 additions & 154 deletions
Large diffs are not rendered by default.

tests/testsuite/bad_config.rs

Lines changed: 333 additions & 333 deletions
Large diffs are not rendered by default.

tests/testsuite/bench.rs

Lines changed: 345 additions & 331 deletions
Large diffs are not rendered by default.

tests/testsuite/build.rs

Lines changed: 1063 additions & 1061 deletions
Large diffs are not rendered by default.

tests/testsuite/build_plan.rs

Lines changed: 126 additions & 126 deletions
Original file line numberDiff line numberDiff line change
@@ -14,28 +14,28 @@ fn cargo_build_plan_simple() {
1414
.masquerade_as_nightly_cargo()
1515
.with_json(
1616
r#"
17-
{
18-
"inputs": [
19-
"[..]/foo/Cargo.toml"
20-
],
21-
"invocations": [
2217
{
23-
"args": "{...}",
24-
"cwd": "[..]/cit/[..]/foo",
25-
"deps": [],
26-
"env": "{...}",
27-
"kind": null,
28-
"links": "{...}",
29-
"outputs": "{...}",
30-
"package_name": "foo",
31-
"package_version": "0.5.0",
32-
"program": "rustc",
33-
"target_kind": ["bin"],
34-
"compile_mode": "build"
18+
"inputs": [
19+
"[..]/foo/Cargo.toml"
20+
],
21+
"invocations": [
22+
{
23+
"args": "{...}",
24+
"cwd": "[..]/cit/[..]/foo",
25+
"deps": [],
26+
"env": "{...}",
27+
"kind": null,
28+
"links": "{...}",
29+
"outputs": "{...}",
30+
"package_name": "foo",
31+
"package_version": "0.5.0",
32+
"program": "rustc",
33+
"target_kind": ["bin"],
34+
"compile_mode": "build"
35+
}
36+
]
3537
}
36-
]
37-
}
38-
"#,
38+
"#,
3939
)
4040
.run();
4141
assert!(!p.bin("foo").is_file());
@@ -47,24 +47,24 @@ fn cargo_build_plan_single_dep() {
4747
.file(
4848
"Cargo.toml",
4949
r#"
50-
[package]
51-
name = "foo"
52-
authors = []
53-
version = "0.5.0"
50+
[package]
51+
name = "foo"
52+
authors = []
53+
version = "0.5.0"
5454
55-
[dependencies]
56-
bar = { path = "bar" }
57-
"#,
55+
[dependencies]
56+
bar = { path = "bar" }
57+
"#,
5858
)
5959
.file(
6060
"src/lib.rs",
6161
r#"
62-
extern crate bar;
63-
pub fn foo() { bar::bar(); }
62+
extern crate bar;
63+
pub fn foo() { bar::bar(); }
6464
65-
#[test]
66-
fn test() { foo(); }
67-
"#,
65+
#[test]
66+
fn test() { foo(); }
67+
"#,
6868
)
6969
.file("bar/Cargo.toml", &basic_manifest("bar", "0.0.1"))
7070
.file("bar/src/lib.rs", "pub fn bar() {}")
@@ -73,49 +73,49 @@ fn cargo_build_plan_single_dep() {
7373
.masquerade_as_nightly_cargo()
7474
.with_json(
7575
r#"
76-
{
77-
"inputs": [
78-
"[..]/foo/Cargo.toml",
79-
"[..]/foo/bar/Cargo.toml"
80-
],
81-
"invocations": [
82-
{
83-
"args": "{...}",
84-
"cwd": "[..]/cit/[..]/foo",
85-
"deps": [],
86-
"env": "{...}",
87-
"kind": null,
88-
"links": "{...}",
89-
"outputs": [
90-
"[..]/foo/target/debug/deps/libbar-[..].rlib",
91-
"[..]/foo/target/debug/deps/libbar-[..].rmeta"
92-
],
93-
"package_name": "bar",
94-
"package_version": "0.0.1",
95-
"program": "rustc",
96-
"target_kind": ["lib"],
97-
"compile_mode": "build"
98-
},
9976
{
100-
"args": "{...}",
101-
"cwd": "[..]/cit/[..]/foo",
102-
"deps": [0],
103-
"env": "{...}",
104-
"kind": null,
105-
"links": "{...}",
106-
"outputs": [
107-
"[..]/foo/target/debug/deps/libfoo-[..].rlib",
108-
"[..]/foo/target/debug/deps/libfoo-[..].rmeta"
77+
"inputs": [
78+
"[..]/foo/Cargo.toml",
79+
"[..]/foo/bar/Cargo.toml"
10980
],
110-
"package_name": "foo",
111-
"package_version": "0.5.0",
112-
"program": "rustc",
113-
"target_kind": ["lib"],
114-
"compile_mode": "build"
81+
"invocations": [
82+
{
83+
"args": "{...}",
84+
"cwd": "[..]/cit/[..]/foo",
85+
"deps": [],
86+
"env": "{...}",
87+
"kind": null,
88+
"links": "{...}",
89+
"outputs": [
90+
"[..]/foo/target/debug/deps/libbar-[..].rlib",
91+
"[..]/foo/target/debug/deps/libbar-[..].rmeta"
92+
],
93+
"package_name": "bar",
94+
"package_version": "0.0.1",
95+
"program": "rustc",
96+
"target_kind": ["lib"],
97+
"compile_mode": "build"
98+
},
99+
{
100+
"args": "{...}",
101+
"cwd": "[..]/cit/[..]/foo",
102+
"deps": [0],
103+
"env": "{...}",
104+
"kind": null,
105+
"links": "{...}",
106+
"outputs": [
107+
"[..]/foo/target/debug/deps/libfoo-[..].rlib",
108+
"[..]/foo/target/debug/deps/libfoo-[..].rmeta"
109+
],
110+
"package_name": "foo",
111+
"package_version": "0.5.0",
112+
"program": "rustc",
113+
"target_kind": ["lib"],
114+
"compile_mode": "build"
115+
}
116+
]
115117
}
116-
]
117-
}
118-
"#,
118+
"#,
119119
)
120120
.run();
121121
}
@@ -126,13 +126,13 @@ fn cargo_build_plan_build_script() {
126126
.file(
127127
"Cargo.toml",
128128
r#"
129-
[project]
129+
[project]
130130
131-
name = "foo"
132-
version = "0.5.0"
133-
authors = ["[email protected]"]
134-
build = "build.rs"
135-
"#,
131+
name = "foo"
132+
version = "0.5.0"
133+
authors = ["[email protected]"]
134+
build = "build.rs"
135+
"#,
136136
)
137137
.file("src/main.rs", r#"fn main() {}"#)
138138
.file("build.rs", r#"fn main() {}"#)
@@ -142,56 +142,56 @@ fn cargo_build_plan_build_script() {
142142
.masquerade_as_nightly_cargo()
143143
.with_json(
144144
r#"
145-
{
146-
"inputs": [
147-
"[..]/foo/Cargo.toml"
148-
],
149-
"invocations": [
150145
{
151-
"args": "{...}",
152-
"cwd": "[..]/cit/[..]/foo",
153-
"deps": [],
154-
"env": "{...}",
155-
"kind": null,
156-
"links": "{...}",
157-
"outputs": "{...}",
158-
"package_name": "foo",
159-
"package_version": "0.5.0",
160-
"program": "rustc",
161-
"target_kind": ["custom-build"],
162-
"compile_mode": "build"
163-
},
164-
{
165-
"args": "{...}",
166-
"cwd": "[..]/cit/[..]/foo",
167-
"deps": [0],
168-
"env": "{...}",
169-
"kind": null,
170-
"links": "{...}",
171-
"outputs": [],
172-
"package_name": "foo",
173-
"package_version": "0.5.0",
174-
"program": "[..]/build-script-build",
175-
"target_kind": ["custom-build"],
176-
"compile_mode": "run-custom-build"
177-
},
178-
{
179-
"args": "{...}",
180-
"cwd": "[..]/cit/[..]/foo",
181-
"deps": [1],
182-
"env": "{...}",
183-
"kind": null,
184-
"links": "{...}",
185-
"outputs": "{...}",
186-
"package_name": "foo",
187-
"package_version": "0.5.0",
188-
"program": "rustc",
189-
"target_kind": ["bin"],
190-
"compile_mode": "build"
146+
"inputs": [
147+
"[..]/foo/Cargo.toml"
148+
],
149+
"invocations": [
150+
{
151+
"args": "{...}",
152+
"cwd": "[..]/cit/[..]/foo",
153+
"deps": [],
154+
"env": "{...}",
155+
"kind": null,
156+
"links": "{...}",
157+
"outputs": "{...}",
158+
"package_name": "foo",
159+
"package_version": "0.5.0",
160+
"program": "rustc",
161+
"target_kind": ["custom-build"],
162+
"compile_mode": "build"
163+
},
164+
{
165+
"args": "{...}",
166+
"cwd": "[..]/cit/[..]/foo",
167+
"deps": [0],
168+
"env": "{...}",
169+
"kind": null,
170+
"links": "{...}",
171+
"outputs": [],
172+
"package_name": "foo",
173+
"package_version": "0.5.0",
174+
"program": "[..]/build-script-build",
175+
"target_kind": ["custom-build"],
176+
"compile_mode": "run-custom-build"
177+
},
178+
{
179+
"args": "{...}",
180+
"cwd": "[..]/cit/[..]/foo",
181+
"deps": [1],
182+
"env": "{...}",
183+
"kind": null,
184+
"links": "{...}",
185+
"outputs": "{...}",
186+
"package_name": "foo",
187+
"package_version": "0.5.0",
188+
"program": "rustc",
189+
"target_kind": ["bin"],
190+
"compile_mode": "build"
191+
}
192+
]
191193
}
192-
]
193-
}
194-
"#,
194+
"#,
195195
)
196196
.run();
197197
}

0 commit comments

Comments
 (0)