about summary refs log tree commit diff
path: root/compiler/rustc_middle/src
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2023-11-22 18:49:51 +0000
committerbors <bors@rust-lang.org>2023-11-22 18:49:51 +0000
commit06d1afe5189bc0830b9b5654fd0ba89e9829f4cd (patch)
treeed14f198629118fec0ffc8a83b048be3774ac9ed /compiler/rustc_middle/src
parent6d2b84b3ed7848fd91b8d6151d4451b3103ed816 (diff)
parent4ec548afbe27589f6542f11c81b93f2931d1c811 (diff)
downloadrust-06d1afe5189bc0830b9b5654fd0ba89e9829f4cd.tar.gz
rust-06d1afe5189bc0830b9b5654fd0ba89e9829f4cd.zip
Auto merge of #118178 - compiler-errors:rollup-0i11w85, r=compiler-errors
Rollup of 6 pull requests

Successful merges:

 - #118012 (Add support for global allocation in smir)
 - #118013 (Enable Rust to use the EHCont security feature of Windows)
 - #118100 (Enable profiler in dist-powerpc64-linux)
 - #118142 (Tighten up link attributes for llvm-wrapper bindings)
 - #118147 (Fix some unnecessary casts)
 - #118161 (Allow defining opaques in `check_coroutine_obligations`)

r? `@ghost`
`@rustbot` modify labels: rollup
Diffstat (limited to 'compiler/rustc_middle/src')
-rw-r--r--compiler/rustc_middle/src/mir/tcx.rs4
-rw-r--r--compiler/rustc_middle/src/query/mod.rs2
2 files changed, 2 insertions, 4 deletions
diff --git a/compiler/rustc_middle/src/mir/tcx.rs b/compiler/rustc_middle/src/mir/tcx.rs
index 557c4d0f564..0fc12586948 100644
--- a/compiler/rustc_middle/src/mir/tcx.rs
+++ b/compiler/rustc_middle/src/mir/tcx.rs
@@ -95,9 +95,7 @@ impl<'tcx> PlaceTy<'tcx> {
             ProjectionElem::Subslice { from, to, from_end } => {
                 PlaceTy::from_ty(match self.ty.kind() {
                     ty::Slice(..) => self.ty,
-                    ty::Array(inner, _) if !from_end => {
-                        Ty::new_array(tcx, *inner, (to - from) as u64)
-                    }
+                    ty::Array(inner, _) if !from_end => Ty::new_array(tcx, *inner, to - from),
                     ty::Array(inner, size) if from_end => {
                         let size = size.eval_target_usize(tcx, param_env);
                         let len = size - from - to;
diff --git a/compiler/rustc_middle/src/query/mod.rs b/compiler/rustc_middle/src/query/mod.rs
index cbba990867e..c982e2a9325 100644
--- a/compiler/rustc_middle/src/query/mod.rs
+++ b/compiler/rustc_middle/src/query/mod.rs
@@ -567,7 +567,7 @@ rustc_queries! {
         separate_provide_extern
     }
 
-    query check_coroutine_obligations(key: LocalDefId) {
+    query check_coroutine_obligations(key: LocalDefId) -> Result<(), ErrorGuaranteed> {
         desc { |tcx| "verify auto trait bounds for coroutine interior type `{}`", tcx.def_path_str(key) }
     }