]> git.proxmox.com Git - rustc.git/blame - src/test/ui/object-safety/object-safety-mentions-Self.object_safe_for_dispatch.stderr
New upstream version 1.48.0~beta.8+dfsg1
[rustc.git] / src / test / ui / object-safety / object-safety-mentions-Self.object_safe_for_dispatch.stderr
CommitLineData
e74abb32
XL
1error[E0038]: the trait `Bar` cannot be made into an object
2 --> $DIR/object-safety-mentions-Self.rs:24:5
3 |
74b04a01
XL
4LL | trait Bar {
5 | --- this trait cannot be made into an object...
e74abb32 6LL | fn bar(&self, x: &Self);
74b04a01 7 | ----- ...because method `bar` references the `Self` type in this parameter
e74abb32
XL
8...
9LL | t
10 | ^ the trait `Bar` cannot be made into an object
11 |
74b04a01 12 = help: consider moving `bar` to another trait
1b1a35ee 13 = note: required because of the requirements on the impl of `CoerceUnsized<&dyn Bar>` for `&T`
e74abb32
XL
14 = note: required by cast to type `&dyn Bar`
15
16error[E0038]: the trait `Baz` cannot be made into an object
17 --> $DIR/object-safety-mentions-Self.rs:30:5
18 |
74b04a01
XL
19LL | trait Baz {
20 | --- this trait cannot be made into an object...
e74abb32 21LL | fn baz(&self) -> Self;
74b04a01 22 | ---- ...because method `baz` references the `Self` type in its return type
e74abb32
XL
23...
24LL | t
25 | ^ the trait `Baz` cannot be made into an object
26 |
74b04a01 27 = help: consider moving `baz` to another trait
1b1a35ee 28 = note: required because of the requirements on the impl of `CoerceUnsized<&dyn Baz>` for `&T`
e74abb32
XL
29 = note: required by cast to type `&dyn Baz`
30
31error: aborting due to 2 previous errors
32
33For more information about this error, try `rustc --explain E0038`.