提交 14dc780d 编写于 作者: R Ralf Jung

fix a comment in validity

上级 f3e7efc8
......@@ -226,7 +226,9 @@ pub fn validate_mplace(
// Validate all fields
match dest.layout.fields {
// primitives are unions with zero fields
// FIXME: Use some other indicator instead, like `layout.abi`.
// We still check `layout.fields`, not `layout.abi`, because `layout.abi`
// is `Scalar` for newtypes around scalars, but we want to descend through the
// fields to get a proper `path`.
layout::FieldPlacement::Union(0) => {
match dest.layout.abi {
// nothing to do, whatever the pointer points to, it is never going to be read
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册