Y
Hacker News
new
|
ask
|
show
|
jobs
by
pwdisswordfishq
6 days ago
So how do I take a shared reference to a variable named "raw"?
Complicating the grammar for no good reason. This should have stayed a macro.
3 comments
smj-edison
6 days ago
Rust allows you to use a literal iirc like r#raw, which helps with migration. This isn't too different from Zig's @"var" for example, which I'm glad modern languages have an escape hatch for naming things that don't parse normally.
link
ssokolow
6 days ago
https://play.rust-lang.org/?version=stable&mode=debug&editio...
link
afdbcreid
6 days ago
`raw` is a contextual keyword.
link