summaryrefslogtreecommitdiffstats
path: root/tests/ui/impl-trait/issues/issue-82139.rs
blob: 3f0b0f1a8dee05b58122fcc67bdefc9801aef804 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#![feature(impl_trait_in_assoc_type)]

trait Trait {
    type Associated;
    fn func() -> Self::Associated;
}

trait Bound {}
pub struct Struct;

impl Trait for Struct {
    type Associated = impl Bound;

    fn func() -> Self::Associated {
        Some(42).map(|_| j) //~ ERROR cannot find value `j` in this scope
    }
}

fn main() {}