diff options
| author | Alex Crichton <alex@alexcrichton.com> | 2015-02-18 15:52:01 -0800 |
|---|---|---|
| committer | Alex Crichton <alex@alexcrichton.com> | 2015-02-18 15:52:01 -0800 |
| commit | 1506b34e0c52b098158541d2ba9e334df1ce4812 (patch) | |
| tree | a9ead87eacaf0acafdb0c4f72c334c2d5601b0ca /src/libcoretest | |
| parent | 3e7a04cb3cac2b803dc8188d9a55ba1836404ea3 (diff) | |
| parent | 9f8b9d6847ab02f7f1c28c84988ceae4c0a10f26 (diff) | |
| download | rust-1506b34e0c52b098158541d2ba9e334df1ce4812.tar.gz rust-1506b34e0c52b098158541d2ba9e334df1ce4812.zip | |
rollup merge of #22286: nikomatsakis/variance-4b
Conflicts: src/librustc/middle/infer/combine.rs src/librustc_typeck/check/wf.rs
Diffstat (limited to 'src/libcoretest')
| -rw-r--r-- | src/libcoretest/mem.rs | 2 | ||||
| -rw-r--r-- | src/libcoretest/ptr.rs | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/src/libcoretest/mem.rs b/src/libcoretest/mem.rs index 421ce76caaf..5aeb330b78b 100644 --- a/src/libcoretest/mem.rs +++ b/src/libcoretest/mem.rs @@ -92,7 +92,7 @@ fn test_transmute_copy() { #[test] fn test_transmute() { - trait Foo {} + trait Foo { fn dummy(&self) { } } impl Foo for int {} let a = box 100 as Box<Foo>; diff --git a/src/libcoretest/ptr.rs b/src/libcoretest/ptr.rs index 9c2e242c105..57456bfb1a7 100644 --- a/src/libcoretest/ptr.rs +++ b/src/libcoretest/ptr.rs @@ -171,8 +171,8 @@ fn test_set_memory() { #[test] fn test_unsized_unique() { let xs: &mut [_] = &mut [1, 2, 3]; - let ptr = Unique(xs as *mut [_]); - let ys = unsafe { &mut *ptr.ptr }; + let ptr = unsafe { Unique::new(xs as *mut [_]) }; + let ys = unsafe { &mut **ptr }; let zs: &mut [_] = &mut [1, 2, 3]; assert!(ys == zs); } |
