Skip to content

Implement &P patterns for borrowed ptrs #2855

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

Closed
graydon opened this issue Jul 10, 2012 · 6 comments
Closed

Implement &P patterns for borrowed ptrs #2855

graydon opened this issue Jul 10, 2012 · 6 comments
Labels
A-grammar Area: The grammar of Rust A-lifetimes Area: Lifetimes / regions A-type-system Area: Type system
Milestone

Comments

@graydon
Copy link
Contributor

graydon commented Jul 10, 2012

See conclusion of the saga of unsafe pointers trying on caret:

#2826 (comment)

Essentially we decided to leave & as borrowed-ptr, and * as unsafe, and just add a keyword for capture-by-reference since we expect it'll be a rare-ish occurrence in the pattern language.

(or * rather than ref. neither is in the pattern grammar at present. pick one.)

@ghost ghost assigned nikomatsakis Jul 10, 2012
@bblum
Copy link
Contributor

bblum commented Aug 24, 2012

Part of #3271. Isn't this already done, or is there some borrowck integration left?

@bblum bblum closed this as completed Aug 24, 2012
@bblum bblum reopened this Aug 24, 2012
@bblum bblum closed this as completed Aug 24, 2012
@bblum bblum reopened this Aug 24, 2012
@bblum
Copy link
Contributor

bblum commented Aug 24, 2012

oops didn't mean to close it.

@nikomatsakis
Copy link
Contributor

This is basically done, except that there is no pattern for borrowed ptrs.

@ghost ghost assigned catamorphism Sep 7, 2012
@catamorphism
Copy link
Contributor

I'll take this over.

@bblum
Copy link
Contributor

bblum commented Sep 7, 2012

is there something concrete left to do for this, apart from the "make the ref keyword work more smoothly" problems? (#3235, #3256)

@nikomatsakis
Copy link
Contributor

Yes, we need to implement & patterns. I will update the subject to be more specific.

celinval pushed a commit to celinval/rust-dev that referenced this issue Jun 4, 2024
`--visualize` option does not work, it needs to include
`--enable-unstable` as well.
By submitting this pull request, I confirm that my contribution is made
under the terms of the Apache 2.0 and MIT licenses.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-grammar Area: The grammar of Rust A-lifetimes Area: Lifetimes / regions A-type-system Area: Type system
Projects
None yet
Development

No branches or pull requests

4 participants