aboutsummaryrefslogtreecommitdiff
path: root/gcc/rust/util/rust-canonical-path.h
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/rust/util/rust-canonical-path.h')
-rw-r--r--gcc/rust/util/rust-canonical-path.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/gcc/rust/util/rust-canonical-path.h b/gcc/rust/util/rust-canonical-path.h
index 079ae76..4c4d9df 100644
--- a/gcc/rust/util/rust-canonical-path.h
+++ b/gcc/rust/util/rust-canonical-path.h
@@ -114,6 +114,8 @@ public:
return CanonicalPath (other.segs, crate_num);
std::vector<std::pair<NodeId, std::string>> copy (segs);
+ copy.reserve (other.segs.size ());
+
for (auto &s : other.segs)
copy.push_back (s);