reword message
This commit is contained in:
parent
b2e7ae1f65
commit
5c427b4600
@ -4062,7 +4062,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
|
|||||||
let name = self.tcx.crate_name(trait_candidate.def_id.krate);
|
let name = self.tcx.crate_name(trait_candidate.def_id.krate);
|
||||||
if trait_candidate.def_id.krate != item.def_id.krate && name == pick_name {
|
if trait_candidate.def_id.krate != item.def_id.krate && name == pick_name {
|
||||||
let msg = format!(
|
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",
|
dependency graph",
|
||||||
);
|
);
|
||||||
let tdid = self.tcx.parent(item.def_id);
|
let tdid = self.tcx.parent(item.def_id);
|
||||||
|
@ -1697,11 +1697,11 @@ impl<'a, 'tcx> TypeErrCtxt<'a, 'tcx> {
|
|||||||
err.highlighted_span_help(
|
err.highlighted_span_help(
|
||||||
span,
|
span,
|
||||||
vec![
|
vec![
|
||||||
StringPart::normal("you have ".to_string()),
|
StringPart::normal("there are ".to_string()),
|
||||||
StringPart::highlighted("multiple different versions".to_string()),
|
StringPart::highlighted("multiple different versions".to_string()),
|
||||||
StringPart::normal(" of crate `".to_string()),
|
StringPart::normal(" of crate `".to_string()),
|
||||||
StringPart::highlighted(format!("{name}")),
|
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() {
|
let candidates = if impl_candidates.is_empty() {
|
||||||
|
@ -18,7 +18,7 @@ fn main() {
|
|||||||
.extern_("dep_2_reexport", rust_lib_name("foo"))
|
.extern_("dep_2_reexport", rust_lib_name("foo"))
|
||||||
.run_fail()
|
.run_fail()
|
||||||
.assert_stderr_contains(
|
.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(
|
.assert_stderr_contains(
|
||||||
"two types coming from two different versions of the same crate are different types \
|
"two types coming from two different versions of the same crate are different types \
|
||||||
|
Loading…
x
Reference in New Issue
Block a user