about summary refs log tree commit diff
path: root/src/test/compile-fail/borrowck
AgeCommit message (Collapse)AuthorLines
2018-08-14Moved compile-fail tests to ui tests.David Wood-6487/+0
2018-08-07Special case error message for thread-local statics.David Wood-1/+1
2018-07-20Update tests for new NLL mutability errorsMatthew Jasper-1/+1
2018-07-16ExprKindcsmoe-1/+1
2018-07-04write code to extract region names and emit new style messageNiko Matsakis-1/+1
2018-06-27Update tests for grouped nll move errorsMatthew Jasper-1/+1
2018-06-19updates to compile-fail tests for changes to NLL.Felix S. Klock II-2/+2
2018-06-17test: Ignore some problematic tests on powerpc and powerpc64*John Paul Adrian Glaubitz-0/+2
2018-06-04test: Ignore some problematic tests on sparc and sparc64John Paul Adrian Glaubitz-0/+1
2018-04-24Disable two-phase-reservation-sharing-interference[nll_beyond]Josh Stone-1/+1
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.
2018-04-15remove -Znll -- borrowck=mir implies nll nowNiko Matsakis-104/+129
2018-04-15determine whether a borrow is active based solely on the locationNiko Matsakis-0/+34
2018-04-12Avoid comparing fields by name when possibleVadim Petrochenkov-1/+1
Resolve them into field indices once and then use those resolutions + Fix rebase
2018-04-10Auto merge of #48914 - gaurikholkar:e0389, r=nikomatsakisbors-1/+1
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.
2018-04-07modify the error message- CR Commentsgaurikholkar-2/+2
2018-04-06Auto merge of #49392 - retep007:nll-issue-48962, r=nikomatsakisbors-0/+38
fixes move analysis Fixed compiler error by correct checking when dereferencing Fix #48962 r? @nikomatsakis
2018-04-05Merge branch 'master' of https://github.com/rust-lang/rust into e0389gaurikholkar-40/+53
2018-04-05Rollup merge of #49547 - Phlosioneer:44831-borrowck-remove-ignore, r=arielb1kennytm-1/+0
Unignore borrowck test Unignores a test that has been fixed. See #44831
2018-04-03Auto merge of #49348 - bobtwinkles:extend_2pb, r=nikomatsakisbors-18/+31
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.
2018-03-31Unignore borrowck testPhlosioneer-1/+0
Unignores a test that has been fixed. See #44831
2018-03-26fixes internal compiler error:Peter Hrvola-0/+38
librustc_mir/transform/elaborate_drops.rs — drop of untracked, uninitialized value Fix #48962 r? @nikomatsakis
2018-03-24Extend two-phase borrows to apply to method receiver autorefsbobtwinkles-18/+31
This is required to compile things like src/test/ui/borrowck/two-phase-method-receivers.rs
2018-03-20Stabilize slice patterns without `..`Vadim Petrochenkov-5/+2
Merge `feature(advanced_slice_patterns)` into `feature(slice_patterns)`
2018-03-16Rollup merge of #48875 - jcowgill:mips-test-fixes, r=sanxiynkennytm-1/+3
MIPS testsuite fixes This PR adjusts various bits in the testsuite so that more stuff passes on mips*.
2018-03-10code refactor, modify compile-fail testsgaurikholkar-2/+2
2018-03-09Complete re-implementation of 2-phase borrowsbobtwinkles-1/+0
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
2018-03-09Finally start down the right pathbobtwinkles-16/+19
2018-03-08borrowck-asm: enable on mipsJames Cowgill-1/+3
2018-02-24Rollup merge of #48197 - bobtwinkles:two_phase_borrow_on_ops, r=nikomatsakisManish Goregaokar-53/+0
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
2018-02-23update tests and reference filesNiko Matsakis-8/+4
The type checker invokes the borrow checker for closures it finds, so removing the NLL type checker affects ordering of errors somewhat.
2018-02-17Auto merge of #47926 - mikhail-m1:subslice_pattern_array_drop2, r=nikomatsakisbors-0/+30
add transform for uniform array move out reworked second step for fix #34708 previous try #46686 r? @nikomatsakis
2018-02-13Allow two-phase borrows of &mut self in opsbobtwinkles-53/+0
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
2018-02-11Auto merge of #48092 - eddyb:discriminate-the-void, r=nikomatsakisbors-16/+16
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
2018-02-09rustc_mir: insert a dummy access to places being matched on, when building MIR.Eduard-Mihai Burtescu-16/+16
2018-02-08add transform for uniform array move outMikhail Modin-0/+30
2018-02-08Fleshed out the test a lot more.Felix S. Klock II-9/+230
2018-02-08Test that autoref'ing beyond method receivers does not leak into two-phase ↵Felix S. Klock II-0/+39
borrows.
2018-02-08Restrict two-phase borrows to solely borrows introduced via autoref.Felix S. Klock II-18/+67
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.)
2018-01-03Auto merge of #46984 - arielb1:pre-statement-effect, r=nikomatsakisbors-1/+0
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
2017-12-24Make killing of out-of-scope borrows a pre-statement effectAriel Ben-Yehuda-1/+0
Fixes #46875. Fixes #46917. Fixes #46935.
2017-12-23Give MIR borrowck a better understanding of inline asmMatthew Jasper-0/+97
2017-12-15Auto merge of #46537 - pnkfelix:two-phase-borrows, r=arielb1bors-0/+246
[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.)
2017-12-14Move compile-fail tests with NOTE/HELP annotations to UIVadim Petrochenkov-500/+0
2017-12-13Check activation points as the place where mutable borrows become relevant.Felix S. Klock II-11/+72
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.)
2017-12-13two-phase-reservation-sharing-interference.rs variant that is perhaps more ↵Felix S. Klock II-0/+38
surprising.
2017-12-13test describing a currently unsupported corner case.Felix S. Klock II-0/+46
2017-12-13tests transcribed from nikos blog post.Felix S. Klock II-0/+101
2017-12-11Updated existing tests with new error messages.David Wood-4/+6
2017-12-06fix borrows across loops, libcore *almost* compilesAriel Ben-Yehuda-8/+2
2017-12-06handle gen/kill sets togetherAriel Ben-Yehuda-1/+5