I would like the output of the standard code
$x \left.\right|_{x\gets 5}$
namely
but with the ability to lower the subscript and extend the vertical bar downwards. There are several relevant pages on Stack Exchange but none I found that quite does it. For instance
$x \left.\rule[-4mm]{0mm}{4mm}\right|_{x\gets 5}$
does it but at the cost of the vertical bar also extending upwards:
and I want to avoid that. Specifically, I would like the top of the vertical bar to be at the same height as given by the standard code.