@@ -149,12 +149,11 @@ unsafe impl<#[may_dangle] K, #[may_dangle] V> Drop for BTreeMap<K, V> {
149
149
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
150
150
impl < K : Clone , V : Clone > Clone for BTreeMap < K , V > {
151
151
fn clone ( & self ) -> BTreeMap < K , V > {
152
- fn clone_subtree < K : Clone , V : Clone > ( node : node:: NodeRef < marker:: Immut ,
153
- K ,
154
- V ,
155
- marker:: LeafOrInternal > )
156
- -> BTreeMap < K , V > {
157
-
152
+ fn clone_subtree < ' a , K : Clone , V : Clone > (
153
+ node : node:: NodeRef < marker:: Immut < ' a > , K , V , marker:: LeafOrInternal >
154
+ ) -> BTreeMap < K , V >
155
+ where K : ' a , V : ' a ,
156
+ {
158
157
match node. force ( ) {
159
158
Leaf ( leaf) => {
160
159
let mut out_tree = BTreeMap {
@@ -1080,7 +1079,11 @@ impl<K: Ord, V> BTreeMap<K, V> {
1080
1079
1081
1080
/// Calculates the number of elements if it is incorrect.
1082
1081
fn recalc_length ( & mut self ) {
1083
- fn dfs < K , V > ( node : NodeRef < marker:: Immut , K , V , marker:: LeafOrInternal > ) -> usize {
1082
+ fn dfs < ' a , K , V > (
1083
+ node : NodeRef < marker:: Immut < ' a > , K , V , marker:: LeafOrInternal >
1084
+ ) -> usize
1085
+ where K : ' a , V : ' a
1086
+ {
1084
1087
let mut res = node. len ( ) ;
1085
1088
1086
1089
if let Internal ( node) = node. force ( ) {
0 commit comments