Skip to content

Commit

Permalink
Import from alloc to make remaining std dependencies clear
Browse files Browse the repository at this point in the history
  • Loading branch information
dtolnay committed Jul 16, 2023
1 parent 00360bc commit 177c700
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
2 changes: 2 additions & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,8 @@ compile_error! {"\
build script as well.
"}

extern crate alloc;

#[cfg(feature = "proc-macro")]
extern crate proc_macro;

Expand Down
4 changes: 2 additions & 2 deletions src/marker.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use alloc::rc::Rc;
use core::marker::PhantomData;
use std::panic::{RefUnwindSafe, UnwindSafe};
use std::rc::Rc;
use core::panic::{RefUnwindSafe, UnwindSafe};

// Zero sized marker with the correct set of autotrait impls we want all proc
// macro types to have.
Expand Down
6 changes: 3 additions & 3 deletions src/rcvec.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
use alloc::rc::Rc;
use alloc::vec;
use core::mem;
use core::panic::RefUnwindSafe;
use core::slice;
use std::panic::RefUnwindSafe;
use std::rc::Rc;
use std::vec;

pub(crate) struct RcVec<T> {
inner: Rc<Vec<T>>,
Expand Down

0 comments on commit 177c700

Please sign in to comment.