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 | | };
|
||||
// | |_____^ expected integer, found `()`
|
||||
// ```
|
||||
if block.expr.is_none() && block.stmts.is_empty() && outer_span.is_some() {
|
||||
let sp = if let Some(cs) = cond_span.find_ancestor_inside(span) {
|
||||
span.with_hi(cs.hi())
|
||||
} else {
|
||||
span
|
||||
};
|
||||
outer_span = Some(sp);
|
||||
if block.expr.is_none() && block.stmts.is_empty()
|
||||
&& let Some(outer_span) = &mut outer_span
|
||||
&& let Some(cond_span) = cond_span.find_ancestor_inside(*outer_span)
|
||||
{
|
||||
*outer_span = outer_span.with_hi(cond_span.hi())
|
||||
}
|
||||
|
||||
(self.find_block_span(block), block.hir_id)
|
||||
|
Loading…
Reference in New Issue
Block a user