File: custom_error_generic_missing_bound.stderr

package info (click to toggle)
rust-derive-builder 0.20.1-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 500 kB
  • sloc: makefile: 2
file content (15 lines) | stat: -rw-r--r-- 709 bytes parent folder | download | duplicates (15)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
error[E0277]: the trait bound `N: Popular` is not satisfied
  --> tests/compile-fail/custom_error_generic_missing_bound.rs:17:31
   |
17 | #[builder(build_fn(validate = "check_person", error = "Error<N>"))]
   |                               ^^^^^^^^^^^^^^ the trait `Popular` is not implemented for `N`
   |
note: required by a bound in `check_person`
  --> tests/compile-fail/custom_error_generic_missing_bound.rs:34:20
   |
34 | fn check_person<N: Popular + Clone>(builder: &PersonBuilder<N>) -> Result<(), Error<N>> {
   |                    ^^^^^^^ required by this bound in `check_person`
help: consider restricting type parameter `N`
   |
18 | struct Person<N: Popular> {
   |                +++++++++