]> git.proxmox.com Git - rustc.git/blob - src/test/ui/generic-associated-types/impl_bounds.stderr
New upstream version 1.48.0~beta.8+dfsg1
[rustc.git] / src / test / ui / generic-associated-types / impl_bounds.stderr
1 error[E0310]: the parameter type `T` may not live long enough
2 --> $DIR/impl_bounds.rs:15:5
3 |
4 LL | type A<'a> where Self: 'static = (&'a ());
5 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
6 |
7 = help: consider adding an explicit lifetime bound `T: 'static`...
8 = note: ...so that the type `Fooy<T>` will meet its required lifetime bounds
9
10 error[E0478]: lifetime bound not satisfied
11 --> $DIR/impl_bounds.rs:17:5
12 |
13 LL | type B<'a, 'b> where 'b: 'a = (&'a(), &'b ());
14 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
15 |
16 note: lifetime parameter instantiated with the lifetime `'b` as defined on the associated item at 17:16
17 --> $DIR/impl_bounds.rs:17:16
18 |
19 LL | type B<'a, 'b> where 'b: 'a = (&'a(), &'b ());
20 | ^^
21 note: but lifetime parameter must outlive the lifetime `'a` as defined on the associated item at 17:12
22 --> $DIR/impl_bounds.rs:17:12
23 |
24 LL | type B<'a, 'b> where 'b: 'a = (&'a(), &'b ());
25 | ^^
26
27 error[E0277]: the trait bound `T: Copy` is not satisfied
28 --> $DIR/impl_bounds.rs:19:5
29 |
30 LL | type C where Self: Copy = String;
31 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Copy` is not implemented for `T`
32 |
33 = note: required because of the requirements on the impl of `Copy` for `Fooy<T>`
34 = note: the requirement `Fooy<T>: Copy` appears on the associated impl type but not on the corresponding associated trait type
35 help: consider restricting type parameter `T`
36 |
37 LL | impl<T: Copy> Foo for Fooy<T> {
38 | ^^^^^^
39
40 error: aborting due to 3 previous errors
41
42 Some errors have detailed explanations: E0277, E0310, E0478.
43 For more information about an error, try `rustc --explain E0277`.