about summary refs log tree commit diff
path: root/tests/ui/traits/alias/generic-default-in-dyn.stderr
blob: 1ab9e6d5c5ca09f209c77dc8ba8149f7b57ef3ea (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
error[E0658]: trait aliases are experimental
  --> $DIR/generic-default-in-dyn.rs:1:1
   |
LL | trait SendEqAlias<T> = PartialEq;
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = note: see issue #41517 <https://github.com/rust-lang/rust/issues/41517> for more information
   = help: add `#![feature(trait_alias)]` to the crate attributes to enable
   = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date

error[E0038]: the trait alias `SendEqAlias` is not dyn compatible
  --> $DIR/generic-default-in-dyn.rs:4:19
   |
LL | struct Foo<T>(dyn SendEqAlias<T>);
   |                   ^^^^^^^^^^^^^^ `SendEqAlias` is not dyn compatible
   |
note: for a trait to be dyn compatible it needs to allow building a vtable
      for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
  --> $DIR/generic-default-in-dyn.rs:1:24
   |
LL | trait SendEqAlias<T> = PartialEq;
   |       -----------      ^^^^^^^^^ ...because it uses `Self` as a type parameter
   |       |
   |       this trait is not dyn compatible...

error[E0038]: the trait alias `SendEqAlias` is not dyn compatible
  --> $DIR/generic-default-in-dyn.rs:7:19
   |
LL | struct Bar<T>(dyn SendEqAlias<T>, T);
   |                   ^^^^^^^^^^^^^^ `SendEqAlias` is not dyn compatible
   |
note: for a trait to be dyn compatible it needs to allow building a vtable
      for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
  --> $DIR/generic-default-in-dyn.rs:1:24
   |
LL | trait SendEqAlias<T> = PartialEq;
   |       -----------      ^^^^^^^^^ ...because it uses `Self` as a type parameter
   |       |
   |       this trait is not dyn compatible...

error: aborting due to 3 previous errors

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