Interesting! I also tried that in version 1.0.0 and the same behaviour happens:
>>> with torch.no_grad():
...     z = x

>>> z.requires_grad
True
>>> with torch.no_grad():
...     z = x + 0.0

>>> z.requires_grad
False

I wonder if this is a bug that needs to be fixed!