about summary refs log tree commit diff
path: root/compiler/rustc_trait_selection
diff options
context:
space:
mode:
authorOli Scherer <git-spam-no-reply9815368754983@oli-obk.de>2024-02-08 09:30:42 +0000
committerOli Scherer <git-spam-no-reply9815368754983@oli-obk.de>2024-02-08 09:30:42 +0000
commitaa6f45eb79113e2ecd81646f33d113e7727a27e6 (patch)
tree6176b3163f8b2f55cc516a23fb911956b22e5481 /compiler/rustc_trait_selection
parent870a01a30e45d73b8e922a91850919e03f772636 (diff)
downloadrust-aa6f45eb79113e2ecd81646f33d113e7727a27e6.tar.gz
rust-aa6f45eb79113e2ecd81646f33d113e7727a27e6.zip
Use `ensure` when the result of the query is not needed beyond its `Result`ness
Diffstat (limited to 'compiler/rustc_trait_selection')
-rw-r--r--compiler/rustc_trait_selection/src/traits/specialize/mod.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_trait_selection/src/traits/specialize/mod.rs b/compiler/rustc_trait_selection/src/traits/specialize/mod.rs
index de08e7d2f03..8e0fa79c977 100644
--- a/compiler/rustc_trait_selection/src/traits/specialize/mod.rs
+++ b/compiler/rustc_trait_selection/src/traits/specialize/mod.rs
@@ -446,7 +446,7 @@ fn report_conflicting_impls<'tcx>(
     match used_to_be_allowed {
         None => {
             let reported = if overlap.with_impl.is_local()
-                || tcx.orphan_check_impl(impl_def_id).is_ok()
+                || tcx.ensure().orphan_check_impl(impl_def_id).is_ok()
             {
                 let mut err = tcx.dcx().struct_span_err(impl_span, msg);
                 err.code(E0119);