3 ms·
Preemptive comment: the following output towards the second half: help: function arguments must have a statically known size, borrowed types always have a
by estebank 6y ago
Preemptive comment: the following output towards the second half:
help: function arguments must have a statically known size, borrowed types always have a known size
|
3 | fn f<T>(&t: T)
| ^
is a bug that already has a PR to fix. It's supposed to point at the T and suggest the following instead:
help: function arguments must have a statically known size, borrowed types always have a known size
|
3 | fn f<T>(t: &T)
| ^
- fasterthanlime 6y agoI've added a link to the PR directly in the article to clear up the confusion!
- kzrdude 6y agoYou changed the function signature between your two code snippets, that makes it hard to understand what you mean.
- CBLT 6y agoCheck out the context from TFA: this is a help message prescribing a change you could make (inserting a &). The signature is different because it's prescribing a different signature to fix the issue.