about summary refs log tree commit diff
path: root/src/test/ui/error-codes
AgeCommit message (Collapse)AuthorLines
2022-10-06Rollup merge of #102694 - compiler-errors:fn-to-method, r=davidtwcoMatthias Krüger-11/+11
Suggest calling method if fn does not exist I tried to split this up into two commits, the first where we stash the resolution error until typeck (which causes a bunch of diagnostics changes because the ordering of error messages change), then the second commit is the actual logic that actually implements the suggestion. I am not in love with the presentation of the suggestion, so I could use some advice for how to format the actual messaging. r? diagnostics Fixes #102518
2022-10-05Delay function resolution error until typeckMichael Goulet-11/+11
2022-10-04follow-up fix about 101866 to print the self type.Yiming Lei-12/+12
modified: compiler/rustc_trait_selection/src/traits/error_reporting/mod.rs modified: src/test/ui/error-codes/E0283.stderr modified: src/test/ui/error-codes/E0790.stderr modified: src/test/ui/traits/static-method-generic-inference.stderr modified: src/test/ui/type/issue-101866.stderr
2022-10-01bless ui testsMaybe Waffle-4/+4
2022-09-29Stabilize the `instruction_set` featureYuki Okushi-13/+5
Signed-off-by: Yuki Okushi <jtitor@2k36.org>
2022-09-29Rollup merge of #102351 - Rageking8:improve-E0585, r=wesleywiserYuki Okushi-1/+1
Improve E0585 help
2022-09-28Auto merge of #100719 - CohenArthur:rust-safe-intrinsic-attribute, r=wesleywiserbors-2/+6
Add `#[rustc_safe_intrinsic]` This PR adds the `#[rustc_safe_intrinsic]` attribute as mentionned on Zulip. The goal of this attribute is to avoid keeping a list of symbols as the source for stable intrinsics, and instead rely on an attribute. This is similar to `#[rustc_const_stable]` and `#[rustc_const_unstable]`, which among other things, are used to mark the constness of intrinsic functions.
2022-09-29improve E0585 helpRageking8-1/+1
2022-09-27core: Mark all safe intrinsics with #[rustc_safe_intrinsic]Arthur Cohen-1/+3
2022-09-27attributes: Add #[rustc_safe_intrinsic] builtinArthur Cohen-1/+3
2022-09-26remove implied link bound per reviewMatthew Kelly-2/+2
also update .stderr outputs
2022-09-26Merge remote-tracking branch 'origin/master' into ↵Matthew Kelly-9/+9
mpk/add-long-error-message-for-E0311
2022-09-15Remove feature gate from let else suggestionest31-1/+1
The let else suggestion added by 0d92752b8aac53e033541d04fc7d9677d8bca227 does not need a feature gate any more.
2022-09-06Rollup merge of #101357 - compiler-errors:variant-sugg-tweak, r=oli-obkGuillaume Gomez-3/+3
Include enum path in variant suggestion (except for `Result` and `Option`, which we should have via the prelude) Fixes #101356
2022-09-03Include enum path in variant suggestionMichael Goulet-3/+3
2022-09-03Shrink suggestion span of argument mismatch errorMichael Goulet-5/+5
2022-08-31Merge remote-tracking branch 'origin/master' into ↵Matthew Kelly-13/+15
mpk/add-long-error-message-for-E0311
2022-08-27Review updates: simpler MWE and docsMatthew Kelly-50/+19
- use the simpler minimum working example from the review - add an alterate "fix" that helps make the cause of the error more clear - attempt to add an improved description of what is going on
2022-08-27use smaller span for suggestionsTakayuki Maeda-2/+4
2022-08-24Improve description againMatthew Kelly-7/+8
-- update summary based on review -- rewrite explanation to be more clear and correct
2022-08-23Improve local generic parameter suggestions.Camille GILLOT-4/+4
2022-08-21Rework ambiguity errorsMichael Goulet-17/+4
2022-08-21Rework point-at-argMichael Goulet-6/+19
2022-08-19Add long description and test for E0311Matthew Kelly-0/+63
Adds a long description and unit test for the E0311 compiler error.
2022-08-19Rollup merge of #99576 - compiler-errors:foreign-fundamental-drop-is-bad, ↵Dylan DPC-5/+5
r=TaKO8Ki Do not allow `Drop` impl on foreign fundamental types `Drop` should not be implemented on `Pin<T>` even if `T` is local. This does not trigger regular orphan rules is because `Pin` is `#[fundamental]`... but we don't allow specialized `Drop` impls anyways, so these rules are not sufficient to prevent this impl on stable. Let's just choose even stricter rules, since we shouldn't be implementing `Drop` on a foreign ADT ever. Fixes #99575
2022-08-18Reword "Required because of the requirements on the impl of ..."Andy Wang-2/+2
2022-08-16Do not allow Drop impl on foreign fundamental typesMichael Goulet-5/+5
2022-08-14Point to argument if it's self type of unsatisfied projection predicateMichael Goulet-2/+4
2022-08-08Fix plural form of `variant` in error message not formatting correctlyBryysen-6/+26
due to ordering, added/improved comments and removed redundant test already caught by `E0081.rs`
2022-08-07Further improve error message for E0081Bryysen-15/+54
Multiple duplicate assignments of the same discriminant are now reported in the samme error. We now point out the incrementation start point for discriminants that are not explicitly assigned that are also duplicates. Removed old test related to E0081 that is now covered by error-codes/E0081.rs. Also refactored parts of the `check_enum` function.
2022-07-26bless tests, remove nonexistent E0395Deadbeef-18/+0
2022-07-25Report elision failures on the AST.Camille GILLOT-17/+17
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