diff --git a/src/comp/lib/llvm.rs b/src/comp/lib/llvm.rs index 76e234cae9a..16a3efc06b8 100644 --- a/src/comp/lib/llvm.rs +++ b/src/comp/lib/llvm.rs @@ -1554,8 +1554,8 @@ fn fn_ty_param_tys(fn_ty: TypeRef) -> TypeRef[] { /* Memory-managed interface to target data. */ -obj target_data_dtor(TD: TargetDataRef) - {drop { llvm::LLVMDisposeTargetData(TD); } +obj target_data_dtor(TD: TargetDataRef) { + drop { llvm::LLVMDisposeTargetData(TD); } } type target_data = {lltd: TargetDataRef, dtor: target_data_dtor}; @@ -1567,8 +1567,8 @@ fn mk_target_data(string_rep: str) -> target_data { /* Memory-managed interface to pass managers. */ -obj pass_manager_dtor(PM: PassManagerRef) - {drop { llvm::LLVMDisposePassManager(PM); } +obj pass_manager_dtor(PM: PassManagerRef) { + drop { llvm::LLVMDisposePassManager(PM); } } type pass_manager = {llpm: PassManagerRef, dtor: pass_manager_dtor}; @@ -1580,8 +1580,8 @@ fn mk_pass_manager() -> pass_manager { /* Memory-managed interface to object files. */ -obj object_file_dtor(ObjectFile: ObjectFileRef) - {drop { llvm::LLVMDisposeObjectFile(ObjectFile); } +obj object_file_dtor(ObjectFile: ObjectFileRef) { + drop { llvm::LLVMDisposeObjectFile(ObjectFile); } } type object_file = {llof: ObjectFileRef, dtor: object_file_dtor}; @@ -1593,8 +1593,8 @@ fn mk_object_file(llmb: MemoryBufferRef) -> object_file { /* Memory-managed interface to section iterators. */ -obj section_iter_dtor(SI: SectionIteratorRef) - {drop { llvm::LLVMDisposeSectionIterator(SI); } +obj section_iter_dtor(SI: SectionIteratorRef) { + drop { llvm::LLVMDisposeSectionIterator(SI); } } type section_iter = {llsi: SectionIteratorRef, dtor: section_iter_dtor}; diff --git a/src/lib/io.rs b/src/lib/io.rs index acbbd4904f9..9e085ec0352 100644 --- a/src/lib/io.rs +++ b/src/lib/io.rs @@ -70,7 +70,8 @@ obj FILE_buf_reader(f: os::libc::FILE, must_close: bool) { } fn tell() -> uint { ret os::libc::ftell(f) as uint; - }drop { if must_close { os::libc::fclose(f); } } + } + drop { if must_close { os::libc::fclose(f); } } } @@ -248,7 +249,8 @@ obj FILE_writer(f: os::libc::FILE, must_close: bool) { } fn tell() -> uint { ret os::libc::ftell(f) as uint; - }drop { if must_close { os::libc::fclose(f); } } + } + drop { if must_close { os::libc::fclose(f); } } } obj fd_buf_writer(fd: int, must_close: bool) { @@ -274,7 +276,8 @@ obj fd_buf_writer(fd: int, must_close: bool) { fn tell() -> uint { log_err "need 64-bit native calls for tell, sorry"; fail; - }drop { if must_close { os::libc::close(fd); } } + } + drop { if must_close { os::libc::close(fd); } } } fn file_buf_writer(path: str, flags: vec[fileflag]) -> buf_writer { diff --git a/src/lib/run_program.rs b/src/lib/run_program.rs index 09550208388..5ceba6d9a77 100644 --- a/src/lib/run_program.rs +++ b/src/lib/run_program.rs @@ -73,11 +73,12 @@ fn start_program(prog: str, args: vec[str]) -> @program { finished = true; self.close_input(); ret os::waitpid(pid); - }drop { - self.close_input(); - if !finished { os::waitpid(pid); } - os::libc::fclose(out_file); - } + } + drop { + self.close_input(); + if !finished { os::waitpid(pid); } + os::libc::fclose(out_file); + } } ret @new_program(pid, pipe_input.out, os::fd_FILE(pipe_output.in), false); }