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
Copy file name to clipboardexpand all lines: tests/ui/impl-trait/in-trait/object-safety.stderr
+8-8
Original file line number
Diff line number
Diff line change
@@ -1,11 +1,11 @@
1
1
error[E0038]: the trait `Foo` cannot be made into an object
2
-
--> $DIR/object-safety.rs:16:33
2
+
--> $DIR/object-safety.rs:14:33
3
3
|
4
4
LL | let i = Box::new(42_u32) as Box<dyn Foo>;
5
5
| ^^^^^^^^^^^^ `Foo` cannot be made into an object
6
6
|
7
7
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>
error[E0038]: the trait `Foo` cannot be made into an object
17
-
--> $DIR/object-safety.rs:19:15
17
+
--> $DIR/object-safety.rs:17:15
18
18
|
19
19
LL | let s = i.baz();
20
20
| ^^^ `Foo` cannot be made into an object
21
21
|
22
22
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>
error[E0038]: the trait `Foo` cannot be made into an object
32
-
--> $DIR/object-safety.rs:19:13
32
+
--> $DIR/object-safety.rs:17:13
33
33
|
34
34
LL | let s = i.baz();
35
35
| ^^^^^^^ `Foo` cannot be made into an object
36
36
|
37
37
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>
error[E0038]: the trait `Foo` cannot be made into an object
47
-
--> $DIR/object-safety.rs:16:13
47
+
--> $DIR/object-safety.rs:14:13
48
48
|
49
49
LL | let i = Box::new(42_u32) as Box<dyn Foo>;
50
50
| ^^^^^^^^^^^^^^^^ `Foo` cannot be made into an object
51
51
|
52
52
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>
0 commit comments