Changed lists of lifetimes in ast and ty to use Vec instead of OptVec.
There is a broader revision (that does this across the board) pending in #12675, but that is awaiting the arrival of more data (to decide whether to keep OptVec alive by using a non-Vec internally). For this code, the representation of lifetime lists needs to be the same in both ScopeChain and in the ast and ty structures. So it seemed cleanest to just use `vec_ng::Vec`, now that it has a cheaper empty representation than the current `vec` code.
This commit is contained in:
parent
28ebec5160
commit
586b619c76
19 changed files with 72 additions and 71 deletions
|
@ -556,7 +556,7 @@ mod test {
|
|||
segments: vec!(
|
||||
ast::PathSegment {
|
||||
identifier: str_to_ident("d"),
|
||||
lifetimes: opt_vec::Empty,
|
||||
lifetimes: Vec::new(),
|
||||
types: opt_vec::Empty,
|
||||
}
|
||||
),
|
||||
|
@ -578,7 +578,7 @@ mod test {
|
|||
segments: vec!(
|
||||
ast::PathSegment {
|
||||
identifier: str_to_ident("b"),
|
||||
lifetimes: opt_vec::Empty,
|
||||
lifetimes: Vec::new(),
|
||||
types: opt_vec::Empty,
|
||||
}
|
||||
),
|
||||
|
@ -605,7 +605,7 @@ mod test {
|
|||
segments: vec!(
|
||||
ast::PathSegment {
|
||||
identifier: str_to_ident("b"),
|
||||
lifetimes: opt_vec::Empty,
|
||||
lifetimes: Vec::new(),
|
||||
types: opt_vec::Empty,
|
||||
}
|
||||
),
|
||||
|
@ -633,7 +633,7 @@ mod test {
|
|||
ast::PathSegment {
|
||||
identifier:
|
||||
str_to_ident("int"),
|
||||
lifetimes: opt_vec::Empty,
|
||||
lifetimes: Vec::new(),
|
||||
types: opt_vec::Empty,
|
||||
}
|
||||
),
|
||||
|
@ -651,7 +651,7 @@ mod test {
|
|||
ast::PathSegment {
|
||||
identifier:
|
||||
str_to_ident("b"),
|
||||
lifetimes: opt_vec::Empty,
|
||||
lifetimes: Vec::new(),
|
||||
types: opt_vec::Empty,
|
||||
}
|
||||
),
|
||||
|
@ -671,7 +671,7 @@ mod test {
|
|||
ast::ImpureFn,
|
||||
abi::AbiSet::Rust(),
|
||||
ast::Generics{ // no idea on either of these:
|
||||
lifetimes: opt_vec::Empty,
|
||||
lifetimes: Vec::new(),
|
||||
ty_params: opt_vec::Empty,
|
||||
},
|
||||
ast::P(ast::Block {
|
||||
|
@ -689,7 +689,7 @@ mod test {
|
|||
str_to_ident(
|
||||
"b"),
|
||||
lifetimes:
|
||||
opt_vec::Empty,
|
||||
Vec::new(),
|
||||
types:
|
||||
opt_vec::Empty
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue