Rust Syntax Highlighting Code Example?


I would like to provide a sample of Rust code that covers all the syntactically-highlightable constructs in a short, valid Rust file. Does something like that already exist?

I’m (selfishly) trying to get Rust syntax highlighting for the Monokai theme in IntelliJ.

If there isn’t an existing example used by RLS (or something else), then I’ll attempt to put together a good sample file.

Here’s the various stuff that can be independently highlighted in IntelliJ:


Found some!

It appears to actually have been included with the Rust plugin for IntelliJ. Makes sense. It appears in Preferences > Editor > Color Schema > Rust > Bottom panel