Skip to content

Commit b35d601

Browse files
committed
Directly use Option<&[T]> instead of converting from Option<&Vec<T>> later on
1 parent e0d9f79 commit b35d601

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

compiler/rustc_resolve/src/late/lifetimes.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -2422,7 +2422,7 @@ impl<'a, 'tcx> LifetimeContext<'a, 'tcx> {
24222422
_ => break,
24232423
}
24242424
}
2425-
break Some(e);
2425+
break Some(&e[..]);
24262426
}
24272427
Elide::Forbid => break None,
24282428
};
@@ -2452,7 +2452,7 @@ impl<'a, 'tcx> LifetimeContext<'a, 'tcx> {
24522452
lifetime_refs.len(),
24532453
&lifetime_names,
24542454
lifetime_spans,
2455-
error.map(|p| &p[..]).unwrap_or(&[]),
2455+
error.unwrap_or(&[]),
24562456
);
24572457
err.emit();
24582458
}

0 commit comments

Comments
 (0)