mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-27 09:14:20 +00:00
20 lines
338 B
Rust
20 lines
338 B
Rust
#![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() {}
|