Remove some transitional code
This commit is contained in:
parent
fa74edf1a0
commit
287114a3b9
|
@ -4,10 +4,6 @@
|
|||
|
||||
use option::{Some, None};
|
||||
use Option = option::Option;
|
||||
// XXX: snapshot rustc is generating code that wants lower-case option
|
||||
#[cfg(stage0)]
|
||||
use option = option::Option;
|
||||
|
||||
use result::{Result, Ok, Err};
|
||||
|
||||
use Path = path::Path;
|
||||
|
|
|
@ -268,12 +268,198 @@ mod ct {
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
// Functions used by the fmt extension at runtime. For now there are a lot of
|
||||
// decisions made a runtime. If it proves worthwhile then some of these
|
||||
// conditions can be evaluated at compile-time. For now though it's cleaner to
|
||||
// implement it 0this way, I think.
|
||||
// XXX Rename to rt after snapshot
|
||||
mod rt {
|
||||
const flag_none : u32 = 0u32;
|
||||
const flag_left_justify : u32 = 0b00000000000000000000000000000001u32;
|
||||
const flag_left_zero_pad : u32 = 0b00000000000000000000000000000010u32;
|
||||
const flag_space_for_sign : u32 = 0b00000000000000000000000000000100u32;
|
||||
const flag_sign_always : u32 = 0b00000000000000000000000000001000u32;
|
||||
const flag_alternate : u32 = 0b00000000000000000000000000010000u32;
|
||||
|
||||
enum Count { CountIs(int), CountImplied, }
|
||||
enum Ty { TyDefault, TyBits, TyHexUpper, TyHexLower, TyOctal, }
|
||||
|
||||
type Conv = {flags: u32, width: Count, precision: Count, ty: Ty};
|
||||
|
||||
pure fn conv_int(cv: Conv, i: int) -> ~str {
|
||||
let radix = 10u;
|
||||
let prec = get_int_precision(cv);
|
||||
let mut s : ~str = int_to_str_prec(i, radix, prec);
|
||||
if 0 <= i {
|
||||
if have_flag(cv.flags, flag_sign_always) {
|
||||
unchecked { str::unshift_char(s, '+') };
|
||||
} else if have_flag(cv.flags, flag_space_for_sign) {
|
||||
unchecked { str::unshift_char(s, ' ') };
|
||||
}
|
||||
}
|
||||
return unchecked { pad(cv, s, PadSigned) };
|
||||
}
|
||||
pure fn conv_uint(cv: Conv, u: uint) -> ~str {
|
||||
let prec = get_int_precision(cv);
|
||||
let mut rs =
|
||||
match cv.ty {
|
||||
TyDefault => uint_to_str_prec(u, 10u, prec),
|
||||
TyHexLower => uint_to_str_prec(u, 16u, prec),
|
||||
TyHexUpper => str::to_upper(uint_to_str_prec(u, 16u, prec)),
|
||||
TyBits => uint_to_str_prec(u, 2u, prec),
|
||||
TyOctal => uint_to_str_prec(u, 8u, prec)
|
||||
};
|
||||
return unchecked { pad(cv, rs, PadUnsigned) };
|
||||
}
|
||||
pure fn conv_bool(cv: Conv, b: bool) -> ~str {
|
||||
let s = if b { ~"true" } else { ~"false" };
|
||||
// run the boolean conversion through the string conversion logic,
|
||||
// giving it the same rules for precision, etc.
|
||||
return conv_str(cv, s);
|
||||
}
|
||||
pure fn conv_char(cv: Conv, c: char) -> ~str {
|
||||
let mut s = str::from_char(c);
|
||||
return unchecked { pad(cv, s, PadNozero) };
|
||||
}
|
||||
pure fn conv_str(cv: Conv, s: &str) -> ~str {
|
||||
// For strings, precision is the maximum characters
|
||||
// displayed
|
||||
let mut unpadded = match cv.precision {
|
||||
CountImplied => s.to_unique(),
|
||||
CountIs(max) => if max as uint < str::char_len(s) {
|
||||
str::substr(s, 0u, max as uint)
|
||||
} else {
|
||||
s.to_unique()
|
||||
}
|
||||
};
|
||||
return unchecked { pad(cv, unpadded, PadNozero) };
|
||||
}
|
||||
pure fn conv_float(cv: Conv, f: float) -> ~str {
|
||||
let (to_str, digits) = match cv.precision {
|
||||
CountIs(c) => (float::to_str_exact, c as uint),
|
||||
CountImplied => (float::to_str, 6u)
|
||||
};
|
||||
let mut s = unchecked { to_str(f, digits) };
|
||||
if 0.0 <= f {
|
||||
if have_flag(cv.flags, flag_sign_always) {
|
||||
s = ~"+" + s;
|
||||
} else if have_flag(cv.flags, flag_space_for_sign) {
|
||||
s = ~" " + s;
|
||||
}
|
||||
}
|
||||
return unchecked { pad(cv, s, PadFloat) };
|
||||
}
|
||||
pure fn conv_poly<T>(cv: Conv, v: T) -> ~str {
|
||||
let s = sys::log_str(v);
|
||||
return conv_str(cv, s);
|
||||
}
|
||||
|
||||
// Convert an int to string with minimum number of digits. If precision is
|
||||
// 0 and num is 0 then the result is the empty string.
|
||||
pure fn int_to_str_prec(num: int, radix: uint, prec: uint) -> ~str {
|
||||
return if num < 0 {
|
||||
~"-" + uint_to_str_prec(-num as uint, radix, prec)
|
||||
} else { uint_to_str_prec(num as uint, radix, prec) };
|
||||
}
|
||||
|
||||
// Convert a uint to string with a minimum number of digits. If precision
|
||||
// is 0 and num is 0 then the result is the empty string. Could move this
|
||||
// to uint: but it doesn't seem all that useful.
|
||||
pure fn uint_to_str_prec(num: uint, radix: uint, prec: uint) -> ~str {
|
||||
return if prec == 0u && num == 0u {
|
||||
~""
|
||||
} else {
|
||||
let s = uint::to_str(num, radix);
|
||||
let len = str::char_len(s);
|
||||
if len < prec {
|
||||
let diff = prec - len;
|
||||
let pad = str::from_chars(vec::from_elem(diff, '0'));
|
||||
pad + s
|
||||
} else { move s }
|
||||
};
|
||||
}
|
||||
pure fn get_int_precision(cv: Conv) -> uint {
|
||||
return match cv.precision {
|
||||
CountIs(c) => c as uint,
|
||||
CountImplied => 1u
|
||||
};
|
||||
}
|
||||
|
||||
enum PadMode { PadSigned, PadUnsigned, PadNozero, PadFloat }
|
||||
|
||||
impl PadMode: Eq {
|
||||
pure fn eq(&&other: PadMode) -> bool {
|
||||
match (self, other) {
|
||||
(PadSigned, PadSigned) => true,
|
||||
(PadUnsigned, PadUnsigned) => true,
|
||||
(PadNozero, PadNozero) => true,
|
||||
(PadFloat, PadFloat) => true,
|
||||
(PadSigned, _) => false,
|
||||
(PadUnsigned, _) => false,
|
||||
(PadNozero, _) => false,
|
||||
(PadFloat, _) => false
|
||||
}
|
||||
}
|
||||
pure fn ne(&&other: PadMode) -> bool { !self.eq(other) }
|
||||
}
|
||||
|
||||
fn pad(cv: Conv, &s: ~str, mode: PadMode) -> ~str {
|
||||
let uwidth : uint = match cv.width {
|
||||
CountImplied => return copy s,
|
||||
CountIs(width) => {
|
||||
// FIXME: width should probably be uint (see Issue #1996)
|
||||
width as uint
|
||||
}
|
||||
};
|
||||
let strlen = str::char_len(s);
|
||||
if uwidth <= strlen { return copy s; }
|
||||
let mut padchar = ' ';
|
||||
let diff = uwidth - strlen;
|
||||
if have_flag(cv.flags, flag_left_justify) {
|
||||
let padstr = str::from_chars(vec::from_elem(diff, padchar));
|
||||
return s + padstr;
|
||||
}
|
||||
let {might_zero_pad, signed} = match mode {
|
||||
PadNozero => {might_zero_pad:false, signed:false},
|
||||
PadSigned => {might_zero_pad:true, signed:true },
|
||||
PadFloat => {might_zero_pad:true, signed:true},
|
||||
PadUnsigned => {might_zero_pad:true, signed:false}
|
||||
};
|
||||
pure fn have_precision(cv: Conv) -> bool {
|
||||
return match cv.precision { CountImplied => false, _ => true };
|
||||
}
|
||||
let zero_padding = {
|
||||
if might_zero_pad && have_flag(cv.flags, flag_left_zero_pad) &&
|
||||
(!have_precision(cv) || mode == PadFloat) {
|
||||
padchar = '0';
|
||||
true
|
||||
} else {
|
||||
false
|
||||
}
|
||||
};
|
||||
let padstr = str::from_chars(vec::from_elem(diff, padchar));
|
||||
// This is completely heinous. If we have a signed value then
|
||||
// potentially rip apart the intermediate result and insert some
|
||||
// zeros. It may make sense to convert zero padding to a precision
|
||||
// instead.
|
||||
|
||||
if signed && zero_padding && str::len(s) > 0u {
|
||||
let head = str::shift_char(s);
|
||||
if head == '+' || head == '-' || head == ' ' {
|
||||
let headstr = str::from_chars(vec::from_elem(1u, head));
|
||||
return headstr + padstr + s;
|
||||
}
|
||||
else {
|
||||
str::unshift_char(s, head);
|
||||
}
|
||||
}
|
||||
return padstr + s;
|
||||
}
|
||||
pure fn have_flag(flags: u32, f: u32) -> bool {
|
||||
flags & f != 0
|
||||
}
|
||||
}
|
||||
|
||||
// XXX remove after snapshots
|
||||
mod rt2 {
|
||||
const flag_none : u32 = 0u32;
|
||||
const flag_left_justify : u32 = 0b00000000000000000000000000000001u32;
|
||||
|
@ -461,196 +647,6 @@ mod rt2 {
|
|||
}
|
||||
}
|
||||
|
||||
// XXX remove after snappies
|
||||
#[allow(non_camel_case_types)]
|
||||
mod rt {
|
||||
const flag_none : u32 = 0u32;
|
||||
const flag_left_justify : u32 = 0b00000000000000000000000000000001u32;
|
||||
const flag_left_zero_pad : u32 = 0b00000000000000000000000000000010u32;
|
||||
const flag_space_for_sign : u32 = 0b00000000000000000000000000000100u32;
|
||||
const flag_sign_always : u32 = 0b00000000000000000000000000001000u32;
|
||||
const flag_alternate : u32 = 0b00000000000000000000000000010000u32;
|
||||
|
||||
enum count { count_is(int), count_implied, }
|
||||
enum ty { ty_default, ty_bits, ty_hex_upper, ty_hex_lower, ty_octal, }
|
||||
|
||||
type conv = {flags: u32, width: count, precision: count, ty: ty};
|
||||
|
||||
pure fn conv_int(cv: conv, i: int) -> ~str {
|
||||
let radix = 10u;
|
||||
let prec = get_int_precision(cv);
|
||||
let mut s : ~str = int_to_str_prec(i, radix, prec);
|
||||
if 0 <= i {
|
||||
if have_flag(cv.flags, flag_sign_always) {
|
||||
unchecked { str::unshift_char(s, '+') };
|
||||
} else if have_flag(cv.flags, flag_space_for_sign) {
|
||||
unchecked { str::unshift_char(s, ' ') };
|
||||
}
|
||||
}
|
||||
return unchecked { pad(cv, s, pad_signed) };
|
||||
}
|
||||
pure fn conv_uint(cv: conv, u: uint) -> ~str {
|
||||
let prec = get_int_precision(cv);
|
||||
let mut rs =
|
||||
match cv.ty {
|
||||
ty_default => uint_to_str_prec(u, 10u, prec),
|
||||
ty_hex_lower => uint_to_str_prec(u, 16u, prec),
|
||||
ty_hex_upper => str::to_upper(uint_to_str_prec(u, 16u, prec)),
|
||||
ty_bits => uint_to_str_prec(u, 2u, prec),
|
||||
ty_octal => uint_to_str_prec(u, 8u, prec)
|
||||
};
|
||||
return unchecked { pad(cv, rs, pad_unsigned) };
|
||||
}
|
||||
pure fn conv_bool(cv: conv, b: bool) -> ~str {
|
||||
let s = if b { ~"true" } else { ~"false" };
|
||||
// run the boolean conversion through the string conversion logic,
|
||||
// giving it the same rules for precision, etc.
|
||||
return conv_str(cv, s);
|
||||
}
|
||||
pure fn conv_char(cv: conv, c: char) -> ~str {
|
||||
let mut s = str::from_char(c);
|
||||
return unchecked { pad(cv, s, pad_nozero) };
|
||||
}
|
||||
pure fn conv_str(cv: conv, s: &str) -> ~str {
|
||||
// For strings, precision is the maximum characters
|
||||
// displayed
|
||||
let mut unpadded = match cv.precision {
|
||||
count_implied => s.to_unique(),
|
||||
count_is(max) => if max as uint < str::char_len(s) {
|
||||
str::substr(s, 0u, max as uint)
|
||||
} else {
|
||||
s.to_unique()
|
||||
}
|
||||
};
|
||||
return unchecked { pad(cv, unpadded, pad_nozero) };
|
||||
}
|
||||
pure fn conv_float(cv: conv, f: float) -> ~str {
|
||||
let (to_str, digits) = match cv.precision {
|
||||
count_is(c) => (float::to_str_exact, c as uint),
|
||||
count_implied => (float::to_str, 6u)
|
||||
};
|
||||
let mut s = unchecked { to_str(f, digits) };
|
||||
if 0.0 <= f {
|
||||
if have_flag(cv.flags, flag_sign_always) {
|
||||
s = ~"+" + s;
|
||||
} else if have_flag(cv.flags, flag_space_for_sign) {
|
||||
s = ~" " + s;
|
||||
}
|
||||
}
|
||||
return unchecked { pad(cv, s, pad_float) };
|
||||
}
|
||||
pure fn conv_poly<T>(cv: conv, v: T) -> ~str {
|
||||
let s = sys::log_str(v);
|
||||
return conv_str(cv, s);
|
||||
}
|
||||
|
||||
// Convert an int to string with minimum number of digits. If precision is
|
||||
// 0 and num is 0 then the result is the empty string.
|
||||
pure fn int_to_str_prec(num: int, radix: uint, prec: uint) -> ~str {
|
||||
return if num < 0 {
|
||||
~"-" + uint_to_str_prec(-num as uint, radix, prec)
|
||||
} else { uint_to_str_prec(num as uint, radix, prec) };
|
||||
}
|
||||
|
||||
// Convert a uint to string with a minimum number of digits. If precision
|
||||
// is 0 and num is 0 then the result is the empty string. Could move this
|
||||
// to uint: but it doesn't seem all that useful.
|
||||
pure fn uint_to_str_prec(num: uint, radix: uint, prec: uint) -> ~str {
|
||||
return if prec == 0u && num == 0u {
|
||||
~""
|
||||
} else {
|
||||
let s = uint::to_str(num, radix);
|
||||
let len = str::char_len(s);
|
||||
if len < prec {
|
||||
let diff = prec - len;
|
||||
let pad = str::from_chars(vec::from_elem(diff, '0'));
|
||||
pad + s
|
||||
} else { move s }
|
||||
};
|
||||
}
|
||||
pure fn get_int_precision(cv: conv) -> uint {
|
||||
return match cv.precision {
|
||||
count_is(c) => c as uint,
|
||||
count_implied => 1u
|
||||
};
|
||||
}
|
||||
|
||||
enum pad_mode { pad_signed, pad_unsigned, pad_nozero, pad_float }
|
||||
|
||||
impl pad_mode: Eq {
|
||||
pure fn eq(&&other: pad_mode) -> bool {
|
||||
match (self, other) {
|
||||
(pad_signed, pad_signed) => true,
|
||||
(pad_unsigned, pad_unsigned) => true,
|
||||
(pad_nozero, pad_nozero) => true,
|
||||
(pad_float, pad_float) => true,
|
||||
(pad_signed, _) => false,
|
||||
(pad_unsigned, _) => false,
|
||||
(pad_nozero, _) => false,
|
||||
(pad_float, _) => false
|
||||
}
|
||||
}
|
||||
pure fn ne(&&other: pad_mode) -> bool { !self.eq(other) }
|
||||
}
|
||||
|
||||
fn pad(cv: conv, &s: ~str, mode: pad_mode) -> ~str {
|
||||
let uwidth : uint = match cv.width {
|
||||
count_implied => return copy s,
|
||||
count_is(width) => {
|
||||
// FIXME: width should probably be uint (see Issue #1996)
|
||||
width as uint
|
||||
}
|
||||
};
|
||||
let strlen = str::char_len(s);
|
||||
if uwidth <= strlen { return copy s; }
|
||||
let mut padchar = ' ';
|
||||
let diff = uwidth - strlen;
|
||||
if have_flag(cv.flags, flag_left_justify) {
|
||||
let padstr = str::from_chars(vec::from_elem(diff, padchar));
|
||||
return s + padstr;
|
||||
}
|
||||
let {might_zero_pad, signed} = match mode {
|
||||
pad_nozero => {might_zero_pad:false, signed:false},
|
||||
pad_signed => {might_zero_pad:true, signed:true },
|
||||
pad_float => {might_zero_pad:true, signed:true},
|
||||
pad_unsigned => {might_zero_pad:true, signed:false}
|
||||
};
|
||||
pure fn have_precision(cv: conv) -> bool {
|
||||
return match cv.precision { count_implied => false, _ => true };
|
||||
}
|
||||
let zero_padding = {
|
||||
if might_zero_pad && have_flag(cv.flags, flag_left_zero_pad) &&
|
||||
(!have_precision(cv) || mode == pad_float) {
|
||||
padchar = '0';
|
||||
true
|
||||
} else {
|
||||
false
|
||||
}
|
||||
};
|
||||
let padstr = str::from_chars(vec::from_elem(diff, padchar));
|
||||
// This is completely heinous. If we have a signed value then
|
||||
// potentially rip apart the intermediate result and insert some
|
||||
// zeros. It may make sense to convert zero padding to a precision
|
||||
// instead.
|
||||
|
||||
if signed && zero_padding && str::len(s) > 0u {
|
||||
let head = str::shift_char(s);
|
||||
if head == '+' || head == '-' || head == ' ' {
|
||||
let headstr = str::from_chars(vec::from_elem(1u, head));
|
||||
return headstr + padstr + s;
|
||||
}
|
||||
else {
|
||||
str::unshift_char(s, head);
|
||||
}
|
||||
}
|
||||
return padstr + s;
|
||||
}
|
||||
pure fn have_flag(flags: u32, f: u32) -> bool {
|
||||
flags & f != 0
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#[cfg(test)]
|
||||
mod test {
|
||||
#[test]
|
||||
|
|
|
@ -101,14 +101,6 @@ export recv_one, try_recv_one, send_one, try_send_one;
|
|||
// Functions used by the protocol compiler
|
||||
export rt;
|
||||
|
||||
// XXX remove me
|
||||
#[cfg(stage0)]
|
||||
export has_buffer, buffer_header, packet;
|
||||
#[cfg(stage0)]
|
||||
export recv_packet_buffered, send_packet_buffered;
|
||||
#[cfg(stage0)]
|
||||
export send_packet, recv_packet, buffer_header;
|
||||
|
||||
#[doc(hidden)]
|
||||
const SPIN_COUNT: uint = 0;
|
||||
|
||||
|
@ -146,10 +138,6 @@ fn BufferHeader() -> BufferHeader{
|
|||
}
|
||||
}
|
||||
|
||||
// XXX remove me
|
||||
#[cfg(stage0)]
|
||||
fn buffer_header() -> BufferHeader { BufferHeader() }
|
||||
|
||||
// This is for protocols to associate extra data to thread around.
|
||||
#[doc(hidden)]
|
||||
type Buffer<T: Send> = {
|
||||
|
@ -212,11 +200,6 @@ type Packet<T: Send> = {
|
|||
mut payload: Option<T>,
|
||||
};
|
||||
|
||||
// XXX remove me
|
||||
#[cfg(stage0)]
|
||||
#[allow(non_camel_case_types)]
|
||||
type packet<T: Send> = Packet<T>;
|
||||
|
||||
#[doc(hidden)]
|
||||
trait HasBuffer {
|
||||
// XXX This should not have a trailing underscore
|
||||
|
@ -229,20 +212,6 @@ impl<T: Send> Packet<T>: HasBuffer {
|
|||
}
|
||||
}
|
||||
|
||||
#[cfg(stage0)] // XXX remove me
|
||||
#[doc(hidden)]
|
||||
#[allow(non_camel_case_types)]
|
||||
trait has_buffer {
|
||||
fn set_buffer(b: *libc::c_void);
|
||||
}
|
||||
|
||||
#[cfg(stage0)] // XXX remove me
|
||||
impl<T: Send> packet<T>: has_buffer {
|
||||
fn set_buffer(b: *libc::c_void) {
|
||||
self.header.buffer = b;
|
||||
}
|
||||
}
|
||||
|
||||
#[doc(hidden)]
|
||||
fn mk_packet<T: Send>() -> Packet<T> {
|
||||
{
|
||||
|
@ -768,17 +737,6 @@ fn SendPacket<T: Send>(p: *Packet<T>) -> SendPacket<T> {
|
|||
SendPacketBuffered(p)
|
||||
}
|
||||
|
||||
// XXX remove me
|
||||
#[cfg(stage0)]
|
||||
#[allow(non_camel_case_types)]
|
||||
type send_packet<T: Send> = SendPacket<T>;
|
||||
|
||||
// XXX remove me
|
||||
#[cfg(stage0)]
|
||||
fn send_packet<T: Send>(p: *packet<T>) -> SendPacket<T> {
|
||||
SendPacket(p)
|
||||
}
|
||||
|
||||
struct SendPacketBuffered<T: Send, Tbuffer: Send> {
|
||||
mut p: Option<*Packet<T>>,
|
||||
mut buffer: Option<BufferResource<Tbuffer>>,
|
||||
|
@ -837,12 +795,6 @@ impl<T: Send, Tbuffer: Send> SendPacketBuffered<T, Tbuffer> {
|
|||
}
|
||||
}
|
||||
|
||||
// XXX remove me
|
||||
#[cfg(stage0)]
|
||||
#[allow(non_camel_case_types)]
|
||||
type send_packet_buffered<T: Send, Tbuffer: Send> =
|
||||
SendPacketBuffered<T, Tbuffer>;
|
||||
|
||||
/// Represents the receive end of a pipe. It can receive exactly one
|
||||
/// message.
|
||||
type RecvPacket<T: Send> = RecvPacketBuffered<T, Packet<T>>;
|
||||
|
@ -852,17 +804,6 @@ fn RecvPacket<T: Send>(p: *Packet<T>) -> RecvPacket<T> {
|
|||
RecvPacketBuffered(p)
|
||||
}
|
||||
|
||||
// XXX remove me
|
||||
#[cfg(stage0)]
|
||||
#[allow(non_camel_case_types)]
|
||||
type recv_packet<T: Send> = RecvPacket<T>;
|
||||
|
||||
// XXX remove me
|
||||
#[cfg(stage0)]
|
||||
fn recv_packet<T: Send>(p: *packet<T>) -> RecvPacket<T> {
|
||||
RecvPacket(p)
|
||||
}
|
||||
|
||||
struct RecvPacketBuffered<T: Send, Tbuffer: Send> {
|
||||
mut p: Option<*Packet<T>>,
|
||||
mut buffer: Option<BufferResource<Tbuffer>>,
|
||||
|
@ -921,12 +862,6 @@ fn RecvPacketBuffered<T: Send, Tbuffer: Send>(p: *Packet<T>)
|
|||
}
|
||||
}
|
||||
|
||||
// XXX remove me
|
||||
#[cfg(stage0)]
|
||||
#[allow(non_camel_case_types)]
|
||||
type recv_packet_buffered<T: Send, Tbuffer: Send> =
|
||||
RecvPacketBuffered<T, Tbuffer>;
|
||||
|
||||
#[doc(hidden)]
|
||||
fn entangle<T: Send>() -> (SendPacket<T>, RecvPacket<T>) {
|
||||
let p = packet();
|
||||
|
|
|
@ -39,7 +39,7 @@ fn pieces_to_expr(cx: ext_ctxt, sp: span,
|
|||
-> @ast::expr {
|
||||
fn make_path_vec(_cx: ext_ctxt, ident: @~str) -> ~[ast::ident] {
|
||||
let intr = _cx.parse_sess().interner;
|
||||
return ~[intr.intern(@~"extfmt"), intr.intern(@~"rt2"),
|
||||
return ~[intr.intern(@~"extfmt"), intr.intern(@~"rt"),
|
||||
intr.intern(ident)];
|
||||
}
|
||||
fn make_rt_path_expr(cx: ext_ctxt, sp: span, nm: @~str) -> @ast::expr {
|
||||
|
|
Loading…
Reference in New Issue