]> git.lizzy.rs Git - rust.git/commit
Fix ICE that @steveklabnik encountered in rust-ice. The problems turned out to be...
authorNiko Matsakis <niko@alum.mit.edu>
Tue, 6 Jan 2015 10:03:42 +0000 (05:03 -0500)
committerNiko Matsakis <niko@alum.mit.edu>
Tue, 6 Jan 2015 18:42:42 +0000 (13:42 -0500)
commit2486d93e5b8a3dd62fa6d257d4086e19c0e0edd6
tree51b1e0c875588aff6c1c61d2868bd887bace9937
parent8efd9901b628d687d11a4d0ccc153553b38ada49
Fix ICE that @steveklabnik encountered in rust-ice. The problems turned out to be that were being very loose with bound regions in trans (we were basically just ignoring and flattening binders). Since binders are significant to subtyping and hence to trait selection, this can cause a lot of problems. So this patch makes us treat them more strictly -- for example, we propagate binders, and avoid skipping past the `Binder` by writing `foo.0`.

Fixes #20644.
23 files changed:
src/librustc/middle/cfg/construct.rs
src/librustc/middle/expr_use_visitor.rs
src/librustc/middle/liveness.rs
src/librustc/middle/mem_categorization.rs
src/librustc/middle/ty.rs
src/librustc/middle/ty_fold.rs
src/librustc_trans/trans/base.rs
src/librustc_trans/trans/callee.rs
src/librustc_trans/trans/closure.rs
src/librustc_trans/trans/common.rs
src/librustc_trans/trans/controlflow.rs
src/librustc_trans/trans/debuginfo.rs
src/librustc_trans/trans/expr.rs
src/librustc_trans/trans/foreign.rs
src/librustc_trans/trans/glue.rs
src/librustc_trans/trans/intrinsic.rs
src/librustc_trans/trans/meth.rs
src/librustc_trans/trans/type_of.rs
src/librustc_typeck/check/_match.rs
src/librustc_typeck/check/mod.rs
src/librustc_typeck/check/regionck.rs
src/librustc_typeck/check/wf.rs
src/test/run-pass/issue-20644.rs [new file with mode: 0644]