about summary refs log tree commit diff
path: root/tests/ui/suggestions/tuple-struct-where-clause-suggestion-91520.stderr
blob: 577b090ce1b4f6ede9c73b0c3804a4bd2d455c84 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
error[E0277]: the trait bound `Inner<T>: Clone` is not satisfied
  --> $DIR/tuple-struct-where-clause-suggestion-91520.rs:15:17
   |
LL | #[derive(Clone)]
   |          ----- in this derive macro expansion
LL | struct Outer<T>(Inner<T>);
   |                 ^^^^^^^^ the trait `Clone` is not implemented for `Inner<T>`
   |
help: consider annotating `Inner<T>` with `#[derive(Clone)]`
   |
LL + #[derive(Clone)]
LL | struct Inner<T>(T);
   |
help: consider introducing a `where` clause, but there might be an alternative better way to express this requirement
   |
LL | struct Outer<T>(Inner<T>) where Inner<T>: Clone;
   |                           +++++++++++++++++++++

error: aborting due to 1 previous error

For more information about this error, try `rustc --explain E0277`.