Skip to content

Commit

Permalink
chore: Add rust syntax to an example
Browse files Browse the repository at this point in the history
  • Loading branch information
tesuji committed Oct 22, 2019
1 parent 41626dd commit 5606f18
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/items/generics.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,10 +92,11 @@ attributes may give meaning to it.
This example shows using a custom derive attribute to modify the meaning of a
generic parameter.

```ignore
```rust,ignore
// Assume that the derive for MyFlexibleClone declared `my_flexible_clone` as
// an attribute it understands.
#[derive(MyFlexibleClone)] struct Foo<#[my_flexible_clone(unbounded)] H> {
#[derive(MyFlexibleClone)]
struct Foo<#[my_flexible_clone(unbounded)] H> {
a: *const H
}
```
Expand Down

0 comments on commit 5606f18

Please sign in to comment.