about summary refs log tree commit diff
path: root/src/test/ui/empty
AgeCommit message (Collapse)AuthorLines
2019-04-22Never stop due to errors before borrow checkingEsteban Küber-1/+14
2019-04-18hide `--explain` hint if error has no extended infoAndy Russell-2/+2
2019-04-09improve unknown enum variant errorsAndy Russell-9/+17
2019-03-23Tweak spans for E0599Esteban Küber-8/+8
2019-03-11Update testsVadim Petrochenkov-24/+24
2019-03-02Point at enum definition when match patterns are not exhaustiveEsteban Küber-2/+9
``` error[E0004]: non-exhaustive patterns: type `X` is non-empty --> file.rs:9:11 | 1 | / enum X { 2 | | A, | | - variant not covered 3 | | B, | | - variant not covered 4 | | C, | | - variant not covered 5 | | } | |_- `X` defined here ... 9 | match x { | ^ | = help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms error[E0004]: non-exhaustive patterns: `B` and `C` not covered --> file.rs:11:11 | 1 | / enum X { 2 | | A, 3 | | B, 4 | | C, | | - not covered 5 | | } | |_- `X` defined here ... 11 | match x { | ^ patterns `C` not covered ``` When a match expression doesn't have patterns covering every variant, point at the enum's definition span. On a best effort basis, point at the variant(s) that are missing. This does not handle the case when the missing pattern is due to a field's enum variants: ``` enum E1 { A, B, C, } enum E2 { A(E1), B, } fn foo() { match E2::A(E1::A) { E2::A(E1::B) => {} E2::B => {} } //~^ ERROR `E2::A(E1::A)` and `E2::A(E1::C)` not handled } ``` Unify look between match with no arms and match with some missing patterns. Fix #37518.
2019-01-20Use structured suggestion in stead of notesEsteban Küber-6/+4
2019-01-09clarify resolve typo suggestionAndy Russell-18/+18
Include the kind of the binding that we're suggesting, and use a structured suggestion.
2018-12-26Fixed more tests.Alexander Regueiro-6/+10
2018-12-25Remove licensesMark Rousskov-168/+38
2018-11-23Reword incorrect macro invocation primary labelEsteban Küber-1/+1
2018-11-19Auto merge of #56051 - pietroalbini:rollup, r=pietroalbinibors-4/+12
Rollup of 25 pull requests Successful merges: - #55562 (Add powerpc- and powerpc64-unknown-linux-musl targets) - #55564 (test/linkage-visibility: Ignore on musl targets) - #55827 (A few tweaks to iterations/collecting) - #55834 (Forward the ABI of the non-zero sized fields of an union if they have the same ABI) - #55857 (remove unused dependency) - #55862 (in which the E0618 "expected function" diagnostic gets a makeover) - #55867 (do not panic just because cargo failed) - #55894 (miri enum discriminant handling: Fix treatment of pointers, better error when it is undef) - #55916 (Make miri value visitor useful for mutation) - #55919 (core/tests/num: Simplify `test_int_from_str_overflow()` test code) - #55923 (reword #[test] attribute error on fn items) - #55949 (ty: return impl Iterator from Predicate::walk_tys) - #55952 (Update to Clang 7 on CI.) - #55953 (#53488 Refactoring UpvarId) - #55962 (rustdoc: properly calculate spans for intra-doc link resolution errors) - #55963 (Stress test for MPSC) - #55968 (Clean up some non-mod-rs stuff.) - #55970 (Miri backtrace improvements) - #56007 (CTFE: dynamically make sure we do not call non-const-fn) - #56011 (Replace data.clone() by Arc::clone(&data) in mutex doc.) - #56012 (avoid shared ref in UnsafeCell::get) - #56016 (Add VecDeque::resize_with) - #56027 (docs: Add missing backtick in object_safety.rs docs) - #56043 (remove "approx env bounds" if we already know from trait) - #56059 (Increase `Duration` approximate equal threshold to 1us)
2018-11-18resolve: Tweak some articles in ambiguity diagnosticsVadim Petrochenkov-2/+2
2018-11-10in which the E0618 "expected function" diagnostic gets a makeoverZack M. Davis-4/+12
Now the main span focuses on the erroneous not-a-function callee, while showing the entire call expression is relegated to a secondary span. In the case where the erroneous callee is itself a call, we point out the definition, and, if the call expression spans multiple lines, tentatively suggest a semicolon (because we suspect that the "outer" call is actually supposed to be a tuple). The new `bug!` assertion is, in fact, safe (`confirm_builtin_call` is only called by `check_call`, which is only called with a first arg of kind `ExprKind::Call` in `check_expr_kind`). Resolves #51055.
2018-10-24Point to macro def span instead of whole bodyEsteban Küber-6/+4
2018-10-23Point at macro definition when no rules expect tokenEsteban Küber-2/+7
2018-08-14Moved problematic tests on i586-unknown-linux-gnu back to compile-fail.David Wood-21/+0
2018-08-14Merged migrated compile-fail tests and ui tests. Fixes #46841.David Wood-0/+754