mirror of
https://github.com/rust-lang/rust.git
synced 2025-09-28 21:55:31 +00:00
30 lines
1.2 KiB
Plaintext
30 lines
1.2 KiB
Plaintext
error: implementation of `FnOnce` is not general enough
|
|
--> $DIR/higher-ranked-auto-trait-17.rs:12:5
|
|
|
|
|
LL | / async move {
|
|
LL | | let iter = Adaptor::new(a.iter().map(|_: &()| {}));
|
|
LL | | std::future::pending::<()>().await;
|
|
LL | | drop(iter);
|
|
LL | | }
|
|
| |_____^ implementation of `FnOnce` is not general enough
|
|
|
|
|
= note: closure with signature `fn(&'0 ())` must implement `FnOnce<(&'1 (),)>`, for any two lifetimes `'0` and `'1`...
|
|
= note: ...but it actually implements `FnOnce<(&(),)>`
|
|
|
|
error: implementation of `FnOnce` is not general enough
|
|
--> $DIR/higher-ranked-auto-trait-17.rs:12:5
|
|
|
|
|
LL | / async move {
|
|
LL | | let iter = Adaptor::new(a.iter().map(|_: &()| {}));
|
|
LL | | std::future::pending::<()>().await;
|
|
LL | | drop(iter);
|
|
LL | | }
|
|
| |_____^ implementation of `FnOnce` is not general enough
|
|
|
|
|
= note: closure with signature `fn(&'0 ())` must implement `FnOnce<(&'1 (),)>`, for any two lifetimes `'0` and `'1`...
|
|
= note: ...but it actually implements `FnOnce<(&(),)>`
|
|
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
|
|
|
|
error: aborting due to 2 previous errors
|
|
|