What are identifiers represented by single quotes (')? #150184
-
Body
What is the significance of that apostrophe (')? Maybe it's a modifier of references (&)? Guidelines
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Hi mate, I think this document may be helpful for you. 'Static lifetime' is a special lifetime that is the longest of all lifetimes: the lifetime of the program. A typical example is a string "literal" that is always available for the lifetime of the program/module. |
Beta Was this translation helpful? Give feedback.
Hi mate, I think this document may be helpful for you.
https://doc.rust-lang.org/stable/book/ch10-03-lifetime-syntax.html#lifetime-annotation-syntax
This gave me also much help to me.
'Static lifetime' is a special lifetime that is the longest of all lifetimes: the lifetime of the program. A typical example is a string "literal" that is always available for the lifetime of the program/module.
Hope it would be helpful.