You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
error[E0412]: cannot find type `MissingType` in this scope
2
+
--> $DIR/erroneous_signature.rs:2:22
3
+
|
4
+
LL | fn err(&self) -> MissingType;
5
+
| ^^^^^^^^^^^ not found in this scope
6
+
7
+
error[E0412]: cannot find type `MissingType` in this scope
8
+
--> $DIR/erroneous_signature.rs:7:22
9
+
|
10
+
LL | fn err(&self) -> MissingType {
11
+
| ^^^^^^^^^^^ not found in this scope
12
+
13
+
error[E0038]: the trait `Foo` cannot be made into an object
14
+
--> $DIR/erroneous_signature.rs:13:24
15
+
|
16
+
LL | fn coerce(x: &i32) -> &dyn Foo {
17
+
| ^^^^^^^ `Foo` cannot be made into an object
18
+
|
19
+
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>
20
+
--> $DIR/erroneous_signature.rs:2:8
21
+
|
22
+
LL | trait Foo {
23
+
| --- this trait cannot be made into an object...
24
+
LL | fn err(&self) -> MissingType;
25
+
| ^^^ ...because method `err` has errors in its signature
26
+
= help: consider moving `err` to another trait
27
+
= help: only type `i32` implements the trait, consider using it directly instead
28
+
29
+
error: aborting due to 3 previous errors
30
+
31
+
Some errors have detailed explanations: E0038, E0412.
32
+
For more information about an error, try `rustc --explain E0038`.
0 commit comments