Skip to content

Commit f6e4703

Browse files
committedMay 27, 2024
Auto merge of #125611 - GuillaumeGomez:rollup-dfavpgg, r=GuillaumeGomez
Rollup of 7 pull requests Successful merges: - #124870 (Update Result docs to the new guarantees) - #125148 (codegen: tweak/extend shift comments) - #125522 (Add "better" edition handling on lint-docs tool) - #125530 (cleanup dependence of `ExtCtxt` in transcribe when macro expansion) - #125535 (clean-up: remove deprecated field `dist.missing-tools`) - #125597 (Uplift `EarlyBinder` into `rustc_type_ir`) - #125607 (Migrate `run-make/compile-stdin` to `rmake.rs`) r? `@ghost` `@rustbot` modify labels: rollup
2 parents a59072e + 7083131 commit f6e4703

File tree

57 files changed

+885
-762
lines changed

Some content is hidden

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

57 files changed

+885
-762
lines changed
 

‎Cargo.lock

+1
Original file line numberDiff line numberDiff line change
@@ -4686,6 +4686,7 @@ dependencies = [
46864686
"rustc_span",
46874687
"rustc_type_ir_macros",
46884688
"smallvec",
4689+
"tracing",
46894690
]
46904691

46914692
[[package]]

‎compiler/rustc_codegen_ssa/src/base.rs

+5-4
Original file line numberDiff line numberDiff line change
@@ -294,12 +294,13 @@ pub fn coerce_unsized_into<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>>(
294294
}
295295
}
296296

297-
/// Returns `rhs` sufficiently masked, truncated, and/or extended so that
298-
/// it can be used to shift `lhs`.
297+
/// Returns `rhs` sufficiently masked, truncated, and/or extended so that it can be used to shift
298+
/// `lhs`: it has the same size as `lhs`, and the value, when interpreted unsigned (no matter its
299+
/// type), will not exceed the size of `lhs`.
299300
///
300-
/// Shifts in MIR are all allowed to have mismatched LHS & RHS types.
301+
/// Shifts in MIR are all allowed to have mismatched LHS & RHS types, and signed RHS.
301302
/// The shift methods in `BuilderMethods`, however, are fully homogeneous
302-
/// (both parameters and the return type are all the same type).
303+
/// (both parameters and the return type are all the same size) and assume an unsigned RHS.
303304
///
304305
/// If `is_unchecked` is false, this masks the RHS to ensure it stays in-bounds,
305306
/// as the `BuilderMethods` shifts are UB for out-of-bounds shift amounts.

0 commit comments

Comments
 (0)
Please sign in to comment.