diff --git a/src/cargo/core/compiler/fingerprint.rs b/src/cargo/core/compiler/fingerprint.rs index 78b18af265f..551aab14347 100644 --- a/src/cargo/core/compiler/fingerprint.rs +++ b/src/cargo/core/compiler/fingerprint.rs @@ -459,6 +459,7 @@ fn calculate<'a, 'cfg>( unit.mode, bcx.extra_args_for(unit), cx.incremental_args(unit)?, + cx.used_in_plugin.contains(unit), // used when passing panic=abort )); let fingerprint = Arc::new(Fingerprint { rustc: util::hash_u64(&bcx.build_config.rustc.verbose_version), diff --git a/tests/testsuite/freshness.rs b/tests/testsuite/freshness.rs index 9ff31d66afe..09f324d8ea7 100644 --- a/tests/testsuite/freshness.rs +++ b/tests/testsuite/freshness.rs @@ -1119,3 +1119,48 @@ fn path_dev_dep_registry_updates() { execs().with_status(0).with_stderr("[FINISHED] [..]"), ); } + +#[test] +fn change_panic_mode() { + let p = project("p") + .file( + "Cargo.toml", + r#" + [workspace] + members = ['foo', 'bar'] + [profile.dev] + panic = 'abort' + "#, + ) + .file("src/lib.rs", "") + .file( + "foo/Cargo.toml", + r#" + [package] + name = "foo" + version = "0.1.1" + authors = [] + "#, + ) + .file("foo/src/lib.rs", "") + .file( + "bar/Cargo.toml", + r#" + [package] + name = "bar" + version = "0.1.1" + authors = [] + + [lib] + proc-macro = true + + [dependencies] + foo = { path = '../foo' } + "#, + ) + .file("bar/src/lib.rs", "extern crate foo;") + .build(); + + assert_that(p.cargo("build -p foo"), execs().with_status(0)); + assert_that(p.cargo("build -p bar"), execs().with_status(0)); +}