about summary refs log tree commit diff
path: root/src/test/ui/unsized
AgeCommit message (Collapse)AuthorLines
2023-01-11Move /src/test to /testsAlbert Larsan-2325/+0
2022-12-28On unsized locals with explicit types suggest `&`Esteban Küber-0/+16
Fix #72742.
2022-12-11Point at method call when it is the source of the bound errorEsteban Küber-4/+2
2022-09-15Normalize struct types in confirm_builtin_unsize_candidateMichael Goulet-0/+39
2022-08-27Revert "Remove deferred sized checks"Michael Goulet-4/+1
This reverts commit 33212bf7f527798a8cfa2bbb38781742f4ca718a.
2022-08-21Rework point-at-argMichael Goulet-28/+16
2022-08-16Remove deferred sized checksMichael Goulet-2/+7
2022-08-03Warn about dead tuple struct fieldsFabian Wolff-2/+2
2022-07-20Fix hack that remaps env constness.Deadbeef-16/+1
WARNING: might have perf implications. Are there any more problems with having a constness in the `ParamEnv` now? :)
2022-07-07Shorten span for closures.Camille GILLOT-3/+3
2022-06-29Rollup merge of #98607 - compiler-errors:tuple-wrap-suggestion, r=oli-obkDylan DPC-6/+46
Clean up arg mismatch diagnostic, generalize tuple wrap suggestion This is based on top of #97542, so just look at the last commit which contains the relevant changes. 1. Remove `final_arg_types` which was one of the last places we were using raw (`usize`) indices instead of typed indices in the arg mismatch suggestion code. 2. Improve the tuple wrap suggestion, now we suggest things like `call(a, b, c, d)` -> `call(a, (b, c), d)` :smiley_cat: 3. Folded in fix #98645
2022-06-29Rollup merge of #98415 - ↵Dylan DPC-3/+3
compiler-errors:rustc-borrowck-session-diagnostic-1, r=davidtwco Migrate some `rustc_borrowck` diagnostics to `SessionDiagnostic` Self-explanatory r? ```@davidtwco```
2022-06-28Don't point at another arg if we're already pointing at oneMichael Goulet-6/+46
2022-06-28Migrate some rustc_borrowck diagnostics to SessionDiagnosticMichael Goulet-3/+3
2022-06-28Note concrete type being coerced into objectMichael Goulet-4/+4
2022-06-16diagnostics: fix trailing spaceklensy-35/+35
2022-06-06Update src/test/ui/unsized/issue-97732.rsChase Wilson-3/+8
Co-authored-by: Eduard-Mihai Burtescu <edy.burt@gmail.com>
2022-06-04Added test for #97732Chase Wilson-0/+23
2022-05-20Move testsCaio-0/+108
2022-05-06Resolve vars in note_type_errJack Huey-3/+6
2022-04-05Rollup merge of #95603 - compiler-errors:dyn-return, r=oli-obkDylan DPC-0/+111
Fix late-bound ICE in `dyn` return type suggestion This fixes the root-cause of the attached issues -- the root problem is that we're using the return type from a signature with late-bound instead of early-bound regions. The change on line 1087 (`let Some(liberated_sig) = typeck_results.liberated_fn_sigs().get(fn_hir_id) else { return false; };`) makes sure we're grabbing the _right_ return type for this suggestion to check the `dyn` predicates with. Fixes #91801 Fixes #91803 This fix also includes some drive-by changes, specifically: 1. Don't suggest boxing when we have `-> dyn Trait` and are already returning `Box<T>` where `T: Trait` (before we always boxed the value). 2. Suggestion applies even when the return type is a type alias (e.g. `type Foo = dyn Trait`). This does cause the suggestion to expand to the aliased type, but I think it's still beneficial. 3. Split up the multipart suggestion because there's a 6-line max in the printed output... I am open to splitting out the above changes, if we just want to fix the ICE first. cc: ```@terrarier2111``` and #92289
2022-04-02Suggest borrowing when trying to coerce unsized type into dyn TraitMichael Goulet-0/+16
2022-04-02Fix late-bound ICE in unsized return suggestionMichael Goulet-0/+111
2021-12-25bless ui testDeadbeef-1/+16
2021-11-20Point at source of trait bound obligations in more placesEsteban Kuber-0/+9
Be more thorough in using `ItemObligation` and `BindingObligation` when evaluating obligations so that we can point at trait bounds that introduced unfulfilled obligations. We no longer incorrectly point at unrelated trait bounds (`substs-ppaux.verbose.stderr`). In particular, we now point at trait bounds on method calls. We no longer point at "obvious" obligation sources (we no longer have a note pointing at `Trait` saying "required by a bound in `Trait`", like in `associated-types-no-suitable-supertrait*`). Address part of #89418.
2021-11-18Move some tests to more reasonable directoriesCaio-0/+79
2021-11-14Move some tests to more reasonable directoriesCaio-0/+9
2021-11-06Move some tests to more reasonable directoriesCaio-0/+22
2021-10-30stabilize `relaxed_struct_unsize`lcnr-1/+0
2021-10-19Revert "Rollup merge of #86011 - tlyu:correct-sized-bound-spans, r=estebank"Yuki Okushi-4/+4
This reverts commit 36a1076d24697621a3bb67ef654b4eb79647aa54, reversing changes made to e1e9319d93aea755c444c8f8ff863b0936d7a4b6.
2021-10-08update ui test expectationsTaylor Yu-4/+4
2021-09-26Remove box syntax from most places in src/test outside of the issues direst31-8/+7
2021-09-16Point at call span that introduced obligation for the argEsteban Kuber-5/+15
2021-09-16Point at argument instead of call for their obligationsEsteban Kuber-34/+3
When an obligation is introduced by a specific `fn` argument, point at the argument instead of the `fn` call if the obligation fails to be fulfilled.
2021-08-26add unsized coercion testlcnr-0/+24
2021-08-16Use note to point at bound introducing requirementEsteban Küber-38/+66
2021-08-11Modify structured suggestion outputEsteban Küber-133/+169
* On suggestions that include deletions, use a diff inspired output format * When suggesting addition, use `+` as underline * Color highlight modified span
2021-07-30Do not discard `?Sized` type params and suggest their removalEsteban Küber-1/+146
2021-07-03Remove the deprecated `core::raw` and `std::raw` module.Charles Lew-14/+11
2021-04-19fix suggestion for unsized function parameterslcnr-0/+814
2021-04-06Point at `impl` and type defs introducing requirements on E0277Esteban Küber-5/+25
2021-04-03Remove redundant `ignore-tidy-linelength` annotationsSimon Jakobi-3/+1
This is step 2 towards fixing #77548. In the codegen and codegen-units test suites, the `//` comment markers were kept in order not to affect any source locations. This is because these tests cannot be automatically `--bless`ed.
2021-03-31give full path of constraint in suggest_constraining_type_paramhi-rustin-11/+11
revert file bless with nll mode
2021-02-06Rollup merge of #81738 - camelid:misc-small-diag-cleanup, r=lcnrJonas Schievink-4/+4
Miscellaneous small diagnostics cleanup
2021-02-03Miscellaneous small diagnostics cleanupCamelid-4/+4
2021-02-04add `relaxed_struct_unsize` feature gateBastian Kauschke-0/+1
2021-02-04relax adt unsizing requirementsBastian Kauschke-0/+11
2020-10-18Use smaller example for issue-71659Yuki Okushi-77/+15
2020-10-18Add test for issue-75707Yuki Okushi-0/+29
2020-10-18Add test for issue-71659Yuki Okushi-0/+103