如何解决如何保护板条箱功能后面的夜间功能“extended_key_value_attributes”?
我使用 stable 运行代码并使用 nightly 记录它,主要是因为自动链接。
我试图通过 <table class="table display-table">
<thead>
<tr>
<th class="valign-middle" rowspan="2">SPH</th>
<th colspan="9">CYL (-,-)</th>
</tr>
<tr>
<th>0.00</th>
<th>0.25</th>
<th>0.50</th>
<th>0.75</th>
<th>1.00</th>
<th>1.25</th>
<th>1.50</th>
<th>1.75</th>
<th>2.00</th>
</tr>
</thead>
<tbody>
<tr>
<th scope="row">0.00</th>
<td><input type="number" name="" id=""></td>
<td><input type="number" name="" id=""></td>
<td><input type="number" name="" id=""></td>
<td><input type="number" name="" id=""></td>
<td><input type="number" name="" id=""></td>
<td><input type="number" name="" id=""></td>
<td><input type="number" name="" id=""></td>
<td><input type="number" name="" id=""></td>
<td><input type="number" name="" id=""></td>
</tr>
<tr>
<th scope="row">0.25</th>
<td><input type="number" name="" id=""></td>
<td><input type="number" name="" id=""></td>
<td><input type="number" name="" id=""></td>
<td><input type="number" name="" id=""></td>
<td><input type="number" name="" id=""></td>
<td><input type="number" name="" id=""></td>
<td><input type="number" name="" id=""></td>
<td><input type="number" name="" id=""></td>
<td><input type="number" name="" id=""></td>
</tr>
<tr>
<th scope="row">0.50</th>
<td><input type="number" name="" id=""></td>
<td><input type="number" name="" id=""></td>
<td><input type="number" name="" id=""></td>
<td><input type="number" name="" id=""></td>
<td><input type="number" name="" id=""></td>
<td><input type="number" name="" id=""></td>
<td><input type="number" name="" id=""></td>
<td><input type="number" name="" id=""></td>
<td><input type="number" name="" id=""></td>
</tr>
<tr>
<th scope="row">0.75</th>
<td><input type="number" name="" id=""></td>
<td><input type="number" name="" id=""></td>
<td><input type="number" name="" id=""></td>
<td><input type="number" name="" id=""></td>
<td><input type="number" name="" id=""></td>
<td><input type="number" name="" id=""></td>
<td><input type="number" name="" id=""></td>
<td><input type="number" name="" id=""></td>
<td><input type="number" name="" id=""></td>
</tr>
<tr>
<th scope="row">1.00</th>
<td><input type="number" name="" id=""></td>
<td><input type="number" name="" id=""></td>
<td><input type="number" name="" id=""></td>
<td><input type="number" name="" id=""></td>
<td><input type="number" name="" id=""></td>
<td><input type="number" name="" id=""></td>
<td><input type="number" name="" id=""></td>
<td><input type="number" name="" id=""></td>
<td><input type="number" name="" id=""></td>
</tr>
<tr>
<th scope="row">7.75</th>
<td><input type="number" name="" id=""></td>
<td><input type="number" name="" id=""></td>
<td><input type="number" name="" id=""></td>
<td><input type="number" name="" id=""></td>
<td><input type="number" name="" id=""></td>
<td><input type="number" name="" id=""></td>
<td><input type="number" name="" id=""></td>
<td><input type="number" name="" id=""></td>
<td><input type="number" name="" id=""></td>
</tr>
</tbody>
</table>
<div class="end-order show">
<div class="summerize">
<button>Calculate Price</button>
<input class="calculate" type="text">
</div>
<button>Send Order</button>
</div>
在代码中包含一个很长的内部文档,但只有在每晚使用时才使用它,因为它不稳定。执行此操作的标准方法似乎是使用显式功能。
我在 Cargo.toml 上声明了 #![doc = include_str!("doc.md")]
功能,并尝试:
nightly
在 #![cfg_attr(feature = "nightly",feature(extended_key_value_attributes),doc = include_str!("doc.md"))]
中按预期工作,但稳定版不支持:
cargo +nightly doc --features nightly
我怀疑 > cargo +stable build
[...]
error[E0658]: arbitrary expressions in key-value attributes are unstable
即使不使用它们也必须解析其所有参数,因此 cfg_attr
中的宏语法使事情变得更加复杂。
我该如何正确执行此操作?
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。