@@ -540,7 +540,7 @@ fn subst_ty_renumber_bound() {
540
540
* level of binding. This requires adjusting the Debruijn index.
541
541
*/
542
542
543
- test_env ( EMPTY_SOURCE_STR , errors ( [ ] ) , |env| {
543
+ test_env ( EMPTY_SOURCE_STR , errors ( & [ ] ) , |env| {
544
544
// Situation:
545
545
// Theta = [A -> &'a foo]
546
546
@@ -549,7 +549,7 @@ fn subst_ty_renumber_bound() {
549
549
// t_source = fn(A)
550
550
let t_source = {
551
551
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 ( ) )
553
553
} ;
554
554
555
555
let substs = subst:: Substs :: new_type ( vec ! [ t_rptr_bound1] , vec ! [ ] ) ;
@@ -558,7 +558,7 @@ fn subst_ty_renumber_bound() {
558
558
// t_expected = fn(&'a int)
559
559
let t_expected = {
560
560
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 ( ) )
562
562
} ;
563
563
564
564
debug ! ( "subst_bound: t_source={} substs={} t_substituted={} t_expected={}" ,
@@ -578,7 +578,7 @@ fn subst_ty_renumber_some_bounds() {
578
578
* level of binding. This requires adjusting the Debruijn index.
579
579
*/
580
580
581
- test_env ( EMPTY_SOURCE_STR , errors ( [ ] ) , |env| {
581
+ test_env ( EMPTY_SOURCE_STR , errors ( & [ ] ) , |env| {
582
582
// Situation:
583
583
// Theta = [A -> &'a foo]
584
584
@@ -587,7 +587,7 @@ fn subst_ty_renumber_some_bounds() {
587
587
// t_source = (A, fn(A))
588
588
let t_source = {
589
589
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 ( ) ) )
591
591
} ;
592
592
593
593
let substs = subst:: Substs :: new_type ( vec ! [ t_rptr_bound1] , vec ! [ ] ) ;
@@ -598,7 +598,7 @@ fn subst_ty_renumber_some_bounds() {
598
598
// but not that the Debruijn index is different in the different cases.
599
599
let t_expected = {
600
600
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 ( ) ) )
602
602
} ;
603
603
604
604
debug ! ( "subst_bound: t_source={} substs={} t_substituted={} t_expected={}" ,
@@ -618,7 +618,7 @@ fn escaping() {
618
618
* regions or not.
619
619
*/
620
620
621
- test_env ( EMPTY_SOURCE_STR , errors ( [ ] ) , |env| {
621
+ test_env ( EMPTY_SOURCE_STR , errors ( & [ ] ) , |env| {
622
622
// Situation:
623
623
// Theta = [A -> &'a foo]
624
624
@@ -636,19 +636,19 @@ fn escaping() {
636
636
// t_fn = fn(A)
637
637
let t_param = env. t_param ( subst:: TypeSpace , 0 ) ;
638
638
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 ( ) ) ;
640
640
assert ! ( !ty:: type_has_escaping_regions( t_fn) ) ;
641
641
642
642
// 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 ) ) ;
644
644
assert ! ( !ty:: type_has_escaping_regions( t_fn) ) ;
645
645
646
646
// 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 ) ) ;
648
648
assert ! ( ty:: type_has_escaping_regions( t_fn) ) ;
649
649
650
650
// 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 ( ) ,
652
652
env. re_late_bound_with_debruijn ( 1 , ty:: DebruijnIndex :: new ( 1 ) ) ) ;
653
653
assert ! ( ty:: type_has_escaping_regions( t_fn) ) ;
654
654
} )
@@ -661,13 +661,13 @@ fn subst_region_renumber_region() {
661
661
* for an early-bound region is a late-bound region.
662
662
*/
663
663
664
- test_env ( EMPTY_SOURCE_STR , errors ( [ ] ) , |env| {
664
+ test_env ( EMPTY_SOURCE_STR , errors ( & [ ] ) , |env| {
665
665
let re_bound1 = env. re_late_bound_with_debruijn ( 1 , ty:: DebruijnIndex :: new ( 1 ) ) ;
666
666
667
667
// type t_source<'a> = fn(&'a int)
668
668
let t_source = {
669
669
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 ( ) )
671
671
} ;
672
672
673
673
let substs = subst:: Substs :: new_type ( vec ! [ ] , vec ! [ re_bound1] ) ;
@@ -678,7 +678,7 @@ fn subst_region_renumber_region() {
678
678
// but not that the Debruijn index is different in the different cases.
679
679
let t_expected = {
680
680
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 ( ) )
682
682
} ;
683
683
684
684
debug ! ( "subst_bound: t_source={} substs={} t_substituted={} t_expected={}" ,
0 commit comments