diff options
| author | Ralf Jung <post@ralfj.de> | 2023-01-09 13:49:07 +0100 |
|---|---|---|
| committer | Ralf Jung <post@ralfj.de> | 2023-01-09 13:49:07 +0100 |
| commit | 236ae262bc80dabf67669a2763fda5034982b9b9 (patch) | |
| tree | 5fcef00e3290dcedd98e39e2b73c978cde47413c /compiler/rustc_codegen_gcc | |
| parent | 8740443c354ee1510a16017fae2104fcc39933cb (diff) | |
| parent | c54c8cbac882e149e04a9e1f2d146fd548ae30ae (diff) | |
| download | rust-236ae262bc80dabf67669a2763fda5034982b9b9.tar.gz rust-236ae262bc80dabf67669a2763fda5034982b9b9.zip | |
Merge from rustc
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 } |
