hir: Remove fn opt_hir_id and fn opt_span

This commit is contained in:
Vadim Petrochenkov 2024-01-21 21:13:15 +03:00
parent 363b098245
commit a61019b290
44 changed files with 267 additions and 326 deletions

View file

@ -771,8 +771,7 @@ impl<'a, 'tcx> WrongNumberOfGenericArgs<'a, 'tcx> {
);
if let Some(parent_node) = self.tcx.hir().opt_parent_id(self.path_segment.hir_id)
&& let Some(parent_node) = self.tcx.opt_hir_node(parent_node)
&& let hir::Node::Expr(expr) = parent_node
&& let hir::Node::Expr(expr) = self.tcx.hir_node(parent_node)
{
match &expr.kind {
hir::ExprKind::Path(qpath) => self