Skip to content

Commit ecf6a6c

Browse files
committed
libregex: accomodate new lifetime rules for droppable things.
In particular, ensure that both of the thread objects created for nlist and clist both outlive nlist and clist themselves.
1 parent 2c02fd9 commit ecf6a6c

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/libregex_macros/lib.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -183,8 +183,10 @@ fn exec<'t>(which: ::regex::native::MatchKind, input: &'t str,
183183
fn run(&mut self, start: uint, end: uint) -> Vec<Option<uint>> {
184184
let mut matched = false;
185185
let prefix_bytes: &[u8] = $prefix_bytes;
186-
let mut clist = &mut Threads::new(self.which);
187-
let mut nlist = &mut Threads::new(self.which);
186+
let mut cthread = Threads::new(self.which);
187+
let mut nthread = Threads::new(self.which);
188+
let mut clist = &mut cthread;
189+
let mut nlist = &mut nthread;
188190

189191
let mut groups = $init_groups;
190192

0 commit comments

Comments
 (0)