Meaning of ‘&variable’ in arguments/patterns
It’s a pattern match, “destructuring” something of type &T. That is, in let &x = &1i; x has type int, and value 1. So it’s actually the opposite to ref (which does what @KerrekSB is saying, ref x captures by reference rather than by value). One can regard it as similar to match returns_an_option() { … Read more