fix tests and code cleanup
This commit is contained in:
parent
952df48948
commit
5689f9c679
3 changed files with 106 additions and 56 deletions
|
@ -1816,11 +1816,7 @@ impl<'a: 'ast, 'ast> LateResolutionVisitor<'a, '_, 'ast> {
|
|||
if let Some(Expr { kind: ExprKind::Assign(lhs, rhs, _), .. }) =
|
||||
self.diagnostic_metadata.in_assignment
|
||||
{
|
||||
let is_rhs_assign = match rhs.kind {
|
||||
ExprKind::Assign(..) => true,
|
||||
_ => false,
|
||||
};
|
||||
|
||||
let is_rhs_assign = matches!(rhs.kind, ExprKind::Assign(..));
|
||||
if let ast::ExprKind::Path(None, _) = lhs.kind && !is_rhs_assign {
|
||||
let sm = self.r.session.source_map();
|
||||
let line_span = sm.span_extend_to_line(ident_span);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue