We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 33d7b0a commit 02ec8d4Copy full SHA for 02ec8d4
tests/testsuite/rustc.rs
@@ -533,6 +533,29 @@ fn fail_with_multiple_packages() {
533
.run();
534
}
535
536
+#[cargo_test]
537
+fn fail_with_bad_bin_no_package() {
538
+ let p = project()
539
+ .file(
540
+ "src/main.rs",
541
+ r#"
542
+ fn main() { println!("hello a.rs"); }
543
+ "#,
544
+ )
545
+ .build();
546
+
547
+ p.cargo("rustc --bin main")
548
+ .with_status(101)
549
+ .with_stderr_data(str![[r#"
550
551
+thread 'main' panicked [..]:
552
+The number of packages must be at least 1
553
+...
554
555
+"#]])
556
+ .run();
557
+}
558
559
#[cargo_test]
560
fn fail_with_glob() {
561
let p = project()
0 commit comments