diff options
| author | Santiago Pastorino <spastorino@gmail.com> | 2020-01-14 02:10:05 -0300 |
|---|---|---|
| committer | Santiago Pastorino <spastorino@gmail.com> | 2020-01-28 10:12:53 -0300 |
| commit | b5b6be0ab7c500782c5f4d55166d09fa02f8103e (patch) | |
| tree | 428329680d6a46f3124d709b36fef016e6d05ad1 /src/librustc_mir/dataflow | |
| parent | 39d93b1ef8f3e985039a0878e539c7a9ee621a32 (diff) | |
| download | rust-b5b6be0ab7c500782c5f4d55166d09fa02f8103e.tar.gz rust-b5b6be0ab7c500782c5f4d55166d09fa02f8103e.zip | |
Local field on PlaceRef and RootPlace is not a reference anymore
Diffstat (limited to 'src/librustc_mir/dataflow')
| -rw-r--r-- | src/librustc_mir/dataflow/move_paths/builder.rs | 2 | ||||
| -rw-r--r-- | src/librustc_mir/dataflow/move_paths/mod.rs | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/librustc_mir/dataflow/move_paths/builder.rs b/src/librustc_mir/dataflow/move_paths/builder.rs index adba38d2a81..cc3c4eff6f0 100644 --- a/src/librustc_mir/dataflow/move_paths/builder.rs +++ b/src/librustc_mir/dataflow/move_paths/builder.rs @@ -490,7 +490,7 @@ impl<'b, 'a, 'tcx> Gatherer<'b, 'a, 'tcx> { // of the union so it is marked as initialized again. if let [proj_base @ .., ProjectionElem::Field(_, _)] = place.projection { if let ty::Adt(def, _) = - Place::ty_from(place.local, proj_base, self.builder.body, self.builder.tcx).ty.kind + Place::ty_from(&place.local, proj_base, self.builder.body, self.builder.tcx).ty.kind { if def.is_union() { place = PlaceRef { local: place.local, projection: proj_base } diff --git a/src/librustc_mir/dataflow/move_paths/mod.rs b/src/librustc_mir/dataflow/move_paths/mod.rs index a46465ab493..8d62b84bda8 100644 --- a/src/librustc_mir/dataflow/move_paths/mod.rs +++ b/src/librustc_mir/dataflow/move_paths/mod.rs @@ -246,7 +246,7 @@ impl MovePathLookup { // unknown place, but will rather return the nearest available // parent. pub fn find(&self, place: PlaceRef<'_, '_>) -> LookupResult { - let mut result = self.locals[*place.local]; + let mut result = self.locals[place.local]; for elem in place.projection.iter() { if let Some(&subpath) = self.projections.get(&(result, elem.lift())) { |
