Skip to content

Commit

Permalink
Fix incorrect method call in subtrait-dispatch explanation
Browse files Browse the repository at this point in the history
  • Loading branch information
dtolnay committed Dec 1, 2018
1 parent cbeec91 commit f59fa1c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion docs/questions.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion questions/027-subtrait-dispatch.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ Let's consider what happens in each of the two methods called from `main`.
because `x` is of type `dyn Base` and there is no implementation of
`Derived` for `dyn Base`.

- `static_dispatch(&BothTraits)`
- `static_dispatch(BothTraits)`

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

0 comments on commit f59fa1c

Please sign in to comment.