Change imported macros to use leaky modules rather than leaky functions.
This commit is contained in:
parent
6439e286f9
commit
ca147a029e
@ -172,11 +172,6 @@ use syntax::ast_util;
|
||||
use syntax::codemap::span;
|
||||
use syntax::print::pprust::pat_to_str;
|
||||
|
||||
pub fn macros() {
|
||||
// FIXME(#3114): Macro import/export.
|
||||
include!("macros.rs");
|
||||
}
|
||||
|
||||
// An option identifying a literal: either a unit-like struct or an
|
||||
// expression.
|
||||
pub enum Lit {
|
||||
|
@ -18,11 +18,6 @@ use middle::trans::datum::*;
|
||||
|
||||
use core::str;
|
||||
|
||||
pub fn macros() {
|
||||
// FIXME(#3114): Macro import/export.
|
||||
include!("macros.rs");
|
||||
}
|
||||
|
||||
pub fn trans_block(bcx: block, b: &ast::blk, dest: expr::Dest) -> block {
|
||||
let _icx = bcx.insn_ctxt("trans_block");
|
||||
let mut bcx = bcx;
|
||||
|
@ -149,8 +149,6 @@ use syntax::codemap::spanned;
|
||||
// These are passed around by the code generating functions to track the
|
||||
// destination of a computation's value.
|
||||
|
||||
fn macros() { include!("macros.rs"); } // FIXME(#3114): Macro import/export.
|
||||
|
||||
pub enum Dest {
|
||||
SaveIn(ValueRef),
|
||||
Ignore,
|
||||
|
@ -8,7 +8,7 @@
|
||||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
{
|
||||
#[macro_escape];
|
||||
|
||||
macro_rules! unpack_datum(
|
||||
($bcx: ident, $inp: expr) => (
|
||||
@ -18,7 +18,7 @@ macro_rules! unpack_datum(
|
||||
db.datum
|
||||
}
|
||||
)
|
||||
);
|
||||
)
|
||||
|
||||
macro_rules! unpack_result(
|
||||
($bcx: ident, $inp: expr) => (
|
||||
@ -28,7 +28,7 @@ macro_rules! unpack_result(
|
||||
db.val
|
||||
}
|
||||
)
|
||||
);
|
||||
)
|
||||
|
||||
macro_rules! trace_span(
|
||||
($bcx: ident, $sp: expr, $str: expr) => (
|
||||
@ -39,7 +39,7 @@ macro_rules! trace_span(
|
||||
}
|
||||
}
|
||||
)
|
||||
);
|
||||
)
|
||||
|
||||
macro_rules! trace(
|
||||
($bcx: ident, $str: expr) => (
|
||||
@ -50,6 +50,5 @@ macro_rules! trace(
|
||||
}
|
||||
}
|
||||
)
|
||||
);
|
||||
)
|
||||
|
||||
}
|
||||
|
@ -39,11 +39,6 @@ use syntax::ast_util::local_def;
|
||||
use syntax::print::pprust::expr_to_str;
|
||||
use syntax::{ast, ast_map};
|
||||
|
||||
pub fn macros() {
|
||||
// FIXME(#3114): Macro import/export.
|
||||
include!("macros.rs");
|
||||
}
|
||||
|
||||
/**
|
||||
The main "translation" pass for methods. Generates code
|
||||
for non-monomorphized methods only. Other methods will
|
||||
|
@ -72,11 +72,6 @@ use syntax::ast::{Onceness, purity, ret_style};
|
||||
use syntax::ast;
|
||||
use syntax::codemap::span;
|
||||
|
||||
pub fn macros() {
|
||||
// FIXME(#3114): Macro import/export.
|
||||
include!("macros.rs");
|
||||
}
|
||||
|
||||
pub trait Combine {
|
||||
fn infcx(&self) -> @mut InferCtxt;
|
||||
fn tag(&self) -> ~str;
|
||||
|
@ -24,11 +24,6 @@ use std::list;
|
||||
use syntax::ast::{Many, Once, extern_fn, m_const, impure_fn, noreturn};
|
||||
use syntax::ast::{pure_fn, ret_style, return_val, unsafe_fn};
|
||||
|
||||
pub fn macros() {
|
||||
// FIXME(#3114): Macro import/export.
|
||||
include!("macros.rs");
|
||||
}
|
||||
|
||||
pub enum Lub = CombineFields; // least-upper-bound: common supertype
|
||||
|
||||
pub impl Lub {
|
||||
|
@ -8,7 +8,7 @@
|
||||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
{
|
||||
#[macro_escape];
|
||||
|
||||
macro_rules! if_ok(
|
||||
($inp: expr) => (
|
||||
@ -17,6 +17,5 @@ macro_rules! if_ok(
|
||||
Err(e) => { return Err(e); }
|
||||
}
|
||||
)
|
||||
);
|
||||
)
|
||||
|
||||
}
|
||||
|
@ -287,6 +287,7 @@ use syntax::codemap;
|
||||
use syntax::ast_util;
|
||||
use syntax::codemap::span;
|
||||
|
||||
pub mod macros;
|
||||
pub mod combine;
|
||||
pub mod glb;
|
||||
pub mod lattice;
|
||||
|
@ -25,10 +25,6 @@ use std::list::Nil;
|
||||
use std::list;
|
||||
use syntax::ast::{m_const, purity, ret_style};
|
||||
|
||||
pub fn macros() {
|
||||
// FIXME(#3114): Macro import/export.
|
||||
include!("macros.rs");
|
||||
}
|
||||
|
||||
pub enum Sub = CombineFields; // "subtype", "subregion" etc
|
||||
|
||||
|
@ -49,6 +49,7 @@ use back_ = back;
|
||||
|
||||
pub mod middle {
|
||||
pub mod trans {
|
||||
pub mod macros;
|
||||
pub mod inline;
|
||||
pub mod monomorphize;
|
||||
pub mod controlflow;
|
||||
|
Loading…
x
Reference in New Issue
Block a user