[Rust] constant variables as type
See original GitHub issueI have some consts defined, and they are coloured as type
example:
INTERNAL_ERROR of error:INTERNAL_ERROR
is like a type
INTERNAL_ERROR is defined here: https://github.com/ghost-in-the-sushi/efficio-server/blob/997e203c53fc7868a84e4066aa8959bd9386c23c/src/error.rs#L13
Issue Analytics
- State:
- Created 4 years ago
- Comments:7 (3 by maintainers)
Top Results From Across the Web
constants - Rust By Example
Rust has two different types of constants which can be declared in any scope including global. Both require explicit type annotation:.
Read more >Rust - Constant - Tutorialspoint
Rust - Constant, Constants represent values that cannot be changed. If you declare a constant then there is no way its value changes....
Read more >const and static - The Rust Programming Language
Rust provides a 'global variable' sort of facility in static items. They're similar to constants, but static items aren't inlined upon use.
Read more >Global constants | Rust by Example
Constants can be declared in the global scope using the static keyword, ... These variables have type signature &'static str , and are...
Read more >Rust Variables & Constants Tutorial - KoderHQ
In languages like C, we have to specify the type when we declare or initialize a variable. In Rust however, the compiler will...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I’m sorry, I’ve closed this issue by accident. I didn’t know that GitHub does this automatically when you put something like
While not breaking highlighting of enums:
This fix will be included in the next version.
fixes #17
in commit message (=. Highlighting of consts now looks like this:I haven’t take the time to test it yet ^^ I’ll keep you posted 😃