summaryrefslogtreecommitdiffstats
path: root/tests/ui/lint/issue-102705.rs
blob: 5bcc8950adafbf5d38c668421bee899bddea2015 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
// 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() {}