rust/tests/ui/impl-trait/printing-binder.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

15 lines
311 B
Rust
Raw Normal View History

2022-06-22 04:27:15 +00:00
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
}