parent
2b15aefffe
commit
4f7ecce7d1
7 changed files with 10 additions and 6 deletions
|
@ -97,7 +97,7 @@ fn copy_val(cx: @block_ctxt, dst: ValueRef, src: ValueRef,
|
|||
let {bcx, val: llptr} = alloc_uniq(cx, ty);
|
||||
Store(bcx, llptr, dst);
|
||||
|
||||
let src = Load(bcx, src);
|
||||
let src = load_if_immediate(bcx, src, content_ty);
|
||||
let dst = llptr;
|
||||
let bcx = trans::copy_val(bcx, INIT, dst, src, content_ty);
|
||||
ret bcx;
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
// xfail-test
|
||||
|
||||
fn f<T>(x: ~T) -> ~T { ret x; }
|
||||
fn f<@T>(x: ~T) -> ~T { ret x; }
|
||||
|
||||
fn main() { let x = f(~3); log *x; }
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
// xfail-test
|
||||
|
||||
fn test(x: bool, foo: ~{x: int, y: int, z: int}) -> int {
|
||||
let bar = foo;
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
// xfail-test
|
||||
use std;
|
||||
import std::uint;
|
||||
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
// xfail-test
|
||||
use std;
|
||||
import std::uint;
|
||||
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
// xfail-test
|
||||
|
||||
type foo = {a: int, b: uint};
|
||||
tag bar { u(~foo); w(int); }
|
||||
|
||||
|
|
6
src/test/run-pass/unique-rec.rs
Normal file
6
src/test/run-pass/unique-rec.rs
Normal file
|
@ -0,0 +1,6 @@
|
|||
|
||||
fn main() {
|
||||
let x = ~{x: 1};
|
||||
let bar = x;
|
||||
assert bar.x == 1;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue