about summary refs log tree commit diff
path: root/src/test/ui/lifetime-errors
AgeCommit message (Collapse)AuthorLines
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.