@@ -11,6 +11,32 @@ LL | impl<'a, A: Clone> Arbitrary for ::std::borrow::Cow<'a, A> {}
11
11
| ^^
12
12
= note: but lifetime parameter must outlive the static lifetime
13
13
14
- error: aborting due to 1 previous error
14
+ error[E0495]: cannot infer an appropriate lifetime for lifetime parameter `'a` due to conflicting requirements
15
+ --> $DIR/static-lifetime.rs:3:34
16
+ |
17
+ LL | impl<'a, A: Clone> Arbitrary for ::std::borrow::Cow<'a, A> {}
18
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^
19
+ |
20
+ note: first, the lifetime cannot outlive the lifetime `'a` as defined here...
21
+ --> $DIR/static-lifetime.rs:3:6
22
+ |
23
+ LL | impl<'a, A: Clone> Arbitrary for ::std::borrow::Cow<'a, A> {}
24
+ | ^^
25
+ note: ...so that the types are compatible
26
+ --> $DIR/static-lifetime.rs:3:34
27
+ |
28
+ LL | impl<'a, A: Clone> Arbitrary for ::std::borrow::Cow<'a, A> {}
29
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^
30
+ = note: expected `<Cow<'a, A> as Arbitrary>`
31
+ found `<Cow<'_, A> as Arbitrary>`
32
+ = note: but, the lifetime must be valid for the static lifetime...
33
+ note: ...so that the declared lifetime parameter bounds are satisfied
34
+ --> $DIR/static-lifetime.rs:3:34
35
+ |
36
+ LL | impl<'a, A: Clone> Arbitrary for ::std::borrow::Cow<'a, A> {}
37
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^
38
+
39
+ error: aborting due to 2 previous errors
15
40
16
- For more information about this error, try `rustc --explain E0478`.
41
+ Some errors have detailed explanations: E0478, E0495.
42
+ For more information about an error, try `rustc --explain E0478`.
0 commit comments