about summary refs log tree commit diff
diff options
context:
space:
mode:
authorEsteban Küber <esteban@kuber.com.ar>2019-08-23 13:45:18 -0700
committerEsteban Küber <esteban@kuber.com.ar>2019-08-23 13:45:18 -0700
commit055f7e2ec23f36e522e318a64eab414caba55e7e (patch)
tree5901ab20af5bf895eb95297a43b867a453f3613b
parent2d438d6993017ae2b991cd92ea243112e2357c02 (diff)
downloadrust-055f7e2ec23f36e522e318a64eab414caba55e7e.tar.gz
rust-055f7e2ec23f36e522e318a64eab414caba55e7e.zip
Extend comment
-rw-r--r--src/librustc_typeck/check/method/suggest.rs6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/librustc_typeck/check/method/suggest.rs b/src/librustc_typeck/check/method/suggest.rs
index 9f4fed23697..440e7e5d0e3 100644
--- a/src/librustc_typeck/check/method/suggest.rs
+++ b/src/librustc_typeck/check/method/suggest.rs
@@ -747,7 +747,11 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
                         if let Node::GenericParam(ref param) = hir.get(id) {
                             match param.kind {
                                 hir::GenericParamKind::Type { synthetic: Some(_), .. } => {
-                                    impl_trait = true;  // #63706
+                                    // We've found `fn foo(x: impl Trait)` instead of
+                                    // `fn foo<T>(x: T)`. We want to suggest the correct
+                                    // `fn foo(x: impl Trait + TraitBound)` instead of
+                                    // `fn foo<T: TraitBound>(x: T)`. (#63706)
+                                    impl_trait = true;
                                     has_bounds = param.bounds.len() > 1;
                                 }
                                 _ => {