error[E0106]: missing lifetime specifier --> $DIR/opaque-used-in-extraneous-argument.rs:5:39 | LL | fn frob() -> impl Fn
+ '_ {} | ^^ expected named lifetime parameter | = help: this function's return type contains a borrowed value, but there is no value for it to be borrowed from help: consider using the `'static` lifetime, but this is uncommon unless you're returning a borrowed value from a `const` or a `static`, or if you will only have owned values | LL | fn frob() -> impl Fn
+ 'static {} | ~~~~~~~ error[E0412]: cannot find type `P` in this scope --> $DIR/opaque-used-in-extraneous-argument.rs:5:22 | LL | fn frob() -> impl Fn
+ '_ {} | ^ not found in this scope | help: you might be missing a type parameter | LL | fn frob
() -> impl Fn
+ '_ {} | +++ error[E0412]: cannot find type `T` in this scope --> $DIR/opaque-used-in-extraneous-argument.rs:5:34 | LL | fn frob() -> impl Fn
+ '_ {}
| ^ not found in this scope
|
help: you might be missing a type parameter
|
LL | fn frob + '_ {}
| +++
error[E0658]: the precise format of `Fn`-family traits' type parameters is subject to change
--> $DIR/opaque-used-in-extraneous-argument.rs:5:19
|
LL | fn frob() -> impl Fn + '_ {}
| ^^^^^^^^^^^^^^^^^ help: use parenthetical notation instead: `Fn(P) -> T`
|
= note: see issue #29625 + '_ {}
| ^^^^
error[E0061]: this function takes 0 arguments but 1 argument was supplied
--> $DIR/opaque-used-in-extraneous-argument.rs:19:5
|
LL | open_parent(&old_path)
| ^^^^^^^^^^^ ---------
| |
| unexpected argument of type `&impl FnOnce<{type error}, Output = {type error}> + Fn<{type error}> + 'static`
| help: remove the extra argument
|
note: function defined here
--> $DIR/opaque-used-in-extraneous-argument.rs:11:4
|
LL | fn open_parent<'path>() {
| ^^^^^^^^^^^
error: aborting due to 6 previous errors
Some errors have detailed explanations: E0061, E0106, E0412, E0658.
For more information about an error, try `rustc --explain E0061`.