about summary refs log tree commit diff
path: root/src/test/ui/error-codes
AgeCommit message (Collapse)AuthorLines
2019-12-04Forgot to update some test outputsNadrieril-2/+2
2019-12-02Correct other tests related to const_mut_refsChristian Poveda-10/+75
2019-11-27Update test for mutably borrowed statics in a constDylan MacKenzie-6/+21
This checks `static mut` as well for E0017, and blesses tests now that we emit an error for a mut deref.
2019-11-27Remove test for unused error codeDylan MacKenzie-37/+0
This error code is never emitted, and the contents of this test are identical to that of `E0017.rs`.
2019-11-21Change some tests to use the shorter comment styleDylan MacKenzie-8/+2
2019-11-21Auto merge of #66389 - estebank:type-err-labels, r=petrochenkovbors-12/+6
Specific labels when referring to "expected" and "found" types
2019-11-18Surround types with backticks in type errorsEsteban Küber-4/+4
2019-11-18Remove E0308 note when primary label has all infoEsteban Küber-7/+1
2019-11-18review comments: tweak prefix stringsEsteban Küber-2/+2
2019-11-18Specific labels when referring to "expected" and "found" typesEsteban Küber-4/+4
2019-11-18Update ui testsGuillaume Gomez-0/+2
2019-11-15Rollup merge of #66306 - spastorino:remove-error-handled-by-miri, r=oli-obkYuki Okushi-18/+4
Remove cannot mutate statics in initializer of another static error r? @oli-obk This is just a refactoring. As the removed code itself said, it only a heuristic catching a few cases early instead of leaving it all to const eval. It's easy to work around the static check and then run into the miri-engine check.
2019-11-14Fix ui tests with better error code usageGuillaume Gomez-1/+8
2019-11-14Rollup merge of #66351 - JohnTitor:tweak-range-err-msg, r=CentrilYuki Okushi-7/+8
Tweak non-char/numeric in range pattern diagnostic Fixes #66283 r? @estebank
2019-11-13Tweak non-char/numeric in range pattern diagnosticYuki Okushi-7/+8
2019-11-12check-consts remove cannot mutate statics in initializer of another static errorSantiago Pastorino-18/+4
2019-11-10Improve coherence errors for wrong type orderOhad Ravid-0/+1
2019-11-09Auto merge of #65879 - ohadravid:stabilize-re-rebalance-coherence, ↵bors-7/+10
r=nikomatsakis Stabilize the `re_rebalance_coherence` feature This PR stabilizes [RFC 2451](https://rust-lang.github.io/rfcs/2451-re-rebalancing-coherence.html), re-rebalance coherence. Changes include removing the attribute from tests which tested both the old and new behavior, moving the feature to `accepted` and removing the old logic. I'll also open a [PR](https://github.com/rust-lang-nursery/reference/pull/703) against the reference, updating it with the content of the RFC. Closes #63599 r? @nikomatsakis
2019-10-31Stabilize the `re_rebalance_coherence` featureOhad Ravid-7/+10
2019-10-31Fix incorrect diagnostics for expected type in E0271 with an associated typeOhad Ravid-3/+3
2019-10-29Rollup merge of #65562 - Patryk27:master, r=estebankMazdak Farrokhzad-1/+1
Improve the "try using a variant of the expected type" hint. Fix https://github.com/rust-lang/rust/issues/65494. - Change type-printing output. - Use `span_to_snippet` when possible. - Change the message to `try using a variant of the expected enum`
2019-10-29Rollup merge of #65318 - estebank:coherence, r=varkorMazdak Farrokhzad-8/+12
Call out the types that are non local on E0117 CC #24745.
2019-10-28Improve the "try using a variant of the expected type" hint.Patryk Wychowaniec-1/+1
2019-10-28Do not display ADT type arguments and fix rebaseEsteban Küber-1/+1
2019-10-28Account for tuples in explanationEsteban Küber-1/+1
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-8/+12
2019-10-28Call out the types that are non local on E0117Esteban Küber-2/+2
2019-10-27Point at local similarly named element and tweak references to variantsEsteban Küber-13/+19
Point at the span for the definition of ADTs internal to the current crate. Look at the leading char of the ident to determine whether we're expecting a likely fn or any of a fn, a tuple struct or a tuple variant. Turn fn `add_typo_suggestion` into a `Resolver` method.
2019-10-24Increase spacing for suggestions in diagnosticsEsteban Küber-0/+9
Make the spacing between the code snippet and verbose structured suggestions consistent with note and help messages.
2019-10-17Point at enclosing function without `self` receiverEsteban Küber-4/+10
2019-10-17Refer to "associated functions" instead of "static methods"Esteban Küber-1/+1
2019-10-14Rollup merge of #65398 - estebank:capitalization-only, r=varkorTyler Mandry-1/+1
Bring attention to suggestions when the only difference is capitalization CC #65386.
2019-10-14Rollup merge of #65292 - JohnTitor:add-backticks, r=varkor,CentrilMazdak Farrokhzad-2/+2
Print lifetimes with backticks Fixes #65287 r? @varkor
2019-10-13Bring attention to suggestions when the only difference is capitalizationEsteban Küber-1/+1
2019-10-13Rollup merge of #65248 - estebank:mention-if-let, r=cramertjMazdak Farrokhzad-0/+7
Suggest `if let` on `let` refutable binding Fix #58385.
2019-10-11Print lifetimes with backticksYuki Okushi-2/+2
2019-10-09Suggest `if let` on `let` refutable bindingEsteban Küber-0/+7
2019-10-07update ui testsGuillaume Gomez-0/+1
2019-10-03typo: fix typo in E0392Ben Boeckel-1/+1
See #64931.
2019-10-03Rollup merge of #64931 - estebank:missing-param-ref, r=matthewjasper,CentrilMazdak Farrokhzad-1/+1
Reword E0392 slightly Make it clearer that a type or lifetime argument not being used can be fixed by referencing it in a struct's fields, not just using `PhathomData`. CC #53589.
2019-10-02review commentEsteban Küber-1/+1
2019-09-30Reword E0392 slightlyEsteban Küber-1/+1
Make it clearer that a type or lifetime argument not being used can be fixed by referencing it in a struct's fields, not just using `PhathomData`.
2019-09-29Rollup merge of #64691 - estebank:unexpected-variant, r=CentrilMazdak Farrokhzad-0/+3
Point at definition when misusing ADT When given `struct Foo(usize)` and using it as `Foo {}` or `Foo`, point at `Foo`'s definition in the error.
2019-09-29Rollup merge of #63492 - eddyb:cvarargs, r=nagisa,matthewjasperMazdak Farrokhzad-14/+12
Remove redundancy from the implementation of C variadics. This cleanup was first described in https://github.com/rust-lang/rust/issues/44930#issuecomment-497163539: * AST doesn't track `c_variadic: bool` anymore, relying solely on a trailing `CVarArgs` type in fn signatures * HIR doesn't have a `CVarArgs` anymore, relying solely on `c_variadic: bool` * same for `ty::FnSig` (see tests for diagnostics improvements from that) * `{hir,mir}::Body` have one extra argument than the signature when `c_variadic == true` * `rustc_typeck` and `rustc_mir::{build,borrowck}` need to give that argument the right type (which no longer uses a lifetime parameter, but a function-internal scope) * `rustc_target::abi::call` doesn't need special hacks anymore (since it never sees the `VaListImpl` now, it's all inside the body) r? @nagisa / @rkruppe cc @dlrobertson @oli-obk
2019-09-28rustc: rely on c_variadic == true instead of CVarArgs in HIR/Ty fn signatures.Eduard-Mihai Burtescu-14/+12
2019-09-27getting more context for duplicate lang items (fixes #60561)Tomas Tauber-1/+1
Where possible, the error message includes the name of the crate that brought in the crate with duplicate lang items (which helps with debugging). This information is passed on from cstore using the `extern_crate` query.
2019-09-25Rollup merge of #64746 - estebank:elide-impl-trait-obligations-on-err, ↵Mazdak Farrokhzad-6/+20
r=cramertj Remove blanket silencing of "type annotation needed" errors Remove blanket check for existence of other errors before emitting "type annotation needed" errors, and add some eager checks to avoid adding obligations when they refer to types that reference `[type error]` in order to reduce unneeded errors. Fix #64084.
2019-09-24Fix #64744 -- handle zero sub-pats case.Mazdak Farrokhzad-2/+16
2019-09-24Remove blanket silencing of "type annotation needed" errorsEsteban Küber-6/+20
Remove blanket check for existence of other errors before emitting "type annotation needed" errors, and add some eager checks to avoid adding obligations when they refer to types that reference `[type error]` in order to reduce unneded errors.