{"action":"opened","issue":{"url":"https://api.github.com/repos/intellij-rust/intellij-rust/issues/487","repository_url":"https://api.github.com/repos/intellij-rust/intellij-rust","labels_url":"https://api.github.com/repos/intellij-rust/intellij-rust/issues/487/labels{/name}","comments_url":"https://api.github.com/repos/intellij-rust/intellij-rust/issues/487/comments","events_url":"https://api.github.com/repos/intellij-rust/intellij-rust/issues/487/events","html_url":"https://github.com/intellij-rust/intellij-rust/issues/487","id":162168767,"number":487,"title":"RustTypeInferencingVisitor is getting out of hand","user":{"login":"matklad","id":1711539,"avatar_url":"https://avatars.githubusercontent.com/u/1711539?v=3","gravatar_id":"","url":"https://api.github.com/users/matklad","html_url":"https://github.com/matklad","followers_url":"https://api.github.com/users/matklad/followers","following_url":"https://api.github.com/users/matklad/following{/other_user}","gists_url":"https://api.github.com/users/matklad/gists{/gist_id}","starred_url":"https://api.github.com/users/matklad/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/matklad/subscriptions","organizations_url":"https://api.github.com/users/matklad/orgs","repos_url":"https://api.github.com/users/matklad/repos","events_url":"https://api.github.com/users/matklad/events{/privacy}","received_events_url":"https://api.github.com/users/matklad/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-06-24T15:13:31Z","updated_at":"2016-06-24T15:13:31Z","closed_at":null,"body":"Our [RustTypeInferencingVisitor] is a bit hard to follow. There is a number of casts and a bit of duplicated code in each of the visiting functions. I think that one of the problems is that the `path` is very weakly typed: it's just a `LinkedList<PsiElement>`. @alexeykudinkin  do you think about introducing an abstraction for the path to the particular binding inside a pattern? I've tried to do some experiments [here].\r\n\r\n\r\n[RustTypeInferencingVisitor]: https://github.com/intellij-rust/intellij-rust/blob/master/src/main/kotlin/org/rust/lang/core/types/visitors/RustTypeInferenceEngine.kt#L24\r\n\r\n[here]: https://github.com/intellij-rust/intellij-rust/commit/f6a7102a73cf0b7cab16ba2eb1fd131add4ba7ad#diff-04a810d0411b4b04c937b207f054a71cR23"}}
{"actor":{"display_login":"matklad"}}