diff options
| author | bors <bors@rust-lang.org> | 2014-05-24 18:56:19 -0700 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2014-05-24 18:56:19 -0700 |
| commit | bbb70cdd9cd982922cf7390459d53bde409699ae (patch) | |
| tree | 25c39cad9e52bb386f4d9a7cd5bac6fd376cfe3d /src/test/debuginfo/include_string.rs | |
| parent | 07563be6ebe081c8f6666a7b6eb68d8e32774f2f (diff) | |
| parent | 9698221f919a80f2a0810e17c8ee8e80da8cefeb (diff) | |
| download | rust-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/test/debuginfo/include_string.rs')
0 files changed, 0 insertions, 0 deletions
