Don't use BrAnon index in diagnostics
This commit is contained in:
parent
167b70692b
commit
e4edf00f12
@ -90,9 +90,8 @@ impl<'a> DescriptionCtx<'a> {
|
|||||||
};
|
};
|
||||||
me.span = Some(sp);
|
me.span = Some(sp);
|
||||||
}
|
}
|
||||||
ty::BrAnon(idx, span) => {
|
ty::BrAnon(_, span) => {
|
||||||
me.kind = "anon_num_here";
|
me.kind = "defined_here";
|
||||||
me.num_arg = idx+1;
|
|
||||||
me.span = match span {
|
me.span = match span {
|
||||||
Some(_) => span,
|
Some(_) => span,
|
||||||
None => Some(tcx.def_span(scope)),
|
None => Some(tcx.def_span(scope)),
|
||||||
|
@ -226,8 +226,8 @@ fn msg_span_from_early_bound_and_free_regions<'tcx>(
|
|||||||
};
|
};
|
||||||
(text, sp)
|
(text, sp)
|
||||||
}
|
}
|
||||||
ty::BrAnon(idx, span) => (
|
ty::BrAnon(_, span) => (
|
||||||
format!("the anonymous lifetime #{} defined here", idx + 1),
|
"the anonymous lifetime as defined here".to_string(),
|
||||||
match span {
|
match span {
|
||||||
Some(span) => span,
|
Some(span) => span,
|
||||||
None => tcx.def_span(scope)
|
None => tcx.def_span(scope)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user