Skip to content

Commit f59fa1c

Browse files
committed
Fix incorrect method call in subtrait-dispatch explanation
1 parent cbeec91 commit f59fa1c

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

docs/questions.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

questions/027-subtrait-dispatch.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ Let's consider what happens in each of the two methods called from `main`.
6767
because `x` is of type `dyn Base` and there is no implementation of
6868
`Derived` for `dyn Base`.
6969

70-
- `static_dispatch(&BothTraits)`
70+
- `static_dispatch(BothTraits)`
7171

7272
At compile time we know that `x.method()` is a call to `<T as
7373
Base>::method`. Type inference within generic functions in Rust happens

0 commit comments

Comments
 (0)