mirror of https://github.com/rust-lang/rust
41 lines
2.1 KiB
Plaintext
41 lines
2.1 KiB
Plaintext
error: implementation of `FnOnce` is not general enough
|
|
--> $DIR/issue-71955.rs:45:5
|
|
|
|
|
LL | foo(bar, "string", |s| s.len() == 5);
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ implementation of `FnOnce` is not general enough
|
|
|
|
|
= note: closure with signature `for<'a> fn(&'a &'2 str) -> bool` must implement `FnOnce<(&&'1 str,)>`, for any lifetime `'1`...
|
|
= note: ...but it actually implements `FnOnce<(&&'2 str,)>`, for some specific lifetime `'2`
|
|
|
|
error: implementation of `FnOnce` is not general enough
|
|
--> $DIR/issue-71955.rs:45:5
|
|
|
|
|
LL | foo(bar, "string", |s| s.len() == 5);
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ implementation of `FnOnce` is not general enough
|
|
|
|
|
= note: closure with signature `for<'a> fn(&'a &'2 str) -> bool` must implement `FnOnce<(&&'1 str,)>`, for any lifetime `'1`...
|
|
= note: ...but it actually implements `FnOnce<(&&'2 str,)>`, for some specific lifetime `'2`
|
|
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
|
|
|
|
error: implementation of `FnOnce` is not general enough
|
|
--> $DIR/issue-71955.rs:48:5
|
|
|
|
|
LL | foo(baz, "string", |s| s.0.len() == 5);
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ implementation of `FnOnce` is not general enough
|
|
|
|
|
= note: closure with signature `for<'a> fn(&'a Wrapper<'2>) -> bool` must implement `FnOnce<(&Wrapper<'1>,)>`, for any lifetime `'1`...
|
|
= note: ...but it actually implements `FnOnce<(&Wrapper<'2>,)>`, for some specific lifetime `'2`
|
|
|
|
error: implementation of `FnOnce` is not general enough
|
|
--> $DIR/issue-71955.rs:48:5
|
|
|
|
|
LL | foo(baz, "string", |s| s.0.len() == 5);
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ implementation of `FnOnce` is not general enough
|
|
|
|
|
= note: closure with signature `for<'a> fn(&'a Wrapper<'2>) -> bool` must implement `FnOnce<(&Wrapper<'1>,)>`, for any lifetime `'1`...
|
|
= note: ...but it actually implements `FnOnce<(&Wrapper<'2>,)>`, for some specific lifetime `'2`
|
|
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
|
|
|
|
error: aborting due to 4 previous errors
|
|
|