Added support for defining macros in Rust within the macro system
Also fixed a lot of bugs
This commit is contained in:
@@ -52,10 +52,7 @@ impl ExprHandle {
|
||||
/// nothing, otherwise send an Acquire
|
||||
pub async fn drop_one(self: Rc<Self>) {
|
||||
match Rc::try_unwrap(self) {
|
||||
Err(rc) => {
|
||||
eprintln!("Extending lifetime for {:?}", rc.tk);
|
||||
rc.ctx.reqnot().notify(api::Acquire(rc.ctx.sys_id(), rc.tk)).await
|
||||
},
|
||||
Err(rc) => rc.ctx.reqnot().notify(api::Acquire(rc.ctx.sys_id(), rc.tk)).await,
|
||||
Ok(hand) => {
|
||||
// avoid calling destructor
|
||||
hand.destructure();
|
||||
@@ -65,10 +62,7 @@ impl ExprHandle {
|
||||
/// Drop the handle and get the ticket without a release notification.
|
||||
/// Use this with messages that imply ownership transfer. This function is
|
||||
/// safe because abusing it is a memory leak.
|
||||
pub fn serialize(self) -> api::ExprTicket {
|
||||
eprintln!("Skipping destructor for {:?}", self.tk);
|
||||
self.destructure().0
|
||||
}
|
||||
pub fn serialize(self) -> api::ExprTicket { self.destructure().0 }
|
||||
}
|
||||
impl Eq for ExprHandle {}
|
||||
impl PartialEq for ExprHandle {
|
||||
|
||||
Reference in New Issue
Block a user