about summary refs log tree commit diff
path: root/compiler/rustc_middle
diff options
context:
space:
mode:
authorMatthias Krüger <matthias.krueger@famsik.de>2023-07-14 19:33:29 +0200
committerGitHub <noreply@github.com>2023-07-14 19:33:29 +0200
commit0baf4406da23e1a0123bfeae97586f7b6894de74 (patch)
tree9a2d07d9739e32530a0e8647d1ea40bf7991e97b /compiler/rustc_middle
parent9a6eac3001a6afc901553c817d9ac7947a2b696c (diff)
parent14672eba8bec4eeec03d24d5985a4c8c172a01da (diff)
downloadrust-0baf4406da23e1a0123bfeae97586f7b6894de74.tar.gz
rust-0baf4406da23e1a0123bfeae97586f7b6894de74.zip
Rollup merge of #113698 - compiler-errors:rpitit-check, r=spastorino
Make it clearer that we're just checking for an RPITIT

Tiny nit to use `is_impl_trait_in_trait` more, to make it clearer that we're just checking whether a def-id is an RPITIT, rather than doing something meaningful with the `opt_rpitit_info`.

r? `@spastorino`
Diffstat (limited to 'compiler/rustc_middle')
-rw-r--r--compiler/rustc_middle/src/ty/assoc.rs4
1 files changed, 4 insertions, 0 deletions
diff --git a/compiler/rustc_middle/src/ty/assoc.rs b/compiler/rustc_middle/src/ty/assoc.rs
index 4e746a49d84..f77a8c6712e 100644
--- a/compiler/rustc_middle/src/ty/assoc.rs
+++ b/compiler/rustc_middle/src/ty/assoc.rs
@@ -96,6 +96,10 @@ impl AssocItem {
             }
         }
     }
+
+    pub fn is_impl_trait_in_trait(&self) -> bool {
+        self.opt_rpitit_info.is_some()
+    }
 }
 
 #[derive(Copy, Clone, PartialEq, Debug, HashStable, Eq, Hash, Encodable, Decodable)]