Use Place::local
This commit is contained in:
parent
4dbc7f96d6
commit
38ecea4c11
1 changed files with 3 additions and 7 deletions
|
@ -528,13 +528,9 @@ impl<'a, 'gcx, 'tcx> Builder<'a, 'gcx, 'tcx> {
|
|||
}) => {
|
||||
// Not projected from the implicit `self` in a closure.
|
||||
debug_assert!(
|
||||
match *base {
|
||||
Place::Base(PlaceBase::Local(local)) => local == Local::new(1),
|
||||
Place::Projection(box Projection {
|
||||
ref base,
|
||||
elem: ProjectionElem::Deref,
|
||||
}) => *base == Place::Base(PlaceBase::Local(Local::new(1))),
|
||||
_ => false,
|
||||
match base.local() {
|
||||
Some(local) => local == Local::new(1),
|
||||
None => false,
|
||||
},
|
||||
"Unexpected capture place"
|
||||
);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue