about summary refs log tree commit diff
path: root/tests/ui/fn
AgeCommit message (Collapse)AuthorLines
2023-12-07recurse into refs when comparing tys for diagnosticsjyn-14/+14
2023-11-24Show number in error message even for one errorNilstrieb-11/+11
Co-authored-by: Adrian <adrian.iosdev@gmail.com>
2023-11-02Pretty print Fn traits in rustc_on_unimplementedMichael Goulet-3/+3
2023-10-08remove trailing dotsAli MJ Al-Nasrawy-1/+1
2023-10-08always show and explain sub regionAli MJ Al-Nasrawy-1/+3
2023-09-19rustc_hir_analysis: add a helper to check function the signature mismatchesEduardo Sánchez Muñoz-2/+2
This function is now used to check `#[panic_handler]`, `start` lang item, `main`, `#[start]` and intrinsic functions. The diagnosis produced are now closer to the ones produced by trait/impl method signature mismatch.
2023-09-06Add explanatory note to 'expected item' errorGurinder Singh-0/+2
2023-08-30Test and note unsafe ctor to fn ptr coercionMichael Goulet-3/+0
Also remove a note that I don't consider to be very useful in context.
2023-05-08Move testsCaio-0/+25
2023-04-22add known-bug test for unsound issue 100051whtahy-0/+31
2023-04-22add known-bug test for unsound issue 84533whtahy-0/+37
2023-04-03Never consider int and float vars for `FnPtr` candidatesNilstrieb-0/+10
This solves a regression where `0.0.cmp()` was ambiguous when a custom trait with a `cmp` method was in scope. FOr integers it shouldn't be a problem in practice so I wasn't able to add a test.
2023-03-27Add a builtin `FnPtr` traitlcnr-0/+9
2023-03-10feat: implement better error for manual impl of `Fn*` traitsEzra Shaw-0/+28
2023-02-22diagnostics: update test cases to refer to assoc fn with `self` as methodMichael Howell-1/+1
2023-01-30Make structured suggestion for fn casting verboseEsteban Küber-12/+18
2023-01-30Mention fn coercion rules (needs to be expanded)Esteban Küber-0/+3
2023-01-30Modify primary span label for E0308Esteban Küber-13/+12
The previous output was unintuitive to users.
2023-01-26improve fn pointer notesMatthew J Perez-1/+9
- add note and suggestion for casting both expected and found fn items to fn pointers - add note for casting expected fn item to fn pointer
2023-01-25Rollup merge of #106897 - estebank:issue-99430, r=davidtwcoMatthias Krüger-0/+4
Tweak E0597 CC #99430
2023-01-24Add suggestions for function pointersMatthew J Perez-48/+176
- On compiler-error's suggestion of moving this lower down the stack, along the path of `report_mismatched_types()`, which is used by `rustc_hir_analysis` and `rustc_hir_typeck`. - update ui tests, add test - add suggestions for references to fn pointers - modify `TypeErrCtxt::same_type_modulo_infer` to take `T: relate::Relate` instead of `Ty`
2023-01-15Tweak E0597Esteban Küber-0/+4
CC #99430
2023-01-11Move /src/test to /testsAlbert Larsan-0/+1025