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/wf/wf-dyn-incompat-trait-obj-match.stderr
+3-7
Original file line number
Diff line number
Diff line change
@@ -31,14 +31,10 @@ LL | trait Trait: Sized {}
31
31
= note: required for the cast from `&S` to `&dyn Trait`
32
32
33
33
error[E0038]: the trait `Trait` cannot be made into an object
34
-
--> $DIR/wf-dyn-incompat-trait-obj-match.rs:25:25
34
+
--> $DIR/wf-dyn-incompat-trait-obj-match.rs:27:17
35
35
|
36
-
LL | let t: &dyn Trait = match opt() {
37
-
| _________________________^
38
-
LL | | Some(()) => &S,
39
-
LL | | None => &R,
40
-
LL | | };
41
-
| |_____^ `Trait` cannot be made into an object
36
+
LL | None => &R,
37
+
| ^^ `Trait` cannot be made into an object
42
38
|
43
39
note: for a trait to be "dyn-compatible" 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