about summary refs log tree commit diff
path: root/src/test/ui/error-codes
AgeCommit message (Collapse)AuthorLines
2022-07-19Auto merge of #98180 - notriddle:notriddle/rustdoc-fn, ↵bors-5/+15
r=petrochenkov,GuillaumeGomez Improve the function pointer docs This is #97842 but for function pointers instead of tuples. The concept is basically the same. * Reduce duplicate impls; show `fn (T₁, T₂, …, Tₙ)` and include a sentence saying that there exists up to twelve of them. * Show `Copy` and `Clone`. * Show auto traits like `Send` and `Sync`, and blanket impls like `Any`. https://notriddle.com/notriddle-rustdoc-test/std/primitive.fn.html
2022-07-19Improve the function pointer docsMichael Howell-5/+15
* Reduce duplicate impls; show only the `fn (T)` and include a sentence saying that there exists up to twelve of them. * Show `Copy` and `Clone`. * Show auto traits like `Send` and `Sync`, and blanket impls like `Any`.
2022-07-19Add E0790 as more specific variant of E0283aticu-5/+138
2022-07-16Be more precise when suggesting removal of parens on unit adt ctorMichael Goulet-2/+2
2022-07-15Make item spans more consistentMichael Goulet-39/+30
2022-07-07Track implicit `Sized` obligations in type paramsEsteban Küber-1/+1
Suggest adding a `?Sized` bound if appropriate on E0599 by inspecting the HIR Generics. (Fix #98539)
2022-07-05adjust dangling-int-ptr error messageRalf Jung-1/+1
2022-07-01Shorten def_span for more items.Camille GILLOT-61/+45
2022-06-29Rollup merge of #98415 - ↵Dylan DPC-2/+2
compiler-errors:rustc-borrowck-session-diagnostic-1, r=davidtwco Migrate some `rustc_borrowck` diagnostics to `SessionDiagnostic` Self-explanatory r? ```@davidtwco```
2022-06-29Rollup merge of #97542 - compiler-errors:arg-mismatch, r=jackh726Dylan DPC-1/+1
Use typed indices in argument mismatch algorithm I kinda went overboard with the renames, but in general, "arg" is renamed to "expected", and "input" is renamed to "provided", and we use new typed indices to make sure we're indexing into the right sized array. Other drive-by changes: 1. Factor this logic into a new function, so we don't need to `break 'label` to escape it. 1. Factored out dependence on `final_arg_types`, which is never populated for arguments greater than the number of expected args. Instead, we just grab the final coerced expression type from `in_progress_typeck_results`. 1. Adjust the criteria we use to print (provided) type names, before we didn't suggest anything that had infer vars, but now we suggest thing that have infer vars but aren't `_`. ~Also, sorry in advance, I kinda want to backport this but I know I have folded in a lot of unnecessary drive-by changes that might discourage that. I would be open to brainstorming how to get some of these changes on beta at least.~ edit: Minimized the ICE-fixing changes to #97557 cc `@jackh726` as author of #92364, and `@estebank` as reviewer of the PR. fixes #97484
2022-06-28Migrate some rustc_borrowck diagnostics to SessionDiagnosticMichael Goulet-2/+2
2022-06-28Auto merge of #98396 - cjgillot:iwfchir, r=petrochenkovbors-4/+4
Do not access HIR to check impl wf. r? `@ghost`
2022-06-27Use typed indices in argument mismatch algorithmMichael Goulet-1/+1
2022-06-25Rollup merge of #98298 - TaKO8Ki:point-to-type-param-definition, ↵Matthias Krüger-1/+1
r=compiler-errors Point to type parameter definition when not finding variant, method and associated item fixes #77391
2022-06-24Bless ui tests.Camille GILLOT-4/+4
2022-06-22point to type param definition when not finding variant, method and assoc typeTakayuki Maeda-1/+1
use `def_ident_span` , `body_owner_def_id` instead of `in_progress_typeck_results`, `guess_head_span` use `body_id.owner` directly add description to label
2022-06-20Provide a segment res in more casesMichael Goulet-4/+4
2022-06-20Auto merge of #98284 - JohnTitor:rollup-7lbs143, r=JohnTitorbors-2/+4
Rollup of 5 pull requests Successful merges: - #98183 (Fix pretty printing of empty bound lists in where-clause) - #98268 (Improve `lifetime arguments are not allowed on` error message) - #98273 (Fix minor documentation typo) - #98274 (Minor improvements on error for `Self` type in items that don't allow it) - #98281 (Fix typo in `HashMap::drain` docs) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2022-06-20Rollup merge of #98274 - compiler-errors:self-type-error, r=cjgillotYuki Okushi-0/+2
Minor improvements on error for `Self` type in items that don't allow it Fixes #93796
2022-06-19Mention what item is using an invalid `Self` typeMichael Goulet-0/+2
2022-06-19Be more specific for what lifetimes are not allowed onMichael Goulet-2/+2
2022-06-19Make missing argument placeholder more obvious that it's a placeholderMichael Goulet-8/+8
2022-06-16 fix one more case of trailing spaceklensy-10/+10
2022-06-16diagnostics: fix trailing spaceklensy-5/+5
2022-06-15Refactor path segment parameter errorEdwinRy-4/+6
2022-06-03Fully stabilize NLLJack Huey-167/+6
2022-06-03Auto merge of #97694 - Dylan-DPC:rollup-2yxo7ce, r=Dylan-DPCbors-4/+20
Rollup of 3 pull requests Successful merges: - #97415 (Compute `is_late_bound_map` query separately from lifetime resolution) - #97471 (Provide more context when denying invalid type params ) - #97681 (Add more eslint checks) Failed merges: - #97446 (Make hir().get_generics and generics_of consistent.) r? `@ghost` `@rustbot` modify labels: rollup
2022-06-03Rollup merge of #97471 - estebank:prohibit-generics, r=cjgillotDylan DPC-4/+20
Provide more context when denying invalid type params
2022-06-03Auto merge of #89862 - lcnr:path-generics-diagnostics, r=estebankbors-13/+14
rewrite error handling for unresolved inference vars Pretty much completely rewrites `fn emit_inference_failure_err`. This new setup should hopefully be easier to extend and is already a lot better when looking for generic arguments. Because this is a rewrite there are still some parts which are lacking, these are tracked in #94483 and will be fixed in later PRs. r? `@estebank` `@petrochenkov`
2022-06-03Use the same message as type & const generics.Camille GILLOT-5/+5
2022-06-02review commentsEsteban Küber-2/+2
2022-06-02Bless tests.Camille GILLOT-2/+2
2022-06-02Rollup merge of #97023 - cjgillot:uniform-anon, r=estebankDylan DPC-1/+1
Diagnose anonymous lifetimes errors more uniformly between async and regular fns Async fns and regular fns are desugared differently. For the former, we create a generic parameter at HIR level. For the latter, we just create an anonymous region for typeck. I plan to migrate regular fns to the async fn desugaring. Before that, this PR attempts to merge the diagnostics for both cases. r? ```@estebank```
2022-06-02add new `emit_inference_failure_err`lcnr-13/+14
2022-06-01Make output more specificEsteban Küber-4/+8
2022-06-01Provide more context when denying invalid type paramsEsteban Küber-0/+12
2022-06-01Rollup merge of #97264 - ↵Matthias Krüger-0/+2
TaKO8Ki:suggest-extern-crate-when-failing-to-resolve-use-crate, r=estebank Suggest `extern crate foo` when failing to resolve `use foo` closes #97095 r? ``@estebank``
2022-05-29Make lifetime errors more precise in the presence of `Fresh` lifetimes.Camille GILLOT-1/+1
2022-05-28Improve error message for E0081Bryysen-21/+60
Previously whenever a duplicate discriminant was detected for an Enum, we would print the discriminant bits in the diagnostic without any casting. This caused us to display incorrect values for negative discriminants. After this PR we format the discriminant signedness correctly. Also reworded some of the original error messages.
2022-05-25suggest `extern crate foo` when failing to resolve `use foo`Takayuki Maeda-0/+2
fix ci error
2022-05-22Use revisions for NLL in various directoriesJack Huey-18/+24
2022-05-20Rollup merge of #97109 - ↵Matthias Krüger-0/+6
TaKO8Ki:fix-misleading-cannot-infer-type-for-type-parameter-error, r=oli-obk Fix misleading `cannot infer type for type parameter` error closes #93198
2022-05-20report ambiguous type parameters when their parents are impl or fnTakayuki Maeda-0/+6
fix ci error emit err for `impl_item`
2022-05-19Improve u32 to char diagnosticgimbles-6/+3
2022-05-17Auto merge of #96825 - kckeiks:remove-item-like-visitor-trait, r=cjgillotbors-2/+2
Retire `ItemLikeVisitor` trait Issue #95004 cc `@cjgillot`
2022-05-15rustc: Stricter checking for #[link] attributesVadim Petrochenkov-10/+8
2022-05-13optimize find_item to fetch Item only when neededMiguel Guarniz-2/+2
Signed-off-by: Miguel Guarniz <mi9uel9@gmail.com>
2022-05-06Resolve vars in note_type_errJack Huey-13/+0
2022-05-06Point at closure args tooJack Huey-0/+10
2022-05-06Auto merge of #96268 - ↵bors-2/+2
jackh726:remove-mutable_borrow_reservation_conflict-lint, r=nikomatsakis Remove mutable_borrow_reservation_conflict lint and allow the code pattern This was the only breaking issue with the NLL stabilization PR. Lang team decided to go ahead and allow this. r? `@nikomatsakis` Closes #59159 Closes #56254