1
Fork 0

cleanup mir visitor for rustc::pass_by_value

This commit is contained in:
lcnr 2022-07-01 16:21:21 +02:00
parent 7e2733bb1d
commit cf9c0a5935
23 changed files with 193 additions and 150 deletions

View file

@ -219,7 +219,7 @@ impl IsReturnPlaceRead {
}
impl<'tcx> Visitor<'tcx> for IsReturnPlaceRead {
fn visit_local(&mut self, &l: &Local, ctxt: PlaceContext, _: Location) {
fn visit_local(&mut self, l: Local, ctxt: PlaceContext, _: Location) {
if l == mir::RETURN_PLACE && ctxt.is_use() && !ctxt.is_place_assignment() {
self.0 = true;
}