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 79734f1

Browse files
committedMay 2, 2024
Auto merge of #124629 - matthiaskrgr:rollup-gttvzrg, r=matthiaskrgr
Rollup of 7 pull requests Successful merges: - #124138 (Ignore LLVM ABI in dlltool tests since those targets don't use dlltool) - #124414 (remove extraneous note on `UnableToRunDsymutil` diagnostic) - #124579 (Align: add bytes_usize and bits_usize) - #124622 (Cleanup: Rid the `rmake` test runners of `extern crate run_make_support;`) - #124623 (shallow resolve in orphan check) - #124624 (Use `tcx.types.unit` instead of `Ty::new_unit(tcx)`) - #124627 (interpret: hide some reexports in rustdoc) r? `@ghost` `@rustbot` modify labels: rollup
2 parents a8773d5 + a248411 commit 79734f1

File tree

65 files changed

+135
-203
lines changed

Some content is hidden

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

65 files changed

+135
-203
lines changed
 

‎compiler/rustc_abi/src/lib.rs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -742,11 +742,21 @@ impl Align {
742742
1 << self.pow2
743743
}
744744

745+
#[inline]
746+
pub fn bytes_usize(self) -> usize {
747+
self.bytes().try_into().unwrap()
748+
}
749+
745750
#[inline]
746751
pub fn bits(self) -> u64 {
747752
self.bytes() * 8
748753
}
749754

755+
#[inline]
756+
pub fn bits_usize(self) -> usize {
757+
self.bits().try_into().unwrap()
758+
}
759+
750760
/// Computes the best alignment possible for the given offset
751761
/// (the largest power of two that the offset is a multiple of).
752762
///

‎compiler/rustc_codegen_gcc/src/intrinsic/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1223,7 +1223,7 @@ fn get_rust_try_fn<'a, 'gcc, 'tcx>(
12231223
tcx,
12241224
ty::Binder::dummy(tcx.mk_fn_sig(
12251225
iter::once(i8p),
1226-
Ty::new_unit(tcx),
1226+
tcx.types.unit,
12271227
false,
12281228
rustc_hir::Unsafety::Unsafe,
12291229
Abi::Rust,
@@ -1234,7 +1234,7 @@ fn get_rust_try_fn<'a, 'gcc, 'tcx>(
12341234
tcx,
12351235
ty::Binder::dummy(tcx.mk_fn_sig(
12361236
[i8p, i8p].iter().cloned(),
1237-
Ty::new_unit(tcx),
1237+
tcx.types.unit,
12381238
false,
12391239
rustc_hir::Unsafety::Unsafe,
12401240
Abi::Rust,

0 commit comments

Comments
 (0)
Please sign in to comment.