syntax: add a custom owned smart pointer in ptr::P.
This commit is contained in:
@@ -25,16 +25,6 @@ use std::rc::Rc;
|
||||
use std::gc::{Gc, GC};
|
||||
use serialize::{Encodable, Decodable, Encoder, Decoder};
|
||||
|
||||
/// A pointer abstraction.
|
||||
// FIXME(eddyb) #10676 use Rc<T> in the future.
|
||||
pub type P<T> = Gc<T>;
|
||||
|
||||
#[allow(non_snake_case)]
|
||||
/// Construct a P<T> from a T value.
|
||||
pub fn P<T: 'static>(value: T) -> P<T> {
|
||||
box(GC) value
|
||||
}
|
||||
|
||||
// FIXME #6993: in librustc, uses of "ident" should be replaced
|
||||
// by just "Name".
|
||||
|
||||
|
||||
Reference in New Issue
Block a user