Skip to content

Support C string literals highlight#508

Open
rhysd wants to merge 1 commit intorust-lang:masterfrom
rhysd:c-str-lit
Open

Support C string literals highlight#508
rhysd wants to merge 1 commit intorust-lang:masterfrom
rhysd:c-str-lit

Conversation

@rhysd
Copy link
Contributor

@rhysd rhysd commented Mar 20, 2024

Recently Rust has stabilized C string literals syntax (the tracking issue). It will be available on the stable toolchain soon.

const HELLO: &core::ffi::CStr = c"Hello, world!";
const HELLO: &core::ffi::CStr = cr#"Hello, world!"#;

This PR adds support for the syntax.

Before:

image

After:

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant