diff --git a/src/generics/generic-data.md b/src/generics/generic-data.md index a4bd82bafb0c..4ff6ee401b64 100644 --- a/src/generics/generic-data.md +++ b/src/generics/generic-data.md @@ -22,7 +22,7 @@ impl Logger for StderrLogger { } /// Only log messages up to the given verbosity level. -struct VerbosityFilter { +struct VerbosityFilter { max_verbosity: u8, inner: L, } @@ -53,5 +53,8 @@ fn main() { - `VerbosityFilter` is still generic and you can use `VerbosityFilter`, but methods in this block will only be available for `Point`. +- Note that we don't put a trait bound on the `VerbosityFilter` type itself. You + can put bounds there as well, but generally in Rust we only put the trait + bounds on the impl blocks.