Skip to content

Commit

Permalink
Update regions-mock-trans.rs
Browse files Browse the repository at this point in the history
  • Loading branch information
oli-obk committed Jun 22, 2017
1 parent 1883aac commit 2b9cfb6
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions tests/run-pass-fullmir/regions-mock-trans.rs
Expand Up @@ -12,25 +12,27 @@

#![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
}

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::<Bcx<'a>>()
as libc::size_t))
Expand All @@ -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);
}
Expand Down

0 comments on commit 2b9cfb6

Please sign in to comment.