We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c223852 commit 47860ddCopy full SHA for 47860dd
compiler/rustc_middle/src/ty/context.rs
@@ -2443,6 +2443,14 @@ impl<'tcx> TyCtxt<'tcx> {
2443
pub fn lower_impl_trait_in_trait_to_assoc_ty(self) -> bool {
2444
self.sess.opts.unstable_opts.lower_impl_trait_in_trait_to_assoc_ty
2445
}
2446
+
2447
+ pub fn is_impl_trait_in_trait(self, def_id: DefId) -> bool {
2448
+ if self.lower_impl_trait_in_trait_to_assoc_ty() {
2449
+ self.def_kind(def_id) == DefKind::AssocTy && self.opt_rpitit_info(def_id).is_some()
2450
+ } else {
2451
+ self.def_kind(def_id) == DefKind::ImplTraitPlaceholder
2452
+ }
2453
2454
2455
2456
impl<'tcx> TyCtxtAt<'tcx> {
0 commit comments