|
| 1 | +error[E0106]: missing lifetime specifier |
| 2 | + --> $DIR/opaque-used-in-extraneous-argument.rs:5:39 |
| 3 | + | |
| 4 | +LL | fn frob() -> impl Fn<P, Output = T> + '_ {} |
| 5 | + | ^^ expected named lifetime parameter |
| 6 | + | |
| 7 | + = help: this function's return type contains a borrowed value, but there is no value for it to be borrowed from |
| 8 | +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 |
| 9 | + | |
| 10 | +LL | fn frob() -> impl Fn<P, Output = T> + 'static {} |
| 11 | + | ~~~~~~~ |
| 12 | + |
| 13 | +error[E0412]: cannot find type `P` in this scope |
| 14 | + --> $DIR/opaque-used-in-extraneous-argument.rs:5:22 |
| 15 | + | |
| 16 | +LL | fn frob() -> impl Fn<P, Output = T> + '_ {} |
| 17 | + | ^ not found in this scope |
| 18 | + | |
| 19 | +help: you might be missing a type parameter |
| 20 | + | |
| 21 | +LL | fn frob<P>() -> impl Fn<P, Output = T> + '_ {} |
| 22 | + | +++ |
| 23 | + |
| 24 | +error[E0412]: cannot find type `T` in this scope |
| 25 | + --> $DIR/opaque-used-in-extraneous-argument.rs:5:34 |
| 26 | + | |
| 27 | +LL | fn frob() -> impl Fn<P, Output = T> + '_ {} |
| 28 | + | ^ not found in this scope |
| 29 | + | |
| 30 | +help: you might be missing a type parameter |
| 31 | + | |
| 32 | +LL | fn frob<T>() -> impl Fn<P, Output = T> + '_ {} |
| 33 | + | +++ |
| 34 | + |
| 35 | +error[E0658]: the precise format of `Fn`-family traits' type parameters is subject to change |
| 36 | + --> $DIR/opaque-used-in-extraneous-argument.rs:5:19 |
| 37 | + | |
| 38 | +LL | fn frob() -> impl Fn<P, Output = T> + '_ {} |
| 39 | + | ^^^^^^^^^^^^^^^^^ help: use parenthetical notation instead: `Fn(P) -> T` |
| 40 | + | |
| 41 | + = note: see issue #29625 <https://github.com/rust-lang/rust/issues/29625> for more information |
| 42 | + = help: add `#![feature(unboxed_closures)]` to the crate attributes to enable |
| 43 | + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date |
| 44 | + |
| 45 | +error[E0061]: this function takes 0 arguments but 1 argument was supplied |
| 46 | + --> $DIR/opaque-used-in-extraneous-argument.rs:16:20 |
| 47 | + | |
| 48 | +LL | let old_path = frob("hello"); |
| 49 | + | ^^^^ ------- |
| 50 | + | | |
| 51 | + | unexpected argument of type `&'static str` |
| 52 | + | help: remove the extra argument |
| 53 | + | |
| 54 | +note: function defined here |
| 55 | + --> $DIR/opaque-used-in-extraneous-argument.rs:5:4 |
| 56 | + | |
| 57 | +LL | fn frob() -> impl Fn<P, Output = T> + '_ {} |
| 58 | + | ^^^^ |
| 59 | + |
| 60 | +error[E0061]: this function takes 0 arguments but 1 argument was supplied |
| 61 | + --> $DIR/opaque-used-in-extraneous-argument.rs:19:5 |
| 62 | + | |
| 63 | +LL | open_parent(&old_path) |
| 64 | + | ^^^^^^^^^^^ --------- |
| 65 | + | | |
| 66 | + | unexpected argument of type `&impl FnOnce<{type error}, Output = {type error}> + Fn<{type error}> + 'static` |
| 67 | + | help: remove the extra argument |
| 68 | + | |
| 69 | +note: function defined here |
| 70 | + --> $DIR/opaque-used-in-extraneous-argument.rs:11:4 |
| 71 | + | |
| 72 | +LL | fn open_parent<'path>() { |
| 73 | + | ^^^^^^^^^^^ |
| 74 | + |
| 75 | +error: aborting due to 6 previous errors |
| 76 | + |
| 77 | +Some errors have detailed explanations: E0061, E0106, E0412, E0658. |
| 78 | +For more information about an error, try `rustc --explain E0061`. |
0 commit comments