about summary refs log tree commit diff
path: root/src/libsyntax/util/parser_testing.rs
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2014-05-24 18:56:19 -0700
committerbors <bors@rust-lang.org>2014-05-24 18:56:19 -0700
commitbbb70cdd9cd982922cf7390459d53bde409699ae (patch)
tree25c39cad9e52bb386f4d9a7cd5bac6fd376cfe3d /src/libsyntax/util/parser_testing.rs
parent07563be6ebe081c8f6666a7b6eb68d8e32774f2f (diff)
parent9698221f919a80f2a0810e17c8ee8e80da8cefeb (diff)
downloadrust-bbb70cdd9cd982922cf7390459d53bde409699ae.tar.gz
rust-bbb70cdd9cd982922cf7390459d53bde409699ae.zip
auto merge of #14402 : huonw/rust/arc-field-rename, r=alexcrichton
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/util/parser_testing.rs')
0 files changed, 0 insertions, 0 deletions