We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 06c46d5 commit be062dbCopy full SHA for be062db
src/test/compile-fail/unsafe-fn-autoderef.rs
@@ -9,9 +9,11 @@
9
// option. This file may not be copied, modified, or distributed
10
// except according to those terms.
11
12
-// xfail-test
13
-type rec = {f: int};
14
-fn f(p: *rec) -> int {
+struct Rec {
+ f: int
+}
15
+
16
+fn f(p: *Rec) -> int {
17
18
// Test that * ptrs do not autoderef. There is a deeper reason for
19
// prohibiting this, beyond making unsafe things annoying (which doesn't
@@ -25,7 +27,7 @@ fn f(p: *rec) -> int {
25
27
// are prohibited by various checks, such as that the enum is
26
28
// instantiable and so forth).
29
- 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`
31
}
32
33
fn main() {
saw approval from catamorphism at catamorphism@be062db
merging catamorphism/rust/unsafe-fn-autoderef = be062db into auto
catamorphism/rust/unsafe-fn-autoderef = be062db merged ok, testing candidate = 4e4f90d
all tests pass: http://buildbot.rust-lang.org/builders/auto-linux/builds/1258 http://buildbot.rust-lang.org/builders/auto-win/builds/1253 http://buildbot.rust-lang.org/builders/auto-mac/builds/1271
fast-forwarding incoming to auto = 4e4f90d
5 commit comments
bors commentedon May 15, 2013
saw approval from catamorphism
at catamorphism@be062db
bors commentedon May 15, 2013
merging catamorphism/rust/unsafe-fn-autoderef = be062db into auto
bors commentedon May 15, 2013
catamorphism/rust/unsafe-fn-autoderef = be062db merged ok, testing candidate = 4e4f90d
bors commentedon May 15, 2013
all tests pass:
http://buildbot.rust-lang.org/builders/auto-linux/builds/1258
http://buildbot.rust-lang.org/builders/auto-win/builds/1253
http://buildbot.rust-lang.org/builders/auto-mac/builds/1271
bors commentedon May 15, 2013
fast-forwarding incoming to auto = 4e4f90d