]> git.lizzy.rs Git - rust.git/blobdiff - compiler/rustc_typeck/src/constrained_generic_params.rs
Auto merge of #97081 - oli-obk:outlives_query_fast_path, r=jackh726
[rust.git] / compiler / rustc_typeck / src / constrained_generic_params.rs
index 909c99adab5d2d91f6162e86d206896e145f8e3b..7f2e57e61098f1c306c78851b916582efc47253f 100644 (file)
@@ -59,7 +59,7 @@ struct ParameterCollector {
 impl<'tcx> TypeVisitor<'tcx> for ParameterCollector {
     fn visit_ty(&mut self, t: Ty<'tcx>) -> ControlFlow<Self::BreakTy> {
         match *t.kind() {
-            ty::Projection(..) | ty::Opaque(..) if !self.include_nonconstraining => {
+            ty::Projection(..) if !self.include_nonconstraining => {
                 // projections are not injective
                 return ControlFlow::CONTINUE;
             }
@@ -109,9 +109,9 @@ pub fn identify_constrained_generic_params<'tcx>(
 /// constrained before it is used, if that is possible, and add the
 /// parameters so constrained to `input_parameters`. For example,
 /// imagine the following impl:
-///
-///     impl<T: Debug, U: Iterator<Item = T>> Trait for U
-///
+/// ```ignore (illustrative)
+/// impl<T: Debug, U: Iterator<Item = T>> Trait for U
+/// ```
 /// The impl's predicates are collected from left to right. Ignoring
 /// the implicit `Sized` bounds, these are
 ///   * T: Debug