Treat unary struct and enum variants as rvalues

Closes #11681
Fixes temporary lifetime computation for static items

closes: #11854
auto merge of #11776 : FlaPer87/rust/issue-11681-static-lifetime, r=nikomatsakis

Closes #11681
Closes #11854