Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 679d81a

Browse files
committed
Rust: extract dummy Function body
1 parent 46d6bbb commit 679d81a

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

rust/extractor/src/translate.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,10 +94,15 @@ impl CrateTranslator<'_> {
9494
ModuleDef::Function(function) => {
9595
let name = function.name(self.db);
9696
let location = self.emit_location(function);
97+
let body = self.trap.emit(generated::MissingExpr {
98+
id: TrapId::Star,
99+
location: None,
100+
});
97101
labels.push(self.trap.emit(generated::Function {
98102
id: trap_key![module_label, name.as_str()],
99103
location,
100104
name: name.as_str().into(),
105+
body,
101106
}));
102107
}
103108
ModuleDef::Adt(_) => {}

0 commit comments

Comments
 (0)