We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7187209 commit f31528eCopy full SHA for f31528e
lib.rs
@@ -146,6 +146,7 @@ macro_rules! smallvec {
146
});
147
($($x:expr),*$(,)*) => ({
148
let count = 0usize $(+ $crate::smallvec!(@one $x))*;
149
+ #[allow(unused_mut)]
150
let mut vec = $crate::SmallVec::new();
151
if count <= vec.inline_size() {
152
$(vec.push($x);)*
@@ -2708,4 +2709,9 @@ mod tests {
2708
2709
fn const_generics() {
2710
let _v = SmallVec::<[i32; 987]>::default();
2711
}
2712
+
2713
+ #[test]
2714
+ fn empty_macro() {
2715
+ let _v: SmallVec<[u8; 1]> = smallvec![];
2716
+ }
2717
0 commit comments