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

Implement overloaded slice notation #17177

Closed
alexcrichton opened this issue Sep 11, 2014 · 13 comments · Fixed by #17318
Closed

Implement overloaded slice notation #17177

alexcrichton opened this issue Sep 11, 2014 · 13 comments · Fixed by #17318
Labels
B-RFC-approved Blocker: Approved by a merged RFC but not yet implemented. P-low Low priority

Comments

@alexcrichton
Copy link
Member

Tracking issue for rust-lang/rfcs#198

@alexcrichton alexcrichton added the B-RFC-approved Blocker: Approved by a merged RFC but not yet implemented. label Sep 11, 2014
@alexcrichton
Copy link
Member Author

Nominating, I believe this is a very important syntax to have.

@alexcrichton
Copy link
Member Author

cc #17177, this may just be a dupe of that.

@aturon
Copy link
Member

aturon commented Sep 11, 2014

@alexcrichton This is #17177 :-)

Note that if we end up making Vec<T> deref to [T], the need for the [] notation becomes less pressing.

@alexcrichton
Copy link
Member Author

oops: cc #14983

@pnkfelix
Copy link
Member

We can add this syntax backwards-compatibly.

Assigning P-low, not 1.0 blocker.

@pnkfelix pnkfelix added P-low Low priority and removed I-nominated labels Sep 11, 2014
@nrc
Copy link
Member

nrc commented Sep 15, 2014

I am implementing

@aturon
Copy link
Member

aturon commented Sep 15, 2014

@nick29581 Awesome!

@nrc
Copy link
Member

nrc commented Sep 16, 2014

See #17293 and #17273 for some work left to do.

@nrc
Copy link
Member

nrc commented Sep 16, 2014

and #17295

@nodakai
Copy link
Contributor

nodakai commented Dec 19, 2014

@nick29581 You listed three issues #17293 #17273 and #17295 but only the first among them is still open. Is that the reason why we still need feature(slicing_syntax) for this syntax?

@nrc
Copy link
Member

nrc commented Dec 19, 2014

@nodakai in general, feature gates are required until we are absolutely sure that a feature should be in Rust and stay in its current form. We are not there yet with slicing notation. In fact, we are tweaking the implementation and the surface syntax at the moment (see #19795).

@nodakai
Copy link
Contributor

nodakai commented Dec 21, 2014

@nick29581 I see, so the slicing notation is tracked by 0439-cmp-ops-reform rather than 0198-slice-notation now.

@nrc
Copy link
Member

nrc commented Dec 22, 2014

@nodakai I wouldn't say either RFC tracks slicing notation - both contain aspects of the design

lnicola pushed a commit to lnicola/rust that referenced this issue May 19, 2024
Fix Run lens showing when lenses are disabled

I have disabled Rust Analyzer lenses in my VSCode settings, but noticed that the `Run` lens still showed. This surprised me, as the docs for `lens.run.enable` [state that it only applies when `lens.enable` is set](https://github.com/rust-lang/rust-analyzer/blob/25f59be62f6b915b44a4c2ec2defca56a5f766c1/crates/rust-analyzer/src/config.rs#L353-L355). I then found that where we set `LensConfig::run`, we don't check `lens_enable` like for the other settings. [We did this previously](https://github.com/rust-lang/rust-analyzer/blob/eab385e1f64f8e3b861effe91432785f8030191b/crates/rust-analyzer/src/config.rs#L1649), so this seems like a regression from refactoring. This PR tries to fix that.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
B-RFC-approved Blocker: Approved by a merged RFC but not yet implemented. P-low Low priority
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants