blob: 064d0d64e0789c171cc976d385e53de343697933 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
error[E0308]: mismatched types
--> $DIR/return-dyn-type-mismatch.rs:15:21
|
LL | fn other_func() -> dyn TestTrait<MyType = T> {
| ------------------------- expected `(dyn TestTrait<MyType = T> + 'static)` because of return type
LL | match Self::func() {
LL | None => None,
| ^^^^ expected `dyn TestTrait`, found `Option<_>`
|
= note: expected trait object `(dyn TestTrait<MyType = T> + 'static)`
found enum `Option<_>`
error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
|