未验证 提交 f635ce59 编写于 作者: M Mazdak Farrokhzad 提交者: GitHub

Rollup merge of #63308 - spastorino:place-ref-base-is-ref, r=oli-obk

PlaceRef's base is already a reference

r? @oli-obk
......@@ -177,7 +177,7 @@ fn append_place_to_string(
buf.push_str(&self.infcx.tcx.item_name(*def_id).to_string());
}
PlaceRef {
ref base,
base,
projection: Some(ref proj),
} => {
match proj.elem {
......@@ -197,7 +197,7 @@ fn append_place_to_string(
// FIXME turn this recursion into iteration
self.append_place_to_string(
PlaceRef {
base: &base,
base,
projection: &proj.base,
},
buf,
......@@ -210,7 +210,7 @@ fn append_place_to_string(
if self.body.local_decls[*local].is_ref_for_guard() {
self.append_place_to_string(
PlaceRef {
base: &base,
base,
projection: &proj.base,
},
buf,
......@@ -222,7 +222,7 @@ fn append_place_to_string(
buf.push_str(&"*");
self.append_place_to_string(
PlaceRef {
base: &base,
base,
projection: &proj.base,
},
buf,
......@@ -236,7 +236,7 @@ fn append_place_to_string(
buf.push_str(&"*");
self.append_place_to_string(
PlaceRef {
base: &base,
base,
projection: &proj.base,
},
buf,
......@@ -251,7 +251,7 @@ fn append_place_to_string(
ProjectionElem::Downcast(..) => {
self.append_place_to_string(
PlaceRef {
base: &base,
base,
projection: &proj.base,
},
buf,
......@@ -273,12 +273,12 @@ fn append_place_to_string(
buf.push_str(&name);
} else {
let field_name = self.describe_field(PlaceRef {
base: base,
base,
projection: &proj.base,
}, field);
self.append_place_to_string(
PlaceRef {
base: &base,
base,
projection: &proj.base,
},
buf,
......@@ -293,7 +293,7 @@ fn append_place_to_string(
self.append_place_to_string(
PlaceRef {
base: &base,
base,
projection: &proj.base,
},
buf,
......@@ -313,7 +313,7 @@ fn append_place_to_string(
// to avoid confusing the end-user
self.append_place_to_string(
PlaceRef {
base: &base,
base,
projection: &proj.base,
},
buf,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册