summary refs log tree commit diff
path: root/src/test/ui/lifetime-errors
AgeCommit message (Collapse)AuthorLines
2018-04-18Trivial updates to `.nll.stderr` files post-rebase, reflecting s/-Znll/nll/ ↵Felix S. Klock II-37/+37
in messages.
2018-04-11Checkpoint the current status of NLL on `ui` tests via compare-mode=nll.Felix S. Klock II-0/+682
2018-03-14update testsGuillaume Gomez-38/+38
2018-03-09tidy: Add a check for stray `.stderr` and `.stdout` files in UI test directoriesVadim Petrochenkov-19/+0
2018-02-26Update UI testsVadim Petrochenkov-5/+5
2018-02-26Update UI testsVadim Petrochenkov-89/+89
2018-02-25Update ui testsGuillaume Gomez-0/+39
2018-02-17fix more typos found by codespell.Matthias Krüger-1/+1
2017-11-27Don't show first assignment in loopsMatthew Jasper-0/+118
Matches current ast-borrowck behavior.
2017-11-24Merge cfail and ui tests into ui testsOliver Schneider-77/+78
2017-11-12Improve SubSupConflict case with one named, one anonymous lifetime parameter ↵Cengiz Can-91/+48
#42701
2017-11-06review commentsEsteban Küber-2/+2
2017-11-05Handle anon lifetime arg being returned with named lifetime return typeEsteban Küber-3/+44
When there's a lifetime mismatch between an argument with an anonymous lifetime being returned in a method with a return type that has a named lifetime, show specialized lifetime error pointing at argument with a hint to give it an explicit lifetime matching the return type. ``` error[E0621]: explicit lifetime required in the type of `other` --> file2.rs:21:21 | 17 | fn bar(&self, other: Foo) -> Foo<'a> { | ----- consider changing the type of `other` to `Foo<'a>` ... 21 | other | ^^^^^ lifetime `'a` required ``` Follow up to #44124 and #42669.
2017-09-26fix test referenceNiko Matsakis-1/+1
2017-09-26remove random newlines from error messages, fix compile-fail testNiko Matsakis-10/+5
That kind of formatting seems like the job of other code.
2017-09-26use present tense consistently and update referencesNiko Matsakis-4/+4
2017-09-26modify message for return time having multiple lifetimesgaurikholkar-32/+25
2017-09-26merge fixes, addressing CR commentsgaurikholkar-76/+24
2017-09-14add ui tests for EBRgaurikholkar-0/+32
2017-09-14adding ui testsgaurikholkar-0/+28
2017-09-13fix ui testsgaurikholkar-2/+2
2017-09-12Adding changes for trait objectsgaurikholkar-0/+24
2017-09-12add ui test for fn items, tidy fixesgaurikholkar-4/+24
2017-09-12Adding E0623 for structsgaurikholkar-0/+80
2017-09-09adding E0623 for LateBound regionsgaurikholkar-0/+57
2017-08-23minor fixgaurikholkar-1/+1
2017-08-23code review fixesgaurikholkar-66/+6
2017-08-17Adding E0623 for structsgaurikholkar-53/+366
2017-07-29changing E0623 error messagegaurikholkar-10/+10
2017-07-28Adding E0623, to detect missing lifetimes when both regions are anonymousgaurikholkar-0/+108
2017-07-02report the total number of errors on compilation failureAriel Ben-Yehuda-8/+8
Prior to this PR, when we aborted because a "critical pass" failed, we displayed the number of errors from that critical pass. While that's the number of errors that caused compilation to abort in *that place*, that's not what people really want to know. Instead, always report the total number of errors, and don't bother to track the number of errors from the last pass that failed. This changes the compiler driver API to handle errors more smoothly, and therefore is a compiler-api-[breaking-change]. Fixes #42793.
2017-07-02Revert "Change error count messages"Ariel Ben-Yehuda-7/+7
This reverts commit 5558c64f33446225739c1153b43d2e309bb4f50e.
2017-06-29adding compile-fail testgaurikholkar-53/+0
2017-06-29Changing the error code to E0621gaurikholkar-7/+7
2017-06-29Adding changes to track anonymous region in selfgaurikholkar-3/+53
2017-06-29track anonymous regions in return types, fix tidy errorsgaurikholkar-1/+52
2017-06-29Enabling E0611 for inherent functionsgaurikholkar-0/+63
2017-06-29Interchange ^ and -gaurikholkar-15/+15
2017-06-29update reference for testNiko Matsakis-5/+5
2017-06-29Adding new ui test for trait implgaurikholkar-0/+54
2017-06-29Adding diagnostic code 0611 for lifetime errors with one named, one ↵gaurikholkar-38/+142
anonymous lifetime parameter
2017-05-24Change error count messagesMichael Kohl-7/+7
See #33525 for details.
2017-05-18Fix off-by-one error in column number in `explain_span`.Florian Hartwig-12/+12
2017-05-13rustc: use DefId instead of CodeExtent for FreeRegion's scope.Eduard-Mihai Burtescu-48/+36
2017-04-20Reduce visual clutter of multiline start when possibleEsteban Küber-24/+24
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.
2017-04-11Highlight and simplify mismatched typesEsteban Küber-5/+5
Shorten mismatched types errors by replacing subtypes that are not different with `_`, and highlighting only the subtypes that are different. Given a file ```rust struct X<T1, T2> { x: T1, y: T2, } fn foo() -> X<X<String, String>, String> { X { x: X {x: "".to_string(), y: 2}, y: "".to_string()} } fn bar() -> Option<String> { "".to_string() } ``` provide the following output ```rust error[E0308]: mismatched types --> file.rs:6:5 | 6 | X { x: X {x: "".to_string(), y: 2}, y: "".to_string()} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected struct `std::string::String`, found {integer} | = note: expected type `X<X<_, std::string::String>, _>` ^^^^^^^^^^^^^^^^^^^ // < highlighted found type `X<X<_, {integer}>, _>` ^^^^^^^^^ // < highlighted error[E0308]: mismatched types --> file.rs:6:5 | 10 | "".to_string() | ^^^^^^^^^^^^^^ expected struct `std::option::Option`, found `std::string::String` | = note: expected type `Option<std::string::String>` ^^^^^^^ ^ // < highlighted found type `std::string::String` ```
2017-02-17remove vestiges of the old suggestion machineryNiko Matsakis-0/+91
2017-02-17add some sample UI error test casesNiko Matsakis-0/+243
These are some samples that I have been focusing on improving over time. In this PR, I mainly want to stem the bleeding where we in some cases we show an error that gives you no possible way to divine the problem.