Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Zoxc committed Jan 11, 2019
1 parent 2363852 commit 274b927
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/libarena/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ extern crate smallvec;
extern crate rustc_data_structures;

use rustc_data_structures::sync::MTLock;
#[allow(unused_imports)]
use smallvec::SmallVec;

use std::cell::{Cell, RefCell};
Expand Down Expand Up @@ -194,6 +195,7 @@ impl<T> TypedArena<T> {
}
}

#[allow(unreachable_code)]
pub fn alloc_from_iter<I: IntoIterator<Item=T>>(&self, iter: I) -> &[T] where T: Clone {
assert!(mem::size_of::<T>() != 0);
let vec: Vec<_> = iter.into_iter().collect();
Expand Down

0 comments on commit 274b927

Please sign in to comment.