about summary refs log tree commit diff
path: root/src/test/ui/nll
AgeCommit message (Collapse)AuthorLines
2017-12-20get the `DefiningTy` from the `body_owner_kind` not typeNiko Matsakis-0/+21
The type isn't a good idea because we want to treat constants uniformly, regardless of what type of value they produce.
2017-12-20Auto merge of #46733 - nikomatsakis:nll-master-to-rust-master-5, r=arielb1bors-33/+2392
nll part 5 Next round of changes from the nll-master branch. Extensions: - we now propagate ty-region-outlives constraints out of closures and into their creator when necessary - we fix a few ICEs that can occur by doing liveness analysis (and the resulting normalization) during type-checking - we handle the implicit region bound that assumes that each type `T` outlives the fn body - we handle normalization of inputs/outputs in fn signatures Not included in this PR (will come next): - handling `impl Trait` - tracking causal information - extended errors r? @arielb1
2017-12-15stop dumping DefPath into "failed type test" errorsNiko Matsakis-49/+49
The prior messages were not stable across platforms.
2017-12-15Same change to point at borrow for mir errorsEsteban Küber-5/+5
2017-12-15make `blame_span` deterministicNiko Matsakis-28/+29
2017-12-15add a test regarding relating closure and fn genericsNiko Matsakis-0/+119
Turns out this works but we had no test targeting it.
2017-12-15impose inputs/ouputs on MIR after the factNiko Matsakis-0/+29
The input/output types found in `UniversalRegions` are not normalized. The old code used to assign them directly into the MIR, which would lead to errors when there was a projection in a argument or return type. This also led to some special cases in the `renumber` code. We now renumber uniformly but then pass the input/output types into the MIR type-checker, which equates them with the types found in MIR. This allows us to normalize at the same time.
2017-12-15handle projections with regionsNiko Matsakis-7/+1557
2017-12-15propagate type tests from closure to closure creatorsNiko Matsakis-0/+411
Currently, we only propagate type tests that exclude all regions from the type.
2017-12-15thread through an implicit region body of the fn bodyNiko Matsakis-9/+64
2017-12-15move some parts of liveness to happen during type checkingNiko Matsakis-0/+79
This allows us to re-use the `normalize` method on `TypeCheck`, which is important since normalization may create fresh region variables. This is not an ideal solution, though, since the current representation of "liveness constraints" (a vector of (region, point) pairs) is rather inefficient. Could do somewhat better by converting to indices, but it'd still be less good than the older code. Unclear how important this is.
2017-12-15translate `Verify`s into `TypeTest`s and check themNiko Matsakis-0/+77
2017-12-15only propagate ClosureRegionRequirements if non-trivialNiko Matsakis-18/+56
Before, we would always have a `Some` ClosureRegionRequirements if we were inferring values for a closure. Now we only do is it has a non-empty set of outlives requirements.
2017-12-13fix closure tests now that MIR typeck works properlyNiko Matsakis-74/+138
These tests had FIXMEs for errors that were not previously being reported.
2017-12-11Updated existing tests with new error messages.David Wood-37/+42
2017-12-10Update ui tests' line numbers.Tommy Ip-71/+71
2017-12-10Add must-compile-successfully comment to appropriate ui tests.Tommy Ip-0/+6
2017-12-07add test comparing free region to bound regionNiko Matsakis-0/+128
suggested by arielb1
2017-12-07use `-Znll -Zborrowck=mir -Zverbose` consistentlyNiko Matsakis-28/+9
2017-12-07region-ebr-does-not-outlive-static: reuse old test insteadNiko Matsakis-40/+0
2017-12-07propagate-approximated-ref: include FIXME commentNiko Matsakis-1/+1
2017-12-07test more failure cases for approximating the "longer" sideNiko Matsakis-48/+157
as suggested by arielb1
2017-12-07test approximations of the "shorter side" that resort to `'static`Niko Matsakis-18/+113
This includes the additional case suggested by arielb1.
2017-12-07delete stray fileNiko Matsakis-87/+0
2017-12-07escape-upvar-ref: patch comment per arielb1Niko Matsakis-14/+21
2017-12-07escape-upvar-nested: patch "dangling reference" to renamed testNiko Matsakis-1/+1
2017-12-07escape-argument: improve comment per arielb1's suggestionNiko Matsakis-14/+16
2017-12-07escape-argument-callee: improve comment per arielb1's suggestionsNiko Matsakis-18/+23
2017-12-07don't print self symbol's internal index unless gensymedNiko Matsakis-9/+9
It's just not useful. It also makes it hard to have tests that probe internal state, since the interning number is very sensitive. Dumping the number in the case of gensym is not ideal but will do for now.
2017-12-07add closure requirement tests, improve debugging outputNiko Matsakis-35/+1324
The overall format is now easier to read. Also, There is now graphviz output, as well as a `#[rustc_regions]` annotation that dumps internal state.
2017-12-04inform constraint generation using maybe-initPaul Daniel Faria-0/+197
In particular, if we see a variable is DROP-LIVE, but it is not MAYBE-INIT, then we can ignore the drop. This leavess attempt to use more complex refinements of the idea (e.g., for subpaths or subfields) to future work.
2017-11-26Update tests for -Zborrowck-mir -> -Zborrowck=mode migrationest31-1/+1
2017-11-24Merge cfail and ui tests into ui testsOliver Schneider-20/+28
2017-11-19mir-borrowck: Remove parens in the lvalue description of a derefBasile Desloges-1/+1
2017-11-16integrate NLL with MIR type-checkerNiko Matsakis-0/+100
2017-11-02emit less info when we warnNiko Matsakis-1/+1
Actually, I meant to make this use `delay_span_bug`
2017-11-02trace span info for constraints and report errorsNiko Matsakis-0/+51