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
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^ `NonObjectSafe2` cannot be made into an object
19
+
| ^^^^^^^^^^^^^^^^^^ `NonObjectSafe2` cannot be made into an object
20
20
|
21
21
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>
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `NonObjectSafe4` cannot be made into an object
56
+
| ^^^^^^^^^^^^^^^^^^ `NonObjectSafe4` cannot be made into an object
57
57
|
58
58
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>
| ^^^^^^^^^^^^^^^^^^^^^^ `NotObjectSafe` cannot be made into an object
27
+
| ^^^^^^^^^^^^^^^^^ `NotObjectSafe` cannot be made into an object
28
28
|
29
29
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>
Copy file name to clipboardExpand all lines: src/test/ui/object-safety/object-safety-associated-consts.curr.stderr
+2-2
Original file line number
Diff line number
Diff line change
@@ -1,8 +1,8 @@
1
1
error[E0038]: the trait `Bar` cannot be made into an object
2
-
--> $DIR/object-safety-associated-consts.rs:12:30
2
+
--> $DIR/object-safety-associated-consts.rs:12:31
3
3
|
4
4
LL | fn make_bar<T:Bar>(t: &T) -> &dyn Bar {
5
-
| ^^^^^^^^ `Bar` cannot be made into an object
5
+
| ^^^^^^^ `Bar` 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>
Copy file name to clipboardExpand all lines: src/test/ui/object-safety/object-safety-bounds.stderr
+2-2
Original file line number
Diff line number
Diff line change
@@ -1,8 +1,8 @@
1
1
error[E0038]: the trait `X` cannot be made into an object
2
-
--> $DIR/object-safety-bounds.rs:7:11
2
+
--> $DIR/object-safety-bounds.rs:7:15
3
3
|
4
4
LL | fn f() -> Box<dyn X<U = u32>> {
5
-
| ^^^^^^^^^^^^^^^^^^^ `X` cannot be made into an object
5
+
| ^^^^^^^^^^^^^^ `X` 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>
Copy file name to clipboardExpand all lines: src/test/ui/object-safety/object-safety-generics.curr.stderr
+4-4
Original file line number
Diff line number
Diff line change
@@ -1,8 +1,8 @@
1
1
error[E0038]: the trait `Bar` cannot be made into an object
2
-
--> $DIR/object-safety-generics.rs:18:30
2
+
--> $DIR/object-safety-generics.rs:18:31
3
3
|
4
4
LL | fn make_bar<T:Bar>(t: &T) -> &dyn Bar {
5
-
| ^^^^^^^^ `Bar` cannot be made into an object
5
+
| ^^^^^^^ `Bar` 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>
8
8
--> $DIR/object-safety-generics.rs:10:8
@@ -14,10 +14,10 @@ LL | fn bar<T>(&self, t: T);
14
14
= help: consider moving `bar` to another trait
15
15
16
16
error[E0038]: the trait `Bar` cannot be made into an object
17
-
--> $DIR/object-safety-generics.rs:24:39
17
+
--> $DIR/object-safety-generics.rs:24:40
18
18
|
19
19
LL | fn make_bar_explicit<T:Bar>(t: &T) -> &dyn Bar {
20
-
| ^^^^^^^^ `Bar` cannot be made into an object
20
+
| ^^^^^^^ `Bar` 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>
Copy file name to clipboardExpand all lines: src/test/ui/object-safety/object-safety-mentions-Self.curr.stderr
+4-4
Original file line number
Diff line number
Diff line change
@@ -1,8 +1,8 @@
1
1
error[E0038]: the trait `Bar` cannot be made into an object
2
-
--> $DIR/object-safety-mentions-Self.rs:22:30
2
+
--> $DIR/object-safety-mentions-Self.rs:22:31
3
3
|
4
4
LL | fn make_bar<T:Bar>(t: &T) -> &dyn Bar {
5
-
| ^^^^^^^^ `Bar` cannot be made into an object
5
+
| ^^^^^^^ `Bar` 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>
8
8
--> $DIR/object-safety-mentions-Self.rs:11:22
@@ -14,10 +14,10 @@ LL | fn bar(&self, x: &Self);
14
14
= help: consider moving `bar` to another trait
15
15
16
16
error[E0038]: the trait `Baz` cannot be made into an object
17
-
--> $DIR/object-safety-mentions-Self.rs:28:30
17
+
--> $DIR/object-safety-mentions-Self.rs:28:31
18
18
|
19
19
LL | fn make_baz<T:Baz>(t: &T) -> &dyn Baz {
20
-
| ^^^^^^^^ `Baz` cannot be made into an object
20
+
| ^^^^^^^ `Baz` 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>
Copy file name to clipboardExpand all lines: src/test/ui/object-safety/object-safety-no-static.curr.stderr
+2-2
Original file line number
Diff line number
Diff line change
@@ -1,8 +1,8 @@
1
1
error[E0038]: the trait `Foo` cannot be made into an object
2
-
--> $DIR/object-safety-no-static.rs:12:18
2
+
--> $DIR/object-safety-no-static.rs:12:22
3
3
|
4
4
LL | fn diverges() -> Box<dyn Foo> {
5
-
| ^^^^^^^^^^^^ `Foo` cannot be made into an object
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>
Copy file name to clipboardExpand all lines: src/test/ui/object-safety/object-safety-sized-2.curr.stderr
+2-2
Original file line number
Diff line number
Diff line change
@@ -1,8 +1,8 @@
1
1
error[E0038]: the trait `Bar` cannot be made into an object
2
-
--> $DIR/object-safety-sized-2.rs:14:30
2
+
--> $DIR/object-safety-sized-2.rs:14:31
3
3
|
4
4
LL | fn make_bar<T:Bar>(t: &T) -> &dyn Bar {
5
-
| ^^^^^^^^ `Bar` cannot be made into an object
5
+
| ^^^^^^^ `Bar` 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>
Copy file name to clipboardExpand all lines: src/test/ui/object-safety/object-safety-sized.curr.stderr
+2-2
Original file line number
Diff line number
Diff line change
@@ -1,8 +1,8 @@
1
1
error[E0038]: the trait `Bar` cannot be made into an object
2
-
--> $DIR/object-safety-sized.rs:12:30
2
+
--> $DIR/object-safety-sized.rs:12:31
3
3
|
4
4
LL | fn make_bar<T:Bar>(t: &T) -> &dyn Bar {
5
-
| ^^^^^^^^ `Bar` cannot be made into an object
5
+
| ^^^^^^^ `Bar` 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>
0 commit comments