rustdoc: don't clone already owned Path and modify it inplace
#91833
+6
−11
Path and modify it inplace
#91833