Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Resolve how to handle coercions and the like under default binding modes #44848

Closed
nikomatsakis opened this issue Sep 25, 2017 · 1 comment
Closed
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.

Comments

@nikomatsakis
Copy link
Contributor

nikomatsakis commented Sep 25, 2017

One of the tricky questions that came up when implementing default binding modes is how to handle the compiler's current logic around patterns with ref bindings. Currently, if a ref-binding is included, this disables coercion for let statements and tweaks how we handle match statements. It's unclear precisely what we ought to do now that ref bindings are not always syntactically visible. This issue exists to track the question.

There has already been a number of conversations on the topic. Here are some links for background reading:

@nikomatsakis nikomatsakis added T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. WG-compiler-middle labels Sep 25, 2017
@TimNN TimNN added C-feature-request Category: A feature request, i.e: not implemented / a PR. C-tracking-issue Category: An issue tracking the progress of sth. like the implementation of an RFC and removed C-feature-request Category: A feature request, i.e: not implemented / a PR. C-tracking-issue Category: An issue tracking the progress of sth. like the implementation of an RFC labels Sep 27, 2017
bors added a commit that referenced this issue Mar 27, 2018
Stabilize match_default_bindings

This includes a submodule update to rustfmt
in order to allow a stable feature declaration.

r? @nikomatsakis

cc #42640

Many of the tests this PR touches are merely testing the current lack of desired future behavior around #44849 and #44848 (cc @tschottdorf). I noticed the bullets for those items were checked on the tracking issue-- I've unchecked them, as they don't appear to have been completed and I don't see any comments indicating that we don't want to pursue them further. Still, I think it's fine to stabilize the current behavior, as I think expanding it in the future should be backwards-compatible.
bors added a commit that referenced this issue Mar 28, 2018
Stabilize match_default_bindings

This includes a submodule update to rustfmt
in order to allow a stable feature declaration.

r? @nikomatsakis

cc #42640

Many of the tests this PR touches are merely testing the current lack of desired future behavior around #44849 and #44848 (cc @tschottdorf). I noticed the bullets for those items were checked on the tracking issue-- I've unchecked them, as they don't appear to have been completed and I don't see any comments indicating that we don't want to pursue them further. Still, I think it's fine to stabilize the current behavior, as I think expanding it in the future should be backwards-compatible.
@nikomatsakis
Copy link
Contributor Author

The current handling seems to be adequate and -- in any case -- is stabilized. We permit coercions unless there is a ref binding. This is ok because coercions don't alter things underneath references, generally speaking. Closing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
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.
Projects
None yet
Development

No branches or pull requests

2 participants