2 Checks for function arguments and let bindings denoted as
6 The `ref` declaration makes the function take an owned
7 value, but turns the argument into a reference (which means that the value
8 is destroyed when exiting the function). This adds not much value: either
9 take a reference type, or take an owned value and create references in the
12 For let bindings, `let x = &foo;` is preferred over `let ref x = foo`. The
13 type of `x` is more obvious with the former.
16 If the argument is dereferenced within the function,
17 removing the `ref` will lead to errors. This can be fixed by removing the
18 dereferences, e.g., changing `*x` to `x` within the function.