mirror of
https://github.com/rust-lang/rust
synced 2024-11-05 20:45:15 +00:00
14 lines
311 B
Rust
14 lines
311 B
Rust
trait Trait<'a> {}
|
|
impl<T> Trait<'_> for T {}
|
|
fn whatever() -> impl for<'a> Trait<'a> + for<'b> Trait<'b> {}
|
|
|
|
fn whatever2() -> impl for<'c> Fn(&'c ()) {
|
|
|_: &()| {}
|
|
}
|
|
|
|
fn main() {
|
|
let x: u32 = whatever();
|
|
//~^ ERROR mismatched types
|
|
let x2: u32 = whatever2();
|
|
//~^ ERROR mismatched types
|
|
}
|