aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir_ty/src/infer/expr.rs
Commit message (Collapse)AuthorAgeFilesLines
* Revert "Merge #4233"Aleksey Kladov2020-05-021-0/+5
| | | | | This reverts commit a5f2b16366f027ad60c58266a66eb7fbdcbda9f9, reversing changes made to c96b2180c1c4206a0a98c280b4d30897eb116336.
* Kill more zombiesAleksey Kladov2020-04-301-5/+0
|
* Rename StructField -> FieldAleksey Kladov2020-04-251-5/+3
|
* Use `dyn Trait` for working with databseAleksey Kladov2020-03-161-11/+12
| | | | | | | It improves compile time in `--release` mode quite a bit, it doesn't really slow things down and, conceptually, it seems closer to what we want the physical architecture to look like (we don't want to monomorphise EVERYTHING in a single leaf crate).
* Do autoderef for indexingFlorian Diebold2020-02-291-5/+21
|
* Fix a common false-positive type mismatchFlorian Diebold2020-02-291-4/+4
| | | | | | | | | E.g. for `&{ some_string() }` in a context where a `&str` is expected, we reported a mismatch inside the block. The problem is that we're passing an expectation of `str` down, but the expectation is more of a hint in this case. There's a long comment in rustc about this, which I just copied. Also, fix reported location for type mismatches in macros.
* More manual clippy fixesKirill Bulatov2020-02-181-11/+5
|
* Run cargo +nightly fix --clippy -Z unstable-optionsKirill Bulatov2020-02-181-13/+7
|
* Don't let unknown match arms fall back to !Florian Diebold2020-02-111-1/+5
|
* Add or- and parenthesized-patternsMatthew Jasper2020-02-091-3/+1
|
* Fix some TODOsFlorian Diebold2020-02-071-1/+0
|
* Deal better with implicit type parameters and argument listsFlorian Diebold2020-02-071-3/+5
|
* FormattingFlorian Diebold2020-02-071-2/+2
|
* Clean up RPIT a bitFlorian Diebold2020-02-071-1/+0
|
* Use variables in predicates as wellFlorian Diebold2020-02-071-2/+2
|
* Comment fixes / todosFlorian Diebold2020-02-071-0/+1
|
* Change Ty::Param to contain param IDFlorian Diebold2020-02-071-3/+2
|
* Lower impl trait to variables, move away from using placeholders where they ↵Florian Diebold2020-02-071-3/+3
| | | | don't belong
* wip lower impl trait to type argsFlorian Diebold2020-02-071-2/+2
|
* Fix inference for shift operatorsFlorian Diebold2020-01-171-2/+2
| | | | Fixes #2602.
* Push resolver further upAleksey Kladov2020-01-141-6/+13
|
* Fix coercion of last expression in function bodyFlorian Diebold2019-12-201-1/+1
|
* Handle closure return typesFlorian Diebold2019-12-201-3/+14
| | | | Fixes #2547.
* Merge #2592bors[bot]2019-12-201-4/+8
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2592: Add std::ops::Index support for infering r=edwin0cheng a=edwin0cheng see also #2534 Seem like this can't fix #2534 for this case: ```rust fn foo3(bar: [usize; 2]) { let baz = bar[1]; // <--- baz is still unknown ? println!("{}", baz); } ``` Co-authored-by: Edwin Cheng <[email protected]>
| * Add std::ops::Index support for inferingEdwin Cheng2019-12-191-4/+8
| |
* | Rename ContainerId -> AssocContainerIdAleksey Kladov2019-12-201-2/+2
|/
* Handle impl Trait more correctlyFlorian Diebold2019-12-151-0/+1
| | | | | | | When calling a function, argument-position impl Trait is transparent; same for return-position impl Trait when inside the function. So in these cases, we need to represent that type not by `Ty::Opaque`, but by a type variable that can be unified with whatever flows into there.
* Rename N! to name!Florian Diebold2019-12-131-2/+2
|
* Add macros for known names and pathsFlorian Diebold2019-12-131-2/+2
|
* Correctly infer - and ! using std::ops::{Neg,Not}Emil Lauridsen2019-12-131-21/+26
|
* Add helper for resolving associated type of trait in inferEmil Lauridsen2019-12-131-47/+7
|
* Refactor parameter count trackingAleksey Kladov2019-12-071-10/+8
|
* Remove idx and parent generics from genericsAleksey Kladov2019-12-071-11/+13
| | | | | This makes `hir_def::GenericParams` flatter. The logic for re-numbering the params is moved to hir instead.
* Store GenericParams in arenaAleksey Kladov2019-12-071-1/+1
|
* Don't unify within a referenceFlorian Diebold2019-12-061-11/+10
| | | | | | | If we are expecting a `&Foo` and get a `&something`, when checking the `something`, we are *expecting* a `Foo`, but we shouldn't try to unify whatever we get with that expectation, because it could actually be a `&Foo`, and `&&Foo` coerces to `&Foo`. So this fixes quite a few false type mismatches.
* Extract unification code to unify moduleFlorian Diebold2019-12-021-15/+15
|
* Reduce variants of Exproxalica2019-11-291-39/+37
|
* Infer range typesoxalica2019-11-281-0/+41
|
* Move TyAleksey Kladov2019-11-271-0/+686