rust/tests/ui/lint/issue-102705.rs

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

23 lines
288 B
Rust
Raw Normal View History

//@ check-pass
#![allow(opaque_hidden_inferred_bound)]
#![allow(dead_code)]
trait Duh {}
impl Duh for i32 {}
trait Trait {
type Assoc: Duh;
}
impl<R: Duh, F: FnMut() -> R> Trait for F {
type Assoc = R;
}
fn foo() -> impl Trait<Assoc = impl Send> {
|| 42
}
fn main() {}