resolve how to handle constants and default binding modes #44849
Labels
C-feature-request
Category: A feature request, i.e: not implemented / a PR.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
Another interesting question that @tschottdorf encountered when implementing default binding modes: What do we do with constants? The RFC specifies that we ought to treat a
FOO
binding that resolves to a constant as something which can skip through&T
types -- however, that runs into trouble if the type of the constant itself is&str
or&[T]
. The current logic at least skips through all&T
or&mut T
types when it skips through any, but handling&str
correctly would require skipping through "only the right number".@tschottdorf implemented various rules but we should at minimum update the RFC to match.
The text was updated successfully, but these errors were encountered: