Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 3821385

Browse files
committedFeb 6, 2025
Auto merge of rust-lang#136650 - cuviper:beta-next, r=cuviper
[beta] backports - Ensure that we don't try to access fields on a non-struct pattern type rust-lang#135222 - Do not include GCC source code in source tarballs rust-lang#135658 - Temporarily bring back `Rvalue::Len` rust-lang#135709 - Add a couple of missing `ensure_sufficient_stacks` rust-lang#136352 - Enable kernel sanitizers for aarch64-unknown-none-softfloat rust-lang#135905 r? cuviper
2 parents 0277061 + bf24cad commit 3821385

File tree

145 files changed

+2058
-1554
lines changed

Some content is hidden

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

145 files changed

+2058
-1554
lines changed
 

‎compiler/rustc_middle/src/mir/tcx.rs

+1
Original file line numberDiff line numberDiff line change
@@ -210,6 +210,7 @@ impl<'tcx> Rvalue<'tcx> {
210210
let place_ty = place.ty(local_decls, tcx).ty;
211211
Ty::new_ptr(tcx, place_ty, mutability)
212212
}
213+
Rvalue::Len(..) => tcx.types.usize,
213214
Rvalue::Cast(.., ty) => ty,
214215
Rvalue::BinaryOp(op, box (ref lhs, ref rhs)) => {
215216
let lhs_ty = lhs.ty(local_decls, tcx);

‎compiler/rustc_middle/src/mir/visit.rs

+8
Original file line numberDiff line numberDiff line change
@@ -695,6 +695,14 @@ macro_rules! make_mir_visitor {
695695
self.visit_place(path, ctx, location);
696696
}
697697

698+
Rvalue::Len(path) => {
699+
self.visit_place(
700+
path,
701+
PlaceContext::NonMutatingUse(NonMutatingUseContext::Inspect),
702+
location
703+
);
704+
}
705+
698706
Rvalue::Cast(_cast_kind, operand, ty) => {
699707
self.visit_operand(operand, location);
700708
self.visit_ty($(& $mutability)? *ty, TyContext::Location(location));

‎compiler/rustc_mir_build/src/builder/custom/parse/instruction.rs

+1
Original file line numberDiff line numberDiff line change
@@ -246,6 +246,7 @@ impl<'a, 'tcx> ParseCtxt<'a, 'tcx> {
246246
let offset = self.parse_operand(args[1])?;
247247
Ok(Rvalue::BinaryOp(BinOp::Offset, Box::new((ptr, offset))))
248248
},
249+
@call(mir_len, args) => Ok(Rvalue::Len(self.parse_place(args[0])?)),
249250
@call(mir_ptr_metadata, args) => Ok(Rvalue::UnaryOp(UnOp::PtrMetadata, self.parse_operand(args[0])?)),
250251
@call(mir_copy_for_deref, args) => Ok(Rvalue::CopyForDeref(self.parse_place(args[0])?)),
251252
ExprKind::Borrow { borrow_kind, arg } => Ok(
There was a problem loading the remainder of the diff.

0 commit comments

Comments
 (0)
Failed to load comments.