cleanup: Span::new
-> Span::with_lo
This commit is contained in:
parent
db002a06ae
commit
1df0b73196
5 changed files with 6 additions and 14 deletions
|
@ -189,7 +189,7 @@ impl Scope {
|
|||
// To avoid issues with macro-generated spans, the span
|
||||
// of the statement must be nested in that of the block.
|
||||
if span.lo() <= stmt_span.lo() && stmt_span.lo() <= span.hi() {
|
||||
return Span::new(stmt_span.lo(), span.hi(), span.ctxt());
|
||||
return span.with_lo(stmt_span.lo());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -708,11 +708,7 @@ fn compare_number_of_method_arguments<'tcx>(
|
|||
Some(if pos == 0 {
|
||||
arg.span
|
||||
} else {
|
||||
Span::new(
|
||||
trait_m_sig.decl.inputs[0].span.lo(),
|
||||
arg.span.hi(),
|
||||
arg.span.ctxt(),
|
||||
)
|
||||
arg.span.with_lo(trait_m_sig.decl.inputs[0].span.lo())
|
||||
})
|
||||
} else {
|
||||
trait_item_span
|
||||
|
@ -731,11 +727,7 @@ fn compare_number_of_method_arguments<'tcx>(
|
|||
if pos == 0 {
|
||||
arg.span
|
||||
} else {
|
||||
Span::new(
|
||||
impl_m_sig.decl.inputs[0].span.lo(),
|
||||
arg.span.hi(),
|
||||
arg.span.ctxt(),
|
||||
)
|
||||
arg.span.with_lo(impl_m_sig.decl.inputs[0].span.lo())
|
||||
}
|
||||
} else {
|
||||
impl_m_span
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue