about summary refs log tree commit diff
path: root/tests/ui/associated-types/projection-dyn-associated-type.stderr
blob: 1ac2beb0414e20aef9997911c739742ccac97d47 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
error: expected identifier, found `}`
  --> $DIR/projection-dyn-associated-type.rs:26:1
   |
LL | }
   | ^ expected identifier

warning: trait objects without an explicit `dyn` are deprecated
  --> $DIR/projection-dyn-associated-type.rs:13:28
   |
LL | impl<T: ?Sized> Mirror for A {
   |                            ^
   |
   = warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021!
   = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2021/warnings-promoted-to-error.html>
   = note: `#[warn(bare_trait_objects)]` (part of `#[warn(rust_2021_compatibility)]`) on by default
help: if this is a dyn-compatible trait, use `dyn`
   |
LL | impl<T: ?Sized> Mirror for dyn A {
   |                            +++
help: alternatively use a blanket implementation to implement `Mirror` for all types that also implement `A`
   |
LL - impl<T: ?Sized> Mirror for A {
LL + impl<T: ?Sized, U: A> Mirror for U {
   |

error[E0207]: the type parameter `T` is not constrained by the impl trait, self type, or predicates
  --> $DIR/projection-dyn-associated-type.rs:13:6
   |
LL | impl<T: ?Sized> Mirror for A {
   |      ^ unconstrained type parameter

error[E0277]: the trait bound `(dyn B + 'static): Mirror` is not satisfied
  --> $DIR/projection-dyn-associated-type.rs:22:6
   |
LL | ) -> &'a <dyn B + 'static as Mirror>::Assoc {
   |      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Mirror` is not implemented for `(dyn B + 'static)`
   |
   = help: the trait `Mirror` is implemented for `dyn A`

error[E0277]: the trait bound `(dyn B + 'static): Mirror` is not satisfied
  --> $DIR/projection-dyn-associated-type.rs:22:6
   |
LL | ) -> &'a <dyn B + 'static as Mirror>::Assoc {
   |      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Mirror` is not implemented for `(dyn B + 'static)`
   |
   = help: the trait `Mirror` is implemented for `dyn A`
   = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`

error: aborting due to 4 previous errors; 1 warning emitted

Some errors have detailed explanations: E0207, E0277.
For more information about an error, try `rustc --explain E0207`.