summary refs log tree commit diff
path: root/src/test/ui/error-codes
AgeCommit message (Collapse)AuthorLines
2020-03-01doc(librustc_error_codes): add long error explanation for E0719Matthew Kuo-0/+1
Progresses #61137
2020-02-20Rollup merge of #68877 - estebank:point-at-params, r=petrochenkovMazdak Farrokhzad-13/+23
On mismatched argument count point at arguments
2020-02-17Do not emit note suggesting to implement trait to foreign typeLeSeulArtichaut-2/+0
Update tests Extend to other operations Refractor check in a separate function Fix more tests
2020-02-13Constness -> enum Const { Yes(Span), No }Mazdak Farrokhzad-2/+6
Same idea for `Unsafety` & use new span for better diagnostics.
2020-02-11On mismatched argument count point at argumentsEsteban Küber-13/+23
2020-02-11Auto merge of #68929 - matprec:consistent-issue-references, r=Dylan-DPCbors-10/+10
Make issue references consistent Fixes https://github.com/rust-lang/rust/issues/62976 cc https://github.com/rust-lang/rust/pull/63008 r? @varkor because you reviewed the original pr
2020-02-10Rollup merge of #68908 - jwhite927:E0637, r=Dylan-DPCDylan DPC-0/+1
Add long error code explanation message for E0637 Reference issue [#61137](https://github.com/rust-lang/rust/issues/61137) To incorporate a long error description for E0637, I have made the necessary modification to error_codes.rs and added error_codes/E0637.md, and blessed the relevant .stderror files. ~~, however when I build rustc stage 1, I am unable to make `$ rustc --explain E0637` work even though rustc appears to be able to call up the long error explanations for other errors. I wanted to guarantee this would work before moving on the blessing the various ui tests that have been affected. @GuillaumeGomez Do you know the most likely reason(s) why this would be the case?~~ Update: `$ rustc --explain E0637` works now.
2020-02-09--bless --compare-mode=nllMatthias Prechtl-10/+10
2020-02-09Auto merge of #68376 - Centril:move-ref-patterns, r=matthewjasperbors-20/+0
Initial implementation of `#![feature(move_ref_pattern)]` Following up on #45600, under the gate `#![feature(move_ref_pattern)]`, `(ref x, mut y)` is allowed subject to restrictions necessary for soundness. The match checking implementation and tests for `#![feature(bindings_after_at)]` is also adjusted as necessary. Closes #45600. Tracking issue: #68354. r? @matthewjasper
2020-02-07Merge branch 'master' of https://github.com/jwhite927/rust into E0637Josh White-0/+4
2020-02-07performed --bless of 15 ui tests affectedJosh White-0/+1
2020-02-06rustc_macros: don't limit the -Zmacro-backtrace suggestion to extern macros.Eduard-Mihai Burtescu-0/+4
2020-02-06Auto merge of #68583 - estebank:hrlt, r=oli-obkbors-8/+8
Account for HR lifetimes when suggesting introduction of named lifetime ``` error[E0106]: missing lifetime specifier --> src/test/ui/suggestions/fn-missing-lifetime-in-item.rs:2:32 | 2 | struct S2<F: Fn(&i32, &i32) -> &i32>(F); | ---- ---- ^ expected named lifetime parameter | = help: this function's return type contains a borrowed value, but the signature does not say whether it is borrowed from argument 1 or argument 2 = note: for more information on higher-ranked polymorphism, visit https://doc.rust-lang.org/nomicon/hrtb.html help: consider making the bound lifetime-generic with a new `'a` lifetime | 2 | struct S2<F: for<'a> Fn(&'a i32, &'a i32) -> &'a i32>(F); | ^^^^^^^ ^^^^^^^ ^^^^^^^ ^^^ help: consider introducing a named lifetime parameter | 2 | struct S2<'a, F: Fn(&'a i32, &'a i32) -> &'a i32>(F);= | ^^^ ^^^^^^^ ^^^^^^^ ^^^ ``` Follow up to #68267. Addresses the diagnostics part of #49287.
2020-02-05review commentsEsteban Küber-7/+7
2020-02-05Suggest `'r` instead of `'lifetime`Esteban Küber-8/+8
2020-02-05`#![recursion_limit = "X"]`: note current crate name.Mazdak Farrokhzad-2/+2
2020-02-02Use more appropriate spans on object unsafe traits and provide structured ↵Esteban Küber-3/+9
suggestions when possible
2020-02-02Wording changes to object unsafe trait errorsEsteban Küber-3/+15
Stemming from the thread at https://twitter.com/indygreg/status/1223279056398929920
2020-02-02Use more accurate failed predicate spansEsteban Küber-2/+2
2020-02-02Point at arguments or output when fn obligations come from them, or ident ↵Esteban Küber-2/+2
when they don't
2020-02-02move_ref_patterns: introduce testsMazdak Farrokhzad-20/+0
bindings_after_at: harden tests
2020-01-31Auto merge of #68080 - varkor:declared-here, r=petrochenkovbors-2/+2
Address inconsistency in using "is" with "declared here" "is" was generally used for NLL diagnostics, but not other diagnostics. Using "is" makes the diagnostics sound more natural and readable, so it seems sensible to commit to them throughout. r? @Centril
2020-01-25Don't use spaces before type ascription like colonsOliver Scherer-1/+1
2020-01-24Normalise notes with the/isvarkor-2/+2
2020-01-19review commentsEsteban Küber-4/+4
2020-01-19When encountering an expected named lifetime and none are present, suggest ↵Esteban Küber-5/+29
adding one
2020-01-19When encountering an undefined named lifetime, point to where it can beEsteban Küber-1/+5
This doesn't mention that using an existing lifetime is possible, but that would hopefully be clear as always being an option. The intention of this is to teach newcomers what the lifetime syntax is.
2020-01-18slice_patterns: remove gates in testsMazdak Farrokhzad-3/+1
2020-01-17Rollup merge of #68195 - estebank:impl-trait-2000, r=CentrilDylan DPC-0/+63
Account for common `impl Trait`/`dyn Trait` return type errors - When all return paths have the same type, suggest `impl Trait`. - When all return paths implement the expected `trait`, suggest `Box<dyn Trait>` and mention using an `enum`. - When multiple different types are returned and `impl Trait` is expected, extend the explanation. - When return type is `impl Trait` and the return paths do not implement `Trait`, point at the returned values. - Split `src/librustc/traits/error_reporting.rs` into multiple files to keep size under control. Fix #68110, cc #66523.
2020-01-16resolve: Point at the private item definitions in privacy errorsVadim Petrochenkov-1/+7
2020-01-16review commentsEsteban Küber-4/+4
2020-01-16Add E0746 explanation to the indexEsteban Küber-0/+1
2020-01-16Make `impl Trait` suggestion in E0746 `MachineApplicable`Esteban Küber-2/+22
2020-01-16Elide E0308 errors in favor of E0746Esteban Küber-41/+4
When a type error involves a `dyn Trait` as the return type, do not emit the type error, as the "return type is not `Sized`" error will provide enough information to the user.
2020-01-16Specific error for unsized `dyn Trait` return typeEsteban Küber-0/+79
Suggest `impl Trait` when possible, and `Box<dyn Trait>` otherwise.
2020-01-16Rollup merge of #68265 - JohnTitor:fix-issue-number, r=Dylan-DPCDylan DPC-1/+1
Fix some issue numbers of unstable features Looking into the unstable book, some issue numbers are outdated.
2020-01-16Fix issue number of `repr128`Yuki Okushi-1/+1
2020-01-12Diagnostics should not end with a full stopvarkor-2/+2
2020-01-11Ban `...X` pats, harden tests, and improve diagnostics.Mazdak Farrokhzad-3/+3
Also fix a bug with the span passed in `mk_range`.
2020-01-11Rollup merge of #68014 - estebank:unify-e0599, r=cramertjYuki Okushi-1/+1
Unify output of "variant not found" errors Fix #49566.
2020-01-09Update testsVadim Petrochenkov-6/+82
2020-01-08Unify output of "variant not found" errorsEsteban Küber-1/+1
2020-01-05Add backticks to various diagnosticsvarkor-1/+1
2020-01-03clarify that `Drop` can be implemented for enums and unions tooAndy Russell-6/+5
2019-12-31Rollup merge of #67730 - Centril:typeck-pat-cleanup, r=estebankMazdak Farrokhzad-1/+1
Cleanup pattern type checking, fix diagnostics bugs (+ improvements) r? @estebank
2019-12-31Auto merge of #67597 - estebank:placeholder-type, r=oli-obkbors-1/+1
Suggest type param when encountering `_` in item signatures Fix #27435.
2019-12-30MatchExpressionArmPattern: Use more generic wording.Mazdak Farrokhzad-1/+1
The existing wording was inappropriate for e.g. `if let Ok(_) = expr { .. }`. The diagnostic would leak the fact that we desugar to a `match`.
2019-12-29clean up logicEsteban Küber-1/+1
2019-12-29Suggest type param when encountering `_` in fn defsEsteban Küber-1/+1
When encountering `_` type placeholder in fn arguments and return type, suggest using generic type parameters. Expand what counts as an inferable return type to slice, array and tuples of `_`.
2019-12-30note other end-point when typeck range patsMazdak Farrokhzad-2/+4