2024-01-17 08:23:41 -06:00
error[E0106]: missing lifetime specifier
--> $DIR/opaque-used-in-extraneous-argument.rs:5:39
|
LL | fn frob() -> impl Fn<P, Output = T> + '_ {}
| ^^ 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<P, Output = T> + 'static {}
| ~~~~~~~
error[E0412]: cannot find type `P` in this scope
--> $DIR/opaque-used-in-extraneous-argument.rs:5:22
|
LL | fn frob() -> impl Fn<P, Output = T> + '_ {}
| ^ not found in this scope
|
help: you might be missing a type parameter
|
LL | fn frob<P>() -> impl Fn<P, Output = T> + '_ {}
| +++
error[E0412]: cannot find type `T` in this scope
--> $DIR/opaque-used-in-extraneous-argument.rs:5:34
|
LL | fn frob() -> impl Fn<P, Output = T> + '_ {}
| ^ not found in this scope
|
help: you might be missing a type parameter
|
LL | fn frob<T>() -> impl Fn<P, Output = T> + '_ {}
| +++
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<P, Output = T> + '_ {}
| ^^^^^^^^^^^^^^^^^ help: use parenthetical notation instead: `Fn(P) -> T`
|
= note: see issue #29625 <https://github.com/rust-lang/rust/issues/29625> for more information
= help: add `#![feature(unboxed_closures)]` to the crate attributes to enable
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
2024-03-20 11:52:54 -05:00
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<P, Output = T> + '_ {}
| ^^^^^^^^^^^^^^^^^ help: use parenthetical notation instead: `Fn(P) -> T`
|
= note: see issue #29625 <https://github.com/rust-lang/rust/issues/29625> for more information
= help: add `#![feature(unboxed_closures)]` to the crate attributes to enable
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
2024-01-17 08:23:41 -06:00
error[E0061]: this function takes 0 arguments but 1 argument was supplied
2024-03-20 11:52:54 -05:00
--> $DIR/opaque-used-in-extraneous-argument.rs:17:20
2024-01-17 08:23:41 -06:00
|
LL | let old_path = frob("hello");
2024-07-05 14:40:09 -05:00
| ^^^^ ------- unexpected argument of type `&'static str`
2024-01-17 08:23:41 -06:00
|
note: function defined here
--> $DIR/opaque-used-in-extraneous-argument.rs:5:4
|
LL | fn frob() -> impl Fn<P, Output = T> + '_ {}
| ^^^^
2024-07-05 14:40:09 -05:00
help: remove the extra argument
|
LL - let old_path = frob("hello");
LL + let old_path = frob();
|
2024-01-17 08:23:41 -06:00
error[E0061]: this function takes 0 arguments but 1 argument was supplied
2024-03-20 11:52:54 -05:00
--> $DIR/opaque-used-in-extraneous-argument.rs:20:5
2024-01-17 08:23:41 -06:00
|
LL | open_parent(&old_path)
2024-07-05 14:40:09 -05:00
| ^^^^^^^^^^^ --------- unexpected argument of type `&impl FnOnce<{type error}, Output = {type error}> + Fn<{type error}> + 'static`
2024-01-17 08:23:41 -06:00
|
note: function defined here
2024-03-20 11:52:54 -05:00
--> $DIR/opaque-used-in-extraneous-argument.rs:12:4
2024-01-17 08:23:41 -06:00
|
LL | fn open_parent<'path>() {
| ^^^^^^^^^^^
2024-07-05 14:40:09 -05:00
help: remove the extra argument
|
LL - open_parent(&old_path)
LL + open_parent()
|
2024-01-17 08:23:41 -06:00
2024-03-20 11:52:54 -05:00
error: aborting due to 7 previous errors
2024-01-17 08:23:41 -06:00
Some errors have detailed explanations: E0061, E0106, E0412, E0658.
For more information about an error, try `rustc --explain E0061`.