Skip to content

Commit d387e78

Browse files
committed
librustc: back::link::sanitize support esacpe_utf8
1 parent d5c5ce3 commit d387e78

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/librustc/back/link.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -660,9 +660,9 @@ pub fn sanitize(s: &str) -> ~str {
660660
| '_' => result.push_char(c),
661661

662662
_ => {
663-
if c > 'z' && char::is_XID_continue(c) {
664-
result.push_char(c);
665-
}
663+
let tstr = char::escape_unicode(c);
664+
result.push_char('$');
665+
result.push_str(tstr.slice_from(1));
666666
}
667667
}
668668
}

0 commit comments

Comments
 (0)