]> git.lizzy.rs Git - rust.git/blob - src/test/ui/object-safety/object-safety-mentions-Self.curr.stderr
2123e306b16a4c44f8617134aefc8d302d619252
[rust.git] / src / test / ui / object-safety / object-safety-mentions-Self.curr.stderr
1 error[E0038]: the trait `Bar` cannot be made into an object
2   --> $DIR/object-safety-mentions-Self.rs:22:30
3    |
4 LL |     fn bar(&self, x: &Self);
5    |        --- method `bar` references the `Self` type in its parameters or return type
6 ...
7 LL | fn make_bar<T:Bar>(t: &T) -> &dyn Bar {
8    |                              ^^^^^^^^ the trait `Bar` cannot be made into an object
9
10 error[E0038]: the trait `Baz` cannot be made into an object
11   --> $DIR/object-safety-mentions-Self.rs:28:30
12    |
13 LL |     fn baz(&self) -> Self;
14    |        --- method `baz` references the `Self` type in its parameters or return type
15 ...
16 LL | fn make_baz<T:Baz>(t: &T) -> &dyn Baz {
17    |                              ^^^^^^^^ the trait `Baz` 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`.