1111#![ doc( html_root_url = "https://doc.rust-lang.org/nightly/" ,
1212 test( no_crate_inject, attr( deny( warnings) ) ) ) ]
1313
14+ #![ deny( rust_2018_idioms) ]
15+
1416#![ feature( alloc) ]
1517#![ feature( core_intrinsics) ]
1618#![ feature( dropck_eyepatch) ]
17- #![ feature( nll) ]
1819#![ feature( raw_vec_internals) ]
1920#![ cfg_attr( test, feature( test) ) ]
2021
2122#![ allow( deprecated) ]
2223
2324extern crate alloc;
24- extern crate rustc_data_structures;
2525
2626use rustc_data_structures:: sync:: MTLock ;
2727
@@ -476,7 +476,7 @@ impl SyncDroplessArena {
476476#[ cfg( test) ]
477477mod tests {
478478 extern crate test;
479- use self :: test:: Bencher ;
479+ use test:: Bencher ;
480480 use super :: TypedArena ;
481481 use std:: cell:: Cell ;
482482
@@ -511,15 +511,15 @@ mod tests {
511511
512512 impl < ' a > Wrap < ' a > {
513513 fn alloc_inner < F : Fn ( ) -> Inner > ( & self , f : F ) -> & Inner {
514- let r: & EI = self . 0 . alloc ( EI :: I ( f ( ) ) ) ;
514+ let r: & EI < ' _ > = self . 0 . alloc ( EI :: I ( f ( ) ) ) ;
515515 if let & EI :: I ( ref i) = r {
516516 i
517517 } else {
518518 panic ! ( "mismatch" ) ;
519519 }
520520 }
521- fn alloc_outer < F : Fn ( ) -> Outer < ' a > > ( & self , f : F ) -> & Outer {
522- let r: & EI = self . 0 . alloc ( EI :: O ( f ( ) ) ) ;
521+ fn alloc_outer < F : Fn ( ) -> Outer < ' a > > ( & self , f : F ) -> & Outer < ' _ > {
522+ let r: & EI < ' _ > = self . 0 . alloc ( EI :: O ( f ( ) ) ) ;
523523 if let & EI :: O ( ref o) = r {
524524 o
525525 } else {
@@ -609,7 +609,7 @@ mod tests {
609609 count : & ' a Cell < u32 > ,
610610 }
611611
612- impl < ' a > Drop for DropCounter < ' a > {
612+ impl Drop for DropCounter < ' _ > {
613613 fn drop ( & mut self ) {
614614 self . count . set ( self . count . get ( ) + 1 ) ;
615615 }
@@ -619,7 +619,7 @@ mod tests {
619619 fn test_typed_arena_drop_count ( ) {
620620 let counter = Cell :: new ( 0 ) ;
621621 {
622- let arena: TypedArena < DropCounter > = TypedArena :: default ( ) ;
622+ let arena: TypedArena < DropCounter < ' _ > > = TypedArena :: default ( ) ;
623623 for _ in 0 ..100 {
624624 // Allocate something with drop glue to make sure it doesn't leak.
625625 arena. alloc ( DropCounter { count : & counter } ) ;
@@ -631,7 +631,7 @@ mod tests {
631631 #[ test]
632632 fn test_typed_arena_drop_on_clear ( ) {
633633 let counter = Cell :: new ( 0 ) ;
634- let mut arena: TypedArena < DropCounter > = TypedArena :: default ( ) ;
634+ let mut arena: TypedArena < DropCounter < ' _ > > = TypedArena :: default ( ) ;
635635 for i in 0 ..10 {
636636 for _ in 0 ..100 {
637637 // Allocate something with drop glue to make sure it doesn't leak.
0 commit comments