2024-02-19 01:01:11 +01:00
|
|
|
trait FromResidual<R = <Self as Try>::Residual> {
|
|
|
|
|
fn from_residual(residual: R) -> Self;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
trait Try {
|
|
|
|
|
type Residual;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
fn w<'a, T: 'a, F: Fn(&'a T)>() {
|
|
|
|
|
let b: &dyn FromResidual = &();
|
2024-11-20 14:19:36 -08:00
|
|
|
//~^ ERROR: the trait `FromResidual` is not dyn compatible
|
|
|
|
|
//~| ERROR: the trait `FromResidual` is not dyn compatible
|
2025-01-24 04:06:47 +00:00
|
|
|
//~| ERROR the type parameter `R` must be explicitly specified
|
2024-02-19 01:01:11 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
fn main() {}
|