]> git.lizzy.rs Git - rust.git/commit
Auto merge of #33929 - petrochenkov:pathir, r=eddyb
authorbors <bors@rust-lang.org>
Mon, 30 May 2016 04:28:50 +0000 (21:28 -0700)
committerbors <bors@rust-lang.org>
Mon, 30 May 2016 04:28:50 +0000 (21:28 -0700)
commitbf9c60c9a6d27762594c1c5c067194f4c9109f67
tree70418c04e1f34cf63161a9d3bc680d19d3b6a2a5
parent6e00b55568c23e6270ae193a72256cc1c7c5f23a
parentae999e9c8f063eb62c867eafdd86729acd798044
Auto merge of #33929 - petrochenkov:pathir, r=eddyb

Separate bindings from other patterns in HIR

Now when name resolution is done on AST, we can avoid dumping everything that looks like an identifier into `PatKind::Ident` in HIR.
`hir::PatKind::Ident` is removed, fresh bindings are now called `hir::PatKind::Binding`, everything else goes to `hir::PatKind::Path`.

I intend to do something with `PatKind::Path`/`PatKind::QPath` as well using resolution results, but it requires some audit and maybe some deeper refactoring of relevant resolution/type checking code to do it properly.
I'm submitting this part of the patch earlier to notify interested parties that I'm working on this.

cc @jseyfried
r? @eddyb
src/librustc/hir/intravisit.rs
src/librustc_typeck/check/mod.rs
src/libsyntax/ast.rs