Rollup merge of #99994 - TaKO8Ki:remove-guess-head-span, r=fee1-dead
Remove `guess_head_span` follow-up to #98519
This commit is contained in:
commit
17f76a16f9
@ -356,13 +356,11 @@ pub(crate) fn if_cause(
|
|||||||
// 6 | | };
|
// 6 | | };
|
||||||
// | |_____^ expected integer, found `()`
|
// | |_____^ expected integer, found `()`
|
||||||
// ```
|
// ```
|
||||||
if block.expr.is_none() && block.stmts.is_empty() && outer_span.is_some() {
|
if block.expr.is_none() && block.stmts.is_empty()
|
||||||
let sp = if let Some(cs) = cond_span.find_ancestor_inside(span) {
|
&& let Some(outer_span) = &mut outer_span
|
||||||
span.with_hi(cs.hi())
|
&& let Some(cond_span) = cond_span.find_ancestor_inside(*outer_span)
|
||||||
} else {
|
{
|
||||||
span
|
*outer_span = outer_span.with_hi(cond_span.hi())
|
||||||
};
|
|
||||||
outer_span = Some(sp);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
(self.find_block_span(block), block.hir_id)
|
(self.find_block_span(block), block.hir_id)
|
||||||
|
Loading…
Reference in New Issue
Block a user