@@ -211,59 +211,3 @@ fn custom_test_framework() {
211
211
. build_std_arg ( "core" )
212
212
. run ( ) ;
213
213
}
214
-
215
- #[ cargo_test( build_std) ]
216
- fn common_crate_collision ( ) {
217
- // Check for collision with `cc` crate in build dependencies.
218
- // This needs to be a full test since we need to use the real `cc` crate.
219
- // This is a bit fragile, since it assumes `cc` is used in libstd,
220
- // and that we are selecting the same features.
221
-
222
- // Determine the version of CC used in the real std so that we use the
223
- // exact same version.
224
- let sysroot = paths:: sysroot ( ) ;
225
- let sysroot = Path :: new ( & sysroot) ;
226
- let contents =
227
- std:: fs:: read_to_string ( sysroot. join ( "lib/rustlib/src/rust/Cargo.lock" ) ) . unwrap ( ) ;
228
- let lock: toml:: Value = toml:: from_str ( & contents) . unwrap ( ) ;
229
- let mut packages = lock[ "package" ] . as_array ( ) . unwrap ( ) . iter ( ) ;
230
- let cc = packages
231
- . find ( |p| p[ "name" ] . as_str ( ) . unwrap ( ) == "cc" )
232
- . unwrap ( ) ;
233
- // Make sure there is only one `cc`.
234
- assert ! ( packages
235
- . find( |p| p[ "name" ] . as_str( ) . unwrap( ) == "cc" )
236
- . is_none( ) ) ;
237
- let cc_version = cc[ "version" ] . as_str ( ) . unwrap ( ) ;
238
-
239
- let p = project ( )
240
- . file (
241
- "Cargo.toml" ,
242
- & format ! (
243
- r#"
244
- [package]
245
- name = "foo"
246
- version = "0.1.0"
247
-
248
- [build-dependencies]
249
- cc = "={}"
250
- "# ,
251
- cc_version
252
- ) ,
253
- )
254
- . file ( "build.rs" , "extern crate cc; fn main() {}" )
255
- . file ( "src/main.rs" , "fn main() {}" )
256
- . build ( ) ;
257
-
258
- p. cargo ( "build -v" )
259
- . build_std ( )
260
- . target_host ( )
261
- . with_stderr_contains (
262
- "[RUNNING] `rustc --crate-name cc [..]-Zforce-unstable-if-unmarked[..]" ,
263
- )
264
- . with_stderr_line_without (
265
- & [ "[RUNNING] `rustc --crate-name cc" ] ,
266
- & [ "-Zforce-unstable-if-unmarked" ] ,
267
- )
268
- . run ( ) ;
269
- }
0 commit comments