]> git.lizzy.rs Git - rust.git/commit
refactor autoderef to avoid registering obligations
authorAriel Ben-Yehuda <arielb1@mail.tau.ac.il>
Tue, 24 May 2016 11:37:11 +0000 (14:37 +0300)
committerAriel Ben-Yehuda <ariel.byd@gmail.com>
Tue, 24 May 2016 21:03:33 +0000 (00:03 +0300)
commitc209d44c342a664bad5428ff988ee1084c13bed7
tree03fd44daa9d481c9e0ac3c06a9662a80d864d854
parentdd6e8d45e183861d44ed91a99f0a50403b2776a3
refactor autoderef to avoid registering obligations

Refactor `FnCtxt::autoderef` to use an external iterator and to not
register any obligation from the main autoderef loop, but rather to
register them after (and if) the loop successfully completes.

Fixes #24819
Fixes #25801
Fixes #27631
Fixes #31258
Fixes #31964
Fixes #32320
Fixes #33515
Fixes #33755
12 files changed:
src/librustc/traits/mod.rs
src/librustc/ty/adjustment.rs
src/librustc_typeck/check/autoderef.rs [new file with mode: 0644]
src/librustc_typeck/check/callee.rs
src/librustc_typeck/check/coercion.rs
src/librustc_typeck/check/method/confirm.rs
src/librustc_typeck/check/method/probe.rs
src/librustc_typeck/check/method/suggest.rs
src/librustc_typeck/check/mod.rs
src/test/compile-fail/E0055.rs
src/test/compile-fail/borrowck/borrowck-borrow-overloaded-auto-deref-mut.rs
src/test/compile-fail/issue-24819.rs [new file with mode: 0644]