Skip to content

Commit

Permalink
Merge pull request rust-lang#3838 from calebcartwright/static-raw-ide…
Browse files Browse the repository at this point in the history
…nt-prefix

add static support for raw prefix identifiers
  • Loading branch information
scampi authored Oct 6, 2019
2 parents 383306e + ed697c9 commit 61f972b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/items.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
3 changes: 3 additions & 0 deletions tests/target/raw_identifiers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit 61f972b

Please sign in to comment.