Skip to content

Commit

Permalink
fixup! ast
Browse files Browse the repository at this point in the history
  • Loading branch information
CohenArthur committed Dec 5, 2024
1 parent e5c7e29 commit 32fca9a
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions gcc/rust/ast/rust-path.h
Original file line number Diff line number Diff line change
Expand Up @@ -827,14 +827,10 @@ class PathInExpression : public Pattern, public ExprWithoutBlock

bool is_single_segment () const
{
switch (path->get_path_kind ())
{
case Path::Kind::Regular:
return static_cast<RegularPath &> (*path).get_segments ().size () == 1;
case Path::Kind::Type:
case Path::Kind::LangItem:
rust_unreachable ();
}
if (path->get_path_kind () == Path::Kind::Regular)
return static_cast<RegularPath &> (*path).get_segments ().size () == 1;

rust_unreachable ();
}

Pattern::Kind get_pattern_kind () override { return Pattern::Kind::Path; }
Expand Down

0 comments on commit 32fca9a

Please sign in to comment.