Skip to content

Commit 56e112a

Browse files
committedJun 13, 2024·
Auto merge of rust-lang#126374 - workingjubilee:rollup-tz0utfr, r=workingjubilee
Rollup of 10 pull requests Successful merges: - rust-lang#125674 (Rewrite `symlinked-extern`, `symlinked-rlib` and `symlinked-libraries` `run-make` tests in `rmake.rs` format) - rust-lang#125688 (Walk into alias-eq nested goals even if normalization fails) - rust-lang#126142 (Harmonize using root or leaf obligation in trait error reporting) - rust-lang#126303 (Urls to docs in rust_hir) - rust-lang#126328 (Add Option::is_none_or) - rust-lang#126337 (Add test for walking order dependent opaque type behaviour) - rust-lang#126353 (Move `MatchAgainstFreshVars` to old solver) - rust-lang#126356 (docs(rustc): Improve discoverable of Cargo docs) - rust-lang#126358 (safe transmute: support `Single` enums) - rust-lang#126362 (Make `try_from_target_usize` method public) r? `@ghost` `@rustbot` modify labels: rollup
2 parents f6b4b71 + 3b10998 commit 56e112a

File tree

80 files changed

+557
-275
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

80 files changed

+557
-275
lines changed
 

‎compiler/rustc_const_eval/src/interpret/discriminant.rs

+1-4
Original file line numberDiff line numberDiff line change
@@ -241,10 +241,7 @@ impl<'tcx, M: Machine<'tcx>> InterpCx<'tcx, M> {
241241
variant_index: VariantIdx,
242242
) -> InterpResult<'tcx, Option<(ScalarInt, usize)>> {
243243
match self.layout_of(ty)?.variants {
244-
abi::Variants::Single { index } => {
245-
assert_eq!(index, variant_index);
246-
Ok(None)
247-
}
244+
abi::Variants::Single { .. } => Ok(None),
248245

249246
abi::Variants::Multiple {
250247
tag_encoding: TagEncoding::Direct,

‎compiler/rustc_const_eval/src/interpret/eval_context.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1057,7 +1057,7 @@ impl<'tcx, M: Machine<'tcx>> InterpCx<'tcx, M> {
10571057

10581058
ty::Str | ty::Slice(_) | ty::Dynamic(_, _, ty::Dyn) | ty::Foreign(..) => false,
10591059

1060-
ty::Tuple(tys) => tys.last().iter().all(|ty| is_very_trivially_sized(**ty)),
1060+
ty::Tuple(tys) => tys.last().is_none_or(|ty| is_very_trivially_sized(*ty)),
10611061

10621062
ty::Pat(ty, ..) => is_very_trivially_sized(*ty),
10631063

0 commit comments

Comments
 (0)
Please sign in to comment.