diff options
| author | bors <bors@rust-lang.org> | 2023-01-09 13:13:35 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2023-01-09 13:13:35 +0000 |
| commit | d61d359d5ef5e3192611297805dbfbb52c55de8f (patch) | |
| tree | 374888d2e6ddfc2006e9eb8dadc2f0d6214562e8 /compiler/rustc_codegen_gcc | |
| parent | 87a202e6f23896f867457c0a26b31b367fa1c0e0 (diff) | |
| parent | 236ae262bc80dabf67669a2763fda5034982b9b9 (diff) | |
| download | rust-d61d359d5ef5e3192611297805dbfbb52c55de8f.tar.gz rust-d61d359d5ef5e3192611297805dbfbb52c55de8f.zip | |
Auto merge of #2753 - RalfJung:rustup, r=RalfJung
Rustup Pulls in https://github.com/rust-lang/rust/pull/104658
Diffstat (limited to 'compiler/rustc_codegen_gcc')
| -rw-r--r-- | compiler/rustc_codegen_gcc/src/builder.rs | 2 | ||||
| -rw-r--r-- | compiler/rustc_codegen_gcc/src/context.rs | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/compiler/rustc_codegen_gcc/src/builder.rs b/compiler/rustc_codegen_gcc/src/builder.rs index effb2de4827..a92242b2615 100644 --- a/compiler/rustc_codegen_gcc/src/builder.rs +++ b/compiler/rustc_codegen_gcc/src/builder.rs @@ -1244,7 +1244,7 @@ impl<'a, 'gcc, 'tcx> BuilderMethods<'a, 'tcx> for Builder<'a, 'gcc, 'tcx> { ) -> RValue<'gcc> { // FIXME(antoyo): remove when having a proper API. let gcc_func = unsafe { std::mem::transmute(func) }; - let call = if self.functions.borrow().values().find(|value| **value == gcc_func).is_some() { + let call = if self.functions.borrow().values().any(|value| *value == gcc_func) { self.function_call(func, args, funclet) } else { diff --git a/compiler/rustc_codegen_gcc/src/context.rs b/compiler/rustc_codegen_gcc/src/context.rs index 837708aeb0e..4424b31c054 100644 --- a/compiler/rustc_codegen_gcc/src/context.rs +++ b/compiler/rustc_codegen_gcc/src/context.rs @@ -253,7 +253,7 @@ impl<'gcc, 'tcx> CodegenCx<'gcc, 'tcx> { pub fn rvalue_as_function(&self, value: RValue<'gcc>) -> Function<'gcc> { let function: Function<'gcc> = unsafe { std::mem::transmute(value) }; - debug_assert!(self.functions.borrow().values().find(|value| **value == function).is_some(), + debug_assert!(self.functions.borrow().values().any(|value| *value == function), "{:?} ({:?}) is not a function", value, value.get_type()); function } |
