Don't use "do catch"

parent 6048e9da
#![feature(catch_expr)]
#![feature(proc_macro)] #![feature(proc_macro)]
#![recursion_limit = "512"] #![recursion_limit = "512"]
// While under active devel, these warnings are kind of annoying. // While under active devel, these warnings are kind of annoying.
...@@ -185,11 +184,11 @@ mod parser; ...@@ -185,11 +184,11 @@ mod parser;
/// ///
#[proc_macro] #[proc_macro]
pub fn gobject_gen(input: TokenStream) -> TokenStream { 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 ast_program = parser::parse_program(input)?;
let program = hir::Program::from_ast_program(&ast_program)?; let program = hir::Program::from_ast_program(&ast_program)?;
gen::classes(&program) gen::classes(&program)
}; })();
match result { match result {
Ok(tokens) => { 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