Skip to content

Commit 30487a5

Browse files
gebnerCopilot
andcommitted
Remove #restart-solver from generated files
No longer needed since each declaration is in its own module/file, so the solver state doesn't accumulate across declarations. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent cecaae1 commit 30487a5

1 file changed

Lines changed: 2 additions & 12 deletions

File tree

src/pass/emit.rs

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -4661,12 +4661,8 @@ pub fn emit_multifile(diags: &mut Diagnostics, tu: &TranslationUnit) -> Vec<Emit
46614661

46624662
// Emit just the body (decl code)
46634663
let body_doc = emitter.emit_decl(&env, decl);
4664-
let body_with_restart = Doc::text("#restart-solver")
4665-
.append(Doc::hardline())
4666-
.append(Doc::hardline())
4667-
.append(body_doc);
46684664
let mut writer = StrWriter::new();
4669-
body_with_restart.render_raw(100, &mut writer).unwrap();
4665+
body_doc.render_raw(100, &mut writer).unwrap();
46704666

46714667
// For function definitions, also emit the interface (signature only, no body)
46724668
// Skip pure functions — they are emitted as `let` definitions, not `fn`
@@ -4675,14 +4671,8 @@ pub fn emit_multifile(diags: &mut Diagnostics, tu: &TranslationUnit) -> Vec<Emit
46754671
None
46764672
} else {
46774673
let iface_doc = emitter.emit_fn_sig_for_interface(&env, &fn_defn.decl);
4678-
let iface_with_restart = Doc::text("#restart-solver")
4679-
.append(Doc::hardline())
4680-
.append(Doc::hardline())
4681-
.append(iface_doc);
46824674
let mut iface_writer = StrWriter::new();
4683-
iface_with_restart
4684-
.render_raw(100, &mut iface_writer)
4685-
.unwrap();
4675+
iface_doc.render_raw(100, &mut iface_writer).unwrap();
46864676
Some(iface_writer.buffer)
46874677
}
46884678
} else {

0 commit comments

Comments
 (0)