rust/tests/ui/impl-trait/diagnostics/fully-qualified-path-impl-trait.rs

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

16 lines
321 B
Rust
Raw Normal View History

2022-02-14 06:25:26 -06:00
trait Foo<T> {
fn foo(self, f: impl FnOnce());
}
impl<T> Foo<T> for () {
fn foo(self, f: impl FnOnce()) {
f()
}
}
fn main() {
// FIXME: This should ideally use a fully qualified path
// without mentioning the generic arguments of `foo`.
().foo(|| ()) //~ ERROR type annotations needed
}