File tree 2 files changed +46
-0
lines changed
2 files changed +46
-0
lines changed Original file line number Diff line number Diff line change @@ -457,6 +457,7 @@ fn calculate<'a, 'cfg>(
457
457
unit. mode ,
458
458
cx. extra_args_for ( unit) ,
459
459
cx. incremental_args ( unit) ?,
460
+ cx. used_in_plugin . contains ( unit) , // used when passing panic=abort
460
461
) ) ;
461
462
let fingerprint = Arc :: new ( Fingerprint {
462
463
rustc : util:: hash_u64 ( & cx. build_config . rustc . verbose_version ) ,
Original file line number Diff line number Diff line change @@ -1119,3 +1119,48 @@ fn path_dev_dep_registry_updates() {
1119
1119
execs ( ) . with_status ( 0 ) . with_stderr ( "[FINISHED] [..]" ) ,
1120
1120
) ;
1121
1121
}
1122
+
1123
+ #[ test]
1124
+ fn change_panic_mode ( ) {
1125
+ let p = project ( "p" )
1126
+ . file (
1127
+ "Cargo.toml" ,
1128
+ r#"
1129
+ [workspace]
1130
+ members = ['foo', 'bar']
1131
+ [profile.dev]
1132
+ panic = 'abort'
1133
+ "# ,
1134
+ )
1135
+ . file ( "src/lib.rs" , "" )
1136
+ . file (
1137
+ "foo/Cargo.toml" ,
1138
+ r#"
1139
+ [package]
1140
+ name = "foo"
1141
+ version = "0.1.1"
1142
+ authors = []
1143
+ "# ,
1144
+ )
1145
+ . file ( "foo/src/lib.rs" , "" )
1146
+ . file (
1147
+ "bar/Cargo.toml" ,
1148
+ r#"
1149
+ [package]
1150
+ name = "bar"
1151
+ version = "0.1.1"
1152
+ authors = []
1153
+
1154
+ [lib]
1155
+ proc-macro = true
1156
+
1157
+ [dependencies]
1158
+ foo = { path = '../foo' }
1159
+ "# ,
1160
+ )
1161
+ . file ( "bar/src/lib.rs" , "extern crate foo;" )
1162
+ . build ( ) ;
1163
+
1164
+ assert_that ( p. cargo ( "build -p foo" ) , execs ( ) . with_status ( 0 ) ) ;
1165
+ assert_that ( p. cargo ( "build -p bar" ) , execs ( ) . with_status ( 0 ) ) ;
1166
+ }
You can’t perform that action at this time.
0 commit comments