| ▲ | aw1621107 4 days ago | |||||||
> The article doesn't show any function lifetime annotations, only @safe and @unsafe. It does, but it's under the "External Annotations" section:
> The where clause specifies lifetime relationships—like where stmt: 'a, return: 'a means the returned pointer lives as long as the statement handle. This lets the analyzer catch dangling pointers from external APIs.The GitHub repo also has an annotations guide with some more info [0]. The general syntax appears to be:
[0]: https://github.com/shuaimu/rusty-cpp/blob/main/docs/annotati... | ||||||||
| ▲ | SkiFire13 4 days ago | parent | next [-] | |||||||
`@lifetime` seem to be what I was referring to, strange though it wasn't mentioned at all in the article. The ones in `@external` seem to be limited to C++ definitions outside the user control. | ||||||||
| ||||||||
| ▲ | hmry 4 days ago | parent | prev [-] | |||||||
Ah, I see! Thank you! | ||||||||