]> git.lizzy.rs Git - rust.git/blob - src/test/ui/impl-trait/issues/issue-82139.rs
:arrow_up: rust-analyzer
[rust.git] / src / test / ui / impl-trait / issues / issue-82139.rs
1 #![feature(type_alias_impl_trait)]
2
3 trait Trait {
4     type Associated;
5     fn func() -> Self::Associated;
6 }
7
8 trait Bound {}
9 pub struct Struct;
10
11 impl Trait for Struct {
12     type Associated = impl Bound;
13
14     fn func() -> Self::Associated {
15         Some(42).map(|_| j) //~ ERROR cannot find value `j` in this scope
16     }
17 }
18
19 fn main() {}