Adjust dependency-resolution errors to be more consistent
This commit is contained in:
parent
779041cd5a
commit
314c2b1447
3 changed files with 7 additions and 7 deletions
|
|
@ -161,7 +161,8 @@ fn calculate_type<'a, 'tcx>(tcx: TyCtxt<'a, 'tcx, 'tcx>,
|
|||
if tcx.dep_kind(cnum).macros_only() { continue }
|
||||
let src = tcx.used_crate_source(cnum);
|
||||
if src.rlib.is_some() { continue }
|
||||
sess.err(&format!("dependency `{}` not found in rlib format",
|
||||
sess.err(&format!("crate `{}` required to be available in rlib format, \
|
||||
but was not found in this form",
|
||||
tcx.crate_name(cnum)));
|
||||
}
|
||||
return Vec::new();
|
||||
|
|
@ -244,10 +245,9 @@ fn calculate_type<'a, 'tcx>(tcx: TyCtxt<'a, 'tcx, 'tcx>,
|
|||
Linkage::Static => "rlib",
|
||||
_ => "dylib",
|
||||
};
|
||||
let name = tcx.crate_name(cnum);
|
||||
sess.err(&format!("crate `{}` required to be available in {}, \
|
||||
but it was not available in this form",
|
||||
name, kind));
|
||||
sess.err(&format!("crate `{}` required to be available in {} format, \
|
||||
but was not found in this form",
|
||||
tcx.crate_name(cnum), kind));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@
|
|||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
// error-pattern: dependency `cdylib_dep` not found in rlib format
|
||||
// error-pattern: crate `cdylib_dep` required to be available in rlib format, but was not found
|
||||
// aux-build:cdylib-dep.rs
|
||||
// ignore-musl
|
||||
// ignore-emscripten
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@
|
|||
|
||||
// aux-build:rmeta_meta.rs
|
||||
// no-prefer-dynamic
|
||||
// error-pattern: crate `rmeta_meta` required to be available in rlib, but it was not available
|
||||
// error-pattern: crate `rmeta_meta` required to be available in rlib format, but was not found
|
||||
|
||||
// Check that building a non-metadata crate fails if a dependent crate is
|
||||
// metadata-only.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue