Skip to content

Commit 4806a4f

Browse files
committed
Merge pull request #3000 from dgryski/master
Fix formatting of multiline code blocks in asm-comments
2 parents 80f4e9f + 9b02acb commit 4806a4f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/rustc/middle/trans/build.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -653,7 +653,7 @@ fn add_comment(bcx: block, text: ~str) {
653653
let ccx = bcx.ccx();
654654
if !ccx.sess.no_asm_comments() {
655655
let sanitized = str::replace(text, ~"$", ~"");
656-
let comment_text = ~"# " + sanitized;
656+
let comment_text = ~"# " + str::replace(sanitized, ~"\n", ~"\n\t# ");
657657
let asm = str::as_c_str(comment_text, |c| {
658658
str::as_c_str(~"", |e| {
659659
count_insn(bcx, ~"inlineasm");

0 commit comments

Comments
 (0)