-
-
Notifications
You must be signed in to change notification settings - Fork 14.2k
Description
I have, in my patch queue, a change that removes TypeChecker::check_box_free_inputs because I changed the MIR emitted for box_free such that the normal TypeChecker::check_call_inputs should work for it. I wanted to check whether that's true, but couldn't find any case where it's called. I went as far as reverting all my changes, and making check_box_free_inputs eprintln a message, and never saw one. Not while compiling the compiler itself, and not while compiling the testcase from #50041 (which does create a basic block with a termination call to box_free, contrary to most cases where the MIR only contains a drop ; and I tried adding #[feature(nll)] to that testcase in case that matters, to no avail)
Actually, full disclosure: I did see two calls... when compiling liballoc, which contains explicit calls to the function. (
Line 581 in 99d4886
| box_free(bptr); |
Line 696 in 99d4886
| box_free(bptr); |
check_call_inputs is clearly enough, since type checking actually happens before MIR.
Cc: @nikomatsakis