]> git.lizzy.rs Git - rust.git/commit
Overhaul typechecking of patterns
authorJakub Bukaj <jakub@jakub.cc>
Tue, 21 Oct 2014 01:40:10 +0000 (03:40 +0200)
committerJakub Bukaj <jakub@jakub.cc>
Fri, 24 Oct 2014 17:43:47 +0000 (19:43 +0200)
commit4380e96c0470d746267a11633fafe3e4ea459687
tree3a1eab5f1213e9baf959ea545e4380b4a92cd12c
parent3e9ce5afb776bf5a187cafa8cfe5ad677bfd3acc
Overhaul typechecking of patterns

Instead of checking patterns in a top-down fashion with a known
expected type on entry, this changes makes typeck establish
appropriate constraints between a pattern and the expression
it destructures, and lets inference compute the final types
or produce good error messages if it's impossible.
src/librustc/diagnostics.rs
src/librustc/metadata/decoder.rs
src/librustc/middle/privacy.rs
src/librustc/middle/ty.rs
src/librustc/middle/typeck/check/_match.rs
src/librustc/middle/typeck/check/mod.rs
src/librustc/middle/typeck/collect.rs
src/test/run-pass/issue-8783.rs [new file with mode: 0644]