0xMiden / 0xMiden/compiler

`Diagnostic::labels` are not printed

未關閉
#380 2 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視
ux
主要語言
Rust
星號
115
分支
84
平均合併
1 天 8 小時
30 天內合併 PR
15

描述

To reproduce:
- remove the https://github.com/0xPolygonMiden/compiler/blob/greenhat/i363-op-tests/frontend-wasm2/src/code_translator/tests.rs#L33-L40 extra label printing;
- run any failing test due to #378;
- observe the labels are not shown;

Both `Display` and `Debug` implementation. I suspect the empty `SourceSpan` is the reason.

貢獻指南

開啟貢獻指南

研究方向

問題出在 Diagnostic::labels 的列印上。首先檢查程式碼庫(可能在診斷模組中)中的 Diagnostic 結構體及其 Display/Debug 實作。查看 SourceSpan 的處理。執行 issue #378 中的失敗測試以重現缺失的標籤。檢查空的 SourceSpan 值是否導致標籤被跳過。修復涉及確保無論 span 是否為空都列印標籤。

由索引模型根據 Issue 內容生成。

評估

技術堆疊
rust
領域
compilers
Issue 類型
缺陷
難度
3/5
預估耗時
1-2 天
活躍度
停滯
描述清晰度
基本清楚
新手友好度
45/100

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。