1 error[E0310]: the parameter type `T` may not live long enough
2 --> $DIR/impl_bounds.rs:15:5
4 LL | type A<'a> where Self: 'static = (&'a ());
5 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
7 = help: consider adding an explicit lifetime bound `T: 'static`...
8 = note: ...so that the definition in impl matches the definition from the trait
10 error: `impl` associated type signature for `B` doesn't match `trait` associated type signature
11 --> $DIR/impl_bounds.rs:17:5
13 LL | type B<'a, 'b> where 'a: 'b;
14 | ---------------------------- expected
16 LL | type B<'a, 'b> where 'b: 'a = (&'a(), &'b ());
17 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ found
19 error[E0276]: impl has stricter requirements than trait
20 --> $DIR/impl_bounds.rs:17:5
22 LL | type B<'a, 'b> where 'a: 'b;
23 | ---------------------------- definition of `B` from trait
25 LL | type B<'a, 'b> where 'b: 'a = (&'a(), &'b ());
26 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ impl has extra requirement `'b: 'a`
28 error[E0478]: lifetime bound not satisfied
29 --> $DIR/impl_bounds.rs:17:5
31 LL | type B<'a, 'b> where 'b: 'a = (&'a(), &'b ());
32 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
34 note: lifetime parameter instantiated with the lifetime `'a` as defined on the associated item at 17:12
35 --> $DIR/impl_bounds.rs:17:12
37 LL | type B<'a, 'b> where 'b: 'a = (&'a(), &'b ());
39 note: but lifetime parameter must outlive the lifetime `'b` as defined on the associated item at 17:16
40 --> $DIR/impl_bounds.rs:17:16
42 LL | type B<'a, 'b> where 'b: 'a = (&'a(), &'b ());
45 error[E0277]: the trait bound `T: Copy` is not satisfied
46 --> $DIR/impl_bounds.rs:21:5
48 LL | type C where Self: Copy = String;
49 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Copy` is not implemented for `T`
51 note: required because of the requirements on the impl of `Copy` for `Fooy<T>`
52 --> $DIR/impl_bounds.rs:11:10
54 LL | #[derive(Copy, Clone)]
56 note: the requirement `Fooy<T>: Copy` appears on the associated impl type `C` but not on the corresponding associated trait type
57 --> $DIR/impl_bounds.rs:7:5
62 LL | type C where Self: Clone;
63 | ^^^^^^^^^^^^^^^^^^^^^^^^^ this trait associated type doesn't have the requirement `Fooy<T>: Copy`
64 = note: this error originates in the derive macro `Copy` (in Nightly builds, run with -Z macro-backtrace for more info)
65 help: consider restricting type parameter `T`
67 LL | impl<T: std::marker::Copy> Foo for Fooy<T> {
70 error[E0277]: the trait bound `T: Copy` is not satisfied
71 --> $DIR/impl_bounds.rs:23:5
73 LL | fn d() where Self: Copy {}
74 | ^^^^^^^^^^^^^^^^^^^^^^^ the trait `Copy` is not implemented for `T`
76 note: required because of the requirements on the impl of `Copy` for `Fooy<T>`
77 --> $DIR/impl_bounds.rs:11:10
79 LL | #[derive(Copy, Clone)]
81 note: the requirement `Fooy<T>: Copy` appears on the impl method `d` but not on the corresponding trait method
82 --> $DIR/impl_bounds.rs:8:8
87 LL | fn d() where Self: Clone;
88 | ^ this trait method doesn't have the requirement `Fooy<T>: Copy`
89 = note: this error originates in the derive macro `Copy` (in Nightly builds, run with -Z macro-backtrace for more info)
90 help: consider restricting type parameter `T`
92 LL | impl<T: std::marker::Copy> Foo for Fooy<T> {
95 error: aborting due to 6 previous errors
97 Some errors have detailed explanations: E0276, E0277, E0310, E0478.
98 For more information about an error, try `rustc --explain E0276`.