fix: support raw prefix identifiers in statics

This commit is contained in:
Caleb Cartwright 2019-10-05 12:34:48 -05:00
parent 383306e5fe
commit ed697c9347
2 changed files with 4 additions and 1 deletions

View File

@ -1722,7 +1722,7 @@ fn rewrite_static(
static_parts.defaultness.map_or("", format_defaultness),
static_parts.prefix,
format_mutability(static_parts.mutability),
static_parts.ident,
rewrite_ident(context, static_parts.ident),
colon,
);
// 2 = " =".len()

View File

@ -6,6 +6,9 @@
use r#foo as r#alias_foo;
// https://github.com/rust-lang/rustfmt/issues/3837
pub(crate) static r#break: &'static str = "foo";
fn main() {
#[r#attr]
r#foo::r#bar();