我在箱子中有以下注释的代码:
/// Complex Expression
///
/// - The `Undefined` variant is used as a placeholder during code
/// transformations. It must never occur in the final result.
pub enum Cexp {
Undefined,
Unimplemented,
}
Run Code Online (Sandbox Code Playgroud)
在cargo test板条箱上运行时,它会触发doctest运行,但无法编译。(请确保在操场上运行“测试”而不是“构建”。)
/// Complex Expression
///
/// - The `Undefined` variant is used as a placeholder during code
/// transformations. It must never occur in the final result.
pub enum Cexp {
Undefined,
Unimplemented,
}
Run Code Online (Sandbox Code Playgroud)
实际的错误消息无关紧要。锈编译器使注释文本窒息,这并不奇怪。但是,为什么此注释触发doctest运行?根据文档, doctests应该与围起来```,这里不是这种情况。
| 归档时间: |
|
| 查看次数: |
65 次 |
| 最近记录: |