@@ -9,7 +9,7 @@ fn bad1() {
9
9
let p = project ( )
10
10
. file ( "src/lib.rs" , "" )
11
11
. file (
12
- ".cargo/config" ,
12
+ ".cargo/config.toml " ,
13
13
r#"
14
14
[target]
15
15
nonexistent-target = "foo"
@@ -21,7 +21,7 @@ fn bad1() {
21
21
. with_stderr (
22
22
"\
23
23
[ERROR] expected table for configuration key `target.nonexistent-target`, \
24
- but found string in [..]/config
24
+ but found string in [..]/config.toml
25
25
" ,
26
26
)
27
27
. run ( ) ;
@@ -32,7 +32,7 @@ fn bad2() {
32
32
let p = project ( )
33
33
. file ( "src/lib.rs" , "" )
34
34
. file (
35
- ".cargo/config" ,
35
+ ".cargo/config.toml " ,
36
36
r#"
37
37
[http]
38
38
proxy = 3.0
@@ -46,7 +46,7 @@ fn bad2() {
46
46
[ERROR] could not load Cargo configuration
47
47
48
48
Caused by:
49
- failed to load TOML configuration from `[..]config`
49
+ failed to load TOML configuration from `[..]config.toml `
50
50
51
51
Caused by:
52
52
failed to parse key `http`
@@ -67,7 +67,7 @@ fn bad3() {
67
67
let p = project ( )
68
68
. file ( "src/lib.rs" , "" )
69
69
. file (
70
- ".cargo/config" ,
70
+ ".cargo/config.toml " ,
71
71
r#"
72
72
[http]
73
73
proxy = true
@@ -84,7 +84,7 @@ fn bad3() {
84
84
error: failed to update registry [..]
85
85
86
86
Caused by:
87
- error in [..]config: `http.proxy` expected a string, but found a boolean
87
+ error in [..]config.toml : `http.proxy` expected a string, but found a boolean
88
88
" ,
89
89
)
90
90
. run ( ) ;
@@ -94,7 +94,7 @@ Caused by:
94
94
fn bad4 ( ) {
95
95
let p = project ( )
96
96
. file (
97
- ".cargo/config" ,
97
+ ".cargo/config.toml " ,
98
98
r#"
99
99
[cargo-new]
100
100
vcs = false
@@ -108,7 +108,7 @@ fn bad4() {
108
108
[ERROR] Failed to create package `foo` at `[..]`
109
109
110
110
Caused by:
111
- error in [..]config: `cargo-new.vcs` expected a string, but found a boolean
111
+ error in [..]config.toml : `cargo-new.vcs` expected a string, but found a boolean
112
112
" ,
113
113
)
114
114
. run ( ) ;
@@ -120,7 +120,7 @@ fn bad6() {
120
120
let p = project ( )
121
121
. file ( "src/lib.rs" , "" )
122
122
. file (
123
- ".cargo/config" ,
123
+ ".cargo/config.toml " ,
124
124
r#"
125
125
[http]
126
126
user-agent = true
@@ -137,7 +137,7 @@ fn bad6() {
137
137
error: failed to update registry [..]
138
138
139
139
Caused by:
140
- error in [..]config: `http.user-agent` expected a string, but found a boolean
140
+ error in [..]config.toml : `http.user-agent` expected a string, but found a boolean
141
141
" ,
142
142
)
143
143
. run ( ) ;
@@ -158,7 +158,7 @@ fn invalid_global_config() {
158
158
foo = "0.1.0"
159
159
"# ,
160
160
)
161
- . file ( ".cargo/config" , "4" )
161
+ . file ( ".cargo/config.toml " , "4" )
162
162
. file ( "src/lib.rs" , "" )
163
163
. build ( ) ;
164
164
@@ -788,7 +788,7 @@ or workspace dependency to use. This will be considered an error in future versi
788
788
#[ cargo_test]
789
789
fn invalid_toml_historically_allowed_fails ( ) {
790
790
let p = project ( )
791
- . file ( ".cargo/config" , "[bar] baz = 2" )
791
+ . file ( ".cargo/config.toml " , "[bar] baz = 2" )
792
792
. file ( "src/main.rs" , "fn main() {}" )
793
793
. build ( ) ;
794
794
@@ -880,7 +880,7 @@ use `rev = \"foo\"` in the dependency declaration.
880
880
fn bad_source_config1 ( ) {
881
881
let p = project ( )
882
882
. file ( "src/lib.rs" , "" )
883
- . file ( ".cargo/config" , "[source.foo]" )
883
+ . file ( ".cargo/config.toml " , "[source.foo]" )
884
884
. build ( ) ;
885
885
886
886
p. cargo ( "check" )
@@ -906,7 +906,7 @@ fn bad_source_config2() {
906
906
)
907
907
. file ( "src/lib.rs" , "" )
908
908
. file (
909
- ".cargo/config" ,
909
+ ".cargo/config.toml " ,
910
910
r#"
911
911
[source.crates-io]
912
912
registry = 'http://example.com'
@@ -952,7 +952,7 @@ fn bad_source_config3() {
952
952
)
953
953
. file ( "src/lib.rs" , "" )
954
954
. file (
955
- ".cargo/config" ,
955
+ ".cargo/config.toml " ,
956
956
r#"
957
957
[source.crates-io]
958
958
registry = 'https://example.com'
@@ -997,7 +997,7 @@ fn bad_source_config4() {
997
997
)
998
998
. file ( "src/lib.rs" , "" )
999
999
. file (
1000
- ".cargo/config" ,
1000
+ ".cargo/config.toml " ,
1001
1001
r#"
1002
1002
[source.crates-io]
1003
1003
replace-with = 'bar'
@@ -1046,7 +1046,7 @@ fn bad_source_config5() {
1046
1046
)
1047
1047
. file ( "src/lib.rs" , "" )
1048
1048
. file (
1049
- ".cargo/config" ,
1049
+ ".cargo/config.toml " ,
1050
1050
r#"
1051
1051
[source.crates-io]
1052
1052
registry = 'https://example.com'
@@ -1120,7 +1120,7 @@ fn bad_source_config6() {
1120
1120
)
1121
1121
. file ( "src/lib.rs" , "" )
1122
1122
. file (
1123
- ".cargo/config" ,
1123
+ ".cargo/config.toml " ,
1124
1124
r#"
1125
1125
[source.crates-io]
1126
1126
registry = 'https://example.com'
@@ -1133,10 +1133,10 @@ fn bad_source_config6() {
1133
1133
. with_status ( 101 )
1134
1134
. with_stderr (
1135
1135
"\
1136
- [ERROR] error in [..]/foo/.cargo/config: could not load config key `source.crates-io.replace-with`
1136
+ [ERROR] error in [..]/foo/.cargo/config.toml : could not load config key `source.crates-io.replace-with`
1137
1137
1138
1138
Caused by:
1139
- error in [..]/foo/.cargo/config: `source.crates-io.replace-with` expected a string, but found a array
1139
+ error in [..]/foo/.cargo/config.toml : `source.crates-io.replace-with` expected a string, but found a array
1140
1140
"
1141
1141
)
1142
1142
. run ( ) ;
@@ -1207,7 +1207,7 @@ fn bad_source_config7() {
1207
1207
)
1208
1208
. file ( "src/lib.rs" , "" )
1209
1209
. file (
1210
- ".cargo/config" ,
1210
+ ".cargo/config.toml " ,
1211
1211
r#"
1212
1212
[source.foo]
1213
1213
registry = 'https://example.com'
@@ -1241,7 +1241,7 @@ fn bad_source_config8() {
1241
1241
)
1242
1242
. file ( "src/lib.rs" , "" )
1243
1243
. file (
1244
- ".cargo/config" ,
1244
+ ".cargo/config.toml " ,
1245
1245
r#"
1246
1246
[source.foo]
1247
1247
branch = "somebranch"
@@ -1253,7 +1253,7 @@ fn bad_source_config8() {
1253
1253
. with_status ( 101 )
1254
1254
. with_stderr (
1255
1255
"[ERROR] source definition `source.foo` specifies `branch`, \
1256
- but that requires a `git` key to be specified (in [..]/foo/.cargo/config)",
1256
+ but that requires a `git` key to be specified (in [..]/foo/.cargo/config.toml )",
1257
1257
)
1258
1258
. run ( ) ;
1259
1259
}
@@ -1532,7 +1532,7 @@ fn bad_target_cfg() {
1532
1532
// the message.
1533
1533
let p = project ( )
1534
1534
. file (
1535
- ".cargo/config" ,
1535
+ ".cargo/config.toml " ,
1536
1536
r#"
1537
1537
[target.'cfg(not(target_os = "none"))']
1538
1538
runner = false
@@ -1545,17 +1545,17 @@ fn bad_target_cfg() {
1545
1545
. with_status ( 101 )
1546
1546
. with_stderr (
1547
1547
"\
1548
- [ERROR] error in [..]/foo/.cargo/config: \
1548
+ [ERROR] error in [..]/foo/.cargo/config.toml : \
1549
1549
could not load config key `target.\" cfg(not(target_os = \\ \" none\\ \" ))\" .runner`
1550
1550
1551
1551
Caused by:
1552
- error in [..]/foo/.cargo/config: \
1552
+ error in [..]/foo/.cargo/config.toml : \
1553
1553
could not load config key `target.\" cfg(not(target_os = \\ \" none\\ \" ))\" .runner`
1554
1554
1555
1555
Caused by:
1556
1556
invalid configuration for key `target.\" cfg(not(target_os = \\ \" none\\ \" ))\" .runner`
1557
1557
expected a string or array of strings, but found a boolean for \
1558
- `target.\" cfg(not(target_os = \\ \" none\\ \" ))\" .runner` in [..]/foo/.cargo/config
1558
+ `target.\" cfg(not(target_os = \\ \" none\\ \" ))\" .runner` in [..]/foo/.cargo/config.toml
1559
1559
" ,
1560
1560
)
1561
1561
. run ( ) ;
@@ -1571,7 +1571,7 @@ fn bad_target_links_overrides() {
1571
1571
// currently is designed with serde.
1572
1572
let p = project ( )
1573
1573
. file (
1574
- ".cargo/config" ,
1574
+ ".cargo/config.toml " ,
1575
1575
& format ! (
1576
1576
r#"
1577
1577
[target.{}.somelib]
@@ -1587,12 +1587,12 @@ fn bad_target_links_overrides() {
1587
1587
. with_status ( 101 )
1588
1588
. with_stderr (
1589
1589
"[ERROR] Only `-l` and `-L` flags are allowed in target config \
1590
- `target.[..].rustc-flags` (in [..]foo/.cargo/config): `foo`",
1590
+ `target.[..].rustc-flags` (in [..]foo/.cargo/config.toml ): `foo`",
1591
1591
)
1592
1592
. run ( ) ;
1593
1593
1594
1594
p. change_file (
1595
- ".cargo/config" ,
1595
+ ".cargo/config.toml " ,
1596
1596
& format ! (
1597
1597
"[target.{}.somelib]
1598
1598
warning = \" foo\"
@@ -1611,7 +1611,7 @@ fn redefined_sources() {
1611
1611
// Cannot define a source multiple times.
1612
1612
let p = project ( )
1613
1613
. file (
1614
- ".cargo/config" ,
1614
+ ".cargo/config.toml " ,
1615
1615
r#"
1616
1616
[source.foo]
1617
1617
registry = "https://github.com/rust-lang/crates.io-index"
@@ -1632,7 +1632,7 @@ note: Sources are not allowed to be defined multiple times.
1632
1632
. run ( ) ;
1633
1633
1634
1634
p. change_file (
1635
- ".cargo/config" ,
1635
+ ".cargo/config.toml " ,
1636
1636
r#"
1637
1637
[source.one]
1638
1638
directory = "index"
0 commit comments