mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-23 07:14:28 +00:00
23 lines
340 B
Rust
23 lines
340 B
Rust
|
// issue: rust-lang/rust#126725
|
||
|
|
||
|
trait Foo {
|
||
|
fn foo<'a>() -> <&'a impl Sized as Bar>::Output;
|
||
|
//~^ ERROR `impl Trait` is not allowed in paths
|
||
|
}
|
||
|
|
||
|
trait Bar {
|
||
|
type Output;
|
||
|
}
|
||
|
|
||
|
impl<'a> Bar for &'a () {
|
||
|
type Output = &'a i32;
|
||
|
}
|
||
|
|
||
|
impl Foo for () {
|
||
|
fn foo<'a>() -> <&'a Self as Bar>::Output {
|
||
|
&0
|
||
|
}
|
||
|
}
|
||
|
|
||
|
fn main() {}
|