When creating a SimplePath from a string, we end up creating a path
which contains only one segment but no location. Take the location of
the one segment instead and use it as the simple path's location.
gcc/rust/ChangeLog:
* ast/rust-ast.h: Call SimplePath constructor differently in
SimplePath::from_str
{
std::vector<AST::SimplePathSegment> single_segments
= {AST::SimplePathSegment (std::move (str), locus)};
- return SimplePath (std::move (single_segments));
+ return SimplePath (std::move (single_segments), false, locus);
}
const std::vector<SimplePathSegment> &get_segments () const