mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-27 01:04:03 +00:00
19 lines
307 B
Rust
19 lines
307 B
Rust
//@ known-bug: rust-lang/rust#126646
|
|
mod foo {
|
|
pub trait Callable {
|
|
type Output;
|
|
fn call() -> Self::Output;
|
|
}
|
|
|
|
impl<'a, V: ?Sized> Callable for &'a () {
|
|
type Output = ();
|
|
}
|
|
}
|
|
use foo::*;
|
|
|
|
fn test<'a>() -> impl Sized {
|
|
<&'a () as Callable>::call()
|
|
}
|
|
|
|
fn main() {}
|