diff options
| author | bors <bors@rust-lang.org> | 2022-07-16 20:31:42 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2022-07-16 20:31:42 +0000 |
| commit | d5e7f4782e4b699728d0a08200ecd1a54d56a85d (patch) | |
| tree | 2ecfa500407be289cf19a91c39d2ce7bdd511731 /compiler/rustc_const_eval/src/interpret/validity.rs | |
| parent | 7210e46dc69a4b197a313d093fe145722c248b7d (diff) | |
| parent | 6277ac2fb8bf97cd910a0a841c6924b246d32c44 (diff) | |
| download | rust-d5e7f4782e4b699728d0a08200ecd1a54d56a85d.tar.gz rust-d5e7f4782e4b699728d0a08200ecd1a54d56a85d.zip | |
Auto merge of #99346 - matthiaskrgr:rollup-p4dl1qt, r=matthiaskrgr
Rollup of 10 pull requests Successful merges: - #98582 (Allow destructuring opaque types in their defining scopes) - #99213 (migrate some of `rustc_passes::check_attr`'s diagnostics and derive improvements) - #99258 (Provide structured suggestion for dropped temp value) - #99259 (interpret/visitor: support visiting with a PlaceTy) - #99287 ([rustdoc-json] JSON no longer inlines) - #99290 (Revert "Highlight conflicting param-env candidates") - #99316 (docs: add missing word) - #99317 (Borrow Vec<T, A> as [T]) - #99323 (Fix flakyness of GUI tests) - #99342 (Avoid some `Symbol` to `String` conversions) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
Diffstat (limited to 'compiler/rustc_const_eval/src/interpret/validity.rs')
| -rw-r--r-- | compiler/rustc_const_eval/src/interpret/validity.rs | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/compiler/rustc_const_eval/src/interpret/validity.rs b/compiler/rustc_const_eval/src/interpret/validity.rs index 53bc2cc8a69..2e5492ecf56 100644 --- a/compiler/rustc_const_eval/src/interpret/validity.rs +++ b/compiler/rustc_const_eval/src/interpret/validity.rs @@ -853,7 +853,8 @@ impl<'rt, 'mir, 'tcx: 'mir, M: Machine<'mir, 'tcx>> ValueVisitor<'mir, 'tcx, M> self.visit_scalar(scalar, scalar_layout)?; } Abi::ScalarPair(a_layout, b_layout) => { - // We would validate these things as we descend into the fields, + // There is no `rustc_layout_scalar_valid_range_start` for pairs, so + // we would validate these things as we descend into the fields, // but that can miss bugs in layout computation. Layout computation // is subtle due to enums having ScalarPair layout, where one field // is the discriminant. @@ -867,7 +868,8 @@ impl<'rt, 'mir, 'tcx: 'mir, M: Machine<'mir, 'tcx>> ValueVisitor<'mir, 'tcx, M> } Abi::Vector { .. } => { // No checks here, we assume layout computation gets this right. - // (This is harder to check since Miri does not represent these as `Immediate`.) + // (This is harder to check since Miri does not represent these as `Immediate`. We + // also cannot use field projections since this might be a newtype around a vector.) } Abi::Aggregate { .. } => { // Nothing to do. |
