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: src/test/ui/associated-item/issue-48027.stderr
+15-15
Original file line number
Diff line number
Diff line change
@@ -1,18 +1,3 @@
1
-
error[E0038]: the trait `Bar` cannot be made into an object
2
-
--> $DIR/issue-48027.rs:6:6
3
-
|
4
-
LL | impl dyn Bar {}
5
-
| ^^^^^^^ `Bar` cannot be made into an object
6
-
|
7
-
= help: consider moving `X` to another trait
8
-
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>
9
-
--> $DIR/issue-48027.rs:2:11
10
-
|
11
-
LL | trait Bar {
12
-
| --- this trait cannot be made into an object...
13
-
LL | const X: usize;
14
-
| ^ ...because it contains this associated `const`
15
-
16
1
error[E0283]: type annotations needed
17
2
--> $DIR/issue-48027.rs:3:32
18
3
|
@@ -30,6 +15,21 @@ note: required by `Bar::X`
30
15
LL | const X: usize;
31
16
| ^^^^^^^^^^^^^^^
32
17
18
+
error[E0038]: the trait `Bar` cannot be made into an object
19
+
--> $DIR/issue-48027.rs:6:6
20
+
|
21
+
LL | impl dyn Bar {}
22
+
| ^^^^^^^ `Bar` cannot be made into an object
23
+
|
24
+
= help: consider moving `X` to another trait
25
+
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>
26
+
--> $DIR/issue-48027.rs:2:11
27
+
|
28
+
LL | trait Bar {
29
+
| --- this trait cannot be made into an object...
30
+
LL | const X: usize;
31
+
| ^ ...because it contains this associated `const`
32
+
33
33
error: aborting due to 2 previous errors
34
34
35
35
Some errors have detailed explanations: E0038, E0283.
= note: see issue #44874 <https://github.com/rust-lang/rust/issues/44874> for more information
8
8
= help: add `#![feature(arbitrary_self_types)]` to the crate attributes to enable
9
9
= help: consider changing to `self`, `&self`, `&mut self`, `self: Box<Self>`, `self: Rc<Self>`, `self: Arc<Self>`, or `self: Pin<P>` (where P is one of the previous types except `Self`)
10
10
11
-
error[E0658]: `*const Foo` cannot be used as the type of `self` without the `arbitrary_self_types` feature
0 commit comments