Skip to content

Commit 72b9707

Browse files
committed
do not use fresh regions in return type
This test was abusing #32330; cleanup the code some.
1 parent 136a83a commit 72b9707

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

src/test/run-pass/dropck_legal_cycles.rs

+11-11
Original file line numberDiff line numberDiff line change
@@ -458,7 +458,7 @@ struct S<'a> {
458458
}
459459

460460
impl<'a> Named for S<'a> {
461-
fn new<'b>(name: &'static str) -> S<'b> {
461+
fn new(name: &'static str) -> S<'a> {
462462
S { name: name, mark: Cell::new(0), next: Cell::new(None) }
463463
}
464464
fn name(&self) -> &str { self.name }
@@ -476,7 +476,7 @@ struct S2<'a> {
476476
}
477477

478478
impl<'a> Named for S2<'a> {
479-
fn new<'b>(name: &'static str) -> S2<'b> {
479+
fn new(name: &'static str) -> S2<'a> {
480480
S2 { name: name, mark: Cell::new(0), next: Cell::new((None, None)) }
481481
}
482482
fn name(&self) -> &str { self.name }
@@ -496,7 +496,7 @@ struct V<'a> {
496496
}
497497

498498
impl<'a> Named for V<'a> {
499-
fn new<'b>(name: &'static str) -> V<'b> {
499+
fn new(name: &'static str) -> V<'a> {
500500
V { name: name,
501501
mark: Cell::new(0),
502502
contents: vec![Cell::new(None), Cell::new(None)]
@@ -518,7 +518,7 @@ struct H<'a> {
518518
}
519519

520520
impl<'a> Named for H<'a> {
521-
fn new<'b>(name: &'static str) -> H<'b> {
521+
fn new(name: &'static str) -> H<'a> {
522522
H { name: name, mark: Cell::new(0), next: Cell::new(None) }
523523
}
524524
fn name(&self) -> &str { self.name }
@@ -549,7 +549,7 @@ struct HM<'a> {
549549
}
550550

551551
impl<'a> Named for HM<'a> {
552-
fn new<'b>(name: &'static str) -> HM<'b> {
552+
fn new(name: &'static str) -> HM<'a> {
553553
HM { name: name,
554554
mark: Cell::new(0),
555555
contents: Cell::new(None)
@@ -583,7 +583,7 @@ struct VD<'a> {
583583
}
584584

585585
impl<'a> Named for VD<'a> {
586-
fn new<'b>(name: &'static str) -> VD<'b> {
586+
fn new(name: &'static str) -> VD<'a> {
587587
VD { name: name,
588588
mark: Cell::new(0),
589589
contents: Cell::new(None)
@@ -604,7 +604,7 @@ struct VM<'a> {
604604
}
605605

606606
impl<'a> Named for VM<'a> {
607-
fn new<'b>(name: &'static str) -> VM<'b> {
607+
fn new(name: &'static str) -> VM<'a> {
608608
VM { name: name,
609609
mark: Cell::new(0),
610610
contents: Cell::new(None)
@@ -625,7 +625,7 @@ struct LL<'a> {
625625
}
626626

627627
impl<'a> Named for LL<'a> {
628-
fn new<'b>(name: &'static str) -> LL<'b> {
628+
fn new(name: &'static str) -> LL<'a> {
629629
LL { name: name,
630630
mark: Cell::new(0),
631631
contents: Cell::new(None)
@@ -646,7 +646,7 @@ struct BH<'a> {
646646
}
647647

648648
impl<'a> Named for BH<'a> {
649-
fn new<'b>(name: &'static str) -> BH<'b> {
649+
fn new(name: &'static str) -> BH<'a> {
650650
BH { name: name,
651651
mark: Cell::new(0),
652652
contents: Cell::new(None)
@@ -687,7 +687,7 @@ struct BTM<'a> {
687687
}
688688

689689
impl<'a> Named for BTM<'a> {
690-
fn new<'b>(name: &'static str) -> BTM<'b> {
690+
fn new(name: &'static str) -> BTM<'a> {
691691
BTM { name: name,
692692
mark: Cell::new(0),
693693
contents: Cell::new(None)
@@ -728,7 +728,7 @@ struct BTS<'a> {
728728
}
729729

730730
impl<'a> Named for BTS<'a> {
731-
fn new<'b>(name: &'static str) -> BTS<'b> {
731+
fn new(name: &'static str) -> BTS<'a> {
732732
BTS { name: name,
733733
mark: Cell::new(0),
734734
contents: Cell::new(None)

0 commit comments

Comments
 (0)