Generalize AST and ty::Generics to accept multiple lifetimes.
This commit is contained in:
@@ -1566,13 +1566,13 @@ fn print_path_(s: @ps,
|
||||
}
|
||||
}
|
||||
|
||||
if segment.lifetime.is_some() || !segment.types.is_empty() {
|
||||
if !segment.lifetimes.is_empty() || !segment.types.is_empty() {
|
||||
if colons_before_params {
|
||||
word(s.s, "::")
|
||||
}
|
||||
word(s.s, "<");
|
||||
|
||||
for lifetime in segment.lifetime.iter() {
|
||||
for lifetime in segment.lifetimes.iter() {
|
||||
print_lifetime(s, lifetime);
|
||||
if !segment.types.is_empty() {
|
||||
word_space(s, ",")
|
||||
@@ -1905,7 +1905,8 @@ pub fn print_meta_item(s: @ps, item: &ast::MetaItem) {
|
||||
pub fn print_view_path(s: @ps, vp: &ast::view_path) {
|
||||
match vp.node {
|
||||
ast::view_path_simple(ident, ref path, _) => {
|
||||
if path.segments.last().identifier != ident {
|
||||
// FIXME can't compare identifiers directly here
|
||||
if path.segments.last().identifier.name != ident.name {
|
||||
print_ident(s, ident);
|
||||
space(s.s);
|
||||
word_space(s, "=");
|
||||
|
||||
Reference in New Issue
Block a user