rust/tests/ui/traits/object/canonicalize-fresh-infer-vars-issue-103626.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

16 lines
358 B
Rust
Raw Normal View History

2024-02-18 18:01:11 -06: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 = &();
//~^ ERROR: the trait `FromResidual` cannot be made into an object
//~| ERROR: the trait `FromResidual` cannot be made into an object
}
fn main() {}