2023-04-12 08:32:15 -05:00
|
|
|
#![feature(impl_trait_in_assoc_type)]
|
2022-02-17 07:55:58 -06:00
|
|
|
|
|
|
|
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() {}
|