]> git.lizzy.rs Git - rust.git/commit
make `fn_sig().subst()` ICE when used with a closure
authorNiko Matsakis <niko@alum.mit.edu>
Fri, 1 Dec 2017 14:26:13 +0000 (09:26 -0500)
committerNiko Matsakis <niko@alum.mit.edu>
Thu, 7 Dec 2017 10:28:01 +0000 (05:28 -0500)
commitb4d71ea6f8165b326f065c5db8c7c07ad61bafd3
tree79dbdefaa1d50a2d0770344ac522326818f2f85b
parentd5ef3e262f23d419750d7d96dce69ff17baf0e5b
make `fn_sig().subst()` ICE when used with a closure

It's inefficient, and the substitution there doesn't account for the
extra regions used by NLL inference, so it's a bad thing to encourage.

As it happens all callers already know if they have a closure or not,
from what I can tell.
src/librustc/ty/instance.rs
src/librustc_trans/common.rs
src/librustc_trans/mir/constant.rs
src/librustc_trans_utils/monomorphize.rs
src/librustc_typeck/collect.rs