From 177c70071151a0be9117f1439d2f487e6722df3c Mon Sep 17 00:00:00 2001 From: David Tolnay Date: Sun, 16 Jul 2023 11:51:00 -0700 Subject: [PATCH] Import from alloc to make remaining std dependencies clear --- src/lib.rs | 2 ++ src/marker.rs | 4 ++-- src/rcvec.rs | 6 +++--- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index f7d8610b..d8ba615c 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -118,6 +118,8 @@ compile_error! {"\ build script as well. "} +extern crate alloc; + #[cfg(feature = "proc-macro")] extern crate proc_macro; diff --git a/src/marker.rs b/src/marker.rs index 59fd0963..e648dd21 100644 --- a/src/marker.rs +++ b/src/marker.rs @@ -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. diff --git a/src/rcvec.rs b/src/rcvec.rs index 4b3920b8..37955afb 100644 --- a/src/rcvec.rs +++ b/src/rcvec.rs @@ -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 { inner: Rc>,