e4d816e66c
Fixes #109869
20 lines
948 B
Plaintext
20 lines
948 B
Plaintext
error[E0308]: mismatched types
|
|
--> $DIR/ice-trait-with-default-method-but-no-impl-broken-mir-109869-1.rs:16:9
|
|
|
|
|
LL | fn from((from, ()): Spanned<F>) -> Self {
|
|
| ---- expected `(dyn Span<T> + 'static)` because of return type
|
|
LL | (T::from(from), ())
|
|
| ^^^^^^^^^^^^^^^^^^^ expected `dyn Span`, found `(T, ())`
|
|
|
|
|
= note: expected trait object `(dyn Span<T> + 'static)`
|
|
found tuple `(T, ())`
|
|
= help: `(T, ())` implements `Span` so you could box the found value and coerce it to the trait object `Box<dyn Span>`, you will have to change the expected type as well
|
|
help: call `Into::into` on this expression to convert `(T, ())` into `(dyn Span<T> + 'static)`
|
|
|
|
|
LL | (T::from(from), ()).into()
|
|
| +++++++
|
|
|
|
error: aborting due to 1 previous error
|
|
|
|
For more information about this error, try `rustc --explain E0308`.
|