Skip to content

Commit 4e53ce4

Browse files
committed
Auto merge of #5782 - dwijnand:dedup-manifest, r=alexcrichton
Add a default template for Cargo.toml Fixes #5743 r? @alexcrichton
2 parents 5bb8501 + 081e793 commit 4e53ce4

36 files changed

+108
-1879
lines changed

tests/testsuite/alt_registry.rs

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -428,15 +428,6 @@ fn alt_registry_and_crates_io_deps() {
428428
#[test]
429429
fn block_publish_due_to_no_token() {
430430
let p = project()
431-
.file(
432-
"Cargo.toml",
433-
r#"
434-
[project]
435-
name = "foo"
436-
version = "0.0.1"
437-
authors = []
438-
"#,
439-
)
440431
.file("src/main.rs", "fn main() {}")
441432
.build();
442433

tests/testsuite/bad_config.rs

Lines changed: 1 addition & 100 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,6 @@ use support::hamcrest::assert_that;
55
#[test]
66
fn bad1() {
77
let p = project()
8-
.file(
9-
"Cargo.toml",
10-
r#"
11-
[package]
12-
name = "foo"
13-
version = "0.0.0"
14-
authors = []
15-
"#,
16-
)
178
.file("src/lib.rs", "")
189
.file(
1910
".cargo/config",
@@ -39,15 +30,6 @@ but found string in [..]config
3930
#[test]
4031
fn bad2() {
4132
let p = project()
42-
.file(
43-
"Cargo.toml",
44-
r#"
45-
[package]
46-
name = "foo"
47-
version = "0.0.0"
48-
authors = []
49-
"#,
50-
)
5133
.file("src/lib.rs", "")
5234
.file(
5335
".cargo/config",
@@ -82,15 +64,6 @@ Caused by:
8264
#[test]
8365
fn bad3() {
8466
let p = project()
85-
.file(
86-
"Cargo.toml",
87-
r#"
88-
[package]
89-
name = "foo"
90-
version = "0.0.0"
91-
authors = []
92-
"#,
93-
)
9467
.file("src/lib.rs", "")
9568
.file(
9669
".cargo/config",
@@ -142,15 +115,6 @@ Caused by:
142115
#[test]
143116
fn bad6() {
144117
let p = project()
145-
.file(
146-
"Cargo.toml",
147-
r#"
148-
[package]
149-
name = "foo"
150-
version = "0.0.0"
151-
authors = []
152-
"#,
153-
)
154118
.file("src/lib.rs", "")
155119
.file(
156120
".cargo/config",
@@ -178,15 +142,6 @@ Caused by:
178142
#[test]
179143
fn bad_cargo_config_jobs() {
180144
let p = project()
181-
.file(
182-
"Cargo.toml",
183-
r#"
184-
[package]
185-
name = "foo"
186-
version = "0.0.0"
187-
authors = []
188-
"#,
189-
)
190145
.file("src/lib.rs", "")
191146
.file(
192147
".cargo/config",
@@ -211,15 +166,6 @@ invalid value: integer `-1`, expected u32
211166
#[test]
212167
fn default_cargo_config_jobs() {
213168
let p = project()
214-
.file(
215-
"Cargo.toml",
216-
r#"
217-
[package]
218-
name = "foo"
219-
version = "0.0.0"
220-
authors = []
221-
"#,
222-
)
223169
.file("src/lib.rs", "")
224170
.file(
225171
".cargo/config",
@@ -235,15 +181,6 @@ fn default_cargo_config_jobs() {
235181
#[test]
236182
fn good_cargo_config_jobs() {
237183
let p = project()
238-
.file(
239-
"Cargo.toml",
240-
r#"
241-
[package]
242-
name = "foo"
243-
version = "0.0.0"
244-
authors = []
245-
"#,
246-
)
247184
.file("src/lib.rs", "")
248185
.file(
249186
".cargo/config",
@@ -297,15 +234,6 @@ Caused by:
297234
#[test]
298235
fn bad_cargo_lock() {
299236
let p = project()
300-
.file(
301-
"Cargo.toml",
302-
r#"
303-
[package]
304-
name = "foo"
305-
version = "0.0.0"
306-
authors = []
307-
"#,
308-
)
309237
.file("Cargo.lock", "[[package]]\nfoo = 92")
310238
.file("src/lib.rs", "")
311239
.build();
@@ -429,15 +357,6 @@ Caused by:
429357
#[test]
430358
fn bad_dependency_in_lockfile() {
431359
let p = project()
432-
.file(
433-
"Cargo.toml",
434-
r#"
435-
[project]
436-
name = "foo"
437-
version = "0.0.1"
438-
authors = []
439-
"#,
440-
)
441360
.file("src/lib.rs", "")
442361
.file(
443362
"Cargo.lock",
@@ -965,15 +884,6 @@ to use. This will be considered an error in future versions
965884
#[test]
966885
fn invalid_toml_historically_allowed_is_warned() {
967886
let p = project()
968-
.file(
969-
"Cargo.toml",
970-
r#"
971-
[package]
972-
name = "foo"
973-
version = "0.0.0"
974-
authors = []
975-
"#,
976-
)
977887
.file(
978888
".cargo/config",
979889
r#"
@@ -994,7 +904,7 @@ The TOML spec requires newlines after table definitions (e.g. `[a] b = 1` is
994904
invalid), but this file has a table header which does not have a newline after
995905
it. A newline needs to be added and this warning will soon become a hard error
996906
in the future.
997-
[COMPILING] foo v0.0.0 ([..])
907+
[COMPILING] foo v0.0.1 ([..])
998908
[FINISHED] dev [unoptimized + debuginfo] target(s) in [..]
999909
",
1000910
),
@@ -1036,15 +946,6 @@ This will be considered an error in future versions
1036946
#[test]
1037947
fn bad_source_config1() {
1038948
let p = project()
1039-
.file(
1040-
"Cargo.toml",
1041-
r#"
1042-
[package]
1043-
name = "foo"
1044-
version = "0.0.0"
1045-
authors = []
1046-
"#,
1047-
)
1048949
.file("src/lib.rs", "")
1049950
.file(
1050951
".cargo/config",

tests/testsuite/bench.rs

Lines changed: 1 addition & 91 deletions
Original file line numberDiff line numberDiff line change
@@ -62,15 +62,6 @@ fn bench_bench_implicit() {
6262
}
6363

6464
let p = project()
65-
.file(
66-
"Cargo.toml",
67-
r#"
68-
[package]
69-
name = "foo"
70-
version = "0.0.1"
71-
authors = []
72-
"#,
73-
)
7465
.file(
7566
"src/main.rs",
7667
r#"
@@ -120,15 +111,6 @@ fn bench_bin_implicit() {
120111
}
121112

122113
let p = project()
123-
.file(
124-
"Cargo.toml",
125-
r#"
126-
[package]
127-
name = "foo"
128-
version = "0.0.1"
129-
authors = []
130-
"#,
131-
)
132114
.file(
133115
"src/main.rs",
134116
r#"
@@ -177,15 +159,6 @@ fn bench_tarname() {
177159
}
178160

179161
let p = project()
180-
.file(
181-
"Cargo.toml",
182-
r#"
183-
[package]
184-
name = "foo"
185-
version = "0.0.1"
186-
authors = []
187-
"#,
188-
)
189162
.file(
190163
"benches/bin1.rs",
191164
r#"
@@ -225,15 +198,6 @@ fn bench_multiple_targets() {
225198
}
226199

227200
let p = project()
228-
.file(
229-
"Cargo.toml",
230-
r#"
231-
[package]
232-
name = "foo"
233-
version = "0.0.1"
234-
authors = []
235-
"#,
236-
)
237201
.file(
238202
"benches/bin1.rs",
239203
r#"
@@ -313,15 +277,6 @@ fn many_similar_names() {
313277
}
314278

315279
let p = project()
316-
.file(
317-
"Cargo.toml",
318-
r#"
319-
[package]
320-
name = "foo"
321-
version = "0.0.1"
322-
authors = []
323-
"#,
324-
)
325280
.file(
326281
"src/lib.rs",
327282
"
@@ -536,15 +491,6 @@ fn bench_with_deep_lib_dep() {
536491
)
537492
.build();
538493
let _p2 = project()
539-
.file(
540-
"Cargo.toml",
541-
r#"
542-
[package]
543-
name = "foo"
544-
version = "0.0.1"
545-
authors = []
546-
"#,
547-
)
548494
.file(
549495
"src/lib.rs",
550496
"
@@ -645,15 +591,6 @@ fn external_bench_implicit() {
645591
}
646592

647593
let p = project()
648-
.file(
649-
"Cargo.toml",
650-
r#"
651-
[project]
652-
name = "foo"
653-
version = "0.0.1"
654-
authors = []
655-
"#,
656-
)
657594
.file(
658595
"src/lib.rs",
659596
r#"
@@ -784,15 +721,6 @@ fn dont_run_examples() {
784721
}
785722

786723
let p = project()
787-
.file(
788-
"Cargo.toml",
789-
r#"
790-
[project]
791-
name = "foo"
792-
version = "0.0.1"
793-
authors = []
794-
"#,
795-
)
796724
.file("src/lib.rs", r"")
797725
.file(
798726
"examples/dont-run-me-i-will-fail.rs",
@@ -811,15 +739,6 @@ fn pass_through_command_line() {
811739
}
812740

813741
let p = project()
814-
.file(
815-
"Cargo.toml",
816-
r#"
817-
[package]
818-
name = "foo"
819-
version = "0.0.1"
820-
authors = []
821-
"#,
822-
)
823742
.file(
824743
"src/lib.rs",
825744
"
@@ -1382,15 +1301,6 @@ fn test_bench_no_run() {
13821301
}
13831302

13841303
let p = project()
1385-
.file(
1386-
"Cargo.toml",
1387-
r#"
1388-
[project]
1389-
name = "foo"
1390-
authors = []
1391-
version = "0.1.0"
1392-
"#,
1393-
)
13941304
.file("src/lib.rs", "")
13951305
.file(
13961306
"benches/bbaz.rs",
@@ -1411,7 +1321,7 @@ fn test_bench_no_run() {
14111321
p.cargo("bench").arg("--no-run"),
14121322
execs().with_status(0).with_stderr(
14131323
"\
1414-
[COMPILING] foo v0.1.0 ([..])
1324+
[COMPILING] foo v0.0.1 ([..])
14151325
[FINISHED] release [optimized] target(s) in [..]
14161326
",
14171327
),

0 commit comments

Comments
 (0)