summaryrefslogtreecommitdiff
path: root/tests/ui/suggestions/issue-116434-2021.stderr
blob: a10d6ef6da4d99385832fe217e6e478ea5f6e01c (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
error[E0038]: the trait `Clone` cannot be made into an object
  --> $DIR/issue-116434-2021.rs:5:17
   |
LL |     fn foo() -> Clone;
   |                 ^^^^^ `Clone` cannot be made into an object
   |
   = note: the trait cannot be made into an object because it requires `Self: Sized`
   = note: for a trait to be "object safe" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
help: there is an associated type with the same name
   |
LL |     fn foo() -> Self::Clone;
   |                 ++++++

error[E0038]: the trait `DbHandle` cannot be made into an object
  --> $DIR/issue-116434-2021.rs:14:20
   |
LL |     fn handle() -> DbHandle;
   |                    ^^^^^^^^ `DbHandle` cannot be made into an object
   |
note: for a trait to be "object safe" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
  --> $DIR/issue-116434-2021.rs:10:17
   |
LL | trait DbHandle: Sized {}
   |       --------  ^^^^^ ...because it requires `Self: Sized`
   |       |
   |       this trait cannot be made into an object...
help: there is an associated type with the same name
   |
LL |     fn handle() -> Self::DbHandle;
   |                    ++++++

error: aborting due to 2 previous errors

For more information about this error, try `rustc --explain E0038`.