about summary refs log tree commit diff
path: root/src/test/ui/dropck
AgeCommit message (Collapse)AuthorLines
2019-04-22update tests for migrate mode by defaultMatthew Jasper-567/+329
2019-04-18hide `--explain` hint if error has no extended infoAndy Russell-4/+1
2019-03-11Update NLL testsVadim Petrochenkov-10/+10
2019-03-11Update testsVadim Petrochenkov-15/+15
2019-01-08Improve the wordingYuki Okushi-1/+1
2018-12-25Remove licensesMark Rousskov-131/+31
2018-12-07Various minor/cosmetic improvements to codeAlexander Regueiro-1/+1
2018-11-05Use `// revisions` in the dropck-eyepatch tests instead of relying on ↵Felix S. Klock II-51/+60
compare-mode=nll. NLL has increased precision in its analysis of drop order, and we want the test annotations to deliberately reflect this by having fewer ERROR annotations for NLL than for AST-borrowck. The best way to get this effect is via `// revisions`. As a drive-by, also added uses of all the borrows just to make it clear that NLL isn't somehow sidestepping things by using shorter borrows than you might have otherwise expected. (Of course, the added uses do not make all that much difference since the relevant types all declare `impl Drop` and thus those drops have implicit uses anyway.)
2018-10-21Use new region infer errors for explaining borrowsMatthew Jasper-24/+23
This gives at least some explanation for why a borrow is expected to last for a certain free region. Also: * Reports E0373: "closure may outlive the current function" with NLL. * Special cases the case of returning a reference to (or value referencing) a local variable or temporary (E0515). * Special case assigning a reference to a local variable in a closure to a captured variable.
2018-10-05Updates to .stderr output in ui tests from earlier changes.Felix S. Klock II-4/+4
2018-09-23Remove irrelevant message about drop orderMatthew Jasper-2/+0
When dropping a self-borrowing struct we shouldn't add a "values in a scope are dropped in the opposite order they are defined" message, since there is only one value being dropped.
2018-08-17Auto merge of #53288 - RalfJung:dropck, r=nikomatsakisbors-0/+79
unions are not always trivially dropable Fixes #52786 r? @nikomatsakis
2018-08-17fix licenseRalf Jung-2/+12
2018-08-14Merged migrated compile-fail tests and ui tests. Fixes #46841.David Wood-0/+587
2018-08-12unions are not always trivially dropableRalf Jung-0/+69
Fixes #52786
2018-07-23Don't match on region kinds when reporting NLL errorsMatthew Jasper-3/+3
With NLL region kinds are always ReVar
2018-06-19Suggest that values are dropped in the opposite order they are definedSantiago Pastorino-0/+6
2018-05-25rust-lang/rust#51025: improve test robustness so that they work under NLL too.Felix S. Klock II-99/+193
2018-04-11Checkpoint the current status of NLL on `ui` tests via compare-mode=nll.Felix S. Klock II-0/+42
2018-04-11Workaround rust-lang/rust#49855 by forcing rustc_error in any mode, ↵Felix S. Klock II-6/+6
including NLL. NOTE: I was careful to make each change in a manner that preserves the existing diagnostic output (usually by ensuring that no lines were added or removed). This means that the resulting source files are not as nice to read as they were at the start. But we will have to review these cases by hand anyway as follow-up work, so cleanup could reasonably happen then (or not at all).
2018-04-05Stabilize attributes on generic parametersVadim Petrochenkov-14/+10
2018-03-14update testsGuillaume Gomez-4/+4
2018-02-26Update UI testsVadim Petrochenkov-2/+2
2018-02-26Update UI testsVadim Petrochenkov-58/+58
2018-02-25Update ui testsGuillaume Gomez-0/+4
2017-12-14Point at var in short lived borrowsEsteban Küber-82/+83
2017-11-24Merge cfail and ui tests into ui testsOliver Schneider-29/+40
2017-07-02Revert "Change error count messages"Ariel Ben-Yehuda-4/+4
This reverts commit 5558c64f33446225739c1153b43d2e309bb4f50e.
2017-05-27Add new error codes and update testsGuillaume Gomez-12/+12
2017-05-24Change error count messagesMichael Kohl-4/+4
See #33525 for details.
2017-04-20Reduce visual clutter of multiline start when possibleEsteban Küber-6/+4
When a span starts on a line with nothing but whitespace to the left, and there are no other annotations in that line, simplify the visual representation of the span. Go from: ```rust error[E0072]: recursive type `A` has infinite size --> file2.rs:1:1 | 1 | struct A { | _^ starting here... 2 | | a: A, 3 | | } | |_^ ...ending here: recursive type has infinite size | ``` To: ```rust error[E0072]: recursive type `A` has infinite size --> file2.rs:1:1 | 1 | / struct A { 2 | | a: A, 3 | | } | |_^ recursive type has infinite size ``` Remove `starting here...`/`...ending here` labels from all multiline diagnostics.
2016-11-23review commentsEsteban Küber-2/+2
2016-11-22Show multiline spans in full if short enoughEsteban Küber-4/+16
When dealing with multiline spans that span few lines, show the complete span instead of restricting to the first character of the first line. For example, instead of: ``` % ./rustc foo.rs error[E0277]: the trait bound `{integer}: std::ops::Add<()>` is not satisfied --> foo.rs:13:9 | 13 | foo(1 + bar(x, | ^ trait `{integer}: std::ops::Add<()>` not satisfied | ``` show ``` % ./rustc foo.rs error[E0277]: the trait bound `{integer}: std::ops::Add<()>` is not satisfied --> foo.rs:13:9 | 13 | foo(1 + bar(x, | ________^ starting here... 14 | | y), | |_____________^ ...ending here: trait `{integer}: std::ops::Add<()>` not satisfied | ```
2016-10-20improve "Doesn't live long enough" errorMikhail Modin-36/+36
2016-10-17Moved new dropck-eyepatch compile-fail tests to the `ui/` subtree.Felix S. Klock II-0/+470