Skip to content

TypeChecker::check_box_free_inputs never happens #50071

Closed
@glandium

Description

@glandium

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. (

box_free(bptr);
box_free(bptr);
). And for those, check_call_inputs is clearly enough, since type checking actually happens before MIR.

Cc: @nikomatsakis

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions