]> git.lizzy.rs Git - rust.git/blob - src/test/ui/impl-trait/object-unsafe-trait-in-return-position-dyn-trait.stderr
ff4bfc30a4a62f3937665fb8ff8c92572813ccb3
[rust.git] / src / test / ui / impl-trait / object-unsafe-trait-in-return-position-dyn-trait.stderr
1 error[E0038]: the trait `NotObjectSafe` cannot be made into an object
2   --> $DIR/object-unsafe-trait-in-return-position-dyn-trait.rs:21:13
3    |
4 LL |     fn foo() -> Self;
5    |        --- associated function `foo` has no `self` parameter
6 ...
7 LL | fn car() -> dyn NotObjectSafe {
8    |             ^^^^^^^^^^^^^^^^^ the trait `NotObjectSafe` cannot be made into an object
9
10 error[E0038]: the trait `NotObjectSafe` cannot be made into an object
11   --> $DIR/object-unsafe-trait-in-return-position-dyn-trait.rs:28:13
12    |
13 LL |     fn foo() -> Self;
14    |        --- associated function `foo` has no `self` parameter
15 ...
16 LL | fn cat() -> Box<dyn NotObjectSafe> {
17    |             ^^^^^^^^^^^^^^^^^^^^^^ the trait `NotObjectSafe` cannot be made into an object
18
19 error: aborting due to 2 previous errors
20
21 For more information about this error, try `rustc --explain E0038`.