We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
SecondaryMap
1 parent c99bf94 commit ccfd33bCopy full SHA for ccfd33b
1 file changed
crates/environ/src/collections/secondary_map.rs
@@ -27,6 +27,8 @@ where
27
V: Clone,
28
{
29
/// Same as [`cranelift_entity::SecondaryMap::new`].
30
+ ///
31
+ /// XXX: `Clone::clone(&<V as Default>::default())` should never allocate.
32
pub fn new() -> Self
33
where
34
V: Default,
@@ -37,6 +39,8 @@ where
37
39
}
38
40
41
/// Same as [`cranelift_entity::SecondaryMap::try_with_capacity`].
42
43
44
pub fn with_capacity(capacity: usize) -> Result<Self, OutOfMemory>
45
46
@@ -47,6 +51,8 @@ where
47
51
48
52
49
53
/// Same as [`cranelift_entity::SecondaryMap::with_default`].
54
55
+ /// XXX: `Clone::clone(&default)` should never allocate.
50
56
pub fn with_default(default: V) -> Self {
57
Self {
58
inner: Inner::with_default(default),
0 commit comments