| Age | Commit message (Collapse) | Author | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
A comment already stated that this test should be disabled, but its
`should_fail` is not enough to excuse it from a compiler panic. Remove
it from the `revisions` list to disable it harder.
|
|
|
|
|
|
Resolve them into field indices once and then use those resolutions
+ Fix rebase
|
|
Modify compile-fail/E0389 error message WIP
This fixes #47388
cc @nikomatsakis @estebank
r? @nikomatsakis
Certain ui tests were failing locally. I'll check if the same happens here too.
|
|
|
|
fixes move analysis
Fixed compiler error by correct checking when dereferencing
Fix #48962
r? @nikomatsakis
|
|
|
|
Unignore borrowck test
Unignores a test that has been fixed.
See #44831
|
|
Extend two-phase borrows to apply to method receiver autorefs
Fixes #48598 by permitting two-phase borrows on the autorefs created when functions and methods.
|
|
Unignores a test that has been fixed.
See #44831
|
|
librustc_mir/transform/elaborate_drops.rs — drop of untracked, uninitialized value
Fix #48962
r? @nikomatsakis
|
|
This is required to compile things like
src/test/ui/borrowck/two-phase-method-receivers.rs
|
|
Merge `feature(advanced_slice_patterns)` into `feature(slice_patterns)`
|
|
MIPS testsuite fixes
This PR adjusts various bits in the testsuite so that more stuff passes on mips*.
|
|
|
|
See #48431 for discussion as to why this was necessary and what we hoped to
accomplish. A brief summary:
- the first implementation of 2-phase borrows was hard to limit in the way we
wanted. That is, it was too good at accepting all 2-phase borrows rather than
just autorefs =)
- Numerous diagnostic regressions were introduced by 2-phase borrow support
which were difficult to fix
|
|
|
|
|
|
Allow two-phase borrows of &mut self in ops
We need two-phase borrows of ops to be in the initial NLL release since without them lots of existing code will break. Fixes #48129.
CC @pnkfelix and @nikomatsakis
r? @pnkfelix
|
|
The type checker invokes the borrow checker for closures it finds, so
removing the NLL type checker affects ordering of errors somewhat.
|
|
add transform for uniform array move out
reworked second step for fix #34708
previous try #46686
r? @nikomatsakis
|
|
We need two-phase borrows of ops to be in the initial NLL release since without
them lots of existing code will break. Fixes #48129
|
|
rustc_mir: insert a dummy access to places being matched on, when building MIR.
Fixes #47412 by adding a `_dummy = Discriminant(place)` before each `match place {...}`.
r? @nikomatsakis
|
|
|
|
|
|
|
|
borrows.
|
|
Added `-Z two-phase-beyond-autoref` to bring back old behavior (mainly
to allow demonstration of desugared examples).
Updated tests to use aforementioned flag when necessary. (But in each
case where I added the flag, I made sure to also include a revision
without the flag so that one can readily see what the actual behavior
we expect is for the initial deployment of NLL.)
|
|
NLL fixes
First, introduce pre-statement effects to dataflow to fix #46875. Edge dataflow effects might make that redundant, but I'm not sure of the best way to integrate them with liveness etc., and if this is a hack, this is one of the cleanest hacks I've seen.
And I want a small fix to avoid the torrent of bug reports.
Second, fix linking of projections to fix #46974
r? @pnkfelix
|
|
Fixes #46875.
Fixes #46917.
Fixes #46935.
|
|
|
|
[MIR-borrowck] Two phase borrows
This adds limited support for two-phase borrows as described in
http://smallcultfollowing.com/babysteps/blog/2017/03/01/nested-method-calls-via-two-phase-borrowing/
The support is off by default; you opt into it via the flag `-Z two-phase-borrows`
I have written "*limited* support" above because there are simple variants of the simple `v.push(v.len())` example that one would think should work but currently do not, such as the one documented in the test compile-fail/borrowck/two-phase-reservation-sharing-interference-2.rs
(To be clear, that test is not describing something that is unsound. It is just providing an explicit example of a limitation in the implementation given in this PR. I have ideas on how to fix, but I want to land the work that is in this PR first, so that I can stop repeatedly rebasing this branch.)
|
|
|
|
Since we are now checking activation points, I removed one of the
checks at the reservation point. (You can see the effect this had on
two-phase-reservation-sharing-interference-2.rs)
Also, since we now have checks at both the reservation point and the
activation point, we sometimes would observe duplicate errors (since
either one independently interferes with another mutable borrow). To
deal with this, I used a similar strategy to one used as discussed on
issue #45360: keep a set of errors reported (in this case for
reservations), and then avoid doing the checks for the corresponding
activations. (This does mean that some errors could get masked, namely
for conflicting borrows that start after the reservation but still
conflict with the activation, which is unchecked when there was an
error for the reservation. But this seems like a reasonable price to
pay.)
|
|
surprising.
|
|
|
|
|
|
|
|
|
|
|