@@ -88,13 +88,11 @@ fn build_with_symlink_to_path_dependency_with_build_script_in_git() {
88
88
fn cargo_fail_with_no_stderr ( ) {
89
89
let p = project ( )
90
90
. file ( "Cargo.toml" , & basic_bin_manifest ( "foo" ) )
91
- . file ( "src/foo .rs" , & String :: from ( "refusal" ) )
91
+ . file ( "src/main .rs" , & String :: from ( "refusal" ) )
92
92
. build ( ) ;
93
93
p. cargo ( "build --message-format=json" )
94
94
. with_status ( 101 )
95
95
. with_stderr_data ( str![ [ r#"
96
- [WARNING] path `src/foo.rs` was erroneously implicitly accepted for binary `foo`,
97
- please set bin.path in Cargo.toml
98
96
[COMPILING] foo v0.5.0 ([ROOT]/foo)
99
97
[ERROR] could not compile `foo` (bin "foo") due to 2 previous errors
100
98
@@ -108,14 +106,12 @@ please set bin.path in Cargo.toml
108
106
fn cargo_compile_incremental ( ) {
109
107
let p = project ( )
110
108
. file ( "Cargo.toml" , & basic_bin_manifest ( "foo" ) )
111
- . file ( "src/foo .rs" , & main_file ( r#""i am foo""# , & [ ] ) )
109
+ . file ( "src/main .rs" , & main_file ( r#""i am foo""# , & [ ] ) )
112
110
. build ( ) ;
113
111
114
112
p. cargo ( "build -v" )
115
113
. env ( "CARGO_INCREMENTAL" , "1" )
116
114
. with_stderr_data ( str![ [ r#"
117
- [WARNING] path `src/foo.rs` was erroneously implicitly accepted for binary `foo`,
118
- please set bin.path in Cargo.toml
119
115
[COMPILING] foo v0.5.0 ([ROOT]/foo)
120
116
[RUNNING] `rustc [..] -C incremental=[ROOT]/foo/target/debug/incremental[..]`
121
117
[FINISHED] `dev` profile [unoptimized + debuginfo] target(s) in [ELAPSED]s
@@ -126,8 +122,6 @@ please set bin.path in Cargo.toml
126
122
p. cargo ( "test -v" )
127
123
. env ( "CARGO_INCREMENTAL" , "1" )
128
124
. with_stderr_data ( str![ [ r#"
129
- [WARNING] path `src/foo.rs` was erroneously implicitly accepted for binary `foo`,
130
- please set bin.path in Cargo.toml
131
125
[COMPILING] foo v0.5.0 ([ROOT]/foo)
132
126
[RUNNING] `rustc [..] -C incremental=[ROOT]/foo/target/debug/incremental[..]`
133
127
[FINISHED] `test` profile [unoptimized + debuginfo] target(s) in [ELAPSED]s
@@ -825,14 +819,12 @@ fn cargo_compile_with_lowercase_cargo_toml() {
825
819
fn cargo_compile_with_invalid_code ( ) {
826
820
let p = project ( )
827
821
. file ( "Cargo.toml" , & basic_bin_manifest ( "foo" ) )
828
- . file ( "src/foo .rs" , "invalid rust code!" )
822
+ . file ( "src/main .rs" , "invalid rust code!" )
829
823
. build ( ) ;
830
824
831
825
p. cargo ( "build" )
832
826
. with_status ( 101 )
833
827
. with_stderr_data ( str![ [ r#"
834
- [WARNING] path `src/foo.rs` was erroneously implicitly accepted for binary `foo`,
835
- please set bin.path in Cargo.toml
836
828
[COMPILING] foo v0.5.0 ([ROOT]/foo)
837
829
[ERROR] [..]
838
830
...
@@ -894,13 +886,11 @@ fn cargo_compile_with_invalid_code_in_deps() {
894
886
fn cargo_compile_with_warnings_in_the_root_package ( ) {
895
887
let p = project ( )
896
888
. file ( "Cargo.toml" , & basic_bin_manifest ( "foo" ) )
897
- . file ( "src/foo .rs" , "fn main() {} fn dead() {}" )
889
+ . file ( "src/main .rs" , "fn main() {} fn dead() {}" )
898
890
. build ( ) ;
899
891
900
892
p. cargo ( "build" )
901
893
. with_stderr_data ( str![ [ r#"
902
- [WARNING] path `src/foo.rs` was erroneously implicitly accepted for binary `foo`,
903
- please set bin.path in Cargo.toml
904
894
[COMPILING] foo v0.5.0 ([ROOT]/foo)
905
895
[WARNING] [..]dead[..]
906
896
...
@@ -932,7 +922,7 @@ fn cargo_compile_with_warnings_in_a_dep_package() {
932
922
name = "foo"
933
923
"# ,
934
924
)
935
- . file ( "src/foo .rs" , & main_file ( r#""{}", bar::gimme()"# , & [ "bar" ] ) )
925
+ . file ( "src/main .rs" , & main_file ( r#""{}", bar::gimme()"# , & [ "bar" ] ) )
936
926
. file ( "bar/Cargo.toml" , & basic_lib_manifest ( "bar" ) )
937
927
. file (
938
928
"bar/src/bar.rs" ,
@@ -948,8 +938,6 @@ fn cargo_compile_with_warnings_in_a_dep_package() {
948
938
949
939
p. cargo ( "build" )
950
940
. with_stderr_data ( str![ [ r#"
951
- [WARNING] path `src/foo.rs` was erroneously implicitly accepted for binary `foo`,
952
- please set bin.path in Cargo.toml
953
941
[LOCKING] 2 packages to latest compatible versions
954
942
[COMPILING] bar v0.5.0 ([ROOT]/foo/bar)
955
943
[WARNING] [..]dead[..]
@@ -2316,7 +2304,7 @@ fn ignore_broken_symlinks() {
2316
2304
2317
2305
let p = project ( )
2318
2306
. file ( "Cargo.toml" , & basic_bin_manifest ( "foo" ) )
2319
- . file ( "src/foo .rs" , & main_file ( r#""i am foo""# , & [ ] ) )
2307
+ . file ( "src/main .rs" , & main_file ( r#""i am foo""# , & [ ] ) )
2320
2308
. symlink ( "Notafile" , "bar" )
2321
2309
// To hit the symlink directory, we need a build script
2322
2310
// to trigger a full scan of package files.
@@ -2326,8 +2314,6 @@ fn ignore_broken_symlinks() {
2326
2314
2327
2315
p. cargo ( "build" )
2328
2316
. with_stderr_data ( str![ [ r#"
2329
- [WARNING] path `src/foo.rs` was erroneously implicitly accepted for binary `foo`,
2330
- please set bin.path in Cargo.toml
2331
2317
[WARNING] File system loop found: [ROOT]/foo/a/b/c/d/foo points to an ancestor [ROOT]/foo/a/b
2332
2318
[COMPILING] foo v0.5.0 ([ROOT]/foo)
2333
2319
[FINISHED] `dev` profile [unoptimized + debuginfo] target(s) in [ELAPSED]s
0 commit comments