about summary refs log tree commit diff
path: root/src/libsyntax
diff options
context:
space:
mode:
authorHuon Wilson <dbau.pp+github@gmail.com>2014-05-24 21:35:53 +1000
committerHuon Wilson <dbau.pp+github@gmail.com>2014-05-25 10:23:37 +1000
commit9698221f919a80f2a0810e17c8ee8e80da8cefeb (patch)
tree29b0bb162d7e94d1ebc91d44d6265f211914934b /src/libsyntax
parent9e244d708461d5028066a59e70866f52517e7b85 (diff)
downloadrust-9698221f919a80f2a0810e17c8ee8e80da8cefeb.tar.gz
rust-9698221f919a80f2a0810e17c8ee8e80da8cefeb.zip
Paper over privacy issues with Deref by changing field names.
Types that implement Deref can cause weird error messages due to their
private fields conflicting with a field of the type they deref to, e.g.,
previously

    struct Foo { x: int }

    let a: Arc<Foo> = ...;
    println!("{}", a.x);

would complain the the `x` field of `Arc` was private (since Arc has a
private field called `x`) rather than just ignoring it.

This patch doesn't fix that issue, but does mean one would have to write
`a._ptr` to hit the same error message, which seems far less
common. (This patch `_`-prefixes all private fields of
`Deref`-implementing types.)

cc #12808
Diffstat (limited to 'src/libsyntax')
0 files changed, 0 insertions, 0 deletions