reword message

This commit is contained in:
Esteban Küber 2024-08-07 16:18:06 +00:00
parent b2e7ae1f65
commit 5c427b4600
3 changed files with 4 additions and 4 deletions

View File

@ -4062,7 +4062,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
let name = self.tcx.crate_name(trait_candidate.def_id.krate);
if trait_candidate.def_id.krate != item.def_id.krate && name == pick_name {
let msg = format!(
"you have multiple different versions of crate `{name}` in your \
"there are multiple different versions of crate `{name}` in the \
dependency graph",
);
let tdid = self.tcx.parent(item.def_id);

View File

@ -1697,11 +1697,11 @@ impl<'a, 'tcx> TypeErrCtxt<'a, 'tcx> {
err.highlighted_span_help(
span,
vec![
StringPart::normal("you have ".to_string()),
StringPart::normal("there are ".to_string()),
StringPart::highlighted("multiple different versions".to_string()),
StringPart::normal(" of crate `".to_string()),
StringPart::highlighted(format!("{name}")),
StringPart::normal("` in your dependency graph".to_string()),
StringPart::normal("` the your dependency graph".to_string()),
],
);
let candidates = if impl_candidates.is_empty() {

View File

@ -18,7 +18,7 @@ fn main() {
.extern_("dep_2_reexport", rust_lib_name("foo"))
.run_fail()
.assert_stderr_contains(
"you have multiple different versions of crate `dependency` in your dependency graph",
"there are multiple different versions of crate `dependency` in the dependency graph",
)
.assert_stderr_contains(
"two types coming from two different versions of the same crate are different types \