rust-analyzer/crates/hir-ty/src/tests
bors 1f929659ac Auto merge of #13209 - lowr:feat/inference-for-generator, r=Veykril
feat: type inference for generators

This PR implements basic type inference for generator and yield expressions.

Things not included in this PR:
- Generator upvars and generator witnesses are not implemented. They are only used to determine auto trait impls, so basic type inference should be fine without them, but method resolutions with auto trait bounds may not be resolved correctly.

Open questions:
- I haven't (yet) implemented `HirDisplay` for `TyKind::Generator`, so generator types are just shown as "{{generator}}" (in tests, inlay hints, hovers, etc.), which is not really nice. How should we show them?
- I added moderate amount of stuffs to minicore. I especially didn't want to add `impl<T> Deref for &T` and `impl<T> Deref for &mut T` exclusively for tests for generators; should I move them into the test fixtures or can they be placed in minicore?

cc #4309
2022-09-26 09:28:41 +00:00
..
coercion.rs Add tests for type inference for generators 2022-09-13 02:43:07 +09:00
diagnostics.rs style: rename crates to kebab case 2022-05-01 10:48:58 +00:00
display_source_code.rs style: rename crates to kebab case 2022-05-01 10:48:58 +00:00
incremental.rs style: rename crates to kebab case 2022-05-01 10:48:58 +00:00
macros.rs Remove unnecessary allocations 2022-08-31 18:05:52 +02:00
method_resolution.rs fix: handle trait methods as inherent methods for placeholders 2022-08-31 01:12:14 +09:00
never_type.rs style: rename crates to kebab case 2022-05-01 10:48:58 +00:00
patterns.rs fix: resolve path Self alone in value namespace 2022-08-18 20:12:59 +09:00
regression.rs Ensure at least one trait bound in TyKind::DynTy 2022-09-20 04:37:34 +09:00
simple.rs Auto merge of #13209 - lowr:feat/inference-for-generator, r=Veykril 2022-09-26 09:28:41 +00:00
traits.rs fix: sort all bounds on trait object types 2022-09-05 19:13:32 +09:00