Comments (7)
Sure, here says that is is a reserved keyword (even in Rust2015 it seems). And here is the uses of box
, which are currently unstable in nightly but do work.
from tree-sitter-rust.
Can you share a link to the docs for this? Upon first search, all I'm seeing is very old discussions about the box
syntax that was eventually removed.
from tree-sitter-rust.
For reference:
from tree-sitter-rust.
@GrayJack So if I read correctly, they are removing the let x = box 1;
syntax but might be keeping the if let box Some(y) = Box::new(Some(10))
?
from tree-sitter-rust.
What I understood was that nothing is clear LOL
from tree-sitter-rust.
On another dive into the comments on those features using the box
keyword:
Looks like box
as expression will probably never go to stable and probably remain as a unstable feature till some problems related to the Box
can be fixed, a possible fix for those problems would be this RFC, but it wasn't accepted yet (21/10/2020). Once Box
type problems fixed, this feature will probably be removed.
About the box
pattern, it also looks like it will never face the light of a stable release (there some thoughts about removing it and adding a deref
pattern that will work on any type that can de dereferenced).
Either way, I think it's ok for us to implement those in the parser, since those features are used inside the stdlib and when we open those std files in a editor using tree-sitter the syntax usually breaks. Implementing them would mean that we can get closer to be possible to highlight and parse any Rust code.
from tree-sitter-rust.
I think we're gonna close this out since it probably will never be stabilized, and might be removed in the future, seems like deref patterns will supersede box patterns
from tree-sitter-rust.
Related Issues (20)
- both struct and trait share `type_identifier` nodes - perhaps better on separate nodes HOT 1
- Support for shebang HOT 1
- `&a?` wrong precedence
- `:TSInstall rust` installs a .so file instead of .dll on windows HOT 1
- macro_invocation incorrectly parsed HOT 2
- Parse error relating to `where` clause in associated type
- Attribute doesn't parse correctly HOT 4
- Poor performance of incremental selection in strings HOT 1
- Why does the nvim implementation differ so much? HOT 1
- Labelled block expressions HOT 1
- Double cfg macro inside array isn't parsed correctly HOT 3
- Nested format macro not parsed correctly. HOT 2
- Syntax is broken for some weird cases HOT 1
- bug: First-line inner attribute item is regarded as shebang HOT 2
- bug: Half-open ranges are not parsed correctly in match statements HOT 1
- bug: Parser errors when macros are invoked with multiple arguments HOT 2
- bug: binary operator not detected as such when preceded by block comment HOT 1
- feature: Class Inheritance HOT 1
- feature: c string literals have been stabilized in 1.77 HOT 1
- bug: Assertion failed: (did_merge), function ts_parser__handle_error HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tree-sitter-rust.