about summary refs log tree commit diff
path: root/compiler/rustc_trait_selection/src/traits
diff options
context:
space:
mode:
authorMichael Goulet <michael@errs.io>2022-09-02 16:55:24 +0000
committerMichael Goulet <michael@errs.io>2022-09-09 01:31:45 +0000
commit70775304cd83bf01bf91d5cf206923064fca68ef (patch)
tree92b44a10d78c7770433e8cabeb36f6e90190d5c0 /compiler/rustc_trait_selection/src/traits
parent249ede4195a40147c45411f1fa27e376d40f4f95 (diff)
downloadrust-70775304cd83bf01bf91d5cf206923064fca68ef.tar.gz
rust-70775304cd83bf01bf91d5cf206923064fca68ef.zip
Address nits
Diffstat (limited to 'compiler/rustc_trait_selection/src/traits')
-rw-r--r--compiler/rustc_trait_selection/src/traits/project.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/compiler/rustc_trait_selection/src/traits/project.rs b/compiler/rustc_trait_selection/src/traits/project.rs
index 6ccb91c8cab..6c9efea8ca8 100644
--- a/compiler/rustc_trait_selection/src/traits/project.rs
+++ b/compiler/rustc_trait_selection/src/traits/project.rs
@@ -1308,9 +1308,9 @@ fn project<'cx, 'tcx>(
     }
 }
 
-/// The first thing we have to do is scan through the parameter
-/// environment to see whether there are any projection predicates
-/// there that can answer this question.
+/// If the predicate's item is an `ImplTraitPlaceholder`, we do a select on the
+/// corresponding trait ref. If this yields an `impl`, then we're able to project
+/// to a concrete type, since we have an `impl`'s method  to provide the RPITIT.
 fn assemble_candidate_for_impl_trait_in_trait<'cx, 'tcx>(
     selcx: &mut SelectionContext<'cx, 'tcx>,
     obligation: &ProjectionTyObligation<'tcx>,