Don't use "do catch"

parent 6048e9da
#![feature(catch_expr)]
#![feature(proc_macro)]
#![recursion_limit = "512"]
// While under active devel, these warnings are kind of annoying.
......@@ -185,11 +184,11 @@ mod parser;
///
#[proc_macro]
pub fn gobject_gen(input: TokenStream) -> TokenStream {
let result: Result<quote::Tokens> = do catch {
let result: Result<quote::Tokens> = (|| {
let ast_program = parser::parse_program(input)?;
let program = hir::Program::from_ast_program(&ast_program)?;
gen::classes(&program)
};
})();
match result {
Ok(tokens) => {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment