Skip to content

Commit be062db

Browse files
committedMay 14, 2013
testsuite: Update and un-xfail unsafe-fn-autoderef
1 parent 06c46d5 commit be062db

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed
 

‎src/test/compile-fail/unsafe-fn-autoderef.rs

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,11 @@
99
// option. This file may not be copied, modified, or distributed
1010
// except according to those terms.
1111

12-
// xfail-test
13-
type rec = {f: int};
14-
fn f(p: *rec) -> int {
12+
struct Rec {
13+
f: int
14+
}
15+
16+
fn f(p: *Rec) -> int {
1517

1618
// Test that * ptrs do not autoderef. There is a deeper reason for
1719
// prohibiting this, beyond making unsafe things annoying (which doesn't
@@ -25,7 +27,7 @@ fn f(p: *rec) -> int {
2527
// are prohibited by various checks, such as that the enum is
2628
// instantiable and so forth).
2729

28-
return p.f; //~ ERROR attempted access of field `f` on type `*rec`
30+
return p.f; //~ ERROR attempted access of field `f` on type `*Rec`
2931
}
3032

3133
fn main() {

5 commit comments

Comments
 (5)

bors commented on May 15, 2013

@bors
Collaborator

saw approval from catamorphism
at catamorphism@be062db

bors commented on May 15, 2013

@bors
Collaborator

merging catamorphism/rust/unsafe-fn-autoderef = be062db into auto

bors commented on May 15, 2013

@bors
Collaborator

catamorphism/rust/unsafe-fn-autoderef = be062db merged ok, testing candidate = 4e4f90d

bors commented on May 15, 2013

@bors
Collaborator

fast-forwarding incoming to auto = 4e4f90d

Please sign in to comment.