diff --git a/src/trait/impl_trait.md b/src/trait/impl_trait.md index e738be4a35..34bc06bfd0 100644 --- a/src/trait/impl_trait.md +++ b/src/trait/impl_trait.md @@ -28,7 +28,7 @@ fn parse_csv_document(src: R) -> std::io::Result` or `[u8]`, -but it's not important what type `R` is, and `R` is only used to declare the type of `src`, so the function can also be written an +but it's not important what type `R` is, and `R` is only used to declare the type of `src`, so the function can also be written as: ```rust,editable fn parse_csv_document(src: impl std::io::BufRead) -> std::io::Result>> { @@ -46,7 +46,7 @@ fn parse_csv_document(src: impl std::io::BufRead) -> std::io::Result(std::io::empty())` will not work with the second example +Note that using `impl Trait` as an argument type means that you cannot explicitly state what form of the function you use, i.e. `parse_csv_document::(std::io::empty())` will not work with the second example. ## As a return type