Rollup merge of #26976 - tshepang:more-simple-explanation, r=gankro
That sentence make me read it a few times before properly understanding it
This commit is contained in:
commit
afe16ae7ff
1 changed files with 1 additions and 2 deletions
|
|
@ -791,8 +791,7 @@ trait Foo {
|
|||
fn bar(&self);
|
||||
}
|
||||
|
||||
// we now declare a function which takes an object with Foo trait implemented
|
||||
// as parameter
|
||||
// we now declare a function which takes an object implementing the Foo trait
|
||||
fn some_func<T: Foo>(foo: T) {
|
||||
foo.bar();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue