fork/rust
git clone https://git.julia.blue/fork/rust
3bcad65fbf6
master
1error[E0308]: mismatched types 2 --> $DIR/issue-71955.rs:54:5 3 | 4LL | foo(bar, "string", |s| s.len() == 5); 5 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ one type is more general than the other 6 | 7 = note: expected type `for<'r, 's> FnOnce<(&'r &'s str,)>` 8 found type `for<'r> FnOnce<(&'r &str,)>` 9note: this closure does not fulfill the lifetime requirements 10 --> $DIR/issue-71955.rs:54:24 11 | 12LL | foo(bar, "string", |s| s.len() == 5); 13 | ^^^^^^^^^^^^^^^^ 14note: the lifetime requirement is introduced here 15 --> $DIR/issue-71955.rs:34:9 16 | 17LL | F2: FnOnce(&<F1 as Parser>::Output) -> bool 18 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 19 20error[E0308]: mismatched types 21 --> $DIR/issue-71955.rs:54:5 22 | 23LL | foo(bar, "string", |s| s.len() == 5); 24 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ one type is more general than the other 25 | 26 = note: expected type `FnOnce<(&&str,)>` 27 found type `for<'r> FnOnce<(&'r &str,)>` 28note: this closure does not fulfill the lifetime requirements 29 --> $DIR/issue-71955.rs:54:24 30 | 31LL | foo(bar, "string", |s| s.len() == 5); 32 | ^^^^^^^^^^^^^^^^ 33note: the lifetime requirement is introduced here 34 --> $DIR/issue-71955.rs:34:44 35 | 36LL | F2: FnOnce(&<F1 as Parser>::Output) -> bool 37 | ^^^^ 38 39error[E0308]: mismatched types 40 --> $DIR/issue-71955.rs:58:5 41 | 42LL | foo(baz, "string", |s| s.0.len() == 5); 43 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ one type is more general than the other 44 | 45 = note: expected type `for<'r, 's> FnOnce<(&'r Wrapper<'s>,)>` 46 found type `for<'r> FnOnce<(&'r Wrapper<'_>,)>` 47note: this closure does not fulfill the lifetime requirements 48 --> $DIR/issue-71955.rs:58:24 49 | 50LL | foo(baz, "string", |s| s.0.len() == 5); 51 | ^^^^^^^^^^^^^^^^^^ 52note: the lifetime requirement is introduced here 53 --> $DIR/issue-71955.rs:34:9 54 | 55LL | F2: FnOnce(&<F1 as Parser>::Output) -> bool 56 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 57 58error[E0308]: mismatched types 59 --> $DIR/issue-71955.rs:58:5 60 | 61LL | foo(baz, "string", |s| s.0.len() == 5); 62 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ one type is more general than the other 63 | 64 = note: expected type `FnOnce<(&Wrapper<'_>,)>` 65 found type `for<'r> FnOnce<(&'r Wrapper<'_>,)>` 66note: this closure does not fulfill the lifetime requirements 67 --> $DIR/issue-71955.rs:58:24 68 | 69LL | foo(baz, "string", |s| s.0.len() == 5); 70 | ^^^^^^^^^^^^^^^^^^ 71note: the lifetime requirement is introduced here 72 --> $DIR/issue-71955.rs:34:44 73 | 74LL | F2: FnOnce(&<F1 as Parser>::Output) -> bool 75 | ^^^^ 76 77error: aborting due to 4 previous errors 78 79For more information about this error, try `rustc --explain E0308`.