@@ -9,7 +9,7 @@ fn bad1() {
99 let p = project ( )
1010 . file ( "src/lib.rs" , "" )
1111 . file (
12- ".cargo/config" ,
12+ ".cargo/config.toml " ,
1313 r#"
1414 [target]
1515 nonexistent-target = "foo"
@@ -21,7 +21,7 @@ fn bad1() {
2121 . with_stderr (
2222 "\
2323 [ERROR] expected table for configuration key `target.nonexistent-target`, \
24- but found string in [..]/config
24+ but found string in [..]/config.toml
2525" ,
2626 )
2727 . run ( ) ;
@@ -32,7 +32,7 @@ fn bad2() {
3232 let p = project ( )
3333 . file ( "src/lib.rs" , "" )
3434 . file (
35- ".cargo/config" ,
35+ ".cargo/config.toml " ,
3636 r#"
3737 [http]
3838 proxy = 3.0
@@ -46,7 +46,7 @@ fn bad2() {
4646 [ERROR] could not load Cargo configuration
4747
4848Caused by:
49- failed to load TOML configuration from `[..]config`
49+ failed to load TOML configuration from `[..]config.toml `
5050
5151Caused by:
5252 failed to parse key `http`
@@ -67,7 +67,7 @@ fn bad3() {
6767 let p = project ( )
6868 . file ( "src/lib.rs" , "" )
6969 . file (
70- ".cargo/config" ,
70+ ".cargo/config.toml " ,
7171 r#"
7272 [http]
7373 proxy = true
@@ -84,7 +84,7 @@ fn bad3() {
8484 error: failed to update registry [..]
8585
8686Caused 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
8888" ,
8989 )
9090 . run ( ) ;
@@ -94,7 +94,7 @@ Caused by:
9494fn bad4 ( ) {
9595 let p = project ( )
9696 . file (
97- ".cargo/config" ,
97+ ".cargo/config.toml " ,
9898 r#"
9999 [cargo-new]
100100 vcs = false
@@ -108,7 +108,7 @@ fn bad4() {
108108 [ERROR] Failed to create package `foo` at `[..]`
109109
110110Caused 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
112112" ,
113113 )
114114 . run ( ) ;
@@ -120,7 +120,7 @@ fn bad6() {
120120 let p = project ( )
121121 . file ( "src/lib.rs" , "" )
122122 . file (
123- ".cargo/config" ,
123+ ".cargo/config.toml " ,
124124 r#"
125125 [http]
126126 user-agent = true
@@ -137,7 +137,7 @@ fn bad6() {
137137 error: failed to update registry [..]
138138
139139Caused 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
141141" ,
142142 )
143143 . run ( ) ;
@@ -158,7 +158,7 @@ fn invalid_global_config() {
158158 foo = "0.1.0"
159159 "# ,
160160 )
161- . file ( ".cargo/config" , "4" )
161+ . file ( ".cargo/config.toml " , "4" )
162162 . file ( "src/lib.rs" , "" )
163163 . build ( ) ;
164164
@@ -788,7 +788,7 @@ or workspace dependency to use. This will be considered an error in future versi
788788#[ cargo_test]
789789fn invalid_toml_historically_allowed_fails ( ) {
790790 let p = project ( )
791- . file ( ".cargo/config" , "[bar] baz = 2" )
791+ . file ( ".cargo/config.toml " , "[bar] baz = 2" )
792792 . file ( "src/main.rs" , "fn main() {}" )
793793 . build ( ) ;
794794
@@ -880,7 +880,7 @@ use `rev = \"foo\"` in the dependency declaration.
880880fn bad_source_config1 ( ) {
881881 let p = project ( )
882882 . file ( "src/lib.rs" , "" )
883- . file ( ".cargo/config" , "[source.foo]" )
883+ . file ( ".cargo/config.toml " , "[source.foo]" )
884884 . build ( ) ;
885885
886886 p. cargo ( "check" )
@@ -906,7 +906,7 @@ fn bad_source_config2() {
906906 )
907907 . file ( "src/lib.rs" , "" )
908908 . file (
909- ".cargo/config" ,
909+ ".cargo/config.toml " ,
910910 r#"
911911 [source.crates-io]
912912 registry = 'http://example.com'
@@ -952,7 +952,7 @@ fn bad_source_config3() {
952952 )
953953 . file ( "src/lib.rs" , "" )
954954 . file (
955- ".cargo/config" ,
955+ ".cargo/config.toml " ,
956956 r#"
957957 [source.crates-io]
958958 registry = 'https://example.com'
@@ -997,7 +997,7 @@ fn bad_source_config4() {
997997 )
998998 . file ( "src/lib.rs" , "" )
999999 . file (
1000- ".cargo/config" ,
1000+ ".cargo/config.toml " ,
10011001 r#"
10021002 [source.crates-io]
10031003 replace-with = 'bar'
@@ -1046,7 +1046,7 @@ fn bad_source_config5() {
10461046 )
10471047 . file ( "src/lib.rs" , "" )
10481048 . file (
1049- ".cargo/config" ,
1049+ ".cargo/config.toml " ,
10501050 r#"
10511051 [source.crates-io]
10521052 registry = 'https://example.com'
@@ -1120,7 +1120,7 @@ fn bad_source_config6() {
11201120 )
11211121 . file ( "src/lib.rs" , "" )
11221122 . file (
1123- ".cargo/config" ,
1123+ ".cargo/config.toml " ,
11241124 r#"
11251125 [source.crates-io]
11261126 registry = 'https://example.com'
@@ -1133,10 +1133,10 @@ fn bad_source_config6() {
11331133 . with_status ( 101 )
11341134 . with_stderr (
11351135 "\
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`
11371137
11381138Caused 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
11401140"
11411141 )
11421142 . run ( ) ;
@@ -1207,7 +1207,7 @@ fn bad_source_config7() {
12071207 )
12081208 . file ( "src/lib.rs" , "" )
12091209 . file (
1210- ".cargo/config" ,
1210+ ".cargo/config.toml " ,
12111211 r#"
12121212 [source.foo]
12131213 registry = 'https://example.com'
@@ -1241,7 +1241,7 @@ fn bad_source_config8() {
12411241 )
12421242 . file ( "src/lib.rs" , "" )
12431243 . file (
1244- ".cargo/config" ,
1244+ ".cargo/config.toml " ,
12451245 r#"
12461246 [source.foo]
12471247 branch = "somebranch"
@@ -1253,7 +1253,7 @@ fn bad_source_config8() {
12531253 . with_status ( 101 )
12541254 . with_stderr (
12551255 "[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 )",
12571257 )
12581258 . run ( ) ;
12591259}
@@ -1532,7 +1532,7 @@ fn bad_target_cfg() {
15321532 // the message.
15331533 let p = project ( )
15341534 . file (
1535- ".cargo/config" ,
1535+ ".cargo/config.toml " ,
15361536 r#"
15371537 [target.'cfg(not(target_os = "none"))']
15381538 runner = false
@@ -1545,17 +1545,17 @@ fn bad_target_cfg() {
15451545 . with_status ( 101 )
15461546 . with_stderr (
15471547 "\
1548- [ERROR] error in [..]/foo/.cargo/config: \
1548+ [ERROR] error in [..]/foo/.cargo/config.toml : \
15491549 could not load config key `target.\" cfg(not(target_os = \\ \" none\\ \" ))\" .runner`
15501550
15511551Caused by:
1552- error in [..]/foo/.cargo/config: \
1552+ error in [..]/foo/.cargo/config.toml : \
15531553 could not load config key `target.\" cfg(not(target_os = \\ \" none\\ \" ))\" .runner`
15541554
15551555Caused by:
15561556 invalid configuration for key `target.\" cfg(not(target_os = \\ \" none\\ \" ))\" .runner`
15571557 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
15591559" ,
15601560 )
15611561 . run ( ) ;
@@ -1571,7 +1571,7 @@ fn bad_target_links_overrides() {
15711571 // currently is designed with serde.
15721572 let p = project ( )
15731573 . file (
1574- ".cargo/config" ,
1574+ ".cargo/config.toml " ,
15751575 & format ! (
15761576 r#"
15771577 [target.{}.somelib]
@@ -1587,12 +1587,12 @@ fn bad_target_links_overrides() {
15871587 . with_status ( 101 )
15881588 . with_stderr (
15891589 "[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`",
15911591 )
15921592 . run ( ) ;
15931593
15941594 p. change_file (
1595- ".cargo/config" ,
1595+ ".cargo/config.toml " ,
15961596 & format ! (
15971597 "[target.{}.somelib]
15981598 warning = \" foo\"
@@ -1611,7 +1611,7 @@ fn redefined_sources() {
16111611 // Cannot define a source multiple times.
16121612 let p = project ( )
16131613 . file (
1614- ".cargo/config" ,
1614+ ".cargo/config.toml " ,
16151615 r#"
16161616 [source.foo]
16171617 registry = "https://github.com/rust-lang/crates.io-index"
@@ -1632,7 +1632,7 @@ note: Sources are not allowed to be defined multiple times.
16321632 . run ( ) ;
16331633
16341634 p. change_file (
1635- ".cargo/config" ,
1635+ ".cargo/config.toml " ,
16361636 r#"
16371637 [source.one]
16381638 directory = "index"
0 commit comments