Skip to content

Commit 055f7e2

Browse files
committed
Extend comment
1 parent 2d438d6 commit 055f7e2

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/librustc_typeck/check/method/suggest.rs

+5-1
Original file line numberDiff line numberDiff line change
@@ -747,7 +747,11 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
747747
if let Node::GenericParam(ref param) = hir.get(id) {
748748
match param.kind {
749749
hir::GenericParamKind::Type { synthetic: Some(_), .. } => {
750-
impl_trait = true; // #63706
750+
// We've found `fn foo(x: impl Trait)` instead of
751+
// `fn foo<T>(x: T)`. We want to suggest the correct
752+
// `fn foo(x: impl Trait + TraitBound)` instead of
753+
// `fn foo<T: TraitBound>(x: T)`. (#63706)
754+
impl_trait = true;
751755
has_bounds = param.bounds.len() > 1;
752756
}
753757
_ => {

0 commit comments

Comments
 (0)