未验证 提交 e3887e6c 编写于 作者: K kennytm

Rollup merge of #53551 - nnethercote:access_place_error_reported, r=varkor

Avoid some Place clones.

This is a 0.5% speedup on ripgrep.
......@@ -1080,7 +1080,10 @@ fn access_place(
}
}
if self
// Check is_empty() first because it's the common case, and doing that
// way we avoid the clone() call.
if !self.access_place_error_reported.is_empty() &&
self
.access_place_error_reported
.contains(&(place_span.0.clone(), place_span.1))
{
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册