fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #103046 - JanBeh:PR_clarify_cmp_terminology, r=workingjubilee3bcad65fbf6

master
1.3 KiB31 linesraw
1error[E0119]: conflicting implementations of trait `CoerceUnsized<&Wrapper<_>>` for type `&Wrapper<_>`
2  --> $DIR/E0476.rs:9:1
3   |
4LL | impl<'a, 'b, T, S> CoerceUnsized<&'a Wrapper<T>> for &'b Wrapper<S> where S: Unsize<T> {}
5   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
6   |
7   = note: conflicting implementation in crate `core`:
8           - impl<'a, 'b, T, U> CoerceUnsized<&'a U> for &'b T
9             where 'b: 'a, T: Unsize<U>, T: ?Sized, U: ?Sized;
10
11error[E0476]: lifetime of the source pointer does not outlive lifetime bound of the object type
12  --> $DIR/E0476.rs:9:1
13   |
14LL | impl<'a, 'b, T, S> CoerceUnsized<&'a Wrapper<T>> for &'b Wrapper<S> where S: Unsize<T> {}
15   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
16   |
17note: object type is valid for the lifetime `'a` as defined here
18  --> $DIR/E0476.rs:9:6
19   |
20LL | impl<'a, 'b, T, S> CoerceUnsized<&'a Wrapper<T>> for &'b Wrapper<S> where S: Unsize<T> {}
21   |      ^^
22note: source pointer is only valid for the lifetime `'b` as defined here
23  --> $DIR/E0476.rs:9:10
24   |
25LL | impl<'a, 'b, T, S> CoerceUnsized<&'a Wrapper<T>> for &'b Wrapper<S> where S: Unsize<T> {}
26   |          ^^
27
28error: aborting due to 2 previous errors
29
30Some errors have detailed explanations: E0119, E0476.
31For more information about an error, try `rustc --explain E0119`.