File tree 3 files changed +16
-11
lines changed
3 files changed +16
-11
lines changed Original file line number Diff line number Diff line change @@ -45,9 +45,10 @@ pub use embedded::ScriptSource;
45
45
/// See also `bin/cargo/commands/run.rs`s `is_manifest_command`
46
46
pub fn is_embedded ( path : & Path ) -> bool {
47
47
let ext = path. extension ( ) ;
48
- ext == Some ( OsStr :: new ( "rs" ) ) ||
48
+ ( ext == Some ( OsStr :: new ( "rs" ) ) ||
49
49
// Provide better errors by not considering directories to be embedded manifests
50
- ( ext. is_none ( ) && path. is_file ( ) )
50
+ ext. is_none ( ) )
51
+ && path. is_file ( )
51
52
}
52
53
53
54
/// Loads a `Cargo.toml` from a file on disk.
Original file line number Diff line number Diff line change @@ -6646,17 +6646,21 @@ fn workspace_with_dot_rs_dir() {
6646
6646
p. cargo ( "package -Zpackage-workspace" )
6647
6647
. masquerade_as_nightly_cargo ( & [ "package-workspace" ] )
6648
6648
. replace_crates_io ( reg. index_url ( ) )
6649
- . with_status ( 101 )
6650
6649
. with_stderr_data (
6651
6650
str![ [ r#"
6652
6651
[PACKAGING] foo v0.16.2 ([ROOT]/foo/crates/foo.rs)
6653
- [ERROR] failed to prepare local package for uploading
6654
-
6655
- Caused by:
6656
- Unable to update [ROOT]/foo/crates/foo.rs
6657
-
6658
- Caused by:
6659
- Single file packages cannot be used as dependencies
6652
+ [PACKAGED] 4 files, [FILE_SIZE]B ([FILE_SIZE]B compressed)
6653
+ [PACKAGING] bar v0.16.2 ([ROOT]/foo/crates/bar.rs)
6654
+ [UPDATING] crates.io index
6655
+ [PACKAGED] 4 files, [FILE_SIZE]B ([FILE_SIZE]B compressed)
6656
+ [VERIFYING] foo v0.16.2 ([ROOT]/foo/crates/foo.rs)
6657
+ [COMPILING] foo v0.16.2 ([ROOT]/foo/target/package/foo-0.16.2)
6658
+ [FINISHED] `dev` profile [unoptimized + debuginfo] target(s) in [ELAPSED]s
6659
+ [VERIFYING] bar v0.16.2 ([ROOT]/foo/crates/bar.rs)
6660
+ [UNPACKING] foo v0.16.2 (registry `[ROOT]/foo/target/package/tmp-registry`)
6661
+ [COMPILING] foo v0.16.2
6662
+ [COMPILING] bar v0.16.2 ([ROOT]/foo/target/package/bar-0.16.2)
6663
+ [FINISHED] `dev` profile [unoptimized + debuginfo] target(s) in [ELAPSED]s
6660
6664
6661
6665
"# ] ]
6662
6666
. unordered ( ) ,
Original file line number Diff line number Diff line change @@ -1358,7 +1358,7 @@ fn cmd_check_with_missing_script_rs() {
1358
1358
. with_status ( 101 )
1359
1359
. with_stdout_data ( "" )
1360
1360
. with_stderr_data ( str![ [ r#"
1361
- [ERROR] manifest path `script.rs` does not exist
1361
+ [ERROR] the manifest-path must be a path to a Cargo.toml file
1362
1362
1363
1363
"# ] ] )
1364
1364
. run ( ) ;
You can’t perform that action at this time.
0 commit comments