Allow lifetime parameters to be inferred

This commit is contained in:
Santiago Pastorino 2019-08-24 14:16:56 -07:00
parent 42dcd4b7c5
commit 59c063302f
No known key found for this signature in database
GPG Key ID: 88C941CDA1D46432
2 changed files with 4 additions and 4 deletions

View File

@ -1555,7 +1555,7 @@ pub struct Statement<'tcx> {
#[cfg(target_arch = "x86_64")]
static_assert_size!(Statement<'_>, 56);
impl<'tcx> Statement<'tcx> {
impl Statement<'_> {
/// Changes a statement to a nop. This is both faster than deleting instructions and avoids
/// invalidating statement indices in `Location`s.
pub fn make_nop(&mut self) {
@ -1677,7 +1677,7 @@ pub struct InlineAsm<'tcx> {
pub inputs: Box<[(Span, Operand<'tcx>)]>,
}
impl<'tcx> Debug for Statement<'tcx> {
impl Debug for Statement<'_> {
fn fmt(&self, fmt: &mut Formatter<'_>) -> fmt::Result {
use self::StatementKind::*;
match self.kind {
@ -2047,7 +2047,7 @@ impl<'p, 'tcx> Iterator for ProjectionsIter<'p, 'tcx> {
impl<'p, 'tcx> FusedIterator for ProjectionsIter<'p, 'tcx> {}
impl<'tcx> Debug for Place<'tcx> {
impl Debug for Place<'_> {
fn fmt(&self, fmt: &mut Formatter<'_>) -> fmt::Result {
self.iterate(|_place_base, place_projections| {
// FIXME: remove this collect once we have migrated to slices

View File

@ -240,7 +240,7 @@ impl MovePathLookup {
// alternative will *not* create a MovePath on the fly for an
// unknown place, but will rather return the nearest available
// parent.
pub fn find(&self, place_ref: PlaceRef<'cx, 'tcx>) -> LookupResult {
pub fn find(&self, place_ref: PlaceRef<'_, '_>) -> LookupResult {
place_ref.iterate(|place_base, place_projection| {
let mut result = match place_base {
PlaceBase::Local(local) => self.locals[*local],