diff options
| author | Esteban Küber <esteban@kuber.com.ar> | 2019-08-23 13:45:18 -0700 |
|---|---|---|
| committer | Esteban Küber <esteban@kuber.com.ar> | 2019-08-23 13:45:18 -0700 |
| commit | 055f7e2ec23f36e522e318a64eab414caba55e7e (patch) | |
| tree | 5901ab20af5bf895eb95297a43b867a453f3613b | |
| parent | 2d438d6993017ae2b991cd92ea243112e2357c02 (diff) | |
| download | rust-055f7e2ec23f36e522e318a64eab414caba55e7e.tar.gz rust-055f7e2ec23f36e522e318a64eab414caba55e7e.zip | |
Extend comment
| -rw-r--r-- | src/librustc_typeck/check/method/suggest.rs | 6 |
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; } _ => { |
