diff options
| author | bors <bors@rust-lang.org> | 2023-05-25 00:33:43 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2023-05-25 00:33:43 +0000 |
| commit | 7664dfe4331265d0b2b1ffb89c92d443886bec0b (patch) | |
| tree | 09c5b7ca62f2202c566ff9a70760ce4284646506 /compiler/rustc_codegen_llvm/src | |
| parent | 096309e6dc4378e175e524e963332d1a3830ed63 (diff) | |
| parent | 8038606bf32df8595811176e7299ef88133f9c92 (diff) | |
| download | rust-7664dfe4331265d0b2b1ffb89c92d443886bec0b.tar.gz rust-7664dfe4331265d0b2b1ffb89c92d443886bec0b.zip | |
Auto merge of #111925 - Manishearth:rollup-z6z6l2v, r=Manishearth
Rollup of 5 pull requests Successful merges: - #111741 (Use `ObligationCtxt` in custom type ops) - #111840 (Expose more information in `get_body_with_borrowck_facts`) - #111876 (Roll compiler_builtins to 0.1.92) - #111912 (Use `Option::is_some_and` and `Result::is_ok_and` in the compiler ) - #111915 (libtest: Improve error when missing `-Zunstable-options`) r? `@ghost` `@rustbot` modify labels: rollup
Diffstat (limited to 'compiler/rustc_codegen_llvm/src')
| -rw-r--r-- | compiler/rustc_codegen_llvm/src/coverageinfo/mapgen.rs | 2 | ||||
| -rw-r--r-- | compiler/rustc_codegen_llvm/src/mono_item.rs | 3 |
2 files changed, 2 insertions, 3 deletions
diff --git a/compiler/rustc_codegen_llvm/src/coverageinfo/mapgen.rs b/compiler/rustc_codegen_llvm/src/coverageinfo/mapgen.rs index 240a9d2f371..21a1ac34844 100644 --- a/compiler/rustc_codegen_llvm/src/coverageinfo/mapgen.rs +++ b/compiler/rustc_codegen_llvm/src/coverageinfo/mapgen.rs @@ -163,7 +163,7 @@ impl CoverageMapGenerator { counter_regions.sort_unstable_by_key(|(_counter, region)| *region); for (counter, region) in counter_regions { let CodeRegion { file_name, start_line, start_col, end_line, end_col } = *region; - let same_file = current_file_name.map_or(false, |p| p == file_name); + let same_file = current_file_name.is_some_and(|p| p == file_name); if !same_file { if current_file_name.is_some() { current_file_id += 1; diff --git a/compiler/rustc_codegen_llvm/src/mono_item.rs b/compiler/rustc_codegen_llvm/src/mono_item.rs index e8f8c321510..c24854b27a0 100644 --- a/compiler/rustc_codegen_llvm/src/mono_item.rs +++ b/compiler/rustc_codegen_llvm/src/mono_item.rs @@ -125,8 +125,7 @@ impl CodegenCx<'_, '_> { // Thread-local variables generally don't support copy relocations. let is_thread_local_var = llvm::LLVMIsAGlobalVariable(llval) - .map(|v| llvm::LLVMIsThreadLocal(v) == llvm::True) - .unwrap_or(false); + .is_some_and(|v| llvm::LLVMIsThreadLocal(v) == llvm::True); if is_thread_local_var { return false; } |
