Skip to content

Commit ea0dbc8

Browse files
author
bors-servo
authored
Auto merge of #198 - mbrubeck:macro, r=jdm
Use full path to vec! in smallvec! macro Fixes #197
2 parents 6e61239 + 74e9319 commit ea0dbc8

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

lib.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,14 +31,14 @@
3131
#![cfg_attr(feature = "may_dangle", feature(dropck_eyepatch))]
3232
#![deny(missing_docs)]
3333

34-
#[macro_use]
35-
extern crate alloc;
34+
#[doc(hidden)]
35+
pub extern crate alloc;
3636

3737
#[cfg(any(test, feature = "write"))]
3838
extern crate std;
3939

4040
use alloc::boxed::Box;
41-
use alloc::vec::Vec;
41+
use alloc::{vec, vec::Vec};
4242
use core::borrow::{Borrow, BorrowMut};
4343
use core::cmp;
4444
use core::fmt;
@@ -116,7 +116,7 @@ macro_rules! smallvec {
116116
$(vec.push($x);)*
117117
vec
118118
} else {
119-
$crate::SmallVec::from_vec(vec![$($x,)*])
119+
$crate::SmallVec::from_vec($crate::alloc::vec![$($x,)*])
120120
}
121121
});
122122
}
@@ -1693,7 +1693,7 @@ mod tests {
16931693
use alloc::borrow::ToOwned;
16941694
use alloc::boxed::Box;
16951695
use alloc::rc::Rc;
1696-
use alloc::vec::Vec;
1696+
use alloc::{vec, vec::Vec};
16971697

16981698
#[test]
16991699
pub fn test_zero() {

0 commit comments

Comments
 (0)