diff options
| author | Niko Matsakis <niko@alum.mit.edu> | 2014-12-06 11:55:38 -0800 |
|---|---|---|
| committer | Niko Matsakis <niko@alum.mit.edu> | 2014-12-10 19:45:19 -0500 |
| commit | 31e46ac0a95d58fa95dcd154a0f8a56089e2f5b9 (patch) | |
| tree | 871e5cdbc82e0ce8e4abb0d3a7671cff67b532bb /src/libstd/sys/unix/stack_overflow.rs | |
| parent | ca98fefd04b2a0ccd784f96538c824c49210a418 (diff) | |
| download | rust-31e46ac0a95d58fa95dcd154a0f8a56089e2f5b9.tar.gz rust-31e46ac0a95d58fa95dcd154a0f8a56089e2f5b9.zip | |
During method resolution, only reborrow if we are not doing an auto-ref.
The current behavior leads to adjustments like `&&*` being applied instead of just `&` (when the unmodified receiver is a `&T` or an `&mut T`). This causes both safety errors and unexpected behavior. The safety errors result from regionck not being prepared for auto-ref-ref-like adjustments; this is worth fixing on its own, but I think the best way to do it is to modify regionck to use expr-use-visitor (and fix expr-use-visitor as well, which I don't think properly invokes `borrow` for each level of auto-ref), and for now it's simpler to just not produce the adjustment in question. (I have a separate patch porting regionck to use exprusevisitor for a different bug, so that is coming.)
Diffstat (limited to 'src/libstd/sys/unix/stack_overflow.rs')
0 files changed, 0 insertions, 0 deletions
