Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit c2e5135

Browse files
committedMar 12, 2014
auto merge of #12807 : pnkfelix/rust/fsk-issue5121-fns-with-early-lifetime-params, r=pnkfelix
Fix issue #5121: Add proper support for early/late distinction for lifetime bindings. There are some little refactoring cleanups as separate commits; the real meat that has the actual fix is in the final commit. The original author of the work was @nikomatsakis; I have reviewed it, revised it slightly, refactored it into these separate commits, and done some rebasing work.
2 parents 397abb7 + 742e458 commit c2e5135

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+702
-313
lines changed
 

‎src/librustc/front/std_inject.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -164,12 +164,12 @@ impl fold::Folder for PreludeInjector {
164164
segments: vec!(
165165
ast::PathSegment {
166166
identifier: token::str_to_ident("std"),
167-
lifetimes: opt_vec::Empty,
167+
lifetimes: Vec::new(),
168168
types: opt_vec::Empty,
169169
},
170170
ast::PathSegment {
171171
identifier: token::str_to_ident("prelude"),
172-
lifetimes: opt_vec::Empty,
172+
lifetimes: Vec::new(),
173173
types: opt_vec::Empty,
174174
}),
175175
};

‎src/librustc/front/test.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -369,7 +369,7 @@ fn path_node(ids: Vec<ast::Ident> ) -> ast::Path {
369369
global: false,
370370
segments: ids.move_iter().map(|identifier| ast::PathSegment {
371371
identifier: identifier,
372-
lifetimes: opt_vec::Empty,
372+
lifetimes: Vec::new(),
373373
types: opt_vec::Empty,
374374
}).collect()
375375
}
@@ -381,7 +381,7 @@ fn path_node_global(ids: Vec<ast::Ident> ) -> ast::Path {
381381
global: true,
382382
segments: ids.move_iter().map(|identifier| ast::PathSegment {
383383
identifier: identifier,
384-
lifetimes: opt_vec::Empty,
384+
lifetimes: Vec::new(),
385385
types: opt_vec::Empty,
386386
}).collect()
387387
}

0 commit comments

Comments
 (0)
Please sign in to comment.