]> git.lizzy.rs Git - rust.git/blob - tests/ui/traits/copy-is-not-modulo-regions.not_static.stderr
Rollup merge of #106144 - tgross35:patch-1, r=Mark-Simulacrum
[rust.git] / tests / ui / traits / copy-is-not-modulo-regions.not_static.stderr
1 error[E0204]: the trait `Copy` may not be implemented for this type
2   --> $DIR/copy-is-not-modulo-regions.rs:13:21
3    |
4 LL | struct Bar<'lt>(Foo<'lt>);
5    |                 -------- this field does not implement `Copy`
6 ...
7 LL | impl<'any> Copy for Bar<'any> {}
8    |                     ^^^^^^^^^
9    |
10 note: the `Copy` impl for `Foo<'any>` requires that `'any: 'static`
11   --> $DIR/copy-is-not-modulo-regions.rs:10:17
12    |
13 LL | struct Bar<'lt>(Foo<'lt>);
14    |                 ^^^^^^^^
15 help: consider restricting type parameter `'any`
16    |
17 LL | impl<'any: 'static> Copy for Bar<'any> {}
18    |          +++++++++
19
20 error: aborting due to previous error
21
22 For more information about this error, try `rustc --explain E0204`.