about summary refs log tree commit diff
path: root/src/test/ui/recursion
AgeCommit message (Collapse)AuthorLines
2023-01-11Move /src/test to /testsAlbert Larsan-2969/+0
2022-12-17docs: add long error explanation for error E0320Ezra Shaw-0/+1
2022-12-13Avoid rendering empty annotationsOli Scherer-1/+3
2022-12-13Don't emit empty notesOli Scherer-2/+0
2022-12-13Make some diagnostics not depend on the source of what they reference being ↵Oli Scherer-5/+2
available
2022-11-28Further tweak the type shortening logicEsteban Küber-1/+1
2022-11-28Detect long types in E0308 and write them to diskEsteban Küber-1/+1
On type error with long types, print an abridged type and write the full type to disk. Print the widest possible short type while still fitting in the terminal.
2022-11-19re-add test and blessouz-a-0/+30
2022-11-19revert-overflowouz-a-38/+1
2022-11-18Only use `...` instead of `_` for type elisionEsteban Küber-1/+1
`_` might confuse people into believing that the type isn't known, while `...` is not used anywhere else for types and is not valid syntax, making it more likely to convey the right understanding.
2022-11-18On overflow errors, do not print out long typesEsteban Küber-4/+6
2022-11-18Make "long type" printing type awareEsteban Küber-1/+1
Instead of simple string cutting, use a custom printer to hide parts of long printed types.
2022-10-07Rewrite representabilityCameron Steffen-3/+1
2022-10-01bless ui testsMaybe Waffle-1/+1
2022-09-23Always print '_, even for erased lifetimes.Camille GILLOT-2/+2
2022-09-15Remove feature gate from let else suggestionest31-1/+1
The let else suggestion added by 0d92752b8aac53e033541d04fc7d9677d8bca227 does not need a feature gate any more.
2022-08-19Update issue-83150.stderrouz-a-2/+2
2022-08-19Catch overflow earlyouz-a-2/+39
2022-08-18Reword "Required because of the requirements on the impl of ..."Andy Wang-1/+1
2022-08-03Warn about dead tuple struct fieldsFabian Wolff-14/+8
2022-07-07Shorten span for closures.Camille GILLOT-2/+2
2022-07-04Auto merge of #98641 - lcnr:mir-dropck, r=oli-obkbors-19/+10
fully move dropck to mir r? `@oli-obk`
2022-07-04fully move dropck to mirlcnr-19/+10
2022-07-04Rollup merge of #98870 - TaKO8Ki:add-regression-test-for-86784, ↵Matthias Krüger-0/+2597
r=compiler-errors Add regression test for #86784 closes #86784
2022-07-04add regression test for #86784Takayuki Maeda-0/+2597
2022-07-02Auto merge of #91743 - cjgillot:enable_mir_inlining_inline_all, r=oli-obkbors-4/+5
Enable MIR inlining Continuation of https://github.com/rust-lang/rust/pull/82280 by `@wesleywiser.` #82280 has shown nice compile time wins could be obtained by enabling MIR inlining. Most of the issues in https://github.com/rust-lang/rust/issues/81567 are now fixed, except the interaction with polymorphization which is worked around specifically. I believe we can proceed with enabling MIR inlining in the near future (preferably just after beta branching, in case we discover new issues). Steps before merging: - [x] figure out the interaction with polymorphization; - [x] figure out how miri should deal with extern types; - [x] silence the extra arithmetic overflow warnings; - [x] remove the codegen fulfilment ICE; - [x] remove the type normalization ICEs while compiling nalgebra; - [ ] tweak the inlining threshold.
2022-07-01Shorten def_span for more items.Camille GILLOT-10/+6
2022-06-30Specialize a few tests depending on opt-level.Camille GILLOT-13/+7
2022-06-30Allow inlining `#[inline]` functions.Camille GILLOT-6/+13
2022-06-19Make some lints incremental.Camille GILLOT-1/+8
2022-06-04use precise spans for recursive const evaluationRalf Jung-2/+2
2022-05-11Gracefully fail to resolve associated items instead of `delay_span_bug`.Camille GILLOT-1/+1
2022-03-23separate const prop lint from optimizationsCarl Scherer-2/+6
2022-03-08Suggest `if let`/`let_else` for refutable pat in `let`Esteban Kuber-1/+5
2022-03-08Point at uncovered variants in enum definition in `note` instead of a ↵Esteban Kuber-5/+12
`span_label` This makes the order of the output always consistent: 1. Place of the `match` missing arms 2. The `enum` definition span 3. The structured suggestion to add a fallthrough arm
2022-01-26Ignore unwinding edges when checking for unconditional recursionTomasz Miąsko-2/+13
The unconditional recursion lint determines if all execution paths eventually lead to a self-recursive call. The implementation always follows unwinding edges which limits its practical utility. For example, it would not lint function `f` because a call to `g` might unwind. It also wouldn't lint function `h` because an overflow check preceding the self-recursive call might unwind: ```rust pub fn f() { g(); f(); } pub fn g() { /* ... */ } pub fn h(a: usize) { h(a + 1); } ``` To avoid the issue, assume that terminators that might continue execution along non-unwinding edges do so.
2021-11-14Move some tests to more reasonable directoriesCaio-0/+17
2021-09-28Improve help for recursion limit errorsRoss MacArthur-1/+1
2021-09-21Disable visible path calculation for PrettyPrinter in Ok path of compilerAlik Aslanyan-6/+6
2021-08-24Morph `layout_raw` query into `layout_of`.Eduard-Mihai Burtescu-12/+10
2021-08-19Revert "Revert "Auto merge of #83417 - erikdesjardins:enableremovezsts, ↵Erik Desjardins-3/+3
r=oli-obk"" This reverts commit 8e11199a153218c13a419df37a9bb675181cccb7.
2021-08-18Auto merge of #87738 - lqd:polonius-master, r=nikomatsakisbors-0/+30
Update `polonius-engine` to 0.13.0 This PR updates the use of `polonius-engine` to the recently released 0.13.0: - this version renamed a lot of relations to match the current terminology - "illegal subset relationships errors" (AKA "subset errors" or "universal region errors" in rustc parlance) have been implemented in all variants, and therefore the `Hybrid` variant can be the rustc default once again - some of the blessed expectations were updated: new tests have been added since the last time I updated the tests, diagnostics have changed, etc. In particular: - a few tests had trivial expectations changes such as basic diagnostics changes for the migrate-mode and full NLLs - others were recursion and lengths limits which emits a file, and under the polonius compare-mode, the folder has a different name - a few tests were ignored in the NLL compare-mode for reasons that obviously also apply to Polonius - some diagnostics were unified so that older expectations no longer made sense: the NLL and Polonius outputs were identical. - in a few cases Polonius gets a chance to emit more errors than NLLs A few tests in the compare-mode still are super slow and trigger the 60s warning, or OOM rustc during fact generation, and I've detailed these [on Zulip](https://rust-lang.zulipchat.com/#narrow/stream/186049-t-compiler.2Fwg-polonius/topic/Challenges.20for.20move.2Finit.2C.20liveness.2C.20and.20.60Location.3A.3AAll.60): - `src/test/ui/numbers-arithmetic/saturating-float-casts.rs` -> OOM during rustc fact generation - `src/test/ui/numbers-arithmetic/num-wrapping.rs` - `src/test/ui/issues/issue-72933-match-stack-overflow.rs` - `src/test/ui/issues/issue-74564-if-expr-stack-overflow.rs` - `src/test/ui/repr/repr-no-niche.rs` In addition, 2 tests don't currently pass and I didn't want to bless them now: they deal with HRTBs and miss errors that NLLs emit. We're currently trying to see if we need chalk to deal with HRTB errors (as we thought we would have to) but during the recent sprint, we discovered that we may be able to detect some of these errors in a way that resembles subset errors: - `ui/hrtb/hrtb-just-for-static.rs` -> 3 errors in NLL, 2 in polonius: a missing error about HRTB + needing to outlive 'static - `ui/issues/issue-26217.rs` -> missing HRTB that makes the test compile instead of emitting an error We'll keep talking about this at the next sprint as well. cc `@rust-lang/wg-polonius` r? `@nikomatsakis`
2021-08-17Auto merge of #88056 - erikdesjardins:revertzst, r=oli-obkbors-3/+3
Revert "Auto merge of #83417 - erikdesjardins:enableremovezsts, r=oli-obk" This reverts commit 8007b506ac5da629f223b755f5a5391edd5f6d01, reversing changes made to e55c13e1099b78b1a485202fabc9c1b10b1f1d15. Fixes #88043 r? `@oli-obk`
2021-08-16Use note to point at bound introducing requirementEsteban Küber-6/+10
2021-08-15Revert "Auto merge of #83417 - erikdesjardins:enableremovezsts, r=oli-obk"Erik Desjardins-3/+3
This reverts commit 8007b506ac5da629f223b755f5a5391edd5f6d01, reversing changes made to e55c13e1099b78b1a485202fabc9c1b10b1f1d15.
2021-08-14Auto merge of #83417 - erikdesjardins:enableremovezsts, r=oli-obkbors-3/+3
Run RemoveZsts pass at mir-opt-level=1 per https://github.com/rust-lang/rust/pull/83177#issuecomment-803942217 This pass removes assignments to ZST places. Perf (from https://github.com/rust-lang/rust/pull/83177#issuecomment-803442557): https://perf.rust-lang.org/compare.html?start=41b315a470d583f6446599984ff9ad3bd61012b2&end=bd5d1b96f0c64c9938feea831789e1b5bb2cd4a2 r? `@oli-obk`
2021-08-11Modify structured suggestion outputEsteban Küber-1/+1
* On suggestions that include deletions, use a diff inspired output format * When suggesting addition, use `+` as underline * Color highlight modified span
2021-08-07Run RemoveZsts at mir-opt-level=1Erik Desjardins-3/+3
Effectively reverts commit 6960bc9696b05b15d8d89ece2fef14e6e62a43fc.
2021-08-04Remove trailing whitespace from error messagesFabian Wolff-1/+1
2021-08-03bless a few trivial tests under poloniusRémy Rakic-0/+30
These are all about reaching some type and recursion limits and saving the full type in a file, whose folder changes in this compare-mode.