1 error[E0276]: impl has stricter requirements than trait
2 --> $DIR/impl_bounds.rs:14:39
4 LL | type A<'a> where Self: 'a;
5 | ---------- definition of `A` from trait
7 LL | type A<'a> = (&'a ()) where Self: 'static;
8 | ^^^^^^^ impl has extra requirement `T: 'static`
10 error[E0276]: impl has stricter requirements than trait
11 --> $DIR/impl_bounds.rs:16:48
13 LL | type B<'a, 'b> where 'a: 'b;
14 | -------------- definition of `B` from trait
16 LL | type B<'a, 'b> = (&'a(), &'b ()) where 'b: 'a;
17 | ^^ impl has extra requirement `'b: 'a`
19 error[E0478]: lifetime bound not satisfied
20 --> $DIR/impl_bounds.rs:16:22
22 LL | type B<'a, 'b> where 'a: 'b;
23 | -------------- definition of `B` from trait
25 LL | type B<'a, 'b> = (&'a(), &'b ()) where 'b: 'a;
26 | ^^^^^^^^^^^^^^^ - help: try copying this clause from the trait: `, 'a: 'b`
28 note: lifetime parameter instantiated with the lifetime `'a` as defined here
29 --> $DIR/impl_bounds.rs:16:12
31 LL | type B<'a, 'b> = (&'a(), &'b ()) where 'b: 'a;
33 note: but lifetime parameter must outlive the lifetime `'b` as defined here
34 --> $DIR/impl_bounds.rs:16:16
36 LL | type B<'a, 'b> = (&'a(), &'b ()) where 'b: 'a;
39 error[E0277]: the trait bound `T: Copy` is not satisfied
40 --> $DIR/impl_bounds.rs:19:33
42 LL | type C = String where Self: Copy;
43 | ^^^^ the trait `Copy` is not implemented for `T`
45 note: required for `Fooy<T>` to implement `Copy`
46 --> $DIR/impl_bounds.rs:10:10
48 LL | #[derive(Copy, Clone)]
50 note: the requirement `Fooy<T>: Copy` appears on the `impl`'s associated type `C` but not on the corresponding trait's associated type
51 --> $DIR/impl_bounds.rs:6:10
56 LL | type C where Self: Clone;
57 | ^ this trait's associated type doesn't have the requirement `Fooy<T>: Copy`
58 = note: this error originates in the derive macro `Copy` (in Nightly builds, run with -Z macro-backtrace for more info)
59 help: consider restricting type parameter `T`
61 LL | impl<T: std::marker::Copy> Foo for Fooy<T> {
64 error[E0277]: the trait bound `T: Copy` is not satisfied
65 --> $DIR/impl_bounds.rs:21:24
67 LL | fn d() where Self: Copy {}
68 | ^^^^ the trait `Copy` is not implemented for `T`
70 note: required for `Fooy<T>` to implement `Copy`
71 --> $DIR/impl_bounds.rs:10:10
73 LL | #[derive(Copy, Clone)]
75 note: the requirement `Fooy<T>: Copy` appears on the `impl`'s method `d` but not on the corresponding trait's method
76 --> $DIR/impl_bounds.rs:7:8
81 LL | fn d() where Self: Clone;
82 | ^ this trait's method doesn't have the requirement `Fooy<T>: Copy`
83 = note: this error originates in the derive macro `Copy` (in Nightly builds, run with -Z macro-backtrace for more info)
84 help: consider restricting type parameter `T`
86 LL | impl<T: std::marker::Copy> Foo for Fooy<T> {
89 error: aborting due to 5 previous errors
91 Some errors have detailed explanations: E0276, E0277, E0478.
92 For more information about an error, try `rustc --explain E0276`.