Closed
Description
rustc --version --verbose
output:
rustc 1.30.0-nightly (3bc2ca7e4 2018-09-20)
binary: rustc
commit-hash: 3bc2ca7e4f8507f82a4c357ee19300166bcd8099
commit-date: 2018-09-20
host: x86_64-unknown-linux-gnu
release: 1.30.0-nightly
LLVM version: 8.0
While trying to implement Lua in Rust, I wanted to write a macro to make writing function signatures easier. When I tested the macro within an extern "C"
block, and ran rustc --pretty expanded -Z unstable-options
, my computer froze due to all (8 gigs) of my RAM being used up by rustc
. An MCVE-
#![feature(macros_in_extern)]
#![feature(concat_idents)]
macro_rules! lua_func {
($name: ident, $ret: ty, $var: ident, $type: ty) => {
let fn_name = concat_idents!(lua_, $name);
pub fn fn_name (L: *mut lua_State, $var: $type) -> $ret
};
}
extern "C" {
lua_func!(toboolean, bool, idx, int);
}
Metadata
Metadata
Assignees
Labels
No labels