Skip to content

Commit 14646e6

Browse files
committed
test: Make edition explicit on packages
1 parent 5a5ee9a commit 14646e6

File tree

405 files changed

+2174
-82
lines changed

Some content is hidden

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

405 files changed

+2174
-82
lines changed

crates/cargo-test-support/src/lib.rs

+3
Original file line numberDiff line numberDiff line change
@@ -1074,6 +1074,7 @@ pub fn basic_manifest(name: &str, version: &str) -> String {
10741074
name = "{}"
10751075
version = "{}"
10761076
authors = []
1077+
edition = "2015"
10771078
"#,
10781079
name, version
10791080
)
@@ -1087,6 +1088,7 @@ pub fn basic_bin_manifest(name: &str) -> String {
10871088
name = "{}"
10881089
version = "0.5.0"
10891090
authors = ["wycats@example.com"]
1091+
edition = "2015"
10901092
10911093
[[bin]]
10921094
@@ -1104,6 +1106,7 @@ pub fn basic_lib_manifest(name: &str) -> String {
11041106
name = "{}"
11051107
version = "0.5.0"
11061108
authors = ["wycats@example.com"]
1109+
edition = "2015"
11071110
11081111
[lib]
11091112

tests/testsuite/advanced_env.rs

+1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ fn source_config_env() {
1212
[package]
1313
name = "foo"
1414
version = "0.1.0"
15+
edition = "2015"
1516
1617
[dependencies]
1718
somedep = "1.0"

tests/testsuite/alt_registry.rs

+31-10
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ fn depend_on_alt_registry() {
1717
name = "foo"
1818
version = "0.0.1"
1919
authors = []
20+
edition = "2015"
2021
2122
[dependencies.bar]
2223
version = "0.0.1"
@@ -66,6 +67,7 @@ fn depend_on_alt_registry_depends_on_same_registry_no_index() {
6667
name = "foo"
6768
version = "0.0.1"
6869
authors = []
70+
edition = "2015"
6971
7072
[dependencies.bar]
7173
version = "0.0.1"
@@ -108,6 +110,7 @@ fn depend_on_alt_registry_depends_on_same_registry() {
108110
name = "foo"
109111
version = "0.0.1"
110112
authors = []
113+
edition = "2015"
111114
112115
[dependencies.bar]
113116
version = "0.0.1"
@@ -150,6 +153,7 @@ fn depend_on_alt_registry_depends_on_crates_io() {
150153
name = "foo"
151154
version = "0.0.1"
152155
authors = []
156+
edition = "2015"
153157
154158
[dependencies.bar]
155159
version = "0.0.1"
@@ -194,6 +198,7 @@ fn registry_and_path_dep_works() {
194198
name = "foo"
195199
version = "0.0.1"
196200
authors = []
201+
edition = "2015"
197202
198203
[dependencies.bar]
199204
path = "bar"
@@ -228,6 +233,7 @@ fn registry_incompatible_with_git() {
228233
name = "foo"
229234
version = "0.0.1"
230235
authors = []
236+
edition = "2015"
231237
232238
[dependencies.bar]
233239
git = ""
@@ -258,6 +264,7 @@ fn cannot_publish_to_crates_io_with_registry_dependency() {
258264
name = "foo"
259265
version = "0.0.1"
260266
authors = []
267+
edition = "2015"
261268
[dependencies.bar]
262269
version = "0.0.1"
263270
registry = "alternative"
@@ -301,6 +308,7 @@ fn publish_with_registry_dependency() {
301308
name = "foo"
302309
version = "0.0.1"
303310
authors = []
311+
edition = "2015"
304312
305313
[dependencies.bar]
306314
version = "0.0.1"
@@ -385,6 +393,7 @@ fn alt_registry_and_crates_io_deps() {
385393
name = "foo"
386394
version = "0.0.1"
387395
authors = []
396+
edition = "2015"
388397
389398
[dependencies]
390399
crates_io_dep = "0.0.1"
@@ -542,6 +551,7 @@ fn publish_with_crates_io_dep() {
542551
name = "foo"
543552
version = "0.0.1"
544553
authors = ["me"]
554+
edition = "2015"
545555
license = "MIT"
546556
description = "foo"
547557
@@ -658,6 +668,7 @@ fn patch_alt_reg() {
658668
[package]
659669
name = "foo"
660670
version = "0.0.1"
671+
edition = "2015"
661672
662673
[dependencies]
663674
bar = { version = "0.1.0", registry = "alternative" }
@@ -699,6 +710,7 @@ fn bad_registry_name() {
699710
name = "foo"
700711
version = "0.0.1"
701712
authors = []
713+
edition = "2015"
702714
703715
[dependencies.bar]
704716
version = "0.0.1"
@@ -715,14 +727,14 @@ fn bad_registry_name() {
715727
[ERROR] invalid character ` ` in registry name: `bad name`, characters must be Unicode XID characters (numbers, `-`, `_`, or most letters)
716728
717729
718-
--> Cargo.toml:7:17
719-
|
720-
7 | [dependencies.bar]
721-
| _________________^
722-
8 | | version = \"0.0.1\"
723-
9 | | registry = \"bad name\"
724-
| |_____________________________________^
725-
|
730+
--> Cargo.toml:8:17
731+
|
732+
8 | [dependencies.bar]
733+
| _________________^
734+
9 | | version = \"0.0.1\"
735+
10 | | registry = \"bad name\"
736+
| |_____________________________________^
737+
|
726738
",
727739
)
728740
.run();
@@ -758,6 +770,7 @@ fn no_api() {
758770
[package]
759771
name = "foo"
760772
version = "0.0.1"
773+
edition = "2015"
761774
762775
[dependencies.bar]
763776
version = "0.0.1"
@@ -825,6 +838,7 @@ fn alt_reg_metadata() {
825838
[package]
826839
name = "foo"
827840
version = "0.0.1"
841+
edition = "2015"
828842
829843
[dependencies]
830844
altdep = { version = "0.0.1", registry = "alternative" }
@@ -1139,6 +1153,7 @@ fn unknown_registry() {
11391153
name = "foo"
11401154
version = "0.0.1"
11411155
authors = []
1156+
edition = "2015"
11421157
11431158
[dependencies.bar]
11441159
version = "0.0.1"
@@ -1315,6 +1330,7 @@ fn registries_index_relative_url() {
13151330
name = "foo"
13161331
version = "0.0.1"
13171332
authors = []
1333+
edition = "2015"
13181334
13191335
[dependencies.bar]
13201336
version = "0.0.1"
@@ -1362,6 +1378,7 @@ fn registries_index_relative_path_not_allowed() {
13621378
name = "foo"
13631379
version = "0.0.1"
13641380
authors = []
1381+
edition = "2015"
13651382
13661383
[dependencies.bar]
13671384
version = "0.0.1"
@@ -1440,6 +1457,7 @@ fn sparse_lockfile() {
14401457
name = "a"
14411458
version = "0.5.0"
14421459
authors = []
1460+
edition = "2015"
14431461
14441462
[dependencies]
14451463
foo = { registry = 'alternative', version = '0.1.0'}
@@ -1490,6 +1508,7 @@ fn publish_with_transitive_dep() {
14901508
[package]
14911509
name = "a"
14921510
version = "0.5.0"
1511+
edition = "2015"
14931512
"#,
14941513
)
14951514
.file("src/lib.rs", "")
@@ -1504,6 +1523,7 @@ fn publish_with_transitive_dep() {
15041523
name = "b"
15051524
version = "0.6.0"
15061525
publish = ["Alt-2"]
1526+
edition = "2015"
15071527
15081528
[dependencies]
15091529
a = { version = "0.5.0", registry = "Alt-1" }
@@ -1605,6 +1625,7 @@ fn empty_dependency_registry() {
16051625
[package]
16061626
name = "foo"
16071627
version = "0.0.1"
1628+
edition = "2015"
16081629
16091630
[dependencies]
16101631
bar = { version = "0.1.0", registry = "" }
@@ -1626,9 +1647,9 @@ fn empty_dependency_registry() {
16261647
[ERROR] registry name cannot be empty
16271648
16281649
1629-
--> Cargo.toml:7:23
1650+
--> Cargo.toml:8:23
16301651
|
1631-
7 | bar = { version = \"0.1.0\", registry = \"\" }
1652+
8 | bar = { version = \"0.1.0\", registry = \"\" }
16321653
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
16331654
|
16341655
",

0 commit comments

Comments
 (0)