MCPcopy
hub / github.com/compiler-explorer/compiler-explorer / processRustMirOutput

Method processRustMirOutput

lib/base-compiler.ts:1714–1726  ·  view source on GitHub ↗
(outputFilename: string, output: CompilationResult)

Source from the content-addressed store, hash-verified

1712 }
1713
1714 async processRustMirOutput(outputFilename: string, output: CompilationResult): Promise<ResultLine[]> {
1715 const mirPath = this.getRustMirOutputFilename(outputFilename);
1716 if (output.code !== 0) {
1717 return [{text: 'Failed to run compiler to get Rust MIR'}];
1718 }
1719 if (await utils.fileExists(mirPath)) {
1720 const content = await fs.readFile(mirPath, 'utf8');
1721 return content.split('\n').map(line => ({
1722 text: line,
1723 }));
1724 }
1725 return [{text: 'Internal error; unable to open output path'}];
1726 }
1727
1728 async generateClojureMacroExpansion(inputFilename: string, options: string[]): Promise<ResultLine[]> {
1729 return [{text: 'Clojure Macro Expansion not applicable to current compiler.'}];

Callers 1

doCompilationMethod · 0.95

Calls 3

fileExistsMethod · 0.80
readFileMethod · 0.80

Tested by

no test coverage detected