Skip to content

Commit b3a5537

Browse files
committed
Remove automatic rustfix of asm! to llvm_asm!
This no longer works now that asm! needs an explicit import. Also, it's been over a year since asm! landed, everyone should have transitioned by now.
1 parent a0a4c7d commit b3a5537

File tree

4 files changed

+0
-71
lines changed

4 files changed

+0
-71
lines changed

compiler/rustc_builtin_macros/src/asm.rs

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -42,19 +42,6 @@ fn parse_args<'a>(
4242
ecx.struct_span_err(sp, "the legacy LLVM-style asm! syntax is no longer supported");
4343
err.note("consider migrating to the new asm! syntax specified in RFC 2873");
4444
err.note("alternatively, switch to llvm_asm! to keep your code working as it is");
45-
46-
// Find the span of the "asm!" so that we can offer an automatic suggestion
47-
let asm_span = sp.from_inner(InnerSpan::new(0, 4));
48-
if let Ok(s) = ecx.source_map().span_to_snippet(asm_span) {
49-
if s == "asm!" {
50-
err.span_suggestion(
51-
asm_span,
52-
"replace with",
53-
"llvm_asm!".into(),
54-
Applicability::MachineApplicable,
55-
);
56-
}
57-
}
5845
return Err(err);
5946
}
6047

src/test/ui/asm/rustfix-asm.fixed

Lines changed: 0 additions & 17 deletions
This file was deleted.

src/test/ui/asm/rustfix-asm.rs

Lines changed: 0 additions & 17 deletions
This file was deleted.

src/test/ui/asm/rustfix-asm.stderr

Lines changed: 0 additions & 24 deletions
This file was deleted.

0 commit comments

Comments
 (0)