diff options
author | Edward Barnard <eabarnard@gmail.com> | 2015-01-01 16:39:40 +0000 |
---|---|---|
committer | Edward Barnard <eabarnard@gmail.com> | 2015-01-01 16:39:40 +0000 |
commit | 6172a9f53867be080001ecaeb293740f3dbd10c4 (patch) | |
tree | 7888bc6488031768ac661a078b6100c2c0683cb8 | |
parent | b9b468b897c970db6f7008f1ff81518a3c6966f7 (diff) |
Fix build
-rw-r--r-- | src/bin/bindgen.rs | 2 | ||||
-rw-r--r-- | src/gen.rs | 2 | ||||
-rw-r--r-- | src/parser.rs | 4 |
3 files changed, 4 insertions, 4 deletions
diff --git a/src/bin/bindgen.rs b/src/bin/bindgen.rs index 6390ceb6..233c10a3 100644 --- a/src/bin/bindgen.rs +++ b/src/bin/bindgen.rs @@ -159,7 +159,7 @@ Options: #[main] pub fn main() { let mut bind_args = os::args(); - let bin = bind_args.remove(0).unwrap(); + let bin = bind_args.remove(0); match parse_args(bind_args.as_slice()) { ParseResult::ParseErr(e) => panic!(e), @@ -1079,7 +1079,7 @@ fn mk_fnty(ctx: &mut GenCtx, decl: &ast::FnDecl, abi: abi::Abi) -> ast::Ty { identifier: ctx.ext_cx.ident_of("Option"), parameters: ast::AngleBracketedParameters(ast::AngleBracketedParameterData { lifetimes: Vec::new(), - types: OwnedSlice::from_vec(Vec::from_elem(1, + types: OwnedSlice::from_vec(vec!( P(ast::Ty { id: ast::DUMMY_NODE_ID, node: fnty, diff --git a/src/parser.rs b/src/parser.rs index 428c91dc..0e05537a 100644 --- a/src/parser.rs +++ b/src/parser.rs @@ -12,7 +12,7 @@ use syntax::abi; use types as il; use types::*; use clang as cx; -use clang::*; +use clang::{ast_dump, Cursor, Diagnostic, TranslationUnit, type_to_str}; use clang::ll::*; use super::Logger; @@ -585,7 +585,7 @@ pub fn parse(options: ClangParserOptions, logger: &Logger) -> Result<Vec<Global> cursor.visit(|cur, _| visit_top(cur, &mut ctx)); while !ctx.builtin_defs.is_empty() { - let c = ctx.builtin_defs.remove(0).unwrap(); + let c = ctx.builtin_defs.remove(0); visit_top(&c.definition(), &mut ctx); } |