|
| 1 | +error[E0308]: mismatched types |
| 2 | + --> $DIR/issue-105675.rs:5:5 |
| 3 | + | |
| 4 | +LL | thing(f); |
| 5 | + | ^^^^^^^^ one type is more general than the other |
| 6 | + | |
| 7 | + = note: expected trait `for<'a, 'b> FnOnce<(&'a u32, &'b u32, u32)>` |
| 8 | + found trait `for<'a> FnOnce<(&u32, &'a u32, u32)>` |
| 9 | +note: this closure does not fulfill the lifetime requirements |
| 10 | + --> $DIR/issue-105675.rs:4:13 |
| 11 | + | |
| 12 | +LL | let f = | _ , y: &u32 , z | (); |
| 13 | + | ^^^^^^^^^^^^^^^^^^^ |
| 14 | +note: the lifetime requirement is introduced here |
| 15 | + --> $DIR/issue-105675.rs:1:18 |
| 16 | + | |
| 17 | +LL | fn thing(x: impl FnOnce(&u32, &u32, u32)) {} |
| 18 | + | ^^^^^^^^^^^^^^^^^^^^^^^ |
| 19 | +help: consider specifying the type of the closure parameters |
| 20 | + | |
| 21 | +LL | let f = |_: &_, y: &u32, z| (); |
| 22 | + | ~~~~~~~~~~~~~~~~~~~ |
| 23 | + |
| 24 | +error[E0308]: mismatched types |
| 25 | + --> $DIR/issue-105675.rs:5:5 |
| 26 | + | |
| 27 | +LL | thing(f); |
| 28 | + | ^^^^^^^^ one type is more general than the other |
| 29 | + | |
| 30 | + = note: expected trait `for<'a, 'b> FnOnce<(&'a u32, &'b u32, u32)>` |
| 31 | + found trait `for<'a> FnOnce<(&u32, &'a u32, u32)>` |
| 32 | +note: this closure does not fulfill the lifetime requirements |
| 33 | + --> $DIR/issue-105675.rs:4:13 |
| 34 | + | |
| 35 | +LL | let f = | _ , y: &u32 , z | (); |
| 36 | + | ^^^^^^^^^^^^^^^^^^^ |
| 37 | +note: the lifetime requirement is introduced here |
| 38 | + --> $DIR/issue-105675.rs:1:18 |
| 39 | + | |
| 40 | +LL | fn thing(x: impl FnOnce(&u32, &u32, u32)) {} |
| 41 | + | ^^^^^^^^^^^^^^^^^^^^^^^ |
| 42 | + |
| 43 | +error[E0308]: mismatched types |
| 44 | + --> $DIR/issue-105675.rs:9:5 |
| 45 | + | |
| 46 | +LL | thing(f); |
| 47 | + | ^^^^^^^^ one type is more general than the other |
| 48 | + | |
| 49 | + = note: expected trait `for<'a, 'b> FnOnce<(&'a u32, &'b u32, u32)>` |
| 50 | + found trait `FnOnce<(&u32, &u32, u32)>` |
| 51 | +note: this closure does not fulfill the lifetime requirements |
| 52 | + --> $DIR/issue-105675.rs:8:13 |
| 53 | + | |
| 54 | +LL | let f = | x, y: _ , z: u32 | (); |
| 55 | + | ^^^^^^^^^^^^^^^^^^^^^ |
| 56 | +note: the lifetime requirement is introduced here |
| 57 | + --> $DIR/issue-105675.rs:1:18 |
| 58 | + | |
| 59 | +LL | fn thing(x: impl FnOnce(&u32, &u32, u32)) {} |
| 60 | + | ^^^^^^^^^^^^^^^^^^^^^^^ |
| 61 | +help: consider specifying the type of the closure parameters |
| 62 | + | |
| 63 | +LL | let f = |x: &_, y: &_, z: u32| (); |
| 64 | + | ~~~~~~~~~~~~~~~~~~~~~~ |
| 65 | + |
| 66 | +error[E0308]: mismatched types |
| 67 | + --> $DIR/issue-105675.rs:9:5 |
| 68 | + | |
| 69 | +LL | thing(f); |
| 70 | + | ^^^^^^^^ one type is more general than the other |
| 71 | + | |
| 72 | + = note: expected trait `for<'a, 'b> FnOnce<(&'a u32, &'b u32, u32)>` |
| 73 | + found trait `FnOnce<(&u32, &u32, u32)>` |
| 74 | +note: this closure does not fulfill the lifetime requirements |
| 75 | + --> $DIR/issue-105675.rs:8:13 |
| 76 | + | |
| 77 | +LL | let f = | x, y: _ , z: u32 | (); |
| 78 | + | ^^^^^^^^^^^^^^^^^^^^^ |
| 79 | +note: the lifetime requirement is introduced here |
| 80 | + --> $DIR/issue-105675.rs:1:18 |
| 81 | + | |
| 82 | +LL | fn thing(x: impl FnOnce(&u32, &u32, u32)) {} |
| 83 | + | ^^^^^^^^^^^^^^^^^^^^^^^ |
| 84 | +help: consider specifying the type of the closure parameters |
| 85 | + | |
| 86 | +LL | let f = |x: &_, y: &_, z: u32| (); |
| 87 | + | ~~~~~~~~~~~~~~~~~~~~~~ |
| 88 | + |
| 89 | +error: implementation of `FnOnce` is not general enough |
| 90 | + --> $DIR/issue-105675.rs:9:5 |
| 91 | + | |
| 92 | +LL | thing(f); |
| 93 | + | ^^^^^^^^ implementation of `FnOnce` is not general enough |
| 94 | + | |
| 95 | + = note: closure with signature `fn(&'2 u32, &u32, u32)` must implement `FnOnce<(&'1 u32, &u32, u32)>`, for any lifetime `'1`... |
| 96 | + = note: ...but it actually implements `FnOnce<(&'2 u32, &u32, u32)>`, for some specific lifetime `'2` |
| 97 | + |
| 98 | +error: implementation of `FnOnce` is not general enough |
| 99 | + --> $DIR/issue-105675.rs:9:5 |
| 100 | + | |
| 101 | +LL | thing(f); |
| 102 | + | ^^^^^^^^ implementation of `FnOnce` is not general enough |
| 103 | + | |
| 104 | + = note: closure with signature `fn(&u32, &'2 u32, u32)` must implement `FnOnce<(&u32, &'1 u32, u32)>`, for any lifetime `'1`... |
| 105 | + = note: ...but it actually implements `FnOnce<(&u32, &'2 u32, u32)>`, for some specific lifetime `'2` |
| 106 | + |
| 107 | +error: aborting due to 6 previous errors |
| 108 | + |
| 109 | +For more information about this error, try `rustc --explain E0308`. |
0 commit comments