I have a mortgaged rental property that needs to be torn down; a new one built. If the mortgage is moved to a personal residence heloc, how is this handled on taxes?

Is the mortgage transfer from the rental property to a personal residence heloc, considered as part of the rental property basis, a loss, or an expense to the new structure built?