about summary refs log tree commit diff
path: root/src/test/ui/dropck
AgeCommit message (Collapse)AuthorLines
2021-01-16Move some tests to more reasonable directories - 2Caio-0/+103
Address comments Update limits
2020-12-29Remove `compile-fail` test suiteVadim Petrochenkov-1/+1
2020-12-26update testsBastian Kauschke-33/+31
2020-11-12check `Drop` specialization of const paramsBastian Kauschke-28/+61
2020-11-12move dropck tests from ui -> ui/dropckBastian Kauschke-0/+255
2020-10-16stabilize union with 'ManuallyDrop' fields and 'impl Drop for Union'Ralf Jung-3/+1
2020-09-02pretty: trim paths of unique symbolsDan Aloni-6/+6
If a symbol name can only be imported from one place for a type, and as long as it was not glob-imported anywhere in the current crate, we can trim its printed path and print only the name. This has wide implications on error messages with types, for example, shortening `std::vec::Vec` to just `Vec`, as long as there is no other `Vec` importable anywhere. This adds a new '-Z trim-diagnostic-paths=false' option to control this feature. On the good path, with no diagnosis printed, we should try to avoid issuing this query, so we need to prevent trimmed_def_paths query on several cases. This change also relies on a previous commit that differentiates between `Debug` and `Display` on various rustc types, where the latter is trimmed and presented to the user and the former is not.
2020-05-28standardize limit comparisons with `Limit` typeDavid Wood-7/+7
This commit introduces a `Limit` type which is used to ensure that all comparisons against limits within the compiler are consistent (which can result in ICEs if they aren't). Signed-off-by: David Wood <david@davidtw.co>
2020-01-03clarify that `Drop` can be implemented for enums and unions tooAndy Russell-5/+16
2019-12-05Add regression testsTommaso Bianchi-0/+88
2019-10-28Talk about specific types and remove lifetimes from outputEsteban Küber-1/+1
2019-10-28Use more targeted spans for orphan rule errorsEsteban Küber-2/+4
2019-10-28Call out the types that are non local on E0117Esteban Küber-1/+1
2019-10-02Calculate liveness for the same locals with and without -ZpoloniusMatthew Jasper-78/+0
This fixes some test differences and also avoids overflow in issue-38591.rs.
2019-09-17Update expectations of test ui/dropck/dropck_trait_cycle_checked.rs for Poloniuslqd-4/+8
as its output was changed by https://github.com/rust-lang/rust/commit/2ff337a8e286a5b472f71b3bbdc3d4b6b840870f#diff-bd3f80b956148a5d1567aa8698b8a507
2019-08-16rustc_mir: use the right type for associated const literals.Eduard-Mihai Burtescu-5/+5
2019-07-22Bless output of test dropck/dropck_trait_cycle_checked.rs for Poloniuslqd-0/+74
2019-07-07Raise the default recursion limit to 128Simonas Kazlauskas-7/+7
2019-05-29Update ui test suite to use dynmemoryruins-20/+20
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.