@@ -540,7 +540,7 @@ fn subst_ty_renumber_bound() {
540540 * level of binding. This requires adjusting the Debruijn index.
541541 */
542542
543- test_env ( EMPTY_SOURCE_STR , errors ( [ ] ) , |env| {
543+ test_env ( EMPTY_SOURCE_STR , errors ( & [ ] ) , |env| {
544544 // Situation:
545545 // Theta = [A -> &'a foo]
546546
@@ -549,7 +549,7 @@ fn subst_ty_renumber_bound() {
549549 // t_source = fn(A)
550550 let t_source = {
551551 let t_param = env. t_param ( subst:: TypeSpace , 0 ) ;
552- env. t_fn ( [ t_param] , env. t_nil ( ) )
552+ env. t_fn ( & [ t_param] , env. t_nil ( ) )
553553 } ;
554554
555555 let substs = subst:: Substs :: new_type ( vec ! [ t_rptr_bound1] , vec ! [ ] ) ;
@@ -558,7 +558,7 @@ fn subst_ty_renumber_bound() {
558558 // t_expected = fn(&'a int)
559559 let t_expected = {
560560 let t_ptr_bound2 = env. t_rptr_late_bound_with_debruijn ( 1 , ty:: DebruijnIndex :: new ( 2 ) ) ;
561- env. t_fn ( [ t_ptr_bound2] , env. t_nil ( ) )
561+ env. t_fn ( & [ t_ptr_bound2] , env. t_nil ( ) )
562562 } ;
563563
564564 debug ! ( "subst_bound: t_source={} substs={} t_substituted={} t_expected={}" ,
@@ -578,7 +578,7 @@ fn subst_ty_renumber_some_bounds() {
578578 * level of binding. This requires adjusting the Debruijn index.
579579 */
580580
581- test_env ( EMPTY_SOURCE_STR , errors ( [ ] ) , |env| {
581+ test_env ( EMPTY_SOURCE_STR , errors ( & [ ] ) , |env| {
582582 // Situation:
583583 // Theta = [A -> &'a foo]
584584
@@ -587,7 +587,7 @@ fn subst_ty_renumber_some_bounds() {
587587 // t_source = (A, fn(A))
588588 let t_source = {
589589 let t_param = env. t_param ( subst:: TypeSpace , 0 ) ;
590- env. t_pair ( t_param, env. t_fn ( [ t_param] , env. t_nil ( ) ) )
590+ env. t_pair ( t_param, env. t_fn ( & [ t_param] , env. t_nil ( ) ) )
591591 } ;
592592
593593 let substs = subst:: Substs :: new_type ( vec ! [ t_rptr_bound1] , vec ! [ ] ) ;
@@ -598,7 +598,7 @@ fn subst_ty_renumber_some_bounds() {
598598 // but not that the Debruijn index is different in the different cases.
599599 let t_expected = {
600600 let t_rptr_bound2 = env. t_rptr_late_bound_with_debruijn ( 1 , ty:: DebruijnIndex :: new ( 2 ) ) ;
601- env. t_pair ( t_rptr_bound1, env. t_fn ( [ t_rptr_bound2] , env. t_nil ( ) ) )
601+ env. t_pair ( t_rptr_bound1, env. t_fn ( & [ t_rptr_bound2] , env. t_nil ( ) ) )
602602 } ;
603603
604604 debug ! ( "subst_bound: t_source={} substs={} t_substituted={} t_expected={}" ,
@@ -618,7 +618,7 @@ fn escaping() {
618618 * regions or not.
619619 */
620620
621- test_env ( EMPTY_SOURCE_STR , errors ( [ ] ) , |env| {
621+ test_env ( EMPTY_SOURCE_STR , errors ( & [ ] ) , |env| {
622622 // Situation:
623623 // Theta = [A -> &'a foo]
624624
@@ -636,19 +636,19 @@ fn escaping() {
636636 // t_fn = fn(A)
637637 let t_param = env. t_param ( subst:: TypeSpace , 0 ) ;
638638 assert ! ( !ty:: type_has_escaping_regions( t_param) ) ;
639- let t_fn = env. t_fn ( [ t_param] , env. t_nil ( ) ) ;
639+ let t_fn = env. t_fn ( & [ t_param] , env. t_nil ( ) ) ;
640640 assert ! ( !ty:: type_has_escaping_regions( t_fn) ) ;
641641
642642 // t_fn = |&int|+'a
643- let t_fn = env. t_closure ( [ t_rptr_bound1] , env. t_nil ( ) , env. re_free ( 0 , 1 ) ) ;
643+ let t_fn = env. t_closure ( & [ t_rptr_bound1] , env. t_nil ( ) , env. re_free ( 0 , 1 ) ) ;
644644 assert ! ( !ty:: type_has_escaping_regions( t_fn) ) ;
645645
646646 // t_fn = |&int|+'a (where &int has depth 2)
647- let t_fn = env. t_closure ( [ t_rptr_bound2] , env. t_nil ( ) , env. re_free ( 0 , 1 ) ) ;
647+ let t_fn = env. t_closure ( & [ t_rptr_bound2] , env. t_nil ( ) , env. re_free ( 0 , 1 ) ) ;
648648 assert ! ( ty:: type_has_escaping_regions( t_fn) ) ;
649649
650650 // t_fn = |&int|+&int
651- let t_fn = env. t_closure ( [ t_rptr_bound1] , env. t_nil ( ) ,
651+ let t_fn = env. t_closure ( & [ t_rptr_bound1] , env. t_nil ( ) ,
652652 env. re_late_bound_with_debruijn ( 1 , ty:: DebruijnIndex :: new ( 1 ) ) ) ;
653653 assert ! ( ty:: type_has_escaping_regions( t_fn) ) ;
654654 } )
@@ -661,13 +661,13 @@ fn subst_region_renumber_region() {
661661 * for an early-bound region is a late-bound region.
662662 */
663663
664- test_env ( EMPTY_SOURCE_STR , errors ( [ ] ) , |env| {
664+ test_env ( EMPTY_SOURCE_STR , errors ( & [ ] ) , |env| {
665665 let re_bound1 = env. re_late_bound_with_debruijn ( 1 , ty:: DebruijnIndex :: new ( 1 ) ) ;
666666
667667 // type t_source<'a> = fn(&'a int)
668668 let t_source = {
669669 let re_early = env. re_early_bound ( subst:: TypeSpace , 0 , "'a" ) ;
670- env. t_fn ( [ env. t_rptr ( re_early) ] , env. t_nil ( ) )
670+ env. t_fn ( & [ env. t_rptr ( re_early) ] , env. t_nil ( ) )
671671 } ;
672672
673673 let substs = subst:: Substs :: new_type ( vec ! [ ] , vec ! [ re_bound1] ) ;
@@ -678,7 +678,7 @@ fn subst_region_renumber_region() {
678678 // but not that the Debruijn index is different in the different cases.
679679 let t_expected = {
680680 let t_rptr_bound2 = env. t_rptr_late_bound_with_debruijn ( 1 , ty:: DebruijnIndex :: new ( 2 ) ) ;
681- env. t_fn ( [ t_rptr_bound2] , env. t_nil ( ) )
681+ env. t_fn ( & [ t_rptr_bound2] , env. t_nil ( ) )
682682 } ;
683683
684684 debug ! ( "subst_bound: t_source={} substs={} t_substituted={} t_expected={}" ,
0 commit comments