Skip to content

Commit c8179f6

Browse files
authored
Remove outdated info about impl Trait and generics in the same function
1 parent 5181795 commit c8179f6

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

src/types/impl-trait.md

+1-4
Original file line numberDiff line numberDiff line change
@@ -48,10 +48,7 @@ That is, `impl Trait` in argument position is syntactic sugar for a generic type
4848
> **Note:**
4949
> For function parameters, generic type parameters and `impl Trait` are not exactly equivalent.
5050
> With a generic parameter such as `<T: Trait>`, the caller has the option to explicitly specify the generic argument for `T` at the call site using [_GenericArgs_], for example, `foo::<usize>(1)`.
51-
> If `impl Trait` is the type of *any* function parameter, then the caller can't ever provide any generic arguments when calling that function.
52-
This includes generic arguments for the return type or any const generics.
53-
>
54-
> Therefore, changing the function signature from either one to the other can constitute a breaking change for the callers of a function.
51+
> Changing a parameter from either one to the other can constitute a breaking change for the callers of a function, since this changes the number of generic arguments.
5552
5653
## Abstract return types
5754

0 commit comments

Comments
 (0)