Skip to content

Commit

Permalink
Extend comment
Browse files Browse the repository at this point in the history
  • Loading branch information
estebank committed Aug 23, 2019
1 parent 2d438d6 commit 055f7e2
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/librustc_typeck/check/method/suggest.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
_ => {
Expand Down

0 comments on commit 055f7e2

Please sign in to comment.