From 2b9cfb68500ec0e2ada1fe698950606f2322d983 Mon Sep 17 00:00:00 2001 From: Oliver Schneider Date: Thu, 22 Jun 2017 12:30:02 +0200 Subject: [PATCH] Update regions-mock-trans.rs --- tests/run-pass-fullmir/regions-mock-trans.rs | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/tests/run-pass-fullmir/regions-mock-trans.rs b/tests/run-pass-fullmir/regions-mock-trans.rs index b67612c94b009..7d9d31b0dda19 100644 --- a/tests/run-pass-fullmir/regions-mock-trans.rs +++ b/tests/run-pass-fullmir/regions-mock-trans.rs @@ -12,17 +12,19 @@ #![feature(libc)] +#![allow(dead_code)] + extern crate libc; use std::mem; -struct arena(()); +struct Arena(()); struct Bcx<'a> { fcx: &'a Fcx<'a> } struct Fcx<'a> { - arena: &'a arena, + arena: &'a Arena, ccx: &'a Ccx } @@ -30,7 +32,7 @@ struct Ccx { x: isize } -fn alloc<'a>(_bcx : &'a arena) -> &'a Bcx<'a> { +fn alloc<'a>(_bcx : &'a Arena) -> &'a Bcx<'a> { unsafe { mem::transmute(libc::malloc(mem::size_of::>() as libc::size_t)) @@ -50,7 +52,7 @@ fn g(fcx : &Fcx) { } fn f(ccx : &Ccx) { - let a = arena(()); + let a = Arena(()); let fcx = Fcx { arena: &a, ccx: ccx }; return g(&fcx); }